From 64ba72efefacfcd32a8d36417c398430a797f102 Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Wed, 27 Jan 2021 14:57:44 +0530 Subject: [PATCH 01/60] circleci chagnes --- .circleci/config.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 334a941..44ed126 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,6 +39,16 @@ builddeploy_steps: &builddeploy_steps ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar source buildenvvar ./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME} + #testing code changes + if [[ true ]]; then + ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-qa-appvar + source buildenvvar + curl --request POST \ + --url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \ + --header "Circle-Token: ${QA_USER_TOKEN}" \ + --header 'content-type: application/json' \ + --data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_automatedtesting":true}}' + fi jobs: @@ -84,7 +94,12 @@ jobs: workflows: version: 2 + parameters: + run_automatedtesting: + default: false + type: boolean build: + when: not << pipeline.parameters.run_automatedtesting >> jobs: # Development builds are executed on "develop" branch only. - "build-dev": @@ -93,6 +108,7 @@ workflows: branches: only: - develop + - dev-circleci # Production builds are exectuted only on tagged commits to the # master branch. @@ -102,13 +118,12 @@ workflows: branches: only: master + testingflow: + when: << pipeline.parameters.run_automatedtesting >> + jobs: - "Run-Newman-Test": - context : org-global - requires: - - build-dev - - build-prod + context : org-global filters: branches: only: - - automated-postman-testing - - develop \ No newline at end of file + - dev-circleci \ No newline at end of file From e70ce36bc81de4a176faa8e3eccfb40c1bbc8636 Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Wed, 27 Jan 2021 15:01:32 +0530 Subject: [PATCH 02/60] circleci chagnes --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 44ed126..5359143 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,8 @@ version: 2 +parameters: + run_automatedtesting: + default: false + type: boolean defaults: &defaults docker: - image: circleci/python:2.7-stretch-browsers @@ -94,10 +98,6 @@ jobs: workflows: version: 2 - parameters: - run_automatedtesting: - default: false - type: boolean build: when: not << pipeline.parameters.run_automatedtesting >> jobs: From fa3d4da6f86d41fd0c15c182404cd5be873d8e5e Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Wed, 27 Jan 2021 15:18:49 +0530 Subject: [PATCH 03/60] circleci chagnes --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5359143..7773fd0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,4 @@ -version: 2 +version: 2.1 parameters: run_automatedtesting: default: false @@ -99,7 +99,8 @@ jobs: workflows: version: 2 build: - when: not << pipeline.parameters.run_automatedtesting >> + when: + - not << pipeline.parameters.run_automatedtesting >> jobs: # Development builds are executed on "develop" branch only. - "build-dev": From 0343813691b19dbfcc1dda1ad05fe4eaf2315419 Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Wed, 27 Jan 2021 15:20:40 +0530 Subject: [PATCH 04/60] circleci chagnes --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7773fd0..8118dcb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -100,7 +100,7 @@ workflows: version: 2 build: when: - - not << pipeline.parameters.run_automatedtesting >> + - not: << pipeline.parameters.run_automatedtesting >> jobs: # Development builds are executed on "develop" branch only. - "build-dev": From 251206973081423f3e4ad136d95d40fe138e087e Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Wed, 27 Jan 2021 15:35:32 +0530 Subject: [PATCH 05/60] circleci chagnes --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8118dcb..be78437 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -99,8 +99,7 @@ jobs: workflows: version: 2 build: - when: - - not: << pipeline.parameters.run_automatedtesting >> + when: not << pipeline.parameters.run_automatedtesting >> jobs: # Development builds are executed on "develop" branch only. - "build-dev": From aae6d4a5d1d2406149400a421e61c1e969b31224 Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Wed, 27 Jan 2021 17:09:35 +0530 Subject: [PATCH 06/60] circleci chagnes --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index be78437..0334f92 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,6 +30,7 @@ save_cache_settings: &save_cache_settings builddeploy_steps: &builddeploy_steps - checkout - setup_remote_docker + - run: echo "<< pipeline.parameters.run_automatedtesting >>" - run: *install_dependency - run: *install_deploysuite - restore_cache: *restore_cache_settings_for_build From bcf0bf0c6c358c06ea7f068ab20f0b7522583ac5 Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Wed, 27 Jan 2021 17:15:11 +0530 Subject: [PATCH 07/60] circleci chagnes --- .circleci/config.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0334f92..72c81c0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,6 +3,9 @@ parameters: run_automatedtesting: default: false type: boolean + run_basedeployment: + default: true + type: boolean defaults: &defaults docker: - image: circleci/python:2.7-stretch-browsers @@ -52,7 +55,7 @@ builddeploy_steps: &builddeploy_steps --url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \ --header "Circle-Token: ${QA_USER_TOKEN}" \ --header 'content-type: application/json' \ - --data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_automatedtesting":true}}' + --data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_automatedtesting":true , "run_basedeployment": false}}' fi @@ -100,7 +103,7 @@ jobs: workflows: version: 2 build: - when: not << pipeline.parameters.run_automatedtesting >> + when: << pipeline.parameters.run_basedeployment >> jobs: # Development builds are executed on "develop" branch only. - "build-dev": From 46c3cc171b677f517f064881a825176ec94d95a5 Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Wed, 27 Jan 2021 17:29:16 +0530 Subject: [PATCH 08/60] circleci chagnes --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 72c81c0..946453a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,7 +49,7 @@ builddeploy_steps: &builddeploy_steps ./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME} #testing code changes if [[ true ]]; then - ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-qa-appvar + ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-qa-v1-appvar source buildenvvar curl --request POST \ --url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \ From 0a007654aeb293da745df8a74e7dcbfda8e39bf9 Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Thu, 28 Jan 2021 12:38:57 +0530 Subject: [PATCH 09/60] circleci chagnes --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 946453a..7a8fa23 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,6 @@ save_cache_settings: &save_cache_settings builddeploy_steps: &builddeploy_steps - checkout - setup_remote_docker - - run: echo "<< pipeline.parameters.run_automatedtesting >>" - run: *install_dependency - run: *install_deploysuite - restore_cache: *restore_cache_settings_for_build From f3686b7d86db8200d4dbf4acbcf35d5bd38dd72e Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Wed, 3 Feb 2021 16:09:32 +0530 Subject: [PATCH 10/60] approval --- .circleci/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7a8fa23..4ca633e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -124,8 +124,12 @@ workflows: testingflow: when: << pipeline.parameters.run_automatedtesting >> jobs: + - Hold [Performance-Testing]: + type: approval - "Run-Newman-Test": - context : org-global + context : org-global + requires: + - Hold [Performance-Testing] filters: branches: only: From fbe3324df1fb78c6d838559e1b94d7f94a75ef5c Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Thu, 11 Feb 2021 20:10:37 +0530 Subject: [PATCH 11/60] Update config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4ca633e..3640bf5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -113,7 +113,7 @@ workflows: - develop - dev-circleci - # Production builds are exectuted only on tagged commits to the + # Production builds are exectuted only on tagged commits to the testing # master branch. - "build-prod": context : org-global @@ -133,4 +133,4 @@ workflows: filters: branches: only: - - dev-circleci \ No newline at end of file + - dev-circleci From e7cc058e8e9b6673f74bb1ecce70d23ed6a06f06 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Mon, 8 Mar 2021 16:02:04 +0200 Subject: [PATCH 12/60] Updated postman tests + new circleci configs --- .circleci/config.yml | 1 + PoC-test.md | 44 - ReadMe.md | 32 +- Verification.md | 96 +- env.sh | 4 +- package.json | 1 - src/scripts/create-tables.js | 2 +- .../ResourceRolePhaseDependencyService.js | 4 +- src/services/ResourceRoleService.js | 4 +- src/services/ResourceService.js | 2 + test/e2e/createResource.test.js | 418 ---- test/e2e/createResourceRole.test.js | 154 -- .../createResourceRolePhaseDependency.test.js | 177 -- test/e2e/deleteResource.test.js | 234 --- .../deleteResourceRolePhaseDependency.test.js | 73 - test/e2e/edgeCasesForResourceService.test.js | 52 - .../getResourceRolePhaseDependencies.test.js | 105 - test/e2e/getResourceRoles.test.js | 69 - test/e2e/getResources.test.js | 196 -- test/e2e/listChallengesByMember.test.js | 126 -- test/e2e/test.js | 199 -- test/e2e/updateResourceRole.test.js | 171 -- .../updateResourceRolePhaseDependency.test.js | 169 -- test/postman/newman.js | 88 + .../resource-api.postman_collection.json | 1820 +++++++++++++++-- .../resource-api.postman_environment.json | 19 +- .../create-dependency-with-invalid-data.json | 59 + .../create-dependency.json | 5 - .../get-dependencies-with-invalid-data.json | 34 + .../update-dependency-with-invalid-data.json | 59 + .../update-dependency.json | 5 - ...reate-resource-role-with-invalid-data.json | 79 + .../get-resource-role-with-invalid-data.json | 79 + ...pdate-resource-role-with-invalid-data.json | 79 + .../resource/create-resource-by-admin.json | 18 + .../resource/create-resource-by-m2m.json | 18 + .../create-resource-with-invalid-data.json | 104 + .../create-resource-with-invalid-tokens.json | 26 + ...elete-resource-with-invalid-parameter.json | 70 + .../delete-resource-with-invalid-tokens.json | 21 + ...ources-by-member-with-different-users.json | 18 + ...rces-by-member-with-invalid-parameter.json | 19 + ...sources-by-member-with-invalid-tokens.json | 25 + ...esources-by-member-with-resource-role.json | 14 + .../get-resources-with-all-parameters.json | 26 + .../get-resources-with-invalid-data.json | 242 +++ ...get-resources-with-required-parameter.json | 30 + 47 files changed, 2843 insertions(+), 2447 deletions(-) delete mode 100644 PoC-test.md delete mode 100644 test/e2e/createResource.test.js delete mode 100644 test/e2e/createResourceRole.test.js delete mode 100644 test/e2e/createResourceRolePhaseDependency.test.js delete mode 100644 test/e2e/deleteResource.test.js delete mode 100644 test/e2e/deleteResourceRolePhaseDependency.test.js delete mode 100644 test/e2e/edgeCasesForResourceService.test.js delete mode 100644 test/e2e/getResourceRolePhaseDependencies.test.js delete mode 100644 test/e2e/getResourceRoles.test.js delete mode 100644 test/e2e/getResources.test.js delete mode 100644 test/e2e/listChallengesByMember.test.js delete mode 100644 test/e2e/test.js delete mode 100644 test/e2e/updateResourceRole.test.js delete mode 100644 test/e2e/updateResourceRolePhaseDependency.test.js create mode 100644 test/postman/testData/resource-role-phase-dependency/create-dependency-with-invalid-data.json create mode 100644 test/postman/testData/resource-role-phase-dependency/get-dependencies-with-invalid-data.json create mode 100644 test/postman/testData/resource-role-phase-dependency/update-dependency-with-invalid-data.json create mode 100644 test/postman/testData/resource-role/create-resource-role-with-invalid-data.json create mode 100644 test/postman/testData/resource-role/get-resource-role-with-invalid-data.json create mode 100644 test/postman/testData/resource-role/update-resource-role-with-invalid-data.json create mode 100644 test/postman/testData/resource/create-resource-by-admin.json create mode 100644 test/postman/testData/resource/create-resource-by-m2m.json create mode 100644 test/postman/testData/resource/create-resource-with-invalid-data.json create mode 100644 test/postman/testData/resource/create-resource-with-invalid-tokens.json create mode 100644 test/postman/testData/resource/delete-resource-with-invalid-parameter.json create mode 100644 test/postman/testData/resource/delete-resource-with-invalid-tokens.json create mode 100644 test/postman/testData/resource/get-resources-by-member-with-different-users.json create mode 100644 test/postman/testData/resource/get-resources-by-member-with-invalid-parameter.json create mode 100644 test/postman/testData/resource/get-resources-by-member-with-invalid-tokens.json create mode 100644 test/postman/testData/resource/get-resources-by-member-with-resource-role.json create mode 100644 test/postman/testData/resource/get-resources-with-all-parameters.json create mode 100644 test/postman/testData/resource/get-resources-with-invalid-data.json create mode 100644 test/postman/testData/resource/get-resources-with-required-parameter.json diff --git a/.circleci/config.yml b/.circleci/config.yml index 3640bf5..506262a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -133,4 +133,5 @@ workflows: filters: branches: only: + - develop - dev-circleci diff --git a/PoC-test.md b/PoC-test.md deleted file mode 100644 index e8781d0..0000000 --- a/PoC-test.md +++ /dev/null @@ -1,44 +0,0 @@ -# Postman PoC test -## Prerequisite -- start db and es: - ```bash - $ cd resources-api/local - $ docker-compose up - ``` -- create tables: - ```bash - $ cd resources-api - - # NOTE: - # if tables and data already exist, please run first - - # $ npm run drop-tables:test - - # to drop data and tables - - $ npm run create-tables:test - ``` -- start mock challenge api: - ``` - $ cd resources-api/mock - $ npm run mock-challenge-api - ``` -- start app - ```bash - $ cd resources-api - $ source env.sh # set env variables - $ NODE_ENV=test npm start - ``` - -## newman test - ```bash - $ npm run test:newman - ``` - -## Postman test -Please refer to: https://drive.google.com/file/d/1VcTtNwI5_TXgnEKT4TruqG0Z-ts0J83G/view?usp=sharing - - -## Postman mock server -E2E tests use nock to mock `BUSAPI_URL`, where postman mock server could be used to replace nock. -Please refer to: https://drive.google.com/file/d/1GXMzyqpzwix-LDBwieiRFfpJlJxrTIgI/view?usp=sharing \ No newline at end of file diff --git a/ReadMe.md b/ReadMe.md index 4610182..88e7994 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -168,14 +168,32 @@ To run unit tests and generate coverage report. npm run test ``` -### Running integration tests +### Running E2E tests with Postman -#### You need to `stop` the app server and mock API server before running e2e tests. +#### `Start` the app server and mock API server before running e2e tests. You may need to set the env variables by calling `source env.sh` before calling `npm start`. -To run integration tests and generate coverage report. +- Make sure the db and es are started +```bash + $ cd resources-api + + # NOTE: + # if tables and data already exist, please run first + + # $ npm run drop-tables + + # to drop data and tables + + # Then re-initialize the es server and the database. + + $ npm run create-tables + $ npm run init-es force + $ npm run init-db +``` + +To run postman e2e tests. ```bash -npm run e2e +npm run test:newman ``` ## Running tests in CI @@ -183,8 +201,4 @@ npm run e2e ## Verification -Refer to the verification document `Verification.md` - -## Postman PoC test - -Refer to the PoC test document [**PoC-test.md**](PoC-test.md) \ No newline at end of file +Refer to the verification document `Verification.md`. \ No newline at end of file diff --git a/Verification.md b/Verification.md index 5c525c3..6abce48 100644 --- a/Verification.md +++ b/Verification.md @@ -37,41 +37,61 @@ All files | 88.69 | 83.7 | 90.43 | 88 ResourceRoleService.js | 96.55 | 90 | 100 | 95.35 | 60,96 ResourceService.js | 100 | 100 | 100 | 100 | -## E2E test Coverage - - 170 passing (1m) - -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s --------------------------------------------|----------|----------|----------|----------|------------------- -All files | 95.8 | 89.63 | 99.17 | 95.57 | - resources-api | 96.26 | 85.96 | 100 | 96.12 | - app-bootstrap.js | 100 | 100 | 100 | 100 | - app-constants.js | 100 | 100 | 100 | 100 | - app-routes.js | 97.62 | 96.15 | 100 | 97.62 | 25 - app.js | 94.23 | 77.42 | 100 | 94.23 | 45,75,91 - resources-api/config | 100 | 98.78 | 100 | 100 | - default.js | 100 | 98.78 | 100 | 100 | 35 - test.js | 100 | 100 | 100 | 100 | - resources-api/src | 100 | 100 | 100 | 100 | - routes.js | 100 | 100 | 100 | 100 | - resources-api/src/common | 91.19 | 75 | 98.11 | 90.95 | - errors.js | 100 | 50 | 100 | 100 | 23 - helper.js | 90.13 | 78.57 | 97.37 | 89.73 |... 69,364,374,390 - logger.js | 92.31 | 65 | 100 | 92.31 | 31,53,58,82,116 - resources-api/src/controllers | 100 | 100 | 100 | 100 | - HealthCheckController.js | 100 | 100 | 100 | 100 | - ResourceController.js | 100 | 100 | 100 | 100 | - ResourceRoleController.js | 100 | 100 | 100 | 100 | - ResourceRolePhaseDependencyController.js | 100 | 100 | 100 | 100 | - resources-api/src/models | 100 | 50 | 100 | 100 | - MemberProfile.js | 100 | 100 | 100 | 100 | - MemberStats.js | 100 | 100 | 100 | 100 | - Resource.js | 100 | 100 | 100 | 100 | - ResourceRole.js | 100 | 100 | 100 | 100 | - ResourceRolePhaseDependency.js | 100 | 100 | 100 | 100 | - index.js | 100 | 50 | 100 | 100 | 8,18 - resources-api/src/services | 98.24 | 96.45 | 100 | 98.06 | - HealthCheckService.js | 100 | 100 | 100 | 100 | - ResourceRolePhaseDependencyService.js | 94.83 | 87.5 | 100 | 94.74 | 77,113,136 - ResourceRoleService.js | 96.55 | 90 | 100 | 95.35 | 60,96 - ResourceService.js | 100 | 100 | 100 | 100 | +## E2E testing with Postman + +You should be able to find the tests result from the command window of running `npm run test:newman` for each test case. + +### Postman mock server +E2E tests use nock to mock `BUSAPI_URL`, where postman mock server could be used to replace nock. +Please refer to: https://drive.google.com/file/d/1GXMzyqpzwix-LDBwieiRFfpJlJxrTIgI/view?usp=sharing + +Below is a sample output result of finding resources by member. + +``` +resource-api + +Iteration 1/4 + +❏ Resources / list challenge by member +↳ get challenges by member with resource role + GET http://localhost:3000/v5/resources/16096823/challenges?resourceRoleId=c943cb74-37bb-409a-994e-1cd28fbbb7b5 [200 OK, 702B, 11ms] + ✓ Status code is 200 + +Iteration 2/4 + +↳ get challenges by member with resource role + GET http://localhost:3000/v5/resources/16096823/challenges?resourceRoleId=c943cb74-37bb-409a-994e-1cd28fbbb7b5 [200 OK, 702B, 17ms] + ✓ Status code is 200 + +Iteration 3/4 + +↳ get challenges by member with resource role + GET http://localhost:3000/v5/resources/16096823/challenges?resourceRoleId=c943cb74-37bb-409a-994e-1cd28fbbb7b5 [200 OK, 702B, 21ms] + ✓ Status code is 200 + +Iteration 4/4 + +↳ get challenges by member with resource role + GET http://localhost:3000/v5/resources/not_exist_user/challenges?resourceRoleId=c943cb74-37bb-409a-994e-1cd28fbbb7b5 [200 OK, 397B, 24ms] + ✓ Status code is 200 + +┌─────────────────────────┬──────────────────┬──────────────────┐ +│ │ executed │ failed │ +├─────────────────────────┼──────────────────┼──────────────────┤ +│ iterations │ 4 │ 0 │ +├─────────────────────────┼──────────────────┼──────────────────┤ +│ requests │ 4 │ 0 │ +├─────────────────────────┼──────────────────┼──────────────────┤ +│ test-scripts │ 4 │ 0 │ +├─────────────────────────┼──────────────────┼──────────────────┤ +│ prerequest-scripts │ 0 │ 0 │ +├─────────────────────────┼──────────────────┼──────────────────┤ +│ assertions │ 4 │ 0 │ +├─────────────────────────┴──────────────────┴──────────────────┤ +│ total run duration: 207ms │ +├───────────────────────────────────────────────────────────────┤ +│ total data received: 122B (approx) │ +├───────────────────────────────────────────────────────────────┤ +│ average response time: 18ms [min: 11ms, max: 24ms, s.d.: 4ms] │ +└───────────────────────────────────────────────────────────────┘ +``` \ No newline at end of file diff --git a/env.sh b/env.sh index db4faaf..70ff940 100644 --- a/env.sh +++ b/env.sh @@ -1,7 +1,7 @@ #!/bin/sh -export AUTH0_CLIENT_ID= +export AUTH0_CLIENT_ID=jGIf2pd3f44B1jqvOai30BIKTZanYBfU -export AUTH0_CLIENT_SECRET= +export AUTH0_CLIENT_SECRET=ldzqVaVEbqhwjM5KtZ79sG8djZpAVK8Z7qieVcC3vRjI4NirgcinKSBpPwk6mYYP export AUTH0_AUDIENCE=https://m2m.topcoder-dev.com/ diff --git a/package.json b/package.json index f44e466..7f636f3 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "view-data": "node src/scripts/view-data.js", "mock-challenge-api": "NODE_ENV=test node mock/mock-challenge-api", "test": "nyc --reporter=html --reporter=text mocha test/unit/test.js --require test/common/prepare.js --timeout 60000 --exit", - "e2e": "nyc --reporter=html --reporter=text mocha test/e2e/test.js --require test/common/prepare.js --timeout 60000 --exit", "test:newman": "node test/postman/newman.js" }, "author": "TCSCODER", diff --git a/src/scripts/create-tables.js b/src/scripts/create-tables.js index 2f52ef9..818699b 100644 --- a/src/scripts/create-tables.js +++ b/src/scripts/create-tables.js @@ -9,7 +9,7 @@ const logger = require('../common/logger') logger.info('Requesting to create tables...') const promises = [] -const skipModels = ['DynamoDB', 'MemberStats', 'MemberProfile'] +const skipModels = ['DynamoDB', 'MemberProfile'] Object.keys(models).forEach(modelName => { if (!includes(skipModels, modelName)) { diff --git a/src/services/ResourceRolePhaseDependencyService.js b/src/services/ResourceRolePhaseDependencyService.js index 3d6d0e7..f83c3e6 100644 --- a/src/services/ResourceRolePhaseDependencyService.js +++ b/src/services/ResourceRolePhaseDependencyService.js @@ -7,7 +7,7 @@ const config = require('config') const Joi = require('joi') const { v4: uuid } = require('uuid') const helper = require('../common/helper') -// const logger = require('../common/logger') +const logger = require('../common/logger') const errors = require('../common/errors') /** @@ -155,4 +155,4 @@ module.exports = { deleteDependency } -// logger.buildService(module.exports) +logger.buildService(module.exports) diff --git a/src/services/ResourceRoleService.js b/src/services/ResourceRoleService.js index ba873b5..1024c3a 100644 --- a/src/services/ResourceRoleService.js +++ b/src/services/ResourceRoleService.js @@ -7,7 +7,7 @@ const config = require('config') const Joi = require('joi') const { v4: uuid } = require('uuid') const helper = require('../common/helper') -// const logger = require('../common/logger') +const logger = require('../common/logger') const payloadFields = ['id', 'name', 'legacyId', 'fullReadAccess', 'fullWriteAccess', 'isActive', 'selfObtainable'] @@ -122,4 +122,4 @@ module.exports = { updateResourceRole } -// logger.buildService(module.exports) +logger.buildService(module.exports) diff --git a/src/services/ResourceService.js b/src/services/ResourceService.js index 5531c3e..d0e96f4 100644 --- a/src/services/ResourceService.js +++ b/src/services/ResourceService.js @@ -520,3 +520,5 @@ module.exports = { deleteResource, listChallengesByMember } + +logger.buildService(module.exports) \ No newline at end of file diff --git a/test/e2e/createResource.test.js b/test/e2e/createResource.test.js deleted file mode 100644 index 2e98a09..0000000 --- a/test/e2e/createResource.test.js +++ /dev/null @@ -1,418 +0,0 @@ -/** - * E2E test of the Challenge Resource API - create resource endpoint. - */ - -const _ = require('lodash') -const config = require('config') -const should = require('should') -const { v4: uuid } = require('uuid') -const helper = require('../../src/common/helper') -const ResourceRolePhaseDependencyService = require('../../src/services/ResourceRolePhaseDependencyService') -const ResourceRoleService = require('../../src/services/ResourceRoleService') -const { postRequest, getRoleIds, assertResource, clearDependencies } = require('../common/testHelper') -const { token, requestBody } = require('../common/testData') - -const challengeId1 = 'fe6d0a58-ce7d-4521-8501-b8132b1c0391' -const challengeId2 = 'fe6d0a58-ce7d-4521-8501-b8132b1c0392' -const challengeId3 = 'fe6d0a58-ce7d-4521-8501-b8132b1c0393' -const phaseId1 = 'ad123e44-c6c4-4cb3-8c60-e0339e1eaa3e' -const phaseId2 = 'ad123e44-c6c4-4cb3-8c60-e0339e1eaa40' -const phaseId3 = 'ad123e44-c6c4-4cb3-8c60-e0339e1eaa41' -const phaseId4 = 'ad123e44-c6c4-4cb3-8c60-e0339e1eaa42' -const challengeNotFoundId = '11111111-ce7d-4521-8501-b8132b1c0391' -const resourceUrl = `http://localhost:${config.PORT}/${config.API_VERSION}/resources` -const resources = requestBody.resources - -module.exports = describe('Create resource endpoint', () => { - let copilotRoleId - let observerRoleId - let submitterRoleId - let reviewerRoleId - let dependency - - before(async () => { - const ret = await getRoleIds() - copilotRoleId = ret.copilotRoleId - observerRoleId = ret.observerRoleId - submitterRoleId = ret.submitterRoleId - reviewerRoleId = ret.reviewerRoleId - - const records = await ResourceRolePhaseDependencyService.getDependencies({ resourceRoleId: copilotRoleId }) - dependency = records[0] - }) - - describe('create resource - wrong phase cases', async () => { - before(async () => { - await ResourceRoleService.updateResourceRole(copilotRoleId, { - name: 'co-pilot', - isActive: true, - selfObtainable: true - }) - }) - - after(async () => { - await ResourceRoleService.updateResourceRole(copilotRoleId, { - name: 'co-pilot', - isActive: true, - selfObtainable: false - }) - }) - - it('create resource - wrong phase state 1', async () => { - await ResourceRolePhaseDependencyService.updateDependency(dependency.id, { - phaseId: dependency.phaseId, - resourceRoleId: dependency.resourceRoleId, - phaseState: false - }) - try { - const body = resources.createBody('HoHoSKY', copilotRoleId, challengeId1) - await postRequest(resourceUrl, body, token.hohosky) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `Phase ${dependency.phaseId} should not be open`) - } - }) - - it('create resource - wrong phase state 2', async () => { - await ResourceRolePhaseDependencyService.updateDependency(dependency.id, { - phaseId: phaseId1, - resourceRoleId: dependency.resourceRoleId, - phaseState: true - }) - try { - const body = resources.createBody('HoHoSKY', copilotRoleId, challengeId1) - await postRequest(resourceUrl, body, token.hohosky) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `Phase ${phaseId1} should be open`) - } - }) - - it('create resource - wrong phase state 3', async () => { - await ResourceRolePhaseDependencyService.updateDependency(dependency.id, { - phaseId: phaseId2, - resourceRoleId: dependency.resourceRoleId, - phaseState: true - }) - try { - const body = resources.createBody('HoHoSKY', copilotRoleId, challengeId1) - await postRequest(resourceUrl, body, token.hohosky) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `Phase ${phaseId2} should be open`) - } - }) - - it('create resource - wrong phase state 4', async () => { - await ResourceRolePhaseDependencyService.updateDependency(dependency.id, { - phaseId: phaseId3, - resourceRoleId: dependency.resourceRoleId, - phaseState: true - }) - try { - const body = resources.createBody('HoHoSKY', copilotRoleId, challengeId1) - await postRequest(resourceUrl, body, token.hohosky) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `Phase ${phaseId3} should be open`) - } - }) - }) - - describe('create resource - other cases', async () => { - it('create resource - task already assign', async () => { - const resourceId = uuid() - await helper.getESClient().create({ - index: config.ES.ES_INDEX, - type: config.ES.ES_TYPE, - id: resourceId, - body: { - id: resourceId, - challengeId: challengeId2, - memberId: 16096823, - memberHandle: 'hohosky', - roleId: config.SUBMITTER_RESOURCE_ROLE_ID - }, - refresh: 'true' - }) - try { - const body = resources.createBody('hohosky', config.SUBMITTER_RESOURCE_ROLE_ID, challengeId2) - await postRequest(resourceUrl, body, token.hohosky) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 409) - should.equal(_.get(err, 'response.body.message'), 'The Task is already assigned') - } finally { - await helper.getESClient().delete({ - index: config.ES.ES_INDEX, - type: config.ES.ES_TYPE, - id: resourceId, - refresh: 'true' - }) - } - }) - - it('create resource by admin', async () => { - await ResourceRolePhaseDependencyService.updateDependency(dependency.id, { - phaseId: dependency.phaseId, - resourceRoleId: dependency.resourceRoleId, - phaseState: true - }) - - const body = resources.createBody('HoHoSKY', copilotRoleId, challengeId1) - const res = await postRequest(resourceUrl, body, token.admin) - should.equal(res.status, 200) - should.equal(res.body.roleId, body.roleId) - should.equal(res.body.memberHandle.toLowerCase(), body.memberHandle.toLowerCase()) - await assertResource(res.body.id, res.body) - }) - - it('failure - create duplicate resource 1', async () => { - const body = resources.createBody('hohosky', copilotRoleId, challengeId1) - try { - await postRequest(resourceUrl, body, token.hohosky) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 409) - should.equal(_.get(err, 'response.body.message'), `User hohosky already has resource with roleId: ${copilotRoleId} in challenge: ${challengeId1}`) - } - }) - - it('failure - create duplicate resource 2', async () => { - await ResourceRolePhaseDependencyService.updateDependency(dependency.id, { - phaseId: phaseId4, - resourceRoleId: dependency.resourceRoleId, - phaseState: true - }) - - const body = resources.createBody('hohosky', copilotRoleId, challengeId1) - try { - await postRequest(resourceUrl, body, token.hohosky) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 409) - should.equal(_.get(err, 'response.body.message'), `User hohosky already has resource with roleId: ${copilotRoleId} in challenge: ${challengeId1}`) - } - - // remove the dependencies so that below tests will not have these limitations - await clearDependencies() - }) - - it('create another resource for user hohosky', async () => { - const body = resources.createBody('HoHoSKY', reviewerRoleId, challengeId1) - const res = await postRequest(resourceUrl, body, token.admin) - should.equal(res.status, 200) - await assertResource(res.body.id, res.body) - }) - - it('create resource by user', async () => { - const body = resources.createBody('denis', submitterRoleId, challengeId1) - const res = await postRequest(resourceUrl, body, token.hohosky) - should.equal(res.status, 200) - await assertResource(res.body.id, res.body) - }) - - it('failure - create self obtainable resource for other user by normal user 403', async () => { - const body = resources.createBody('lars2520', config.SUBMITTER_RESOURCE_ROLE_ID, challengeId2) - try { - await postRequest(resourceUrl, body, token.denis) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'Only M2M, admin or user with full access role can perform this action') - } - }) - - it('failure - create resource when user has not yet agreed terms', async () => { - const body = resources.createBody('lars2520', config.SUBMITTER_RESOURCE_ROLE_ID, challengeId1) - try { - await postRequest(resourceUrl, body, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'The user has not yet agreed to the following terms: [term_title]') - } - }) - - it('create self obtainable resource by user itself', async () => { - const body = resources.createBody('lars2520', submitterRoleId, challengeId1) - const res = await postRequest(resourceUrl, body, token.lars2520) - should.equal(res.status, 200) - await assertResource(res.body.id, res.body) - }) - - it('failure - create non self obtainable resource by normal user 403', async () => { - const body = resources.createBody('lars2520', copilotRoleId, challengeId1) - try { - await postRequest(resourceUrl, body, token.lars2520) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), `Only M2M, admin or user with full access role can perform this action`) - } - }) - - it('create resource using m2m token', async () => { - const body = resources.createBody('ghostar', submitterRoleId, challengeId1) - const res = await postRequest(resourceUrl, body, token.m2m) - should.equal(res.status, 200) - await assertResource(res.body.id, res.body) - }) - - it('create resource for user ghostar 1', async () => { - const body = resources.createBody('ghostar', reviewerRoleId, challengeId2) - const res = await postRequest(resourceUrl, body, token.m2m) - should.equal(res.status, 200) - await assertResource(res.body.id, res.body) - }) - - it('create resource for user ghostar 2', async () => { - const body = resources.createBody('ghostar', reviewerRoleId, challengeId3) - const res = await postRequest(resourceUrl, body, token.m2m) - should.equal(res.status, 200) - await assertResource(res.body.id, res.body) - }) - - it('create resource using inactive role, expected 400', async () => { - const body = resources.createBody('ghostar', observerRoleId, challengeId1) - try { - await postRequest(resourceUrl, body, token.m2m) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `Resource role with id: ${observerRoleId} is inactive, please use an active one.`) - } - }) - - it('create resource using non-existed role, expected 400', async () => { - const body = resources.createBody('ghostar', challengeId1, challengeId1) - try { - await postRequest(resourceUrl, body, token.m2m) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `No resource role found with id: ${challengeId1}.`) - } - }) - - it(`create resource member doesn't exist, expected 400`, async () => { - const body = resources.createBody('123abcx', challengeId1, challengeId1) - try { - await postRequest(resourceUrl, body, token.m2m) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `User with handle: 123abcx doesn't exist`) - } - }) - - let { stringFields, requiredFields, testBody } = resources - - it(`test invalid path parameter, challengeId must be UUID`, async () => { - let body = _.cloneDeep(testBody) - body.challengeId = 'invalid' - try { - await postRequest(resourceUrl, body, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"challengeId" must be a valid GUID`) - } - }) - - for (const stringField of stringFields) { - it(`test invalid parameters, invalid string type field ${stringField}`, async () => { - let body = _.cloneDeep(testBody) - _.set(body, stringField, 123) - try { - await postRequest(resourceUrl, body, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"${stringField}" must be a string`) - } - }) - } - - for (const requiredField of requiredFields) { - it(`test invalid parameters, required field ${requiredField} is missing`, async () => { - let body = _.cloneDeep(testBody) - body = _.omit(body, requiredField) - try { - await postRequest(resourceUrl, body, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"${requiredField}" is required`) - } - }) - } - - it(`test without token, expected 401`, async () => { - try { - await postRequest(resourceUrl, testBody) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'No token provided.') - } - }) - - it(`test with invalid token(invalid), expected 401`, async () => { - try { - await postRequest(resourceUrl, testBody, 'invalid') - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Invalid Token.') - } - }) - - it(`test with invalid token(expired), expected 401`, async () => { - try { - await postRequest(resourceUrl, testBody, token.expired) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Failed to authenticate token.') - } - }) - - it(`test with user without permission, expected 403`, async () => { - const body = resources.createBody('tonyj', submitterRoleId, challengeId1) - try { - await postRequest(resourceUrl, body, token.denis) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'Only M2M, admin or user with full access role can perform this action') - } - }) - - it(`test with invalid M2M token, expected 403`, async () => { - const body = resources.createBody('tonyj', submitterRoleId, challengeId1) - try { - await postRequest(resourceUrl, body, token.m2mRead) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'You are not allowed to perform this action!') - } - }) - - it('create resource for non-existed challenge, expected 404', async () => { - const body = resources.createBody('ghostar', observerRoleId, challengeNotFoundId) - try { - await postRequest(resourceUrl, body, token.m2m) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 404) - should.equal(_.get(err, 'response.body.message'), `Challenge with id: ${challengeNotFoundId} doesn't exist.`) - } - }) - }) -}) diff --git a/test/e2e/createResourceRole.test.js b/test/e2e/createResourceRole.test.js deleted file mode 100644 index e529726..0000000 --- a/test/e2e/createResourceRole.test.js +++ /dev/null @@ -1,154 +0,0 @@ -/** - * E2E test of the Challenge Resource API - create resource role endpoint. - */ - -const _ = require('lodash') -const config = require('config') -const should = require('should') -const helper = require('../../src/common/helper') -const { postRequest, assertResourceRole } = require('../common/testHelper') -const { token, requestBody } = require('../common/testData') - -const resourceRoleUrl = `http://localhost:${config.PORT}/${config.API_VERSION}/resource-roles` -const resourceRoles = requestBody.resourceRoles - -module.exports = describe('Create resource role endpoint', () => { - it('create active full-access resource role by admin', async () => { - const body = resourceRoles.createBody('co-pilot', true, true, true, false) - const res = await postRequest(resourceRoleUrl, body, token.admin) - should.equal(res.status, 200) - const copilotRoleId = res.body.id - await assertResourceRole(copilotRoleId, body) - }) - - it('create inactive full-access resource role by M2M', async () => { - const body = resourceRoles.createBody('Observer', true, false, false, false) - const res = await postRequest(resourceRoleUrl, body, token.m2m) - should.equal(res.status, 200) - const observerRoleId = res.body.id - await assertResourceRole(observerRoleId, body) - const resourceRole = await helper.getById('ResourceRole', res.body.id) - await helper.update(resourceRole, { legacyId: 1 }) - }) - - it('create active not full-access resource role by admin', async () => { - const body = resourceRoles.createBody('submitter', false, true, true, true) - const res = await postRequest(resourceRoleUrl, body, token.admin) - should.equal(res.status, 200) - const submitterRoleId = res.body.id - await assertResourceRole(submitterRoleId, body) - }) - - it('create reviewer resource role', async () => { - const body = resourceRoles.createBody('reviewer', false, true, true, false) - const res = await postRequest(resourceRoleUrl, body, token.admin) - should.equal(res.status, 200) - const reviewerRoleId = res.body.id - await assertResourceRole(reviewerRoleId, body) - }) - - let { stringFields, booleanFields, requiredFields, testBody } = resourceRoles - - for (const stringField of stringFields) { - it(`test invalid parameters, invalid string type field ${stringField}`, async () => { - let body = _.cloneDeep(testBody) - _.set(body, stringField, 123) - try { - await postRequest(resourceRoleUrl, body, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"${stringField}" must be a string`) - } - }) - } - - for (const booleanField of booleanFields) { - it(`test invalid parameters, invalid boolean type field ${booleanField}`, async () => { - let body = _.cloneDeep(testBody) - _.set(body, booleanField, 123) - try { - await postRequest(resourceRoleUrl, body, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"${booleanField}" must be a boolean`) - } - }) - } - - for (const requiredField of requiredFields) { - it(`test invalid parameters, required field ${requiredField} is missing`, async () => { - let body = _.cloneDeep(testBody) - body = _.omit(body, requiredField) - try { - await postRequest(resourceRoleUrl, body, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"${requiredField}" is required`) - } - }) - } - - it(`test without token, expected 401`, async () => { - try { - await postRequest(resourceRoleUrl, testBody) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'No token provided.') - } - }) - - it(`test with invalid token(invalid), expected 401`, async () => { - try { - await postRequest(resourceRoleUrl, testBody, 'invalid') - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Invalid Token.') - } - }) - - it(`test with invalid token(expired), expected 401`, async () => { - try { - await postRequest(resourceRoleUrl, testBody, token.expired) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Failed to authenticate token.') - } - }) - - it(`test with user token, expected 403`, async () => { - try { - await postRequest(resourceRoleUrl, testBody, token.denis) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'You are not allowed to perform this action!') - } - }) - - it(`test with invalid M2M token, expected 403`, async () => { - try { - await postRequest(resourceRoleUrl, testBody, token.m2mRead) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'You are not allowed to perform this action!') - } - }) - - it(`create duplicate resource role, expected 409`, async () => { - const body = resourceRoles.createBody('SUBMITTER', false, true, true, true) - try { - await postRequest(resourceRoleUrl, body, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 409) - should.equal(_.get(err, 'response.body.message'), 'ResourceRole with name: SUBMITTER already exist.') - } - }) -}) diff --git a/test/e2e/createResourceRolePhaseDependency.test.js b/test/e2e/createResourceRolePhaseDependency.test.js deleted file mode 100644 index 9ed0caa..0000000 --- a/test/e2e/createResourceRolePhaseDependency.test.js +++ /dev/null @@ -1,177 +0,0 @@ -/** - * E2E test of the Challenge Resource API - create resource role phase dependency endpoint. - */ - -const _ = require('lodash') -const config = require('config') -const should = require('should') -const { postRequest, assertResourceRolePhaseDependency, getRoleIds } = require('../common/testHelper') -const { token, requestBody } = require('../common/testData') - -const dependenciesUrl = `http://localhost:${config.PORT}/${config.API_VERSION}/resource-roles/phase-dependencies` -const dependencies = requestBody.resourceRolePhaseDependencies - -module.exports = describe('Create resource role phase dependency endpoint', () => { - let copilotRoleId - let submitterRoleId - let observerRoleId - - before(async () => { - const ret = await getRoleIds() - copilotRoleId = ret.copilotRoleId - submitterRoleId = ret.submitterRoleId - observerRoleId = ret.observerRoleId - }) - - it('create copilot dependency', async () => { - const entity = dependencies.createBody(dependencies.testBody.phaseId, copilotRoleId, true) - const ret = await postRequest(dependenciesUrl, entity, token.admin) - should.equal(ret.status, 200) - await assertResourceRolePhaseDependency(ret.body.id, entity) - }) - - it('create submitter dependency', async () => { - const entity = dependencies.createBody(dependencies.testBody.phaseId, submitterRoleId, true) - const ret = await postRequest(dependenciesUrl, entity, token.m2m) - should.equal(ret.status, 200) - await assertResourceRolePhaseDependency(ret.body.id, entity) - }) - - it('create dependency - resource role is inactive', async () => { - try { - const entity = dependencies.createBody(dependencies.testBody.phaseId, observerRoleId, true) - await postRequest(dependenciesUrl, entity, token.m2m) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `Resource role with id: ${observerRoleId} is inactive`) - } - }) - - it('create dependency - phaseId not found', async () => { - try { - const entity = dependencies.createBody(submitterRoleId, submitterRoleId, false) - await postRequest(dependenciesUrl, entity, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 404) - should.equal(_.get(err, 'response.body.message'), `Not found phase id: ${submitterRoleId}`) - } - }) - - it('create dependency - resourceRoleId not found', async () => { - try { - const entity = dependencies.createBody(dependencies.testBody.phaseId, dependencies.testBody.phaseId, true) - await postRequest(dependenciesUrl, entity, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 404) - should.equal(_.get(err, 'response.body.message'), `ResourceRole with id: ${dependencies.testBody.phaseId} doesn't exist`) - } - }) - - it('create dependency - conflict', async () => { - const entity = dependencies.createBody(dependencies.testBody.phaseId, submitterRoleId, true) - try { - await postRequest(dependenciesUrl, entity, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 409) - should.equal(_.get(err, 'response.body.message'), 'There is already dependency of given phaseId and resourceRoleId') - } - }) - - let { stringFields, booleanFields, requiredFields, testBody } = dependencies - - for (const stringField of stringFields) { - it(`test invalid parameters, invalid string type field ${stringField}`, async () => { - let entity = _.cloneDeep(testBody) - _.set(entity, stringField, 123) - try { - await postRequest(dependenciesUrl, entity, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"${stringField}" must be a string`) - } - }) - } - - for (const booleanField of booleanFields) { - it(`test invalid parameters, invalid boolean type field ${booleanField}`, async () => { - let entity = _.cloneDeep(testBody) - _.set(entity, booleanField, 123) - try { - await postRequest(dependenciesUrl, entity, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"${booleanField}" must be a boolean`) - } - }) - } - - for (const requiredField of requiredFields) { - it(`test invalid parameters, required field ${requiredField} is missing`, async () => { - let entity = _.cloneDeep(testBody) - entity = _.omit(entity, requiredField) - try { - await postRequest(dependenciesUrl, entity, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"${requiredField}" is required`) - } - }) - } - - it(`test without token, expected 401`, async () => { - try { - await postRequest(dependenciesUrl, testBody) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'No token provided.') - } - }) - - it(`test with invalid token(invalid), expected 401`, async () => { - try { - await postRequest(dependenciesUrl, testBody, 'invalid') - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Invalid Token.') - } - }) - - it(`test with invalid token(expired), expected 401`, async () => { - try { - await postRequest(dependenciesUrl, testBody, token.expired) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Failed to authenticate token.') - } - }) - - it(`test with user token, expected 403`, async () => { - try { - await postRequest(dependenciesUrl, testBody, token.denis) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'You are not allowed to perform this action!') - } - }) - - it(`test with invalid M2M token, expected 403`, async () => { - try { - await postRequest(dependenciesUrl, testBody, token.m2mRead) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'You are not allowed to perform this action!') - } - }) -}) diff --git a/test/e2e/deleteResource.test.js b/test/e2e/deleteResource.test.js deleted file mode 100644 index 57e1e7e..0000000 --- a/test/e2e/deleteResource.test.js +++ /dev/null @@ -1,234 +0,0 @@ -/** - * E2E test of the Challenge Resource API - delete resource endpoint. - */ - -const _ = require('lodash') -const config = require('config') -const should = require('should') -const helper = require('../../src/common/helper') -const { deleteRequest, getRoleIds } = require('../common/testHelper') -const { token, requestBody, user } = require('../common/testData') - -const challengeId = 'fe6d0a58-ce7d-4521-8501-b8132b1c0391' -const challengeNotFoundId = '11111111-ce7d-4521-8501-b8132b1c0391' -const resourceUrl = `http://localhost:${config.PORT}/${config.API_VERSION}/resources` -const resources = requestBody.resources - -module.exports = describe('Delete resource endpoint', () => { - let copilotRoleId - let observerRoleId - let submitterRoleId - - before(async () => { - const ret = await getRoleIds() - copilotRoleId = ret.copilotRoleId - observerRoleId = ret.observerRoleId - submitterRoleId = ret.submitterRoleId - }) - - it(`delete resource that user doesn't have, expected 400`, async () => { - const body = resources.createBody('HoHosky', observerRoleId, challengeId) - try { - await deleteRequest(resourceUrl, body, token.m2mModify) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `User HoHosky doesn't have resource with roleId: ${observerRoleId} in challenge ${challengeId}`) - } - }) - - it('delete resource using non-existed role, expected 400', async () => { - const body = resources.createBody('ghostar', challengeId, challengeId) - try { - await deleteRequest(resourceUrl, body, token.m2m) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `No resource role found with id: ${challengeId}.`) - } - }) - - it(`delete resource member doesn't exist, expected 400`, async () => { - const body = resources.createBody('123abcx', observerRoleId, challengeId) - try { - await deleteRequest(resourceUrl, body, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `User with handle: 123abcx doesn't exist`) - } - }) - - let { stringFields, requiredFields, testBody } = resources - - it(`test invalid path parameter, challengeId must be UUID`, async () => { - let body = _.cloneDeep(testBody) - body.challengeId = 'invalid' - try { - await deleteRequest(resourceUrl, body, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"challengeId" must be a valid GUID`) - } - }) - - for (const stringField of stringFields) { - it(`test invalid parameters, invalid string type field ${stringField}`, async () => { - let body = _.cloneDeep(testBody) - _.set(body, stringField, 123) - try { - await deleteRequest(resourceUrl, body, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"${stringField}" must be a string`) - } - }) - } - - for (const requiredField of requiredFields) { - it(`test invalid parameters, required field ${requiredField} is missing`, async () => { - let body = _.cloneDeep(testBody) - body = _.omit(body, requiredField) - try { - await deleteRequest(resourceUrl, body, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"${requiredField}" is required`) - } - }) - } - - it(`test without token, expected 401`, async () => { - try { - await deleteRequest(resourceUrl, testBody) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'No token provided.') - } - }) - - it(`test with invalid token(invalid), expected 401`, async () => { - try { - await deleteRequest(resourceUrl, testBody, 'invalid') - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Invalid Token.') - } - }) - - it(`test with invalid token(expired), expected 401`, async () => { - try { - await deleteRequest(resourceUrl, testBody, token.expired) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Failed to authenticate token.') - } - }) - - it(`test with user without permission, expected 403`, async () => { - const body = resources.createBody('tonyj', submitterRoleId, challengeId) - try { - await deleteRequest(resourceUrl, body, token.denis) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'Only M2M, admin or user with full access role can perform this action') - } - }) - - it(`test with invalid M2M token, expected 403`, async () => { - const body = resources.createBody('tonyj', submitterRoleId, challengeId) - try { - await deleteRequest(resourceUrl, body, token.m2mRead) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'You are not allowed to perform this action!') - } - }) - - it(`failure - delete self obtainable resource for other user by normal user 403`, async () => { - const body = resources.createBody('lars2520', submitterRoleId, challengeId) - try { - await deleteRequest(resourceUrl, body, token.denis) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'Only M2M, admin or user with full access role can perform this action') - } - }) - - it('delete resource for non-existed challenge, expected 404', async () => { - const body = resources.createBody('ghostar', observerRoleId, challengeNotFoundId) - try { - await deleteRequest(resourceUrl, body, token.m2m) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 404) - should.equal(_.get(err, 'response.body.message'), `Challenge with id: ${challengeNotFoundId} doesn't exist.`) - } - }) - - it('delete resource using m2m token', async () => { - const body = resources.createBody('ghostar', submitterRoleId, challengeId) - const res = await deleteRequest(resourceUrl, body, token.m2m) - should.equal(res.status, 200) - should.exist(res.body.id) - try { - await helper.getById('Resource', res.body.id) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.name, 'NotFoundError') - } - should.equal(res.body.challengeId, challengeId) - should.exist(res.body.memberId) - should.equal(res.body.memberHandle.toLowerCase(), 'ghostar') - should.equal(res.body.roleId, submitterRoleId) - should.exist(res.body.created) - should.equal(res.body.createdBy, user.m2m.sub) - }) - - it('delete resource by user', async () => { - const body = resources.createBody('DENIS', submitterRoleId, challengeId) - const res = await deleteRequest(resourceUrl, body, token.hohosky) - should.equal(res.status, 200) - should.exist(res.body.id) - try { - await helper.getById('Resource', res.body.id) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.name, 'NotFoundError') - } - should.equal(res.body.challengeId, challengeId) - should.exist(res.body.memberId) - should.equal(res.body.memberHandle.toLowerCase(), 'denis') - should.equal(res.body.roleId, submitterRoleId) - should.exist(res.body.created) - should.equal(res.body.createdBy.toLowerCase(), 'hohosky') - }) - - it('delete resource by admin', async () => { - const body = resources.createBody('HoHoSKY', copilotRoleId, challengeId) - const res = await deleteRequest(resourceUrl, body, token.admin) - should.equal(res.status, 200) - should.exist(res.body.id) - try { - await helper.getById('Resource', res.body.id) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.name, 'NotFoundError') - } - should.equal(res.body.challengeId, challengeId) - should.exist(res.body.memberId) - should.equal(res.body.memberHandle.toLowerCase(), 'hohosky') - should.equal(res.body.roleId, copilotRoleId) - should.exist(res.body.created) - should.equal(res.body.createdBy.toLowerCase(), 'tonyj') - }) -}) diff --git a/test/e2e/deleteResourceRolePhaseDependency.test.js b/test/e2e/deleteResourceRolePhaseDependency.test.js deleted file mode 100644 index 39c9b49..0000000 --- a/test/e2e/deleteResourceRolePhaseDependency.test.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * E2E test of the Challenge Resource API - delete resource role phase dependency endpoint. - */ - -const _ = require('lodash') -const config = require('config') -const should = require('should') -const service = require('../../src/services/ResourceRolePhaseDependencyService') -const { deleteRequest, getRoleIds } = require('../common/testHelper') -const { token } = require('../common/testData') - -const dependenciesUrl = `http://localhost:${config.PORT}/${config.API_VERSION}/resource-roles/phase-dependencies` - -module.exports = describe('Delete resource role phase dependency endpoint', () => { - let dependency - - before(async () => { - const ret = await getRoleIds() - const submitterRoleId = ret.submitterRoleId - const records = await service.getDependencies({ resourceRoleId: submitterRoleId }) - dependency = records[0] - }) - - it('delete dependency', async () => { - const ret = await deleteRequest(`${dependenciesUrl}/${dependency.id}`, {}, token.admin) - should.equal(ret.status, 200) - should.equal(ret.body.id, dependency.id) - should.equal(ret.body.phaseId, dependency.phaseId) - should.equal(ret.body.resourceRoleId, dependency.resourceRoleId) - should.equal(ret.body.phaseState, dependency.phaseState) - }) - - it('delete dependency - not found', async () => { - try { - await deleteRequest(`${dependenciesUrl}/${dependency.id}`, {}, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 404) - should.equal(_.get(err, 'response.body.message'), - `ResourceRolePhaseDependency with id: ${dependency.id} doesn't exist`) - } - }) - - it('delete dependency - invalid id', async () => { - try { - await deleteRequest(`${dependenciesUrl}/invalid`, {}, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), '"id" must be a valid GUID') - } - }) - - it('delete dependency - forbidden user', async () => { - try { - await deleteRequest(`${dependenciesUrl}/${dependency.id}`, {}, token.denis) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'You are not allowed to perform this action!') - } - }) - - it('delete dependency - forbidden m2m', async () => { - try { - await deleteRequest(`${dependenciesUrl}/${dependency.id}`, {}, token.m2mRead) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'You are not allowed to perform this action!') - } - }) -}) diff --git a/test/e2e/edgeCasesForResourceService.test.js b/test/e2e/edgeCasesForResourceService.test.js deleted file mode 100644 index e63fec6..0000000 --- a/test/e2e/edgeCasesForResourceService.test.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * E2E test of the Challenge Resource API - edge cases. - */ - -const config = require('config') -const should = require('should') -const helper = require('../../src/common/helper') -const { getRequest } = require('../common/testHelper') -const { token } = require('../common/testData') - -const challengeId = 'fe6d0a58-ce7d-4521-8501-b8132b1c0391' -const resourceUrl = `http://localhost:${config.PORT}/${config.API_VERSION}/resources` - -module.exports = describe('Edge cases for resources endpoint', () => { - before(async () => { - try { - await helper.getESClient().indices.delete({ index: config.ES.ES_INDEX }) - } catch (err) { - // ignore - } - }) - - after(async () => { - const body = { mappings: {} } - body.mappings[config.get('ES.ES_TYPE')] = { - properties: { - id: { type: 'keyword' } - } - } - - try { - await helper.getESClient().indices.create({ - index: config.ES.ES_INDEX, - body - }) - } catch (err) { - // ignore - } - }) - - it('get resources by admin - ES is fresh', async () => { - const res = await getRequest(`${resourceUrl}?challengeId=${challengeId}`, token.admin) - should.equal(res.status, 200) - should.equal(res.body.length, 0) - }) - - it('get challenges hohosky can access - ES is fresh', async () => { - const res = await getRequest(`${resourceUrl}/16096823/challenges`, token.admin) - should.equal(res.status, 200) - should.equal(res.body.length, 0) - }) -}) diff --git a/test/e2e/getResourceRolePhaseDependencies.test.js b/test/e2e/getResourceRolePhaseDependencies.test.js deleted file mode 100644 index 950d61f..0000000 --- a/test/e2e/getResourceRolePhaseDependencies.test.js +++ /dev/null @@ -1,105 +0,0 @@ -/** - * E2E test of the Challenge Resource API - get resource role phase dependencies endpoint. - */ - -const _ = require('lodash') -const config = require('config') -const should = require('should') -const service = require('../../src/services/ResourceRolePhaseDependencyService') -const { getRequest, assertResourceRolePhaseDependency, getRoleIds } = require('../common/testHelper') -const { token } = require('../common/testData') - -const dependenciesUrl = `http://localhost:${config.PORT}/${config.API_VERSION}/resource-roles/phase-dependencies` - -module.exports = describe('Get resource roles endpoint', () => { - let dependency - - before(async () => { - const ret = await getRoleIds() - const submitterRoleId = ret.submitterRoleId - const records = await service.getDependencies({ resourceRoleId: submitterRoleId }) - dependency = records[0] - }) - - it('get all resource role phase dependencies', async () => { - const res = await getRequest(dependenciesUrl, token.admin) - should.equal(res.status, 200) - const records = res.body - should.equal(records.length, 2) - for (const record of records) { - await assertResourceRolePhaseDependency(record.id, record) - } - }) - - it('get matched resource role phase dependencies', async () => { - const res = await getRequest(`${dependenciesUrl}?phaseId=${dependency.phaseId}&resourceRoleId=${ - dependency.resourceRoleId - }&phaseState=${dependency.phaseState}`, token.m2mRead) - should.equal(res.status, 200) - const records = res.body - should.equal(records.length, 1) - for (const record of records) { - await assertResourceRolePhaseDependency(record.id, record) - } - }) - - it('test invalid parameters, invalid boolean parameter phaseState ', async () => { - try { - await getRequest(`${dependenciesUrl}?phaseState=invalid`, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"phaseState" must be a boolean`) - } - }) - - it('test invalid parameters, invalid GUID parameter phaseId ', async () => { - try { - await getRequest(`${dependenciesUrl}?phaseId=invalid`, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"phaseId" must be a valid GUID`) - } - }) - - it(`test without token, expected 401`, async () => { - try { - await getRequest(dependenciesUrl) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'No token provided.') - } - }) - - it(`test with invalid token(invalid), expected 401`, async () => { - try { - await getRequest(dependenciesUrl, 'invalid') - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Invalid Token.') - } - }) - - it(`test with invalid token(expired), expected 401`, async () => { - try { - await getRequest(dependenciesUrl, token.expired) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Failed to authenticate token.') - } - }) - - it(`test with invalid M2M token, expected 403`, async () => { - try { - await getRequest(dependenciesUrl, token.m2mModify) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'You are not allowed to perform this action!') - } - }) -}) diff --git a/test/e2e/getResourceRoles.test.js b/test/e2e/getResourceRoles.test.js deleted file mode 100644 index 9de9e37..0000000 --- a/test/e2e/getResourceRoles.test.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * E2E test of the Challenge Resource API - get resource roles endpoint. - */ - -const _ = require('lodash') -const config = require('config') -const should = require('should') -const { getRequest, assertResourceRole } = require('../common/testHelper') -const { token } = require('../common/testData') - -const resourceRoleUrl = `http://localhost:${config.PORT}/${config.API_VERSION}/resource-roles` - -module.exports = describe('Get resource roles endpoint', () => { - let inactiveId - - it('get all resource roles', async () => { - const res = await getRequest(resourceRoleUrl, token.admin) - should.equal(res.status, 200) - const records = res.body - should.equal(records.length, 4) - for (const record of records) { - await assertResourceRole(record.id, record) - } - }) - - it('get active resource roles', async () => { - const res = await getRequest(`${resourceRoleUrl}?isActive=true`, token.admin) - should.equal(res.status, 200) - const records = res.body - should.equal(records.length, 3) - for (const record of records) { - should.equal(record.isActive, true) - await assertResourceRole(record.id, record) - } - }) - - it('get inactive resource roles', async () => { - const res = await getRequest(`${resourceRoleUrl}?isActive=false`, token.denis) - should.equal(res.status, 200) - const records = res.body - should.equal(records.length, 1) - should.equal(records[0].isActive, false) - await assertResourceRole(records[0].id, records[0]) - inactiveId = records[0].id - }) - - it('search resource roles with filter', async () => { - const res = await getRequest(`${resourceRoleUrl}?name=Observer&id=${inactiveId}&legacyId=1&selfObtainable=false&fullReadAccess=true&fullWriteAccess=false`, token.admin) - should.equal(res.status, 200) - const records = res.body - should.equal(records.length, 1) - should.equal(records[0].id, inactiveId) - should.equal(records[0].name, 'Observer') - should.equal(records[0].fullReadAccess, true) - should.equal(records[0].fullWriteAccess, false) - should.equal(records[0].selfObtainable, false) - should.equal(records[0].legacyId, 1) - }) - - it('test invalid parameters, invalid boolean path parameter isActive ', async () => { - try { - await getRequest(`${resourceRoleUrl}?isActive=invalid`, token.denis) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"isActive" must be a boolean`) - } - }) -}) diff --git a/test/e2e/getResources.test.js b/test/e2e/getResources.test.js deleted file mode 100644 index a8efe1b..0000000 --- a/test/e2e/getResources.test.js +++ /dev/null @@ -1,196 +0,0 @@ -/** - * E2E test of the Challenge Resource API - get resources endpoint. - */ - -const _ = require('lodash') -const config = require('config') -const should = require('should') -const helper = require('../../src/common/helper') -const { getRequest, getRoleIds } = require('../common/testHelper') -const { token } = require('../common/testData') - -const challengeId = 'fe6d0a58-ce7d-4521-8501-b8132b1c0391' -const challengeNotFoundId = '11111111-ce7d-4521-8501-b8132b1c0391' -const resourceUrl = `http://localhost:${config.PORT}/${config.API_VERSION}/resources?challengeId=${challengeId}` -const resource400Url = `http://localhost:${config.PORT}/${config.API_VERSION}/resources?challengeId=invalid` -const resource404Url = `http://localhost:${config.PORT}/${config.API_VERSION}/resources?challengeId=${challengeNotFoundId}` - -module.exports = describe('Get resource endpoint', () => { - let copilotRoleId - let submitterRoleId - let reviewerRoleId - - before(async () => { - const ret = await getRoleIds() - copilotRoleId = ret.copilotRoleId - submitterRoleId = ret.submitterRoleId - reviewerRoleId = ret.reviewerRoleId - }) - - let hasCopilotRole, hasReviewerRole - - /** - * Assert resource entity in database. - * @param {String} id the entity id - * @param {Object} expected the expected data - */ - const assertResource = async (id, expected) => { - should.exist(id) - const entity = await helper.getById('Resource', id) - should.equal(entity.challengeId, challengeId) - should.equal(entity.memberId, expected.memberId) - should.equal(entity.memberHandle.toLowerCase(), expected.memberHandle.toLowerCase()) - should.equal(entity.roleId, expected.roleId) - if (entity.memberHandle.toLowerCase() === 'hohosky') { - if (entity.roleId === copilotRoleId) { - hasCopilotRole = true - } - if (entity.roleId === reviewerRoleId) { - hasReviewerRole = true - } - should.equal(expected.rating, 2000) - } else { - if (entity.memberHandle.toLowerCase() === 'denis') { - should.equal(expected.rating, 0) - } - should.equal(entity.roleId, submitterRoleId) - } - should.exist(expected.created) - should.exist(expected.createdBy) - should.equal(entity.createdBy, expected.createdBy) - } - - it('get resources by admin', async () => { - hasCopilotRole = false - hasReviewerRole = false - const res = await getRequest(`${resourceUrl}&page=2&perPage=1`, token.admin) - should.equal(res.status, 200) - should.equal(res.headers['x-prev-page'], '1') - should.equal(res.headers['x-next-page'], '3') - should.equal(res.headers['x-total'], '5') - should.equal(res.headers['x-total-pages'], '5') - should.equal(res.body.length, 1) - }) - - it('get resources with pagination', async () => { - hasCopilotRole = false - hasReviewerRole = false - const res = await getRequest(resourceUrl, token.admin) - should.equal(res.status, 200) - const records = res.body - should.equal(records.length, 5) - for (const record of records) { - await assertResource(record.id, record) - } - // user hohosky should have two resources - should.equal(hasCopilotRole, true) - should.equal(hasReviewerRole, true) - }) - - it('get resources by user has full-access permission', async () => { - hasCopilotRole = false - hasReviewerRole = false - const res = await getRequest(resourceUrl, token.hohosky) - should.equal(res.status, 200) - const records = res.body - should.equal(records.length, 5) - for (const record of records) { - await assertResource(record.id, record) - } - // user hohosky should have two resources - should.equal(hasCopilotRole, true) - should.equal(hasReviewerRole, true) - }) - - it(`get resources using user without permission`, async () => { - const res = await getRequest(resourceUrl, token.denis) - should.equal(res.status, 200) - const records = res.body - should.equal(records.length, 1) - should.equal(records[0].memberHandle, 'denis') - }) - - it('get resources using m2m token', async () => { - hasCopilotRole = false - hasReviewerRole = false - const res = await getRequest(resourceUrl, token.m2m) - should.equal(res.status, 200) - const records = res.body - should.equal(records.length, 5) - for (const record of records) { - await assertResource(record.id, record) - } - // user hohosky should have two resources - should.equal(hasCopilotRole, true) - should.equal(hasReviewerRole, true) - }) - - it('get resources with role id using m2m token', async () => { - hasCopilotRole = false - hasReviewerRole = false - const res = await getRequest(`${resourceUrl}&roleId=${copilotRoleId}`, token.m2m) - should.equal(res.status, 200) - const records = res.body - should.equal(records.length, 1) - for (const record of records) { - await assertResource(record.id, record) - } - // user hohosky should have copilot role - should.equal(hasCopilotRole, true) - }) - - it('get resources without user login', async () => { - const res = await getRequest(resourceUrl) - should.equal(res.body.length, 0) - }) - - it(`test invalid url, challengeId query parameter is required`, async () => { - try { - await getRequest(`http://localhost:${config.PORT}/${config.API_VERSION}/resources`, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"challengeId" is required`) - } - }) - - it(`test invalid query parameter, challengeId must be UUID`, async () => { - try { - await getRequest(resource400Url, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"challengeId" must be a valid GUID`) - } - }) - - it(`test with invalid token(invalid), expected 401`, async () => { - try { - await getRequest(resourceUrl, 'invalid') - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Invalid Token.') - } - }) - - it(`test with invalid token(expired), expected 401`, async () => { - try { - await getRequest(resourceUrl, token.expired) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Failed to authenticate token.') - } - }) - - it('get resource from non-existed challenge, expected 404', async () => { - try { - await getRequest(resource404Url, token.m2mRead) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 404) - should.equal(_.get(err, 'response.body.message'), `Challenge ID ${challengeNotFoundId} not found`) - } - }) -}) diff --git a/test/e2e/listChallengesByMember.test.js b/test/e2e/listChallengesByMember.test.js deleted file mode 100644 index dcf7efe..0000000 --- a/test/e2e/listChallengesByMember.test.js +++ /dev/null @@ -1,126 +0,0 @@ -/** - * E2E test of the Challenge Resource API - list challenges by member. - */ - -const _ = require('lodash') -const config = require('config') -const should = require('should') -const { getRequest, getRoleIds } = require('../common/testHelper') -const { token } = require('../common/testData') - -const challengeId1 = 'fe6d0a58-ce7d-4521-8501-b8132b1c0391' -const challengeId2 = 'fe6d0a58-ce7d-4521-8501-b8132b1c0392' -const challengeId3 = 'fe6d0a58-ce7d-4521-8501-b8132b1c0393' -const resourceUrl = `http://localhost:${config.PORT}/${config.API_VERSION}/resources` - -module.exports = describe('Create resource endpoint', () => { - let submitterRoleId - let reviewerRoleId - let observerRoleId - - before(async () => { - const ret = await getRoleIds() - submitterRoleId = ret.submitterRoleId - reviewerRoleId = ret.reviewerRoleId - observerRoleId = ret.observerRoleId - }) - - it('get challenges hohosky can access', async () => { - const res = await getRequest(`${resourceUrl}/16096823/challenges`, token.admin) - should.equal(res.status, 200) - should.equal(res.body.length, 1) - should.equal(res.body[0], challengeId1) - }) - - it('get challenges ghostar can access', async () => { - const res = await getRequest(`${resourceUrl}/151743/challenges`, token.denis) - should.equal(res.status, 200) - should.equal(res.body.length, 3) - should.equal(res.body.includes(challengeId1), true) - should.equal(res.body.includes(challengeId2), true) - should.equal(res.body.includes(challengeId3), true) - }) - - it('get challenges ghostar can access with filter 1', async () => { - const res = await getRequest(`${resourceUrl}/151743/challenges?resourceRoleId=${submitterRoleId}`, token.hohosky) - should.equal(res.status, 200) - should.equal(res.body.length, 1) - should.equal(res.body[0], challengeId1) - }) - - it('get challenges ghostar can access with filter 2', async () => { - const res = await getRequest(`${resourceUrl}/151743/challenges?resourceRoleId=${reviewerRoleId}`, token.m2mRead) - should.equal(res.status, 200) - should.equal(res.body.length, 2) - should.equal(res.body.includes(challengeId2), true) - should.equal(res.body.includes(challengeId3), true) - }) - - it('get challenges ghostar can access with filter 3', async () => { - const res = await getRequest(`${resourceUrl}/151743/challenges?resourceRoleId=${observerRoleId}`, token.m2m) - should.equal(res.status, 200) - should.equal(res.body.length, 0) - }) - - it('get challenges by non existed user', async () => { - const res = await getRequest(`${resourceUrl}/111111111/challenges`, token.m2m) - should.equal(res.status, 200) - should.equal(res.body.length, 0) - }) - - it(`get challenges for user with non existed role`, async () => { - const res = await getRequest(`${resourceUrl}/151743/challenges?resourceRoleId=${challengeId1}`, token.m2m) - should.equal(res.status, 200) - should.equal(res.body.length, 0) - }) - - it(`test invalid parameters, resourceRoleId should be UUID`, async () => { - try { - await getRequest(`${resourceUrl}/151743/challenges?resourceRoleId=invalid`, token.m2m) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"resourceRoleId" must be a valid GUID`) - } - }) - - it(`test without token, expected 401`, async () => { - try { - await getRequest(`${resourceUrl}/151743/challenges`) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'No token provided.') - } - }) - - it(`test with invalid token(invalid), expected 401`, async () => { - try { - await getRequest(`${resourceUrl}/151743/challenges`, 'invalid') - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Invalid Token.') - } - }) - - it(`test with invalid token(expired), expected 401`, async () => { - try { - await getRequest(`${resourceUrl}/151743/challenges`, token.expired) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Failed to authenticate token.') - } - }) - - it(`test with invalid M2M token, expected 403`, async () => { - try { - await getRequest(`${resourceUrl}/151743/challenges`, token.m2mModify) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'You are not allowed to perform this action!') - } - }) -}) diff --git a/test/e2e/test.js b/test/e2e/test.js deleted file mode 100644 index c6d025e..0000000 --- a/test/e2e/test.js +++ /dev/null @@ -1,199 +0,0 @@ -/** - * E2E test of the Challenge Resource API. - */ - -process.env.NODE_ENV = 'test' - -require('../../app-bootstrap') - -const _ = require('lodash') -const config = require('config') -const should = require('should') -const logger = require('../../src/common/logger') -const helper = require('../../src/common/helper') -const { getRequest, putRequest, initES } = require('../common/testHelper') - -const { mockChallengeApi } = require('../../mock/mock-challenge-api') - -describe('Topcoder - Challenge Resource API E2E Test', () => { - let app - let infoLogs = [] - let errorLogs = [] - let debugLogs = [] - const info = logger.info - const error = logger.error - const debug = logger.debug - - /** - * Sleep with time from input - * @param time the time input - */ - const sleep = (time) => new Promise((resolve) => { - setTimeout(resolve, time) - }) - - /** - * Start http server with port - * @param {Object} server the server - * @param {Number} port the server port - */ - const startServer = (server, port) => new Promise((resolve) => { - server.listen(port, () => { - resolve() - }) - }) - - /** - * Close http server - * @param {Object} server the server - */ - const closeServer = (server) => new Promise((resolve) => { - server.close(() => { - resolve() - }) - }) - - /** - * Initialize database tables. All data will be cleared. - */ - const initDB = async () => { - const roles = await helper.scan('ResourceRole') - for (const role of roles) { - await role.delete() - } - const resources = await helper.scan('Resource') - for (const resource of resources) { - await resource.delete() - } - const dependencies = await helper.scan('ResourceRolePhaseDependency') - for (const d of dependencies) { - await d.delete() - } - const staties = await helper.scan('MemberStats') - for (const s of staties) { - await s.delete() - } - } - - before(async () => { - // start mock server for v5 challenge api - await startServer(mockChallengeApi, config.MOCK_CHALLENGE_API_PORT) - - // inject logger with log collector - logger.info = (message) => { - infoLogs.push(message) - info(message) - } - logger.debug = (message) => { - debugLogs.push(message) - debug(message) - } - logger.error = (message) => { - errorLogs.push(message) - error(message) - } - - // start the application - app = require('../../app') - - // wait until application init successfully - while (true) { - if (infoLogs.some(x => String(x).includes('Express server listening on port'))) { - break - } - await sleep(config.WAIT_TIME) - } - - await initDB() - await initES() - - await helper.create('MemberStats', { - userId: '16096823', - handle: 'hohosky', - handleLower: 'hohosky', - maxRating: { rating: 2000 } - }) - - await helper.create('MemberStats', { - userId: '251280', - handle: 'denis', - handleLower: 'denis' - }) - }) - - after(async () => { - // close server - await closeServer(mockChallengeApi) - await closeServer(app) - - // restore logger - logger.error = error - logger.info = info - logger.debug = debug - - await initDB() - await initES() - }) - - describe('Health check endpoints', () => { - it('health check success', async () => { - const res = await getRequest(`http://localhost:${config.PORT}/${config.API_VERSION}/resources/health`) - should.equal(res.status, 200) - should.equal(res.body.checksRun, 1) - }) - }) - - describe('Failure routes Tests', () => { - it('Unsupported http method, return 405', async () => { - try { - await putRequest(`http://localhost:${config.PORT}/${config.API_VERSION}/resource-roles`, {}) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 405) - should.equal(_.get(err, 'response.body.message'), 'The requested HTTP method is not supported.') - } - }) - - it('Http resource not found, return 404', async () => { - try { - await getRequest(`http://localhost:${config.PORT}/${config.API_VERSION}/invalid`) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 404) - should.equal(_.get(err, 'response.body.message'), 'The requested resource cannot be found.') - } - }) - }) - - describe('Resource Roles endpoints', () => { - require('./createResourceRole.test') - require('./getResourceRoles.test') - require('./updateResourceRole.test') - }) - - describe('Resource Role Phase Dependencies endpoints', () => { - require('./createResourceRolePhaseDependency.test') - require('./getResourceRolePhaseDependencies.test') - require('./updateResourceRolePhaseDependency.test') - require('./deleteResourceRolePhaseDependency.test') - }) - - describe('Resources endpoints', () => { - before(async () => { - await helper.create('ResourceRole', { - id: config.SUBMITTER_RESOURCE_ROLE_ID, - name: 'dummy_submitter', - fullReadAccess: false, - fullWriteAccess: true, - isActive: true, - selfObtainable: true, - nameLower: 'dummy_submitter' - }) - }) - require('./edgeCasesForResourceService.test') - require('./createResource.test') - require('./getResources.test') - require('./listChallengesByMember.test') - require('./deleteResource.test') - }) -}) diff --git a/test/e2e/updateResourceRole.test.js b/test/e2e/updateResourceRole.test.js deleted file mode 100644 index 3d8e297..0000000 --- a/test/e2e/updateResourceRole.test.js +++ /dev/null @@ -1,171 +0,0 @@ -/** - * E2E test of the Challenge Resource API - update resource roles endpoint. - */ - -const _ = require('lodash') -const config = require('config') -const should = require('should') -const { putRequest, getRoleIds, assertResourceRole } = require('../common/testHelper') -const { token, requestBody } = require('../common/testData') - -const resourceRoleUrl = `http://localhost:${config.PORT}/${config.API_VERSION}/resource-roles` -const resourceRoles = requestBody.resourceRoles - -module.exports = describe('Update resource roles endpoint', () => { - let copilotRoleId - - before(async () => { - const ret = await getRoleIds() - copilotRoleId = ret.copilotRoleId - }) - - it('update resource role using m2m all token', async () => { - const body = resourceRoles.createBody('UPDATE-CO-PILOT', false, false, false, true) - const res = await putRequest(`${resourceRoleUrl}/${copilotRoleId}`, body, token.m2m) - should.equal(res.status, 200) - should.equal(copilotRoleId, res.body.id) - await assertResourceRole(copilotRoleId, res.body) - }) - - it('update resource role using m2m resource roles token', async () => { - const body = resourceRoles.createBody('UPDATE-CO-PILOT', false, false, false, true) - const res = await putRequest(`${resourceRoleUrl}/${copilotRoleId}`, body, token.m2mModify) - should.equal(res.status, 200) - should.equal(copilotRoleId, res.body.id) - await assertResourceRole(copilotRoleId, res.body) - }) - - it('update resource role via admin', async () => { - const body = resourceRoles.createBody('CO-PILOT', true, true, true, false) - const res = await putRequest(`${resourceRoleUrl}/${copilotRoleId}`, body, token.admin) - should.equal(res.status, 200) - should.equal(copilotRoleId, res.body.id) - await assertResourceRole(copilotRoleId, res.body) - }) - - let { stringFields, booleanFields, requiredFields, testBody } = resourceRoles - - for (const stringField of stringFields) { - it(`test invalid parameters, invalid string type field ${stringField}`, async () => { - let body = _.cloneDeep(testBody) - _.set(body, stringField, 123) - try { - await putRequest(`${resourceRoleUrl}/${copilotRoleId}`, body, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"${stringField}" must be a string`) - } - }) - } - - for (const booleanField of booleanFields) { - it(`test invalid parameters, invalid boolean type field ${booleanField}`, async () => { - let body = _.cloneDeep(testBody) - _.set(body, booleanField, 123) - try { - await putRequest(`${resourceRoleUrl}/${copilotRoleId}`, body, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"${booleanField}" must be a boolean`) - } - }) - } - - for (const requiredField of requiredFields) { - it(`test invalid parameters, required field ${requiredField} is missing`, async () => { - let body = _.cloneDeep(testBody) - body = _.omit(body, requiredField) - try { - await putRequest(`${resourceRoleUrl}/${copilotRoleId}`, body, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"${requiredField}" is required`) - } - }) - } - - it(`test invalid path parameter, resourceRoleId must be UUID`, async () => { - try { - await putRequest(`${resourceRoleUrl}/invalid`, testBody, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"resourceRoleId" must be a valid GUID`) - } - }) - - it(`test without token, expected 401`, async () => { - try { - await putRequest(`${resourceRoleUrl}/${copilotRoleId}`, testBody) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'No token provided.') - } - }) - - it(`test with invalid token(invalid), expected 401`, async () => { - try { - await putRequest(`${resourceRoleUrl}/${copilotRoleId}`, testBody, 'invalid') - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Invalid Token.') - } - }) - - it(`test with invalid token(expired), expected 401`, async () => { - try { - await putRequest(`${resourceRoleUrl}/${copilotRoleId}`, testBody, token.expired) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Failed to authenticate token.') - } - }) - - it(`test with user token, expected 403`, async () => { - try { - await putRequest(`${resourceRoleUrl}/${copilotRoleId}`, testBody, token.denis) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'You are not allowed to perform this action!') - } - }) - - it(`test with invalid M2M token, expected 403`, async () => { - try { - await putRequest(`${resourceRoleUrl}/${copilotRoleId}`, testBody, token.m2mRead) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'You are not allowed to perform this action!') - } - }) - - it(`test with not founded resource role, expected 404`, async () => { - try { - const id = 'fe6d0a58-ce7d-4521-8501-b8132b1c0391' - await putRequest(`${resourceRoleUrl}/${id}`, testBody, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 404) - should.equal(_.get(err, 'response.body.message'), `ResourceRole with id: fe6d0a58-ce7d-4521-8501-b8132b1c0391 doesn't exist`) - } - }) - - it(`update resource role name duplication, expected 409`, async () => { - const body = resourceRoles.createBody('SUBMITTER', true, true, true, false) - try { - await putRequest(`${resourceRoleUrl}/${copilotRoleId}`, body, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 409) - should.equal(_.get(err, 'response.body.message'), 'ResourceRole with name: SUBMITTER already exist.') - } - }) -}) diff --git a/test/e2e/updateResourceRolePhaseDependency.test.js b/test/e2e/updateResourceRolePhaseDependency.test.js deleted file mode 100644 index d726e0a..0000000 --- a/test/e2e/updateResourceRolePhaseDependency.test.js +++ /dev/null @@ -1,169 +0,0 @@ -/** - * E2E test of the Challenge Resource API - update resource role phase dependency endpoint. - */ - -const _ = require('lodash') -const config = require('config') -const should = require('should') -const service = require('../../src/services/ResourceRolePhaseDependencyService') -const { putRequest, assertResourceRolePhaseDependency, getRoleIds } = require('../common/testHelper') -const { token, requestBody } = require('../common/testData') - -const dependenciesUrl = `http://localhost:${config.PORT}/${config.API_VERSION}/resource-roles/phase-dependencies` -const dependencies = requestBody.resourceRolePhaseDependencies - -module.exports = describe('Update resource role phase dependency endpoint', () => { - let dependency - let copilotRoleId - let reviewerRoleId - - before(async () => { - const ret = await getRoleIds() - copilotRoleId = ret.copilotRoleId - reviewerRoleId = ret.reviewerRoleId - const submitterRoleId = ret.submitterRoleId - const records = await service.getDependencies({ resourceRoleId: submitterRoleId }) - dependency = records[0] - }) - - it('update dependency', async () => { - const entity = dependencies.createBody(dependency.phaseId, reviewerRoleId, true) - const ret = await putRequest(`${dependenciesUrl}/${dependency.id}`, entity, token.admin) - should.equal(ret.status, 200) - await assertResourceRolePhaseDependency(ret.body.id, entity) - }) - - it('update dependency again', async () => { - const entity = dependencies.createBody(dependency.phaseId, dependency.resourceRoleId, true) - const ret = await putRequest(`${dependenciesUrl}/${dependency.id}`, entity, token.admin) - should.equal(ret.status, 200) - await assertResourceRolePhaseDependency(ret.body.id, entity) - }) - - it('update dependency - phaseId not found', async () => { - try { - const entity = dependencies.createBody(dependency.resourceRoleId, dependency.resourceRoleId, false) - await putRequest(`${dependenciesUrl}/${dependency.id}`, entity, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 404) - should.equal(_.get(err, 'response.body.message'), `Not found phase id: ${dependency.resourceRoleId}`) - } - }) - - it('update dependency - resourceRoleId not found', async () => { - try { - const entity = dependencies.createBody(dependencies.testBody.phaseId, dependencies.testBody.phaseId, true) - await putRequest(`${dependenciesUrl}/${dependency.id}`, entity, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 404) - should.equal(_.get(err, 'response.body.message'), `ResourceRole with id: ${dependencies.testBody.phaseId} doesn't exist`) - } - }) - - it('update dependency - conflict', async () => { - const entity = dependencies.createBody(dependency.phaseId, copilotRoleId, true) - try { - await putRequest(`${dependenciesUrl}/${dependency.id}`, entity, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 409) - should.equal(_.get(err, 'response.body.message'), 'There is already dependency of given phaseId and resourceRoleId') - } - }) - - let { stringFields, booleanFields, requiredFields, testBody } = dependencies - - for (const stringField of stringFields) { - it(`test invalid parameters, invalid string type field ${stringField}`, async () => { - let entity = _.cloneDeep(testBody) - _.set(entity, stringField, 123) - try { - await putRequest(`${dependenciesUrl}/${dependency.id}`, entity, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"${stringField}" must be a string`) - } - }) - } - - for (const booleanField of booleanFields) { - it(`test invalid parameters, invalid boolean type field ${booleanField}`, async () => { - let entity = _.cloneDeep(testBody) - _.set(entity, booleanField, 123) - try { - await putRequest(`${dependenciesUrl}/${dependency.id}`, entity, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"${booleanField}" must be a boolean`) - } - }) - } - - for (const requiredField of requiredFields) { - it(`test invalid parameters, required field ${requiredField} is missing`, async () => { - let entity = _.cloneDeep(testBody) - entity = _.omit(entity, requiredField) - try { - await putRequest(`${dependenciesUrl}/${dependency.id}`, entity, token.admin) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 400) - should.equal(_.get(err, 'response.body.message'), `"${requiredField}" is required`) - } - }) - } - - it(`test without token, expected 401`, async () => { - try { - await putRequest(`${dependenciesUrl}/${dependency.id}`, testBody) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'No token provided.') - } - }) - - it(`test with invalid token(invalid), expected 401`, async () => { - try { - await putRequest(`${dependenciesUrl}/${dependency.id}`, testBody, 'invalid') - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Invalid Token.') - } - }) - - it(`test with invalid token(expired), expected 401`, async () => { - try { - await putRequest(`${dependenciesUrl}/${dependency.id}`, testBody, token.expired) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 401) - should.equal(_.get(err, 'response.body.message'), 'Failed to authenticate token.') - } - }) - - it(`test with user token, expected 403`, async () => { - try { - await putRequest(`${dependenciesUrl}/${dependency.id}`, testBody, token.denis) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'You are not allowed to perform this action!') - } - }) - - it(`test with invalid M2M token, expected 403`, async () => { - try { - await putRequest(`${dependenciesUrl}/${dependency.id}`, testBody, token.m2mRead) - throw new Error('should not throw error here') - } catch (err) { - should.equal(err.status, 403) - should.equal(_.get(err, 'response.body.message'), 'You are not allowed to perform this action!') - } - }) -}) diff --git a/test/postman/newman.js b/test/postman/newman.js index a093d7f..3119499 100644 --- a/test/postman/newman.js +++ b/test/postman/newman.js @@ -77,6 +77,94 @@ const requests = [ }, { folder: 'delete dependency with m2m' + }, + { + folder: 'create resource role with all kinds of invalid request body', + iterationData: require('./testData/resource-role/create-resource-role-with-invalid-data.json') + }, + { + folder: 'update resource role with all kinds of invalid request body', + iterationData: require('./testData/resource-role/update-resource-role-with-invalid-data.json') + }, + { + folder: 'get all resource roles' + }, + { + folder: 'get matched resource roles' + }, + { + folder: 'get resource roles with all kinds of invalid parameter', + iterationData: require('./testData/resource-role/get-resource-role-with-invalid-data.json') + }, + { + folder: 'create dependency with all kinds of invalid request body', + iterationData: require('./testData/resource-role-phase-dependency/create-dependency-with-invalid-data.json') + }, + { + folder: 'update dependency with all kinds of invalid request body', + iterationData: require('./testData/resource-role-phase-dependency/update-dependency-with-invalid-data.json') + }, + { + folder: 'get dependencies with all kinds of invalid parameter', + iterationData: require('./testData/resource-role-phase-dependency/get-dependencies-with-invalid-data.json') + }, + { + folder: 'create resource by admin', + iterationData: require('./testData/resource/create-resource-by-admin.json') + }, + { + folder: 'create resource using m2m token', + iterationData: require('./testData/resource/create-resource-by-m2m.json') + }, + { + folder: 'create resource with all kinds of invalid token', + iterationData: require('./testData/resource/create-resource-with-invalid-tokens.json') + }, + { + folder: 'create resource with all kinds of invalid request body', + iterationData: require('./testData/resource/create-resource-with-invalid-data.json') + }, + { + folder: 'get resources by required parameter only', + iterationData: require('./testData/resource/get-resources-with-required-parameter.json') + }, + { + folder: 'get resources with all parameters', + iterationData: require('./testData/resource/get-resources-with-all-parameters.json') + }, + { + folder: 'get resources with all kinds of invalid parameter', + iterationData: require('./testData/resource/get-resources-with-invalid-data.json') + }, + { + folder: 'get challenges by member with different users', + iterationData: require('./testData/resource/get-resources-by-member-with-different-users.json') + }, + { + folder: 'get challenges by member with resource role', + iterationData: require('./testData/resource/get-resources-by-member-with-resource-role.json') + }, + { + folder: 'get challenges by member with all kinds of invalid token', + iterationData: require('./testData/resource/get-resources-by-member-with-invalid-tokens.json') + }, + { + folder: 'get challenges by member with all kinds of invalid parameter', + iterationData: require('./testData/resource/get-resources-by-member-with-invalid-parameter.json') + }, + { + folder: 'delete resource with all kinds of invalid token', + iterationData: require('./testData/resource/delete-resource-with-invalid-tokens.json') + }, + { + folder: 'delete resource with all kinds of invalid parameter', + iterationData: require('./testData/resource/delete-resource-with-invalid-parameter.json') + }, + { + folder: 'delete resource with admin' + }, + { + folder: 'delete resource with m2m' } ] diff --git a/test/postman/resource-api.postman_collection.json b/test/postman/resource-api.postman_collection.json index 7ac6a57..e7df16a 100644 --- a/test/postman/resource-api.postman_collection.json +++ b/test/postman/resource-api.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "f9009c39-962f-4d40-a266-d3b1633d5c98", + "_postman_id": "c24b7751-3c89-4248-9d7c-6d2499985af2", "name": "resource-api", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -189,6 +189,61 @@ } }, "response": [] + }, + { + "name": "create resource role with all kinds of invalid request body", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{admin_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"name\": \"{{name}}\",\n\t\"fullReadAccess\": {{fullReadAccess}},\n \"fullWriteAccess\": {{fullWriteAccess}},\n\t\"{{required_field_1}}\": {{isActive}},\n\t\"{{required_field_2}}\": {{selfObtainable}}\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles" + ] + } + }, + "response": [] } ] }, @@ -403,7 +458,7 @@ { "key": "Authorization", "type": "text", - "value": "Bearer {{m2m_all_token}}" + "value": "Bearer {{admin_token}}" } ], "body": { @@ -411,30 +466,20 @@ "raw": "{\n\t\"name\": \"failure-test\",\n\t\"fullReadAccess\": true,\n \"fullWriteAccess\": false,\n\t\"isActive\": true,\n\t\"selfObtainable\": false\n}" }, "url": { - "raw": "{{URL}}/resource-roles/test", + "raw": "{{URL}}/resource-roles/fe6d0a58-ce7d-4521-8501-b8132b1c0311", "host": [ "{{URL}}" ], "path": [ "resource-roles", - "test" + "fe6d0a58-ce7d-4521-8501-b8132b1c0311" ] } }, "response": [] - } - ] - } - ] - }, - { - "name": "Resource Role Phase Dependencies", - "item": [ - { - "name": "create dependency", - "item": [ + }, { - "name": "create dependency by admin", + "name": "update resource role with all kinds of invalid request body", "event": [ { "listen": "test", @@ -444,13 +489,8 @@ "const httpCode = iterationData.get('httpCode')", "pm.test(`Status code is ${httpCode}`, function () {", " pm.response.to.have.status(httpCode);", - " if(httpCode === 200){", - " const response = pm.response.json()", - " pm.expect(response.phaseId).to.eq(iterationData.get('phaseId'))", - " pm.expect(response.resourceRoleId).to.eq(pm.environment.get('COPILOT_RESOURCE_ROLE_ID'))", - " pm.expect(response.phaseState).to.eq(iterationData.get('phaseState'))", - " pm.environment.set(\"DEPENDENCY_ID_1\", pm.response.json().id);", - " }", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", "});" ], "type": "text/javascript" @@ -458,7 +498,7 @@ } ], "request": { - "method": "POST", + "method": "PUT", "header": [ { "key": "Accept", @@ -467,7 +507,6 @@ }, { "key": "Content-Type", - "name": "Content-Type", "type": "text", "value": "application/json" }, @@ -479,23 +518,149 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"phaseId\": \"{{phaseId}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": {{phaseState}}\n}" + "raw": "{\n\t\"name\": \"{{name}}\",\n\t\"fullReadAccess\": {{fullReadAccess}},\n \"fullWriteAccess\": {{fullWriteAccess}},\n\t\"{{required_field_1}}\": {{isActive}},\n\t\"{{required_field_2}}\": {{selfObtainable}}\n}" }, "url": { - "raw": "{{URL}}/resource-roles/Phase-dependencies", + "raw": "{{URL}}/resource-roles/{{COPILOT_RESOURCE_ROLE_ID}}", "host": [ "{{URL}}" ], "path": [ "resource-roles", - "Phase-dependencies" + "{{COPILOT_RESOURCE_ROLE_ID}}" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "get resource role", + "item": [ + { + "name": "get all resource roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "", + "type": "text", + "value": "", + "disabled": true + } + ], + "url": { + "raw": "{{URL}}/resource-roles", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles" ] } }, "response": [] }, { - "name": "create dependency by m2m", + "name": "get matched resource roles", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "", + "type": "text", + "value": "", + "disabled": true + } + ], + "url": { + "raw": "{{URL}}/resource-roles/?name=Reviewer&isActive=true&legacyId=1&selfObtainable=false&fullReadAccess=true&fullWriteAccess=false", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "" + ], + "query": [ + { + "key": "name", + "value": "Reviewer" + }, + { + "key": "isActive", + "value": "true" + }, + { + "key": "legacyId", + "value": "1" + }, + { + "key": "selfObtainable", + "value": "false" + }, + { + "key": "fullReadAccess", + "value": "true" + }, + { + "key": "fullWriteAccess", + "value": "false" + } + ] + } + }, + "response": [] + }, + { + "name": "get resource roles with all kinds of invalid parameter", "event": [ { "listen": "test", @@ -505,13 +670,8 @@ "const httpCode = iterationData.get('httpCode')", "pm.test(`Status code is ${httpCode}`, function () {", " pm.response.to.have.status(httpCode);", - " if(httpCode === 200){", - " const response = pm.response.json()", - " pm.expect(response.phaseId).to.eq(iterationData.get('phaseId'))", - " pm.expect(response.resourceRoleId).to.eq(pm.environment.get('COPILOT_RESOURCE_ROLE_ID'))", - " pm.expect(response.phaseState).to.eq(iterationData.get('phaseState'))", - " pm.environment.set(\"DEPENDENCY_ID_2\", pm.response.json().id);", - " }", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", "});" ], "type": "text/javascript" @@ -519,7 +679,7 @@ } ], "request": { - "method": "POST", + "method": "GET", "header": [ { "key": "Accept", @@ -528,35 +688,71 @@ }, { "key": "Content-Type", - "name": "Content-Type", "type": "text", "value": "application/json" }, { - "key": "Authorization", + "key": "", "type": "text", - "value": "Bearer {{m2m_all_token}}" + "value": "", + "disabled": true } ], - "body": { - "mode": "raw", - "raw": "{\n\t\"phaseId\": \"{{phaseId}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": {{phaseState}}\n}" - }, "url": { - "raw": "{{URL}}/resource-roles/Phase-dependencies", + "raw": "{{URL}}/resource-roles/?name={{name}}&isActive={{isActive}}&legacyId={{legacyId}}&selfObtainable={{selfObtainable}}&fullReadAccess={{fullReadAccess}}&fullWriteAccess={{fullWriteAccess}}&{{invalid}}={{invalid}}", "host": [ "{{URL}}" ], "path": [ "resource-roles", - "Phase-dependencies" + "" + ], + "query": [ + { + "key": "name", + "value": "{{name}}" + }, + { + "key": "isActive", + "value": "{{isActive}}" + }, + { + "key": "legacyId", + "value": "{{legacyId}}" + }, + { + "key": "selfObtainable", + "value": "{{selfObtainable}}" + }, + { + "key": "fullReadAccess", + "value": "{{fullReadAccess}}" + }, + { + "key": "fullWriteAccess", + "value": "{{fullWriteAccess}}" + }, + { + "key": "{{invalid}}", + "value": "{{invalid}}" + } ] } }, "response": [] - }, + } + ] + } + ] + }, + { + "name": "Resource Role Phase Dependencies", + "item": [ + { + "name": "create dependency", + "item": [ { - "name": "create dependency with all kinds of invalid token", + "name": "create dependency by admin", "event": [ { "listen": "test", @@ -566,8 +762,13 @@ "const httpCode = iterationData.get('httpCode')", "pm.test(`Status code is ${httpCode}`, function () {", " pm.response.to.have.status(httpCode);", - " const response = pm.response.json()", - " pm.expect(response.message).to.eq(iterationData.get('message'))", + " if(httpCode === 200){", + " const response = pm.response.json()", + " pm.expect(response.phaseId).to.eq(iterationData.get('phaseId'))", + " pm.expect(response.resourceRoleId).to.eq(pm.environment.get('COPILOT_RESOURCE_ROLE_ID'))", + " pm.expect(response.phaseState).to.eq(iterationData.get('phaseState'))", + " pm.environment.set(\"DEPENDENCY_ID_1\", pm.response.json().id);", + " }", "});" ], "type": "text/javascript" @@ -591,12 +792,12 @@ { "key": "Authorization", "type": "text", - "value": "{{jwtToken}}" + "value": "Bearer {{admin_token}}" } ], "body": { "mode": "raw", - "raw": "{\n\t\"phaseId\": \"{{PHASE_ID}}\",\n\t\"resourceRoleId\": \"{{SUBMITTER_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": false\n}" + "raw": "{\n\t\"phaseId\": \"{{phaseId}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": {{phaseState}}\n}" }, "url": { "raw": "{{URL}}/resource-roles/Phase-dependencies", @@ -612,14 +813,1115 @@ "response": [] }, { - "name": "create dependency with not found phase id 404", + "name": "create dependency by m2m", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " if(httpCode === 200){", + " const response = pm.response.json()", + " pm.expect(response.phaseId).to.eq(iterationData.get('phaseId'))", + " pm.expect(response.resourceRoleId).to.eq(pm.environment.get('COPILOT_RESOURCE_ROLE_ID'))", + " pm.expect(response.phaseState).to.eq(iterationData.get('phaseState'))", + " pm.environment.set(\"DEPENDENCY_ID_2\", pm.response.json().id);", + " }", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{m2m_all_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"phaseId\": \"{{phaseId}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": {{phaseState}}\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies" + ] + } + }, + "response": [] + }, + { + "name": "create dependency with all kinds of invalid token", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "{{jwtToken}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"phaseId\": \"{{PHASE_ID}}\",\n\t\"resourceRoleId\": \"{{SUBMITTER_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": false\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies" + ] + } + }, + "response": [] + }, + { + "name": "create dependency with not found phase id 404", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{m2m_all_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"phaseId\": \"fe6d0a58-ce7d-4521-8501-b8132b1c0391\",\n\t\"resourceRoleId\": \"fe6d0a58-ce7d-4521-8501-b8132b1c0391\",\n\t\"phaseState\": false\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies" + ] + } + }, + "response": [] + }, + { + "name": "create dependency with all kinds of invalid request body", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{admin_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"{{required_field_1}}\": \"{{phaseId}}\",\n\t\"{{required_field_2}}\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"{{required_field_3}}\": {{phaseState}}\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "get dependencies", + "item": [ + { + "name": "get all dependencies", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{admin_token}}" + } + ], + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies" + ] + } + }, + "response": [] + }, + { + "name": "get matched dependencies", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{m2m_read_token}}" + } + ], + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies?phaseId={{PHASE_ID}}&resourceRoleId={{COPILOT_RESOURCE_ROLE_ID}}&phaseState=false", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies" + ], + "query": [ + { + "key": "phaseId", + "value": "{{PHASE_ID}}" + }, + { + "key": "resourceRoleId", + "value": "{{COPILOT_RESOURCE_ROLE_ID}}" + }, + { + "key": "phaseState", + "value": "false" + } + ] + } + }, + "response": [] + }, + { + "name": "get dependencies with all kinds of invalid token", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "{{jwtToken}}" + } + ], + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies" + ] + } + }, + "response": [] + }, + { + "name": "get dependencies with all kinds of invalid parameter", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{admin_token}}" + } + ], + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies?phaseId={{phaseId}}&resourceRoleId={{COPILOT_RESOURCE_ROLE_ID}}&phaseState={{phaseState}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies" + ], + "query": [ + { + "key": "phaseId", + "value": "{{phaseId}}" + }, + { + "key": "resourceRoleId", + "value": "{{COPILOT_RESOURCE_ROLE_ID}}" + }, + { + "key": "phaseState", + "value": "{{phaseState}}" + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "update dependency", + "item": [ + { + "name": "update dependency by admin", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " if(httpCode === 200){", + " const response = pm.response.json()", + " pm.expect(response.phaseId).to.eq(iterationData.get('phaseId'))", + " pm.expect(response.resourceRoleId).to.eq(pm.environment.get('COPILOT_RESOURCE_ROLE_ID'))", + " pm.expect(response.phaseState).to.eq(iterationData.get('phaseState'))", + " }", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{admin_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"phaseId\": \"{{phaseId}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": {{phaseState}}\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_1}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies", + "{{DEPENDENCY_ID_1}}" + ] + } + }, + "response": [] + }, + { + "name": "update dependency by m2m", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " if(httpCode === 200){", + " const response = pm.response.json()", + " pm.expect(response.phaseId).to.eq(iterationData.get('phaseId'))", + " pm.expect(response.resourceRoleId).to.eq(pm.environment.get('COPILOT_RESOURCE_ROLE_ID'))", + " pm.expect(response.phaseState).to.eq(iterationData.get('phaseState'))", + " }", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{m2m_modify_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"phaseId\": \"{{phaseId}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": {{phaseState}}\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_1}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies", + "{{DEPENDENCY_ID_1}}" + ] + } + }, + "response": [] + }, + { + "name": "update not found dependency 404", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 404\", function () {", + " pm.response.to.have.status(404);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{m2m_modify_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"phaseId\": \"{{PHASE_ID}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": false\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies/{{COPILOT_RESOURCE_ROLE_ID}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies", + "{{COPILOT_RESOURCE_ROLE_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "update dependency with all kinds of invalid token", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "{{jwtToken}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"phaseId\": \"{{PHASE_ID}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": false\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_1}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies", + "{{DEPENDENCY_ID_1}}" + ] + } + }, + "response": [] + }, + { + "name": "update dependency with all kinds of invalid request body", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "PUT", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{admin_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"{{required_field_1}}\": \"{{phaseId}}\",\n\t\"{{required_field_2}}\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"{{required_field_3}}\": {{phaseState}}\n}" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_1}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies", + "{{DEPENDENCY_ID_1}}" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "delete dependency", + "item": [ + { + "name": "delete dependency with all kinds of invalid token", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "{{jwtToken}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_2}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies", + "{{DEPENDENCY_ID_2}}" + ] + } + }, + "response": [] + }, + { + "name": "delete dependency with admin", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{admin_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_1}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies", + "{{DEPENDENCY_ID_1}}" + ] + } + }, + "response": [] + }, + { + "name": "delete dependency with m2m", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{m2m_modify_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_2}}", + "host": [ + "{{URL}}" + ], + "path": [ + "resource-roles", + "Phase-dependencies", + "{{DEPENDENCY_ID_2}}" + ] + } + }, + "response": [] + } + ] + } + ] + }, + { + "name": "Resources", + "item": [ + { + "name": "create resource", + "item": [ + { + "name": "create resource by admin", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " if(httpCode === 200){", + " const response = pm.response.json()", + " pm.expect(response.memberHandle).to.eq(iterationData.get('memberHandle'))", + " pm.expect(response.challengeId).to.eq(pm.environment.get('CHALLENGE_ID'))", + " pm.expect(response.roleId).to.eq(pm.environment.get('COPILOT_RESOURCE_ROLE_ID'))", + " pm.expect(response.id).to.be.a(\"string\");", + " pm.expect(response.created).to.be.a(\"string\");", + " pm.expect(response.createdBy).to.be.a(\"string\");", + " pm.expect(response.memberId).to.be.a(\"string\");", + " }", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/json", + "type": "text" + }, + { + "key": "Content-Type", + "value": "application/json", + "type": "text" + }, + { + "key": "Authorization", + "value": "Bearer {{admin_token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"challengeId\": \"{{CHALLENGE_ID}}\",\n\t\"memberHandle\": \"{{memberHandle}}\",\n\t\"roleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\"\n}" + }, + "url": { + "raw": "{{URL}}/resources", + "host": [ + "{{URL}}" + ], + "path": [ + "resources" + ] + } + }, + "response": [] + }, + { + "name": "create resource using m2m token", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " if(httpCode === 200){", + " const response = pm.response.json()", + " pm.expect(response.memberHandle).to.eq(iterationData.get('memberHandle'))", + " pm.expect(response.challengeId).to.eq(pm.environment.get('CHALLENGE_ID'))", + " pm.expect(response.roleId).to.eq(pm.environment.get('COPILOT_RESOURCE_ROLE_ID'))", + " pm.expect(response.id).to.be.a(\"string\");", + " pm.expect(response.created).to.be.a(\"string\");", + " pm.expect(response.createdBy).to.be.a(\"string\");", + " pm.expect(response.memberId).to.be.a(\"string\");", + " }", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{m2m_all_token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"challengeId\": \"{{CHALLENGE_ID}}\",\n\t\"memberHandle\": \"{{memberHandle}}\",\n\t\"roleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\"\n}" + }, + "url": { + "raw": "{{URL}}/resources", + "host": [ + "{{URL}}" + ], + "path": [ + "resources" + ] + } + }, + "response": [] + }, + { + "name": "create resource with all kinds of invalid token", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "type": "text", + "value": "application/json" + }, + { + "key": "Content-Type", + "name": "Content-Type", + "type": "text", + "value": "application/json" + }, + { + "key": "Authorization", + "type": "text", + "value": "{{jwtToken}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"challengeId\": \"{{CHALLENGE_ID}}\",\n\t\"memberHandle\": \"heffan\",\n\t\"roleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\"\n}" + }, + "url": { + "raw": "{{URL}}/resources", + "host": [ + "{{URL}}" + ], + "path": [ + "resources" + ] + } + }, + "response": [] + }, + { + "name": "create resource with all kinds of invalid request body", "event": [ { "listen": "test", "script": { "exec": [ - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.includes(iterationData.get('message'))", "});" ], "type": "text/javascript" @@ -643,21 +1945,20 @@ { "key": "Authorization", "type": "text", - "value": "Bearer {{m2m_all_token}}" + "value": "Bearer {{admin_token}}" } ], "body": { "mode": "raw", - "raw": "{\n\t\"phaseId\": \"{{SUBMITTER_RESOURCE_ROLE_ID}}\",\n\t\"resourceRoleId\": \"{{SUBMITTER_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": false\n}" + "raw": "{\n\t\"{{required_field_1}}\": \"{{CHALLENGE_ID}}\",\n\t\"{{required_field_2}}\": \"{{memberHandle}}\",\n\t\"{{required_field_3}}\": \"{{COPILOT_RESOURCE_ROLE_ID}}\"\n}" }, "url": { - "raw": "{{URL}}/resource-roles/Phase-dependencies", + "raw": "{{URL}}/resources", "host": [ "{{URL}}" ], "path": [ - "resource-roles", - "Phase-dependencies" + "resources" ] } }, @@ -666,10 +1967,10 @@ ] }, { - "name": "get dependencies", + "name": "get resources", "item": [ { - "name": "get all dependencies", + "name": "get resources by required parameter only", "event": [ { "listen": "test", @@ -677,6 +1978,10 @@ "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", + "});", + "pm.test(\"A list of resources should be returned\", () => {", + " const responseJson = pm.response.json();", + " pm.expect(responseJson.length > 0);", "});" ], "type": "text/javascript" @@ -697,26 +2002,40 @@ "value": "application/json" }, { - "key": "Authorization", + "key": "", "type": "text", - "value": "Bearer {{admin_token}}" + "value": "", + "disabled": true } ], "url": { - "raw": "{{URL}}/resource-roles/Phase-dependencies", + "raw": "{{URL}}/resources?{{required_field_1}}={{CHALLENGE_ID}}&{{required_field_2}}={{memberId}}&{{required_field_3}}={{memberHandle}}", "host": [ "{{URL}}" ], "path": [ - "resource-roles", - "Phase-dependencies" + "resources" + ], + "query": [ + { + "key": "{{required_field_1}}", + "value": "{{CHALLENGE_ID}}" + }, + { + "key": "{{required_field_2}}", + "value": "{{memberId}}" + }, + { + "key": "{{required_field_3}}", + "value": "{{memberHandle}}" + } ] } }, "response": [] }, { - "name": "get matched dependencies", + "name": "get resources with all parameters", "event": [ { "listen": "test", @@ -735,41 +2054,61 @@ "header": [ { "key": "Accept", - "type": "text", - "value": "application/json" + "value": "application/json", + "type": "text" }, { "key": "Content-Type", - "type": "text", - "value": "application/json" + "value": "application/json", + "type": "text" }, { - "key": "Authorization", + "key": "", + "value": "", "type": "text", - "value": "Bearer {{m2m_read_token}}" + "disabled": true } ], "url": { - "raw": "{{URL}}/resource-roles/Phase-dependencies?phaseId={{PHASE_ID}}&resourceRoleId={{SUBMITTER_RESOURCE_ROLE_ID}}&phaseState=false", + "raw": "{{URL}}/resources?challengeId={{CHALLENGE_ID}}&page={{page}}&perPage={{perPage}}&memberId={{memberId}}&memberHandle={{memberHandle}}&roleId={{COPILOT_RESOURCE_ROLE_ID}}&sortBy={{sortBy}}&sortOrder={{sortOrder}}", "host": [ "{{URL}}" ], "path": [ - "resource-roles", - "Phase-dependencies" + "resources" ], "query": [ { - "key": "phaseId", - "value": "{{PHASE_ID}}" + "key": "challengeId", + "value": "{{CHALLENGE_ID}}" }, { - "key": "resourceRoleId", - "value": "{{SUBMITTER_RESOURCE_ROLE_ID}}" + "key": "page", + "value": "{{page}}" }, { - "key": "phaseState", - "value": "false" + "key": "perPage", + "value": "{{perPage}}" + }, + { + "key": "memberId", + "value": "{{memberId}}" + }, + { + "key": "memberHandle", + "value": "{{memberHandle}}" + }, + { + "key": "roleId", + "value": "{{COPILOT_RESOURCE_ROLE_ID}}" + }, + { + "key": "sortBy", + "value": "{{sortBy}}" + }, + { + "key": "sortOrder", + "value": "{{sortOrder}}" } ] } @@ -777,7 +2116,7 @@ "response": [] }, { - "name": "get dependencies with all kinds of invalid token", + "name": "get resources with all kinds of invalid parameter", "event": [ { "listen": "test", @@ -809,19 +2148,58 @@ "value": "application/json" }, { - "key": "Authorization", + "key": "", "type": "text", - "value": "{{jwtToken}}" + "value": "", + "disabled": true } ], "url": { - "raw": "{{URL}}/resource-roles/Phase-dependencies", + "raw": "{{URL}}/resources?{{required_field_1}}={{CHALLENGE_ID}}&page={{page}}&perPage={{perPage}}&{{required_field_2}}={{memberId}}&{{required_field_3}}={{memberHandle}}&roleId={{COPILOT_RESOURCE_ROLE_ID}}&sortBy={{sortBy}}&sortOrder={{sortOrder}}", "host": [ "{{URL}}" ], "path": [ - "resource-roles", - "Phase-dependencies" + "resources" + ], + "query": [ + { + "key": "{{required_field_1}}", + "value": "{{CHALLENGE_ID}}" + }, + { + "key": "page", + "value": "{{page}}" + }, + { + "key": "perPage", + "value": "{{perPage}}" + }, + { + "key": "{{required_field_2}}", + "value": "{{memberId}}" + }, + { + "key": "{{required_field_3}}", + "value": "{{memberHandle}}" + }, + { + "key": "roleId", + "value": "{{COPILOT_RESOURCE_ROLE_ID}}" + }, + { + "key": "sortBy", + "value": "{{sortBy}}" + }, + { + "key": "sortOrder", + "value": "{{sortOrder}}" + }, + { + "key": "", + "value": "", + "disabled": true + } ] } }, @@ -830,25 +2208,28 @@ ] }, { - "name": "update dependency", + "name": "list challenge by member", "item": [ { - "name": "update dependency by admin", + "name": "get challenges by member with different users", "event": [ { "listen": "test", "script": { "exec": [ - "const iterationData = pm.iterationData", - "const httpCode = iterationData.get('httpCode')", - "pm.test(`Status code is ${httpCode}`, function () {", - " pm.response.to.have.status(httpCode);", - " if(httpCode === 200){", - " const response = pm.response.json()", - " pm.expect(response.phaseId).to.eq(iterationData.get('phaseId'))", - " pm.expect(response.resourceRoleId).to.eq(pm.environment.get('COPILOT_RESOURCE_ROLE_ID'))", - " pm.expect(response.phaseState).to.eq(iterationData.get('phaseState'))", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + " const iterationData = pm.iterationData", + " const memberId = iterationData.get('memberId')", + " const response = pm.response.json()", + " if (memberId == 'not_exist_user') {", + " // result should be empty", + " pm.expect(response.length).to.eq(0)", + " } else {", + " // result should not be empty", + " pm.expect(response.length).to.gt(0)", " }", + " ", "});" ], "type": "text/javascript" @@ -856,44 +2237,109 @@ } ], "request": { - "method": "PUT", + "method": "GET", "header": [ { - "key": "Accept", - "type": "text", - "value": "application/json" + "key": "Authorization", + "value": "{{jwtToken}}", + "type": "text" }, { - "key": "Content-Type", + "key": "", + "value": "", "type": "text", - "value": "application/json" + "disabled": true }, + { + "key": "", + "value": "", + "type": "text", + "disabled": true + } + ], + "url": { + "raw": "{{URL}}/resources/{{memberId}}/challenges", + "host": [ + "{{URL}}" + ], + "path": [ + "resources", + "{{memberId}}", + "challenges" + ] + } + }, + "response": [] + }, + { + "name": "get challenges by member with resource role", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + " const iterationData = pm.iterationData", + " const memberId = iterationData.get('memberId')", + " const response = pm.response.json()", + " if (memberId == 'not_exist_user') {", + " // result should be empty", + " pm.expect(response.length).to.eq(0)", + " } else {", + " // result should be a list", + " pm.expect(response.length).to.gte(0)", + " }", + " ", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "GET", + "header": [ { "key": "Authorization", "type": "text", "value": "Bearer {{admin_token}}" + }, + { + "key": "", + "type": "text", + "value": "", + "disabled": true + }, + { + "key": "", + "type": "text", + "value": "", + "disabled": true } ], - "body": { - "mode": "raw", - "raw": "{\n\t\"phaseId\": \"{{phaseId}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": {{phaseState}}\n}" - }, "url": { - "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_1}}", + "raw": "{{URL}}/resources/{{memberId}}/challenges?resourceRoleId={{COPILOT_RESOURCE_ROLE_ID}}", "host": [ "{{URL}}" ], "path": [ - "resource-roles", - "Phase-dependencies", - "{{DEPENDENCY_ID_1}}" + "resources", + "{{memberId}}", + "challenges" + ], + "query": [ + { + "key": "resourceRoleId", + "value": "{{COPILOT_RESOURCE_ROLE_ID}}" + } ] } }, "response": [] }, { - "name": "update dependency by m2m", + "name": "get challenges by member with all kinds of invalid token", "event": [ { "listen": "test", @@ -903,12 +2349,8 @@ "const httpCode = iterationData.get('httpCode')", "pm.test(`Status code is ${httpCode}`, function () {", " pm.response.to.have.status(httpCode);", - " if(httpCode === 200){", - " const response = pm.response.json()", - " pm.expect(response.phaseId).to.eq(iterationData.get('phaseId'))", - " pm.expect(response.resourceRoleId).to.eq(pm.environment.get('COPILOT_RESOURCE_ROLE_ID'))", - " pm.expect(response.phaseState).to.eq(iterationData.get('phaseState'))", - " }", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", "});" ], "type": "text/javascript" @@ -916,51 +2358,53 @@ } ], "request": { - "method": "PUT", + "method": "GET", "header": [ { - "key": "Accept", + "key": "Authorization", "type": "text", - "value": "application/json" + "value": "{{jwtToken}}" }, { - "key": "Content-Type", + "key": "", "type": "text", - "value": "application/json" + "value": "", + "disabled": true }, { - "key": "Authorization", + "key": "", "type": "text", - "value": "Bearer {{m2m_modify_token}}" + "value": "", + "disabled": true } ], - "body": { - "mode": "raw", - "raw": "{\n\t\"phaseId\": \"{{phaseId}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": {{phaseState}}\n}" - }, "url": { - "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_1}}", + "raw": "{{URL}}/resources/{{memberId}}/challenges", "host": [ "{{URL}}" ], "path": [ - "resource-roles", - "Phase-dependencies", - "{{DEPENDENCY_ID_1}}" + "resources", + "{{memberId}}", + "challenges" ] } }, "response": [] }, { - "name": "update not found dependency 404", + "name": "get challenges by member with all kinds of invalid parameter", "event": [ { "listen": "test", "script": { "exec": [ - "pm.test(\"Status code is 404\", function () {", - " pm.response.to.have.status(404);", + "const iterationData = pm.iterationData", + "const httpCode = iterationData.get('httpCode')", + "pm.test(`Status code is ${httpCode}`, function () {", + " pm.response.to.have.status(httpCode);", + " const response = pm.response.json()", + " pm.expect(response.message).to.eq(iterationData.get('message'))", "});" ], "type": "text/javascript" @@ -968,44 +2412,57 @@ } ], "request": { - "method": "PUT", + "method": "GET", "header": [ { - "key": "Accept", + "key": "Authorization", "type": "text", - "value": "application/json" + "value": "Bearer {{admin_token}}" }, { - "key": "Content-Type", + "key": "", "type": "text", - "value": "application/json" + "value": "", + "disabled": true }, { - "key": "Authorization", + "key": "", "type": "text", - "value": "Bearer {{m2m_modify_token}}" + "value": "", + "disabled": true } ], - "body": { - "mode": "raw", - "raw": "{\n\t\"phaseId\": \"{{PHASE_ID}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": false\n}" - }, "url": { - "raw": "{{URL}}/resource-roles/Phase-dependencies/{{COPILOT_RESOURCE_ROLE_ID}}", + "raw": "{{URL}}/resources/{{memberId}}/challenges?resourceRoleId={{COPILOT_RESOURCE_ROLE_ID}}&{{invalid}}={{invalid}}", "host": [ "{{URL}}" ], "path": [ - "resource-roles", - "Phase-dependencies", - "{{COPILOT_RESOURCE_ROLE_ID}}" + "resources", + "{{memberId}}", + "challenges" + ], + "query": [ + { + "key": "resourceRoleId", + "value": "{{COPILOT_RESOURCE_ROLE_ID}}" + }, + { + "key": "{{invalid}}", + "value": "{{invalid}}" + } ] } }, "response": [] - }, + } + ] + }, + { + "name": "delete resource", + "item": [ { - "name": "update dependency with all kinds of invalid token", + "name": "delete resource with all kinds of invalid token", "event": [ { "listen": "test", @@ -1024,7 +2481,7 @@ } ], "request": { - "method": "PUT", + "method": "DELETE", "header": [ { "key": "Accept", @@ -1044,29 +2501,22 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"phaseId\": \"{{PHASE_ID}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": false\n}" + "raw": "{\n\t\"challengeId\": \"{{CHALLENGE_ID}}\",\n\t\"memberHandle\": \"denis\",\n\t\"roleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\"\n}" }, "url": { - "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_1}}", + "raw": "{{URL}}/resources", "host": [ "{{URL}}" ], "path": [ - "resource-roles", - "Phase-dependencies", - "{{DEPENDENCY_ID_1}}" + "resources" ] } }, "response": [] - } - ] - }, - { - "name": "delete dependency", - "item": [ + }, { - "name": "delete dependency with all kinds of invalid token", + "name": "delete resource with all kinds of invalid parameter", "event": [ { "listen": "test", @@ -1100,29 +2550,27 @@ { "key": "Authorization", "type": "text", - "value": "{{jwtToken}}" + "value": "Bearer {{admin_token}}" } ], "body": { "mode": "raw", - "raw": "" + "raw": "{\n\t\"{{required_field_1}}\": \"{{CHALLENGE_ID}}\",\n\t\"{{required_field_2}}\": \"{{memberHandle}}\",\n\t\"{{required_field_3}}\": \"{{COPILOT_RESOURCE_ROLE_ID}}\"\n}" }, "url": { - "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_2}}", + "raw": "{{URL}}/resources", "host": [ "{{URL}}" ], "path": [ - "resource-roles", - "Phase-dependencies", - "{{DEPENDENCY_ID_2}}" + "resources" ] } }, "response": [] }, { - "name": "delete dependency with admin", + "name": "delete resource with admin", "event": [ { "listen": "test", @@ -1157,24 +2605,22 @@ ], "body": { "mode": "raw", - "raw": "" + "raw": "{\n\t\"challengeId\": \"{{CHALLENGE_ID}}\",\n\t\"memberHandle\": \"TonyJ\",\n\t\"roleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\"\n}" }, "url": { - "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_1}}", + "raw": "{{URL}}/resources", "host": [ "{{URL}}" ], "path": [ - "resource-roles", - "Phase-dependencies", - "{{DEPENDENCY_ID_1}}" + "resources" ] } }, "response": [] }, { - "name": "delete dependency with m2m", + "name": "delete resource with m2m", "event": [ { "listen": "test", @@ -1204,22 +2650,20 @@ { "key": "Authorization", "type": "text", - "value": "Bearer {{m2m_modify_token}}" + "value": "Bearer {{m2m_all_token}}" } ], "body": { "mode": "raw", - "raw": "" + "raw": "{\n\t\"challengeId\": \"{{CHALLENGE_ID}}\",\n\t\"memberHandle\": \"ghostar\",\n\t\"roleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\"\n}" }, "url": { - "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_2}}", + "raw": "{{URL}}/resources", "host": [ "{{URL}}" ], "path": [ - "resource-roles", - "Phase-dependencies", - "{{DEPENDENCY_ID_2}}" + "resources" ] } }, diff --git a/test/postman/resource-api.postman_environment.json b/test/postman/resource-api.postman_environment.json index 24d0254..7e56a87 100644 --- a/test/postman/resource-api.postman_environment.json +++ b/test/postman/resource-api.postman_environment.json @@ -1,7 +1,7 @@ { "_": { "postman_variable_scope": "environment", - "postman_exported_at": "2021-02-01T10:57:35.837Z", + "postman_exported_at": "2021-02-06T07:02:03.600Z", "postman_exported_using": "Newman/5.2.2" }, "id": "8972a3df-731f-4475-b089-ccbb28735083", @@ -9,7 +9,7 @@ "values": [ { "type": "any", - "value": "https://api.topcoder-dev.com/v5", + "value": "http://localhost:3000/v5", "key": "URL" }, { @@ -44,7 +44,7 @@ }, { "type": "any", - "value": "", + "value": "c943cb74-37bb-409a-994e-1cd28fbbb7b5", "key": "COPILOT_RESOURCE_ROLE_ID" }, { @@ -99,16 +99,21 @@ }, { "type": "any", - "value": "", + "value": "04727d3c-80c2-4784-86c9-64d5ebf82092", "key": "DEPENDENCY_ID_1" }, { "type": "any", - "value": "", + "value": "3fb03069-8ea7-42ae-a3ae-f44da87ea29f", "key": "DEPENDENCY_ID_2" + }, + { + "type": "any", + "value": "e84fa230-c70b-4c96-a923-bc867bb2bb25", + "key": "COPILOT_RESOURCE_ROLE_ID_0" } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2021-02-01T10:57:47.851Z", + "_postman_exported_at": "2021-02-06T07:02:07.803Z", "_postman_exported_using": "Newman/5.2.2" -} +} \ No newline at end of file diff --git a/test/postman/testData/resource-role-phase-dependency/create-dependency-with-invalid-data.json b/test/postman/testData/resource-role-phase-dependency/create-dependency-with-invalid-data.json new file mode 100644 index 0000000..22f8b78 --- /dev/null +++ b/test/postman/testData/resource-role-phase-dependency/create-dependency-with-invalid-data.json @@ -0,0 +1,59 @@ +[ + { + "required_field_1": "phaseId", + "required_field_2": "resourceRoleId", + "required_field_3": "phaseState", + "phaseId": "", + "COPILOT_RESOURCE_ROLE_ID": "", + "phaseState": true, + "httpCode": 400, + "message": "\"phaseId\" is not allowed to be empty" + }, + { + "required_field_1": "phaseId", + "required_field_2": "resourceRoleId", + "required_field_3": "phaseState", + "phaseId": "not_guid", + "phaseState": true, + "httpCode": 400, + "message": "\"phaseId\" must be a valid GUID" + }, + { + "required_field_1": "phaseIdNotProvided", + "required_field_2": "resourceRoleId", + "required_field_3": "phaseState", + "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", + "phaseState": true, + "httpCode": 400, + "message": "\"phaseId\" is required" + }, + { + "required_field_1": "phaseId", + "required_field_2": "resourceRoleId", + "required_field_3": "phaseStateNotProvided", + "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", + "phaseState": true, + "httpCode": 400, + "message": "\"phaseState\" is required" + }, + { + "required_field_1": "phaseId", + "required_field_2": "resourceRoleId", + "required_field_3": "phaseState", + "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", + "COPILOT_RESOURCE_ROLE_ID": "not a guid", + "phaseState": true, + "httpCode": 400, + "message": "\"resourceRoleId\" must be a valid GUID" + }, + { + "required_field_1": "phaseId", + "required_field_2": "resourceRoleId", + "required_field_3": "phaseState", + "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", + "COPILOT_RESOURCE_ROLE_ID": "", + "phaseState": true, + "httpCode": 400, + "message": "\"resourceRoleId\" is not allowed to be empty" + } +] \ No newline at end of file diff --git a/test/postman/testData/resource-role-phase-dependency/create-dependency.json b/test/postman/testData/resource-role-phase-dependency/create-dependency.json index 590c26e..6eea897 100644 --- a/test/postman/testData/resource-role-phase-dependency/create-dependency.json +++ b/test/postman/testData/resource-role-phase-dependency/create-dependency.json @@ -8,10 +8,5 @@ "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", "phaseState": false, "httpCode": 200 - }, - { - "phaseId": "abc", - "phaseState": false, - "httpCode": 404 } ] \ No newline at end of file diff --git a/test/postman/testData/resource-role-phase-dependency/get-dependencies-with-invalid-data.json b/test/postman/testData/resource-role-phase-dependency/get-dependencies-with-invalid-data.json new file mode 100644 index 0000000..b566912 --- /dev/null +++ b/test/postman/testData/resource-role-phase-dependency/get-dependencies-with-invalid-data.json @@ -0,0 +1,34 @@ +[ + { + "phaseId": "", + "phaseState": true, + "httpCode": 400, + "message": "\"phaseId\" is not allowed to be empty" + }, + { + "phaseId": "not_guid", + "phaseState": true, + "httpCode": 400, + "message": "\"phaseId\" must be a valid GUID" + }, + { + "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", + "phaseState": 123, + "httpCode": 400, + "message": "\"phaseState\" must be a boolean" + }, + { + "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", + "COPILOT_RESOURCE_ROLE_ID": "not a guid", + "phaseState": true, + "httpCode": 400, + "message": "\"resourceRoleId\" must be a valid GUID" + }, + { + "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", + "COPILOT_RESOURCE_ROLE_ID": "", + "phaseState": true, + "httpCode": 400, + "message": "\"resourceRoleId\" is not allowed to be empty" + } +] \ No newline at end of file diff --git a/test/postman/testData/resource-role-phase-dependency/update-dependency-with-invalid-data.json b/test/postman/testData/resource-role-phase-dependency/update-dependency-with-invalid-data.json new file mode 100644 index 0000000..22f8b78 --- /dev/null +++ b/test/postman/testData/resource-role-phase-dependency/update-dependency-with-invalid-data.json @@ -0,0 +1,59 @@ +[ + { + "required_field_1": "phaseId", + "required_field_2": "resourceRoleId", + "required_field_3": "phaseState", + "phaseId": "", + "COPILOT_RESOURCE_ROLE_ID": "", + "phaseState": true, + "httpCode": 400, + "message": "\"phaseId\" is not allowed to be empty" + }, + { + "required_field_1": "phaseId", + "required_field_2": "resourceRoleId", + "required_field_3": "phaseState", + "phaseId": "not_guid", + "phaseState": true, + "httpCode": 400, + "message": "\"phaseId\" must be a valid GUID" + }, + { + "required_field_1": "phaseIdNotProvided", + "required_field_2": "resourceRoleId", + "required_field_3": "phaseState", + "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", + "phaseState": true, + "httpCode": 400, + "message": "\"phaseId\" is required" + }, + { + "required_field_1": "phaseId", + "required_field_2": "resourceRoleId", + "required_field_3": "phaseStateNotProvided", + "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", + "phaseState": true, + "httpCode": 400, + "message": "\"phaseState\" is required" + }, + { + "required_field_1": "phaseId", + "required_field_2": "resourceRoleId", + "required_field_3": "phaseState", + "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", + "COPILOT_RESOURCE_ROLE_ID": "not a guid", + "phaseState": true, + "httpCode": 400, + "message": "\"resourceRoleId\" must be a valid GUID" + }, + { + "required_field_1": "phaseId", + "required_field_2": "resourceRoleId", + "required_field_3": "phaseState", + "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", + "COPILOT_RESOURCE_ROLE_ID": "", + "phaseState": true, + "httpCode": 400, + "message": "\"resourceRoleId\" is not allowed to be empty" + } +] \ No newline at end of file diff --git a/test/postman/testData/resource-role-phase-dependency/update-dependency.json b/test/postman/testData/resource-role-phase-dependency/update-dependency.json index 590c26e..6eea897 100644 --- a/test/postman/testData/resource-role-phase-dependency/update-dependency.json +++ b/test/postman/testData/resource-role-phase-dependency/update-dependency.json @@ -8,10 +8,5 @@ "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", "phaseState": false, "httpCode": 200 - }, - { - "phaseId": "abc", - "phaseState": false, - "httpCode": 404 } ] \ No newline at end of file diff --git a/test/postman/testData/resource-role/create-resource-role-with-invalid-data.json b/test/postman/testData/resource-role/create-resource-role-with-invalid-data.json new file mode 100644 index 0000000..9826bf8 --- /dev/null +++ b/test/postman/testData/resource-role/create-resource-role-with-invalid-data.json @@ -0,0 +1,79 @@ +[ + { + "name": "", + "fullReadAccess": true, + "fullWriteAccess": false, + "required_field_1": "isActive", + "required_field_2": "selfObtainable", + "isActive": true, + "selfObtainable": false, + "httpCode": 400, + "message": "\"name\" is not allowed to be empty" + }, + { + "name": "co-pilot", + "fullReadAccess": true, + "fullWriteAccess": false, + "required_field_1": "isActive", + "required_field_2": "selfObtainableNotProvided", + "isActive": true, + "selfObtainable": false, + "httpCode": 400, + "message": "\"selfObtainable\" is required" + }, + { + "name": "co-pilot", + "fullReadAccess": true, + "fullWriteAccess": false, + "required_field_1": "isActiveNotProvided", + "required_field_2": "selfObtainable", + "isActive": true, + "selfObtainable": true, + "httpCode": 400, + "message": "\"isActive\" is required" + }, + { + "name": "co-pilot", + "fullReadAccess": "123", + "fullWriteAccess": false, + "required_field_1": "isActive", + "required_field_2": "selfObtainable", + "isActive": true, + "selfObtainable": false, + "httpCode": 400, + "message": "\"fullReadAccess\" must be a boolean" + }, + { + "name": "Observer", + "fullReadAccess": true, + "fullWriteAccess": "123", + "required_field_1": "isActive", + "required_field_2": "selfObtainable", + "isActive": false, + "selfObtainable": false, + "httpCode": 400, + "message": "\"fullWriteAccess\" must be a boolean" + }, + { + "name": "submitter", + "fullReadAccess": true, + "fullWriteAccess": true, + "required_field_1": "isActive", + "required_field_2": "selfObtainable", + "isActive": "123", + "selfObtainable": true, + "httpCode": 400, + "message": "\"isActive\" must be a boolean" + }, + { + "name": "reviewer", + "fullReadAccess": false, + "fullWriteAccess": false, + "required_field_1": "isActive", + "required_field_2": "selfObtainable", + "isActive": true, + "selfObtainable": "123", + "httpCode": 400, + "message": "\"selfObtainable\" must be a boolean" + } +] \ No newline at end of file diff --git a/test/postman/testData/resource-role/get-resource-role-with-invalid-data.json b/test/postman/testData/resource-role/get-resource-role-with-invalid-data.json new file mode 100644 index 0000000..761131f --- /dev/null +++ b/test/postman/testData/resource-role/get-resource-role-with-invalid-data.json @@ -0,0 +1,79 @@ +[ + { + "name": "", + "legacyId": 1, + "fullReadAccess": true, + "fullWriteAccess": false, + "isActive": true, + "selfObtainable": false, + "invalid": "", + "httpCode": 400, + "message": "\"name\" is not allowed to be empty" + }, + { + "name": "test-copilot", + "legacyId": "", + "fullReadAccess": true, + "fullWriteAccess": false, + "isActive": true, + "selfObtainable": false, + "invalid": "", + "httpCode": 400, + "message": "\"legacyId\" must be a number" + }, + { + "name": "test-copilot", + "legacyId": 1, + "fullReadAccess": 123, + "fullWriteAccess": false, + "isActive": true, + "selfObtainable": false, + "invalid": "", + "httpCode": 400, + "message": "\"fullReadAccess\" must be a boolean" + }, + { + "name": "test-copilot", + "legacyId": 1, + "fullReadAccess": true, + "fullWriteAccess": 123, + "isActive": true, + "selfObtainable": false, + "invalid": "", + "httpCode": 400, + "message": "\"fullWriteAccess\" must be a boolean" + }, + { + "name": "test-copilot", + "legacyId": 1, + "fullReadAccess": true, + "fullWriteAccess": false, + "isActive": 123, + "selfObtainable": false, + "invalid": "", + "httpCode": 400, + "message": "\"isActive\" must be a boolean" + }, + { + "name": "test-copilot", + "legacyId": 1, + "fullReadAccess": true, + "fullWriteAccess": false, + "isActive": true, + "selfObtainable": 123, + "invalid": "", + "httpCode": 400, + "message": "\"selfObtainable\" must be a boolean" + }, + { + "name": "test-copilot", + "legacyId": 1, + "fullReadAccess": true, + "fullWriteAccess": false, + "isActive": true, + "selfObtainable": false, + "invalid": "invalid", + "httpCode": 400, + "message": "\"invalid\" is not allowed" + } +] \ No newline at end of file diff --git a/test/postman/testData/resource-role/update-resource-role-with-invalid-data.json b/test/postman/testData/resource-role/update-resource-role-with-invalid-data.json new file mode 100644 index 0000000..413f983 --- /dev/null +++ b/test/postman/testData/resource-role/update-resource-role-with-invalid-data.json @@ -0,0 +1,79 @@ +[ + { + "name": "", + "fullReadAccess": true, + "fullWriteAccess": false, + "required_field_1": "isActive", + "required_field_2": "selfObtainable", + "isActive": true, + "selfObtainable": false, + "httpCode": 400, + "message": "\"name\" is not allowed to be empty" + }, + { + "name": "update-co-pilot", + "fullReadAccess": true, + "fullWriteAccess": false, + "required_field_1": "isActive", + "required_field_2": "selfObtainableNotProvided", + "isActive": true, + "selfObtainable": false, + "httpCode": 400, + "message": "\"selfObtainable\" is required" + }, + { + "name": "update-co-pilot", + "fullReadAccess": true, + "fullWriteAccess": false, + "required_field_1": "isActiveNotProvided", + "required_field_2": "selfObtainable", + "isActive": true, + "selfObtainable": true, + "httpCode": 400, + "message": "\"isActive\" is required" + }, + { + "name": "update-co-pilot", + "fullReadAccess": "123", + "fullWriteAccess": false, + "required_field_1": "isActive", + "required_field_2": "selfObtainable", + "isActive": true, + "selfObtainable": false, + "httpCode": 400, + "message": "\"fullReadAccess\" must be a boolean" + }, + { + "name": "Observer", + "fullReadAccess": true, + "fullWriteAccess": "123", + "required_field_1": "isActive", + "required_field_2": "selfObtainable", + "isActive": false, + "selfObtainable": false, + "httpCode": 400, + "message": "\"fullWriteAccess\" must be a boolean" + }, + { + "name": "update-submitter", + "fullReadAccess": true, + "fullWriteAccess": true, + "required_field_1": "isActive", + "required_field_2": "selfObtainable", + "isActive": "123", + "selfObtainable": true, + "httpCode": 400, + "message": "\"isActive\" must be a boolean" + }, + { + "name": "update-reviewer", + "fullReadAccess": false, + "fullWriteAccess": false, + "required_field_1": "isActive", + "required_field_2": "selfObtainable", + "isActive": true, + "selfObtainable": "123", + "httpCode": 400, + "message": "\"selfObtainable\" must be a boolean" + } +] \ No newline at end of file diff --git a/test/postman/testData/resource/create-resource-by-admin.json b/test/postman/testData/resource/create-resource-by-admin.json new file mode 100644 index 0000000..41ab013 --- /dev/null +++ b/test/postman/testData/resource/create-resource-by-admin.json @@ -0,0 +1,18 @@ +[ + { + "memberHandle": "HoHoSKY", + "httpCode": 200 + }, + { + "memberHandle": "mess", + "httpCode": 200 + }, + { + "memberHandle": "x", + "httpCode": 200 + }, + { + "memberHandle": "TonyJ", + "httpCode": 200 + } +] \ No newline at end of file diff --git a/test/postman/testData/resource/create-resource-by-m2m.json b/test/postman/testData/resource/create-resource-by-m2m.json new file mode 100644 index 0000000..6c7dbc3 --- /dev/null +++ b/test/postman/testData/resource/create-resource-by-m2m.json @@ -0,0 +1,18 @@ +[ + { + "memberHandle": "iamtong", + "httpCode": 200 + }, + { + "memberHandle": "jack", + "httpCode": 200 + }, + { + "memberHandle": "onsky", + "httpCode": 200 + }, + { + "memberHandle": "ghostar", + "httpCode": 200 + } +] \ No newline at end of file diff --git a/test/postman/testData/resource/create-resource-with-invalid-data.json b/test/postman/testData/resource/create-resource-with-invalid-data.json new file mode 100644 index 0000000..4e92013 --- /dev/null +++ b/test/postman/testData/resource/create-resource-with-invalid-data.json @@ -0,0 +1,104 @@ +[ + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "heffan", + "CHALLENGE_ID": "", + "httpCode": 400, + "message": "\"challengeId\" is not allowed to be empty" + }, + { + "required_field_1": "challengeId_not_provided", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "heffan", + "httpCode": 400, + "message": "\"challengeId\" is required" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "heffan", + "CHALLENGE_ID": "123", + "httpCode": 400, + "message": "\"challengeId\" must be a valid GUID" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "heffan", + "CHALLENGE_ID": "11111111-ce7d-4521-8501-b8132b1c0391", + "httpCode": 404, + "message": "Challenge with id: 11111111-ce7d-4521-8501-b8132b1c0391 doesn't exist." + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "", + "httpCode": 400, + "message": "\"memberHandle\" is not allowed to be empty" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle_not_provided", + "required_field_3": "roleId", + "memberHandle": "heffan", + "httpCode": 400, + "message": "\"memberHandle\" is required" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "some_not_exist_handle", + "httpCode": 400, + "message": "User with handle: some_not_exist_handle doesn't exist" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "heffan", + "COPILOT_RESOURCE_ROLE_ID": "", + "httpCode": 400, + "message": "\"roleId\" is not allowed to be empty" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId_not_provided", + "memberHandle": "heffan", + "httpCode": 400, + "message": "\"roleId\" is required" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "heffan", + "COPILOT_RESOURCE_ROLE_ID": "123", + "httpCode": 400, + "message": "\"roleId\" must be a valid GUID" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "heffan", + "COPILOT_RESOURCE_ROLE_ID": "11111111-ce7d-4521-8501-b8132b1c0771", + "httpCode": 400, + "message": "No resource role found with id: 11111111-ce7d-4521-8501-b8132b1c0771." + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "ghostar", + "httpCode": 409, + "message": "User ghostar already has resource with roleId:" + } +] \ No newline at end of file diff --git a/test/postman/testData/resource/create-resource-with-invalid-tokens.json b/test/postman/testData/resource/create-resource-with-invalid-tokens.json new file mode 100644 index 0000000..f0c5fc1 --- /dev/null +++ b/test/postman/testData/resource/create-resource-with-invalid-tokens.json @@ -0,0 +1,26 @@ +[ + { + "jwtToken": "Bearer invalid", + "httpCode": 401, + "message": "Invalid Token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTU1MTA2MzIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU1MTA1MzIxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.97-pjuSGGqDAqK2FG2yi_3nmzB7ZMXQwtG0bi8_PlKk", + "httpCode": 401, + "message": "Failed to authenticate token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "httpCode": 403, + "message": "Only M2M, admin or user with full access role can perform this action" + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.1EdekIx1jU2lDSIXlMFCPmXkzLWQ_ZvxPuutQWuTKu0", + "httpCode": 403, + "message": "You are not allowed to perform this action!" + }, + { + "httpCode": 401, + "message": "No token provided." + } +] \ No newline at end of file diff --git a/test/postman/testData/resource/delete-resource-with-invalid-parameter.json b/test/postman/testData/resource/delete-resource-with-invalid-parameter.json new file mode 100644 index 0000000..fe214e9 --- /dev/null +++ b/test/postman/testData/resource/delete-resource-with-invalid-parameter.json @@ -0,0 +1,70 @@ +[ + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "mess", + "CHALLENGE_ID": "11111111-ce7d-4521-8501-b8132b1c0391", + "httpCode": 404, + "message": "Challenge with id: 11111111-ce7d-4521-8501-b8132b1c0391 doesn't exist." + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "mess", + "COPILOT_RESOURCE_ROLE_ID": "11111111-ce7d-4521-8501-b8132b1c0391", + "httpCode": 400, + "message": "No resource role found with id: 11111111-ce7d-4521-8501-b8132b1c0391." + }, + { + "required_field_1": "challengeId_not_provided", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "mess", + "httpCode": 400, + "message": "\"challengeId\" is required" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle_not_provided", + "required_field_3": "roleId", + "memberHandle": "mess", + "httpCode": 400, + "message": "\"memberHandle\" is required" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId_not_provided", + "memberHandle": "mess", + "httpCode": 400, + "message": "\"roleId\" is required" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "CHALLENGE_ID": "", + "memberHandle": "mess", + "httpCode": 400, + "message": "\"challengeId\" is not allowed to be empty" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "", + "httpCode": 400, + "message": "\"memberHandle\" is not allowed to be empty" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "COPILOT_RESOURCE_ROLE_ID": "", + "memberHandle": "mess", + "httpCode": 400, + "message": "\"roleId\" is not allowed to be empty" + } +] \ No newline at end of file diff --git a/test/postman/testData/resource/delete-resource-with-invalid-tokens.json b/test/postman/testData/resource/delete-resource-with-invalid-tokens.json new file mode 100644 index 0000000..eef94e0 --- /dev/null +++ b/test/postman/testData/resource/delete-resource-with-invalid-tokens.json @@ -0,0 +1,21 @@ +[ + { + "jwtToken": "Bearer invalid", + "httpCode": 401, + "message": "Invalid Token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTU1MTA2MzIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU1MTA1MzIxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.97-pjuSGGqDAqK2FG2yi_3nmzB7ZMXQwtG0bi8_PlKk", + "httpCode": 401, + "message": "Failed to authenticate token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.1EdekIx1jU2lDSIXlMFCPmXkzLWQ_ZvxPuutQWuTKu0", + "httpCode": 403, + "message": "You are not allowed to perform this action!" + }, + { + "httpCode": 401, + "message": "No token provided." + } +] \ No newline at end of file diff --git a/test/postman/testData/resource/get-resources-by-member-with-different-users.json b/test/postman/testData/resource/get-resources-by-member-with-different-users.json new file mode 100644 index 0000000..2bf0701 --- /dev/null +++ b/test/postman/testData/resource/get-resources-by-member-with-different-users.json @@ -0,0 +1,18 @@ +[ + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTY4MTA1MjIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU0OTc5MTYxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.ONh2RSE5NeJzyjBD68TSUdNFMs5v5BXtga4LchR2x3s", + "memberId": "16096823" + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJhbGw6cmVzb3VyY2VzIGFsbDpyZXNvdXJjZV9yb2xlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.UhuqMGrrNzj-VQz2-BogN28YZTE9uauIfdP7EOhrKB0", + "memberId": "16096823" + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "memberId": "16096823" + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "memberId": "not_exist_user" + } +] \ No newline at end of file diff --git a/test/postman/testData/resource/get-resources-by-member-with-invalid-parameter.json b/test/postman/testData/resource/get-resources-by-member-with-invalid-parameter.json new file mode 100644 index 0000000..9e4420d --- /dev/null +++ b/test/postman/testData/resource/get-resources-by-member-with-invalid-parameter.json @@ -0,0 +1,19 @@ +[ + { + "COPILOT_RESOURCE_ROLE_ID": "", + "invalid": "", + "httpCode": 400, + "message": "\"resourceRoleId\" is not allowed to be empty" + }, + { + "COPILOT_RESOURCE_ROLE_ID": "11111", + "invalid": "", + "httpCode": 400, + "message": "\"resourceRoleId\" must be a valid GUID" + }, + { + "invalid": "invalid", + "httpCode": 400, + "message": "\"invalid\" is not allowed" + } +] \ No newline at end of file diff --git a/test/postman/testData/resource/get-resources-by-member-with-invalid-tokens.json b/test/postman/testData/resource/get-resources-by-member-with-invalid-tokens.json new file mode 100644 index 0000000..af1ac3c --- /dev/null +++ b/test/postman/testData/resource/get-resources-by-member-with-invalid-tokens.json @@ -0,0 +1,25 @@ +[ + { + "jwtToken": "Bearer invalid", + "memberId": "16096823", + "httpCode": 401, + "message": "Invalid Token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTU1MTA2MzIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU1MTA1MzIxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.97-pjuSGGqDAqK2FG2yi_3nmzB7ZMXQwtG0bi8_PlKk", + "memberId": "16096823", + "httpCode": 401, + "message": "Failed to authenticate token." + }, + { + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJjcmVhdGU6cmVzb3VyY2VzIGRlbGV0ZTpyZXNvdXJjZXMgdXBkYXRlOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.f_3FLT3jMTnKwGIg8fcFP2lmShy5S9d5IvLNbXSj2Eo", + "memberId": "16096823", + "httpCode": 403, + "message": "You are not allowed to perform this action!" + }, + { + "memberId": "16096823", + "httpCode": 401, + "message": "No token provided." + } +] \ No newline at end of file diff --git a/test/postman/testData/resource/get-resources-by-member-with-resource-role.json b/test/postman/testData/resource/get-resources-by-member-with-resource-role.json new file mode 100644 index 0000000..cbc555d --- /dev/null +++ b/test/postman/testData/resource/get-resources-by-member-with-resource-role.json @@ -0,0 +1,14 @@ +[ + { + "memberId": "16096823" + }, + { + "memberId": "16096823" + }, + { + "memberId": "16096823" + }, + { + "memberId": "not_exist_user" + } +] \ No newline at end of file diff --git a/test/postman/testData/resource/get-resources-with-all-parameters.json b/test/postman/testData/resource/get-resources-with-all-parameters.json new file mode 100644 index 0000000..1c11ebe --- /dev/null +++ b/test/postman/testData/resource/get-resources-with-all-parameters.json @@ -0,0 +1,26 @@ +[ + { + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc" + }, + { + "page": 2, + "perPage": 4, + "memberId": 105878, + "memberHandle": "x", + "sortBy": "memberHandle", + "sortOrder": "desc" + }, + { + "page": 1, + "perPage": 10, + "memberId": 111036, + "memberHandle": "jack", + "sortBy": "memberHandle", + "sortOrder": "asc" + } +] \ No newline at end of file diff --git a/test/postman/testData/resource/get-resources-with-invalid-data.json b/test/postman/testData/resource/get-resources-with-invalid-data.json new file mode 100644 index 0000000..cf78f51 --- /dev/null +++ b/test/postman/testData/resource/get-resources-with-invalid-data.json @@ -0,0 +1,242 @@ +[ + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "CHALLENGE_ID": "", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"challengeId\" is not allowed to be empty" + }, + { + "required_field_1": "challengeId_not_provided", + "required_field_2": "memberId_not_provided", + "required_field_3": "memberHandle_not_provided", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "At least one of the following parameters is required: [challengeId, memberId, memberHandle]" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": -1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"page\" must be larger than or equal to 1" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": 0, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"page\" must be larger than or equal to 1" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": "", + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"page\" must be a number" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": 1, + "perPage": -1, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"perPage\" must be larger than or equal to 1" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": 1, + "perPage": 0, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "invalid": "", + "httpCode": 400, + "message": "\"perPage\" must be larger than or equal to 1" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": 1, + "perPage": "", + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"perPage\" must be a number" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": 1, + "perPage": 10, + "memberId": "", + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"memberId\" is not allowed to be empty" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"memberHandle\" is not allowed to be empty" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"sortBy\" is not allowed to be empty" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberId", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"sortBy\" must be one of [memberHandle, created]" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "", + "httpCode": 400, + "message": "\"sortOrder\" is not allowed to be empty" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "invalid", + "httpCode": 400, + "message": "\"sortOrder\" must be one of [desc, asc]" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "CHALLENGE_ID": "123", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"challengeId\" must be a valid GUID" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "CHALLENGE_ID": "11111111-ce7d-4521-8501-b8132b1c0391", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 404, + "message": "Challenge ID 11111111-ce7d-4521-8501-b8132b1c0391 not found" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "COPILOT_RESOURCE_ROLE_ID": "", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"roleId\" is not allowed to be empty" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "COPILOT_RESOURCE_ROLE_ID": "123", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"roleId\" must be a valid GUID" + } +] \ No newline at end of file diff --git a/test/postman/testData/resource/get-resources-with-required-parameter.json b/test/postman/testData/resource/get-resources-with-required-parameter.json new file mode 100644 index 0000000..7403d8a --- /dev/null +++ b/test/postman/testData/resource/get-resources-with-required-parameter.json @@ -0,0 +1,30 @@ +[ + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "memberId": 305384, + "memberHandle": "mess" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId_only_challengeId_provided", + "required_field_3": "memberHandle_only_challengeId_provided", + "memberId": 305384, + "memberHandle": "mess" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle_is_not_provided", + "memberId": 305384, + "memberHandle": "mess" + }, + { + "required_field_1": "challengeId", + "required_field_2": "memberId_is_not_provided", + "required_field_3": "memberHandle", + "memberId": 305384, + "memberHandle": "mess" + } +] \ No newline at end of file From 0b9ac1d0774a9e822495e630ef8badf25c8f0ec1 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Mon, 8 Mar 2021 16:06:52 +0200 Subject: [PATCH 13/60] fix lint --- src/services/ResourceService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/ResourceService.js b/src/services/ResourceService.js index d0e96f4..1da069b 100644 --- a/src/services/ResourceService.js +++ b/src/services/ResourceService.js @@ -521,4 +521,4 @@ module.exports = { listChallengesByMember } -logger.buildService(module.exports) \ No newline at end of file +logger.buildService(module.exports) From 4e63a28ad8752ffdb03c64e16bd68cbc3aed4566 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Mon, 8 Mar 2021 16:34:54 +0200 Subject: [PATCH 14/60] Fix postman configs for automated testing --- test/postman/resource-api.postman_environment.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/postman/resource-api.postman_environment.json b/test/postman/resource-api.postman_environment.json index 7e56a87..012c050 100644 --- a/test/postman/resource-api.postman_environment.json +++ b/test/postman/resource-api.postman_environment.json @@ -9,7 +9,7 @@ "values": [ { "type": "any", - "value": "http://localhost:3000/v5", + "value": "https://api.topcoder-dev.com/v5", "key": "URL" }, { @@ -116,4 +116,4 @@ "_postman_variable_scope": "environment", "_postman_exported_at": "2021-02-06T07:02:07.803Z", "_postman_exported_using": "Newman/5.2.2" -} \ No newline at end of file +} From e665b7a11f6502c1d1f189984975808fc661db75 Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Wed, 24 Mar 2021 13:44:02 +0530 Subject: [PATCH 15/60] code change for env specific [skop ci] --- .circleci/config.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 506262a..49ac450 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -79,6 +79,10 @@ jobs: "Run-Newman-Test": docker: - image: circleci/node:12 + environment: + DEPLOY_ENV: "DEV" + LOGICAL_ENV: "dev" + APPNAME: "resources-api" - image: tray/dynamodb-local command: "-inMemory -port 7777" - image: elasticsearch:6.8.13 @@ -87,9 +91,15 @@ jobs: steps: - checkout - setup_remote_docker + - run: *install_dependency + - run: *install_deploysuite - run: name: 'newman test' command: | + ./awsconfiguration.sh $DEPLOY_ENV + source awsenvconf + ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-qa-appvar + source buildenvvar npm i cd local cd .. From a639c8e2c8ee8ffe36f29a5f25bc31d1aa055977 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 8 Apr 2021 16:19:36 +0300 Subject: [PATCH 16/60] auto generate tokens on automated postman testing --- ReadMe.md | 22 +++- Verification.md | 4 - config/test.js | 18 +-- env.sh | 28 ++++- package.json | 2 +- src/scripts/drop-tables.js | 2 +- src/services/ResourceService.js | 2 +- test/postman/envHelper.js | 108 ++++++++++++++++++ test/postman/newman.js | 11 ++ .../resource-api.postman_collection.json | 20 ++-- .../resource-api.postman_environment.json | 60 ++++------ ...create-dependency-with-invalid-tokens.json | 4 +- ...delete-dependency-with-invalid-tokens.json | 4 +- .../get-dependency-with-invalid-tokens.json | 4 +- ...update-dependency-with-invalid-tokens.json | 4 +- ...ate-resource-role-with-invalid-tokens.json | 4 +- ...ate-resource-role-with-invalid-tokens.json | 4 +- .../create-resource-with-invalid-tokens.json | 6 +- .../delete-resource-with-invalid-tokens.json | 5 - ...ources-by-member-with-different-users.json | 8 +- ...sources-by-member-with-invalid-tokens.json | 6 - 21 files changed, 227 insertions(+), 99 deletions(-) create mode 100644 test/postman/envHelper.js diff --git a/ReadMe.md b/ReadMe.md index 88e7994..ec59a6d 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -75,6 +75,15 @@ The following parameters can be set in config files or in env variables: Configuration for testing is at `config/test.js`, only add such new configurations different from `config/default.js` - WAIT_TIME: wait time used in test, default is 1500 or 1.5 second - MOCK_CHALLENGE_API_PORT: the mock server port, default is 4000. +- AUTH_V2_URL: The auth v2 url +- AUTH_V2_CLIENT_ID: The auth v2 client id +- AUTH_V3_URL: The auth v3 url +- ADMIN_CREDENTIALS_USERNAME: The user's username with admin role +- ADMIN_CREDENTIALS_PASSWORD: The user's password with admin role +- COPILOT_CREDENTIALS_USERNAME: The user's username with copilot role +- COPILOT_CREDENTIALS_PASSWORD: The user's password with copilot role +- USER_CREDENTIALS_USERNAME: The user's username with user role +- USER_CREDENTIALS_PASSWORD: The user's password with user role ## Available commands - Install dependencies `npm install` @@ -118,7 +127,7 @@ You can also use your own remote ElasticSearch service for testing purpose. ### Create ElasticSearch Index -1. Makre sure ElasticSearch are running as per instructions above. +1. Make sure ElasticSearch are running as per instructions above. 2. Make sure you have configured all config parameters. Refer [Configuration](#configuration) 3. Run `npm run init-es force` to create index. @@ -148,6 +157,15 @@ The following test parameters can be set in config file or in env variables: - WAIT_TIME: wait time - MOCK_CHALLENGE_API_PORT: mock challenge api port +- AUTH_V2_URL: The auth v2 url +- AUTH_V2_CLIENT_ID: The auth v2 client id +- AUTH_V3_URL: The auth v3 url +- ADMIN_CREDENTIALS_USERNAME: The user's username with admin role +- ADMIN_CREDENTIALS_PASSWORD: The user's password with admin role +- COPILOT_CREDENTIALS_USERNAME: The user's username with copilot role +- COPILOT_CREDENTIALS_PASSWORD: The user's password with copilot role +- USER_CREDENTIALS_USERNAME: The user's username with user role +- USER_CREDENTIALS_PASSWORD: The user's password with user role ### Prepare @@ -170,7 +188,7 @@ npm run test ### Running E2E tests with Postman -#### `Start` the app server and mock API server before running e2e tests. You may need to set the env variables by calling `source env.sh` before calling `npm start`. +#### `Start` the app server and mock API server before running e2e tests. You may need to set the env variables by calling `source env.sh` before calling `NODE_ENV=test npm start`. - Make sure the db and es are started ```bash diff --git a/Verification.md b/Verification.md index 6abce48..64e56c4 100644 --- a/Verification.md +++ b/Verification.md @@ -41,10 +41,6 @@ All files | 88.69 | 83.7 | 90.43 | 88 You should be able to find the tests result from the command window of running `npm run test:newman` for each test case. -### Postman mock server -E2E tests use nock to mock `BUSAPI_URL`, where postman mock server could be used to replace nock. -Please refer to: https://drive.google.com/file/d/1GXMzyqpzwix-LDBwieiRFfpJlJxrTIgI/view?usp=sharing - Below is a sample output result of finding resources by member. ``` diff --git a/config/test.js b/config/test.js index 2c0863b..bfe7ccb 100644 --- a/config/test.js +++ b/config/test.js @@ -4,13 +4,17 @@ module.exports = { TERMS_API_URL: 'http://localhost:4000/v5/terms', - BUSAPI_URL: 'https://65279208-4c97-4d1a-a925-041b2433787a.mock.pstmn.io/v5', + BUSAPI_URL: 'http://localhost:4000/v5', CHALLENGE_PHASES_API_URL: 'http://localhost:4000/v5/challenge-phases', - DYNAMODB: { - AWS_ACCESS_KEY_ID: 'FAKE_ACCESS_KEY', - AWS_SECRET_ACCESS_KEY: 'FAKE_SECRET_ACCESS_KEY', - URL: 'http://localhost:7777' - }, WAIT_TIME: 1500, - MOCK_CHALLENGE_API_PORT: 4000 + MOCK_CHALLENGE_API_PORT: 4000, + AUTH_V2_URL: process.env.AUTH_V2_URL || 'https://topcoder-dev.auth0.com/oauth/ro', + AUTH_V2_CLIENT_ID: process.env.AUTH_V2_CLIENT_ID || '', + AUTH_V3_URL: process.env.AUTH_V3_URL || 'https://api.topcoder-dev.com/v3/authorizations', + ADMIN_CREDENTIALS_USERNAME: process.env.ADMIN_CREDENTIALS_USERNAME || '', + ADMIN_CREDENTIALS_PASSWORD: process.env.ADMIN_CREDENTIALS_PASSWORD || '', + COPILOT_CREDENTIALS_USERNAME: process.env.COPILOT_CREDENTIALS_USERNAME || '', + COPILOT_CREDENTIALS_PASSWORD: process.env.COPILOT_CREDENTIALS_PASSWORD || '', + USER_CREDENTIALS_USERNAME: process.env.USER_CREDENTIALS_USERNAME || '', + USER_CREDENTIALS_PASSWORD: process.env.USER_CREDENTIALS_PASSWORD || '' } diff --git a/env.sh b/env.sh index 70ff940..2feb112 100644 --- a/env.sh +++ b/env.sh @@ -1,7 +1,29 @@ #!/bin/sh -export AUTH0_CLIENT_ID=jGIf2pd3f44B1jqvOai30BIKTZanYBfU +export AUTH0_CLIENT_ID= -export AUTH0_CLIENT_SECRET=ldzqVaVEbqhwjM5KtZ79sG8djZpAVK8Z7qieVcC3vRjI4NirgcinKSBpPwk6mYYP +export AUTH0_CLIENT_SECRET= -export AUTH0_AUDIENCE=https://m2m.topcoder-dev.com/ +export AUTH0_AUDIENCE= + +export AUTH_V2_URL= + +export AUTH_V2_CLIENT_ID= + +export AUTH_V3_URL= + +export ADMIN_CREDENTIALS_USERNAME= + +export ADMIN_CREDENTIALS_PASSWORD= + +export COPILOT_CREDENTIALS_USERNAME= + +export COPILOT_CREDENTIALS_PASSWORD= + +export USER_CREDENTIALS_USERNAME= + +export USER_CREDENTIALS_PASSWORD= + +export IS_LOCAL_DB= + +export AUTH_SECRET= \ No newline at end of file diff --git a/package.json b/package.json index 7f636f3..3cff6d9 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "view-data": "node src/scripts/view-data.js", "mock-challenge-api": "NODE_ENV=test node mock/mock-challenge-api", "test": "nyc --reporter=html --reporter=text mocha test/unit/test.js --require test/common/prepare.js --timeout 60000 --exit", - "test:newman": "node test/postman/newman.js" + "test:newman": "NODE_ENV=test node test/postman/newman.js" }, "author": "TCSCODER", "license": "none", diff --git a/src/scripts/drop-tables.js b/src/scripts/drop-tables.js index cc95a93..e1bc95c 100644 --- a/src/scripts/drop-tables.js +++ b/src/scripts/drop-tables.js @@ -9,7 +9,7 @@ const logger = require('../common/logger') logger.info('Requesting to delete tables...') const promises = [] -const skipModels = ['DynamoDB', 'MemberStats', 'MemberProfile'] +const skipModels = ['DynamoDB', 'MemberProfile'] Object.keys(models).forEach(modelName => { if (!includes(skipModels, modelName)) { diff --git a/src/services/ResourceService.js b/src/services/ResourceService.js index 1da069b..e271959 100644 --- a/src/services/ResourceService.js +++ b/src/services/ResourceService.js @@ -85,7 +85,7 @@ async function getResources (currentUser, challengeId, roleId, memberId, memberH hasFullAccess = false } } - if (memberId && memberId !== currentUser.useId) { + if (memberId && memberId !== currentUser.userId) { throw new errors.ForbiddenError('You are not allowed to perform this operation!') } if (memberHandle && memberHandle !== currentUser.handle) { diff --git a/test/postman/envHelper.js b/test/postman/envHelper.js new file mode 100644 index 0000000..031cbab --- /dev/null +++ b/test/postman/envHelper.js @@ -0,0 +1,108 @@ +/** + * This file defines methods for getting access tokens + */ + +const _ = require('lodash') +const axios = require('axios') +const config = require('config') +const m2mAuth = require('tc-core-library-js').auth.m2m +const m2m = m2mAuth(_.pick(config, ['AUTH0_URL', 'AUTH0_AUDIENCE', 'TOKEN_CACHE_TIME', 'AUTH0_PROXY_SERVER_URL'])) + +/** + * Get m2mToken + * @returns {String} the M2MToken + */ +async function getM2MToken () { + return m2m.getMachineToken(config.AUTH0_CLIENT_ID, config.AUTH0_CLIENT_SECRET) +} + +/** + * Get user tokens from V2 API + * @param {String} userName the user name + * @param {String} userPassword the user password + * @returns {Object} the user tokens + */ +async function getUserTokenV2 (userName, userPassword) { + const { data } = await axios({ + method: 'post', + url: config.AUTH_V2_URL, + data: { + username: userName, + password: userPassword, + client_id: config.AUTH_V2_CLIENT_ID, + sso: false, + scope: 'openid profile offline_access', + response_type: 'token', + connection: 'TC-User-Database', + grant_type: 'password', + device: 'Browser' + }, + headers: { + 'cache-control': 'no-cache', + 'content-type': 'application/json' + } + }) + return data +} + +/** + * Get user token from V3 API + * @param {String} idToken the id_token + * @param {String} refreshToken the refresh_token + * @returns {String} the user token + */ +async function getUserTokenV3 (idToken, refreshToken) { + const { data } = await axios({ + method: 'post', + url: config.AUTH_V3_URL, + data: { + param: { + externalToken: idToken, + refreshToken: refreshToken + } + }, + headers: { + 'cache-control': 'no-cache', + authorization: `Bearer ${this.v2_token}`, + 'content-type': 'application/json;charset=UTF-8' + } + }) + return data +} + +/** + * Get admin token from V3 API + * @returns {String} The admin token + */ +async function getAdminToken () { + const v2 = await getUserTokenV2(config.ADMIN_CREDENTIALS_USERNAME, config.ADMIN_CREDENTIALS_PASSWORD) + const v3 = await getUserTokenV3(v2.id_token, v2.refresh_token) + return _.get(v3, 'result.content.token') +} + +/** + * Get copilot token from V3 API + * @returns {String} The copilot token + */ +async function getCopilotToken () { + const v2 = await getUserTokenV2(config.COPILOT_CREDENTIALS_USERNAME, config.COPILOT_CREDENTIALS_PASSWORD) + const v3 = await getUserTokenV3(v2.id_token, v2.refresh_token) + return _.get(v3, 'result.content.token') +} + +/** + * Get regular user token from V3 API + * @returns {String} The user token + */ +async function getUserToken () { + const v2 = await getUserTokenV2(config.USER_CREDENTIALS_USERNAME, config.USER_CREDENTIALS_PASSWORD) + const v3 = await getUserTokenV3(v2.id_token, v2.refresh_token) + return _.get(v3, 'result.content.token') +} + +module.exports = { + getM2MToken, + getAdminToken, + getCopilotToken, + getUserToken +} diff --git a/test/postman/newman.js b/test/postman/newman.js index 3119499..37c7bdd 100644 --- a/test/postman/newman.js +++ b/test/postman/newman.js @@ -1,5 +1,6 @@ const newman = require('newman') const _ = require('lodash') +const envHelper = require('./envHelper') const requests = [ { @@ -185,6 +186,16 @@ const runner = (options) => new Promise((resolve, reject) => { }) ;(async () => { + const m2mToken = await envHelper.getM2MToken() + const adminToken = await envHelper.getAdminToken() + const copilotToken = await envHelper.getCopilotToken() + const userToken = await envHelper.getUserToken() + options.envVar = [ + { key: 'M2M_TOKEN', value: m2mToken }, + { key: 'admin_token', value: adminToken }, + { key: 'copilot_token', value: copilotToken }, + { key: 'user_token', value: userToken } + ] for (const request of requests) { delete require.cache[require.resolve('./resource-api.postman_environment.json')] options.environment = require('./resource-api.postman_environment.json') diff --git a/test/postman/resource-api.postman_collection.json b/test/postman/resource-api.postman_collection.json index e7df16a..4464a7f 100644 --- a/test/postman/resource-api.postman_collection.json +++ b/test/postman/resource-api.postman_collection.json @@ -116,7 +116,7 @@ { "key": "Authorization", "type": "text", - "value": "Bearer {{m2m_all_token}}" + "value": "Bearer {{M2M_TOKEN}}" } ], "body": { @@ -352,7 +352,7 @@ { "key": "Authorization", "type": "text", - "value": "Bearer {{m2m_modify_token}}" + "value": "Bearer {{M2M_TOKEN}}" } ], "body": { @@ -853,7 +853,7 @@ { "key": "Authorization", "type": "text", - "value": "Bearer {{m2m_all_token}}" + "value": "Bearer {{M2M_TOKEN}}" } ], "body": { @@ -961,7 +961,7 @@ { "key": "Authorization", "type": "text", - "value": "Bearer {{m2m_all_token}}" + "value": "Bearer {{M2M_TOKEN}}" } ], "body": { @@ -1120,7 +1120,7 @@ { "key": "Authorization", "type": "text", - "value": "Bearer {{m2m_read_token}}" + "value": "Bearer {{M2M_TOKEN}}" } ], "url": { @@ -1370,7 +1370,7 @@ { "key": "Authorization", "type": "text", - "value": "Bearer {{m2m_modify_token}}" + "value": "Bearer {{M2M_TOKEN}}" } ], "body": { @@ -1422,7 +1422,7 @@ { "key": "Authorization", "type": "text", - "value": "Bearer {{m2m_modify_token}}" + "value": "Bearer {{M2M_TOKEN}}" } ], "body": { @@ -1699,7 +1699,7 @@ { "key": "Authorization", "type": "text", - "value": "Bearer {{m2m_modify_token}}" + "value": "Bearer {{M2M_TOKEN}}" } ], "body": { @@ -1835,7 +1835,7 @@ { "key": "Authorization", "type": "text", - "value": "Bearer {{m2m_all_token}}" + "value": "Bearer {{M2M_TOKEN}}" } ], "body": { @@ -2650,7 +2650,7 @@ { "key": "Authorization", "type": "text", - "value": "Bearer {{m2m_all_token}}" + "value": "Bearer {{M2M_TOKEN}}" } ], "body": { diff --git a/test/postman/resource-api.postman_environment.json b/test/postman/resource-api.postman_environment.json index 012c050..fc8fd5a 100644 --- a/test/postman/resource-api.postman_environment.json +++ b/test/postman/resource-api.postman_environment.json @@ -1,7 +1,7 @@ { "_": { "postman_variable_scope": "environment", - "postman_exported_at": "2021-02-06T07:02:03.600Z", + "postman_exported_at": "2021-03-26T18:00:05.539Z", "postman_exported_using": "Newman/5.2.2" }, "id": "8972a3df-731f-4475-b089-ccbb28735083", @@ -9,7 +9,7 @@ "values": [ { "type": "any", - "value": "https://api.topcoder-dev.com/v5", + "value": "http://localhost:3000/v5", "key": "URL" }, { @@ -24,27 +24,17 @@ }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", - "key": "user1_token" - }, - { - "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiY29waWxvdCJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoiaG9ob3NreSIsImV4cCI6MTY4MTc5MjM3MCwidXNlcklkIjoiMTYwOTY4MjMiLCJpYXQiOjE1NDk3OTE3NzAsImVtYWlsIjoiZW1haWxAZG9tYWluLmNvbS56IiwianRpIjoiZjFlNjEzYmUtZDViOS00MjMxLWJhYWUtZWU5ZjJkMjI3MjM0In0.YfzhT9rLFK6U2suPdiCSx_n7Ce6ZIt_oLZ0BcvfMqAk", - "key": "user2_token" - }, - { - "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTY4MTA1MjIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU0OTc5MTYxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.ONh2RSE5NeJzyjBD68TSUdNFMs5v5BXtga4LchR2x3s", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IFN1cHBvcnQiLCJ0ZXN0Um9sZSIsImFhYSIsInRvbnlfdGVzdF8xIiwiQ29ubmVjdCBNYW5hZ2VyIiwiQ29ubmVjdCBBZG1pbiIsImNvcGlsb3QiLCJDb25uZWN0IENvcGlsb3QgTWFuYWdlciIsIlRvcGNvZGVyIFVzZXIiLCJhZG1pbmlzdHJhdG9yIiwidS1iYWhuIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTYxNjc4MjE1MywidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTYxNjc4MTU1MywiZW1haWwiOiJhamVmdHNAdG9wY29kZXIuY29tIiwianRpIjoiMTQ4ZWZmMjktNjFiZS00ODQzLWI2ZmMtNWE2MTE4YmU4Y2I4In0.ZPb6NrrWK3n7WvG8gNJ2TT3b1pdnrze5jv_CveXqe9g", "key": "admin_token" }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJhbGw6cmVzb3VyY2VzIGFsbDpyZXNvdXJjZV9yb2xlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.UhuqMGrrNzj-VQz2-BogN28YZTE9uauIfdP7EOhrKB0", - "key": "m2m_all_token" + "value": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5VSkZORGd4UlRVME5EWTBOVVkzTlRkR05qTXlRamxETmpOQk5UYzVRVUV3UlRFeU56TTJRUSJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiakdJZjJwZDNmNDRCMWpxdk9haTMwQklLVFphbllCZlVAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNjE2NzgxNTQ5LCJleHAiOjE2MTY4Njc5NDksImF6cCI6ImpHSWYycGQzZjQ0QjFqcXZPYWkzMEJJS1RaYW5ZQmZVIiwic2NvcGUiOiJ1cGRhdGU6dXNlcl9wcm9maWxlcyB3cml0ZTp1c2VyX3Byb2ZpbGVzIGNyZWF0ZTpjb25uZWN0X3Byb2plY3QgYWxsOmNoYWxsZW5nZXMgcmVhZDpjaGFsbGVuZ2VzIHdyaXRlOmNoYWxsZW5nZXMgYWxsOmdyb3VwcyB3cml0ZTpncm91cHMgcmVhZDpncm91cHMgdXBkYXRlOnN1Ym1pc3Npb24gcmVhZDpzdWJtaXNzaW9uIGRlbGV0ZTpzdWJtaXNzaW9uIGNyZWF0ZTpzdWJtaXNzaW9uIGFsbDpzdWJtaXNzaW9uIHJlYWQ6cHJvamVjdCBhbGw6Y29ubmVjdF9wcm9qZWN0IHJlYWQ6YnVzX3RvcGljcyB3cml0ZTpidXNfYXBpIHJlYWQ6ZW1haWxfdGVtcGxhdGVzIHJlYWQ6dXNlcl9wcm9maWxlcyByZWFkOnJvbGVzIHJlYWQ6cHJvamVjdC11c2VyIHJlYWQ6cHJvamVjdC1wZXJtaXNzaW9uIHJlYWQ6cmVzb3VyY2VzIHdyaXRlOnJlc291cmNlcyBkZWxldGU6cmVzb3VyY2VzIHVwZGF0ZTpyZXNvdXJjZXMgYWxsOnJlc291cmNlcyByZWFkOnRlcm1zIGFsbDp0ZXJtcyBhbGw6cHJvamVjdHMgcmVhZDpwcm9qZWN0cyBhbGw6c2NoZWR1bGVzIHJlYWQ6c2NoZWR1bGVzIGNyZWF0ZTpzY2hlZHVsZXMgdXBkYXRlOnNjaGVkdWxlcyBkZWxldGU6c2NoZWR1bGVzIHJlYWQ6cHJvamVjdC1iaWxsaW5nLWFjY291bnQtZGV0YWlscyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.bElR_f-ps5Yzj4dn1LXpG_3uzdQb9rBtLMGoRFApFcu4SIqkKlIHX1W0Oz7oZjxg3ThhEgpKls2TvFBRrclsoJUJ2xG68i031sE3p_3fvULzuIChGZIbcRKob2UHlMO8Z152dW319rGvlx5z4ubx8rtWpJv6h6tmuOqCmfGUFXzLtFEZ9u9SthZ383dZNNVRaj-d-cCFkS9yo09k8ZHAQ9IUytkhEhO_CKjcGvduEiGGWOLCt3sAMkDIaWp4tEgxQoW_HIeQVYudG8wySn-J19OFcEwr3vgkcz6eHiqSF93ShcnilN-jlLJhOfPu-Qq0s9y37aFLTfchM_QAVc11Cw", + "key": "M2M_TOKEN" }, { "type": "any", - "value": "c943cb74-37bb-409a-994e-1cd28fbbb7b5", + "value": "f8f03802-0e26-4a04-a0fc-6c058d0ea065", "key": "COPILOT_RESOURCE_ROLE_ID" }, { @@ -57,21 +47,6 @@ "value": "", "key": "SUBMITTER_RESOURCE_ROLE_ID" }, - { - "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTU1MTA2MzIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU1MTA1MzIxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.97-pjuSGGqDAqK2FG2yi_3nmzB7ZMXQwtG0bi8_PlKk", - "key": "expire_token" - }, - { - "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.1EdekIx1jU2lDSIXlMFCPmXkzLWQ_ZvxPuutQWuTKu0", - "key": "m2m_read_token" - }, - { - "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJjcmVhdGU6cmVzb3VyY2VzIGRlbGV0ZTpyZXNvdXJjZXMgdXBkYXRlOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.f_3FLT3jMTnKwGIg8fcFP2lmShy5S9d5IvLNbXSj2Eo", - "key": "m2m_modify_token" - }, { "type": "any", "value": "", @@ -87,11 +62,6 @@ "value": "fe6d0a58-ce7d-4521-8501-b8132b1c0393", "key": "TEST_CHALLENGE_ID2" }, - { - "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJsYXJzMjUyMCIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjg3MTMxIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.QIXF4-qSkH7n-i0_4mzF3peFTZ5PjaSYHjm9EjhTfS4", - "key": "user3_token" - }, { "type": "any", "value": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", @@ -99,21 +69,31 @@ }, { "type": "any", - "value": "04727d3c-80c2-4784-86c9-64d5ebf82092", + "value": "dfb7dedb-6ad9-475f-9d1f-1bc354e83136", "key": "DEPENDENCY_ID_1" }, { "type": "any", - "value": "3fb03069-8ea7-42ae-a3ae-f44da87ea29f", + "value": "715b63f9-aa90-47af-885c-5cd205abfb6a", "key": "DEPENDENCY_ID_2" }, { "type": "any", "value": "e84fa230-c70b-4c96-a923-bc867bb2bb25", "key": "COPILOT_RESOURCE_ROLE_ID_0" + }, + { + "type": "any", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IENvcGlsb3QiLCJjb3BpbG90IiwiVG9wY29kZXIgVXNlciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoiVENDb25uQ29waWxvdCIsImV4cCI6MTYxNjc4MjE1NywidXNlcklkIjoiNDAxNTg5OTQiLCJpYXQiOjE2MTY3ODE1NTcsImVtYWlsIjoidG9wY29kZXJjb25uZWN0K0NvcGlsb3RAZ21haWwuY29tIiwianRpIjoiYTQwZmM5YWItNTUwZC00ODYzLThmZmUtZjBhNmE2MmFiNzNhIn0.fY_SCalqt0d8CEtDq0gJpIY4UlOuM-4n5nf7DSTqGGo", + "key": "copilot_token" + }, + { + "type": "any", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJ0ZXN0Y2F0IiwiZXhwIjoxNjE2NzgyMTYxLCJ1c2VySWQiOiI0MDE1NTU3OSIsImlhdCI6MTYxNjc4MTU2MSwiZW1haWwiOiJ0ZXN0LWNhdEBtYWlsLnJ1IiwianRpIjoiYTQ5ZTRhY2MtZTg1YS00NjkwLThhMDktYmU2OTdkZGM2YjE5In0.vWKcBZTuoEHPMxiqBXYA-5CCsXVQvDj-Cc6r8WJIPLs", + "key": "user_token" } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2021-02-06T07:02:07.803Z", + "_postman_exported_at": "2021-03-26T18:00:06.711Z", "_postman_exported_using": "Newman/5.2.2" -} +} \ No newline at end of file diff --git a/test/postman/testData/resource-role-phase-dependency/create-dependency-with-invalid-tokens.json b/test/postman/testData/resource-role-phase-dependency/create-dependency-with-invalid-tokens.json index e5d6d1e..75af002 100644 --- a/test/postman/testData/resource-role-phase-dependency/create-dependency-with-invalid-tokens.json +++ b/test/postman/testData/resource-role-phase-dependency/create-dependency-with-invalid-tokens.json @@ -10,12 +10,12 @@ "message": "Failed to authenticate token." }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "jwtToken": "Bearer {{copilot_token}}", "httpCode": 403, "message": "You are not allowed to perform this action!" }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.1EdekIx1jU2lDSIXlMFCPmXkzLWQ_ZvxPuutQWuTKu0", + "jwtToken": "Bearer {{user_token}}", "httpCode": 403, "message": "You are not allowed to perform this action!" }, diff --git a/test/postman/testData/resource-role-phase-dependency/delete-dependency-with-invalid-tokens.json b/test/postman/testData/resource-role-phase-dependency/delete-dependency-with-invalid-tokens.json index e5d6d1e..75af002 100644 --- a/test/postman/testData/resource-role-phase-dependency/delete-dependency-with-invalid-tokens.json +++ b/test/postman/testData/resource-role-phase-dependency/delete-dependency-with-invalid-tokens.json @@ -10,12 +10,12 @@ "message": "Failed to authenticate token." }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "jwtToken": "Bearer {{copilot_token}}", "httpCode": 403, "message": "You are not allowed to perform this action!" }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.1EdekIx1jU2lDSIXlMFCPmXkzLWQ_ZvxPuutQWuTKu0", + "jwtToken": "Bearer {{user_token}}", "httpCode": 403, "message": "You are not allowed to perform this action!" }, diff --git a/test/postman/testData/resource-role-phase-dependency/get-dependency-with-invalid-tokens.json b/test/postman/testData/resource-role-phase-dependency/get-dependency-with-invalid-tokens.json index 801eb88..75af002 100644 --- a/test/postman/testData/resource-role-phase-dependency/get-dependency-with-invalid-tokens.json +++ b/test/postman/testData/resource-role-phase-dependency/get-dependency-with-invalid-tokens.json @@ -10,12 +10,12 @@ "message": "Failed to authenticate token." }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "jwtToken": "Bearer {{copilot_token}}", "httpCode": 403, "message": "You are not allowed to perform this action!" }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJjcmVhdGU6cmVzb3VyY2VzIGRlbGV0ZTpyZXNvdXJjZXMgdXBkYXRlOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.f_3FLT3jMTnKwGIg8fcFP2lmShy5S9d5IvLNbXSj2Eo", + "jwtToken": "Bearer {{user_token}}", "httpCode": 403, "message": "You are not allowed to perform this action!" }, diff --git a/test/postman/testData/resource-role-phase-dependency/update-dependency-with-invalid-tokens.json b/test/postman/testData/resource-role-phase-dependency/update-dependency-with-invalid-tokens.json index e5d6d1e..75af002 100644 --- a/test/postman/testData/resource-role-phase-dependency/update-dependency-with-invalid-tokens.json +++ b/test/postman/testData/resource-role-phase-dependency/update-dependency-with-invalid-tokens.json @@ -10,12 +10,12 @@ "message": "Failed to authenticate token." }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "jwtToken": "Bearer {{copilot_token}}", "httpCode": 403, "message": "You are not allowed to perform this action!" }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.1EdekIx1jU2lDSIXlMFCPmXkzLWQ_ZvxPuutQWuTKu0", + "jwtToken": "Bearer {{user_token}}", "httpCode": 403, "message": "You are not allowed to perform this action!" }, diff --git a/test/postman/testData/resource-role/create-resource-role-with-invalid-tokens.json b/test/postman/testData/resource-role/create-resource-role-with-invalid-tokens.json index e5d6d1e..75af002 100644 --- a/test/postman/testData/resource-role/create-resource-role-with-invalid-tokens.json +++ b/test/postman/testData/resource-role/create-resource-role-with-invalid-tokens.json @@ -10,12 +10,12 @@ "message": "Failed to authenticate token." }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "jwtToken": "Bearer {{copilot_token}}", "httpCode": 403, "message": "You are not allowed to perform this action!" }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.1EdekIx1jU2lDSIXlMFCPmXkzLWQ_ZvxPuutQWuTKu0", + "jwtToken": "Bearer {{user_token}}", "httpCode": 403, "message": "You are not allowed to perform this action!" }, diff --git a/test/postman/testData/resource-role/update-resource-role-with-invalid-tokens.json b/test/postman/testData/resource-role/update-resource-role-with-invalid-tokens.json index e5d6d1e..75af002 100644 --- a/test/postman/testData/resource-role/update-resource-role-with-invalid-tokens.json +++ b/test/postman/testData/resource-role/update-resource-role-with-invalid-tokens.json @@ -10,12 +10,12 @@ "message": "Failed to authenticate token." }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "jwtToken": "Bearer {{copilot_token}}", "httpCode": 403, "message": "You are not allowed to perform this action!" }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.1EdekIx1jU2lDSIXlMFCPmXkzLWQ_ZvxPuutQWuTKu0", + "jwtToken": "Bearer {{user_token}}", "httpCode": 403, "message": "You are not allowed to perform this action!" }, diff --git a/test/postman/testData/resource/create-resource-with-invalid-tokens.json b/test/postman/testData/resource/create-resource-with-invalid-tokens.json index f0c5fc1..14d751f 100644 --- a/test/postman/testData/resource/create-resource-with-invalid-tokens.json +++ b/test/postman/testData/resource/create-resource-with-invalid-tokens.json @@ -10,14 +10,14 @@ "message": "Failed to authenticate token." }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "jwtToken": "Bearer {{copilot_token}}", "httpCode": 403, "message": "Only M2M, admin or user with full access role can perform this action" }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.1EdekIx1jU2lDSIXlMFCPmXkzLWQ_ZvxPuutQWuTKu0", + "jwtToken": "Bearer {{user_token}}", "httpCode": 403, - "message": "You are not allowed to perform this action!" + "message": "Only M2M, admin or user with full access role can perform this action" }, { "httpCode": 401, diff --git a/test/postman/testData/resource/delete-resource-with-invalid-tokens.json b/test/postman/testData/resource/delete-resource-with-invalid-tokens.json index eef94e0..aaf9261 100644 --- a/test/postman/testData/resource/delete-resource-with-invalid-tokens.json +++ b/test/postman/testData/resource/delete-resource-with-invalid-tokens.json @@ -9,11 +9,6 @@ "httpCode": 401, "message": "Failed to authenticate token." }, - { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJyZWFkOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.1EdekIx1jU2lDSIXlMFCPmXkzLWQ_ZvxPuutQWuTKu0", - "httpCode": 403, - "message": "You are not allowed to perform this action!" - }, { "httpCode": 401, "message": "No token provided." diff --git a/test/postman/testData/resource/get-resources-by-member-with-different-users.json b/test/postman/testData/resource/get-resources-by-member-with-different-users.json index 2bf0701..a00e295 100644 --- a/test/postman/testData/resource/get-resources-by-member-with-different-users.json +++ b/test/postman/testData/resource/get-resources-by-member-with-different-users.json @@ -1,18 +1,18 @@ [ { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTY4MTA1MjIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU0OTc5MTYxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.ONh2RSE5NeJzyjBD68TSUdNFMs5v5BXtga4LchR2x3s", + "jwtToken": "Bearer {{user_token}}", "memberId": "16096823" }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJhbGw6cmVzb3VyY2VzIGFsbDpyZXNvdXJjZV9yb2xlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.UhuqMGrrNzj-VQz2-BogN28YZTE9uauIfdP7EOhrKB0", + "jwtToken": "Bearer {{copilot_token}}", "memberId": "16096823" }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "jwtToken": "Bearer {{admin_token}}", "memberId": "16096823" }, { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJkZW5pcyIsImV4cCI6MTY4MjgwMDE2OSwidXNlcklkIjoiMjUxMjgwIiwiaWF0IjoxNTQ5Nzk5NTY5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjljNDUxMWM1LWMxNjUtNGExYi04OTllLWI2NWFkMGUwMmI1NSJ9.BCF6xW3aQfHDDFbgGvvOKzvwEXVLWGf-TgF5JrtM9Tg", + "jwtToken": "Bearer {{M2M_TOKEN}}", "memberId": "not_exist_user" } ] \ No newline at end of file diff --git a/test/postman/testData/resource/get-resources-by-member-with-invalid-tokens.json b/test/postman/testData/resource/get-resources-by-member-with-invalid-tokens.json index af1ac3c..d584dde 100644 --- a/test/postman/testData/resource/get-resources-by-member-with-invalid-tokens.json +++ b/test/postman/testData/resource/get-resources-by-member-with-invalid-tokens.json @@ -11,12 +11,6 @@ "httpCode": 401, "message": "Failed to authenticate token." }, - { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiZW5qdzE4MTBlRHozWFR3U08yUm4yWTljUVRyc3BuM0JAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNTUwOTA2Mzg4LCJleHAiOjE2ODA5OTI3ODgsImF6cCI6ImVuancxODEwZUR6M1hUd1NPMlJuMlk5Y1FUcnNwbjNCIiwic2NvcGUiOiJjcmVhdGU6cmVzb3VyY2VzIGRlbGV0ZTpyZXNvdXJjZXMgdXBkYXRlOnJlc291cmNlcyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.f_3FLT3jMTnKwGIg8fcFP2lmShy5S9d5IvLNbXSj2Eo", - "memberId": "16096823", - "httpCode": 403, - "message": "You are not allowed to perform this action!" - }, { "memberId": "16096823", "httpCode": 401, From 0057530625c41c08e04257f0807e9ac0eef4ff7b Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Thu, 8 Apr 2021 19:20:58 +0530 Subject: [PATCH 17/60] pip issue pip issue --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 49ac450..0fd25cd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,7 +12,7 @@ defaults: &defaults install_dependency: &install_dependency name: Installation of build and deployment dependencies. command: | - sudo apt install jq + sudo apt install jq python-pip sudo pip install awscli --upgrade sudo pip install docker-compose install_deploysuite: &install_deploysuite From e2d71ca5bcfccf441805638738f0468e47be7c97 Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Thu, 8 Apr 2021 19:35:05 +0530 Subject: [PATCH 18/60] Update config.yml docker-compose not needed --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0fd25cd..f5851a6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ install_dependency: &install_dependency command: | sudo apt install jq python-pip sudo pip install awscli --upgrade - sudo pip install docker-compose + # sudo pip install docker-compose install_deploysuite: &install_deploysuite name: Installation of install_deploysuite. command: | From 4be47143914b40c6805ec400601d4e9caddbf47e Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 8 Apr 2021 17:19:44 +0300 Subject: [PATCH 19/60] fix tokens --- test/postman/newman.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/postman/newman.js b/test/postman/newman.js index 37c7bdd..a1be2bb 100644 --- a/test/postman/newman.js +++ b/test/postman/newman.js @@ -191,10 +191,10 @@ const runner = (options) => new Promise((resolve, reject) => { const copilotToken = await envHelper.getCopilotToken() const userToken = await envHelper.getUserToken() options.envVar = [ - { key: 'M2M_TOKEN', value: m2mToken }, - { key: 'admin_token', value: adminToken }, - { key: 'copilot_token', value: copilotToken }, - { key: 'user_token', value: userToken } + { key: 'M2M_TOKEN', value: `Bearer ${m2mToken}` }, + { key: 'admin_token', value: `Bearer ${adminToken}` }, + { key: 'copilot_token', value: `Bearer ${copilotToken}` }, + { key: 'user_token', value: `Bearer ${userToken}` } ] for (const request of requests) { delete require.cache[require.resolve('./resource-api.postman_environment.json')] From b3a881b56f51da3d0e725d8b7d68de3b36ababab Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 8 Apr 2021 17:33:32 +0300 Subject: [PATCH 20/60] trigger a deployment --- test/postman/newman.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/postman/newman.js b/test/postman/newman.js index a1be2bb..d3e8ab0 100644 --- a/test/postman/newman.js +++ b/test/postman/newman.js @@ -174,7 +174,6 @@ const options = { exportEnvironment: 'test/postman/resource-api.postman_environment.json', reporters: 'cli' } - const runner = (options) => new Promise((resolve, reject) => { newman.run(options, function (err, results) { if (err) { From 8b64197d9f4d15ac323b36f3c8fc859659209faa Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 8 Apr 2021 17:49:02 +0300 Subject: [PATCH 21/60] try to fix the postman env issue --- test/postman/newman.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/postman/newman.js b/test/postman/newman.js index d3e8ab0..fbd59f4 100644 --- a/test/postman/newman.js +++ b/test/postman/newman.js @@ -197,7 +197,10 @@ const runner = (options) => new Promise((resolve, reject) => { ] for (const request of requests) { delete require.cache[require.resolve('./resource-api.postman_environment.json')] - options.environment = require('./resource-api.postman_environment.json') + options.environment = { + ...require('./resource-api.postman_environment.json'), + ...request.iterationData + } options.folder = request.folder options.iterationData = request.iterationData try { From 41c02f539aa11fbcab3a59ee81ede02073ee18d1 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 8 Apr 2021 18:10:17 +0300 Subject: [PATCH 22/60] Fix automated postman testing --- test/postman/newman.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/postman/newman.js b/test/postman/newman.js index fbd59f4..58752db 100644 --- a/test/postman/newman.js +++ b/test/postman/newman.js @@ -189,18 +189,19 @@ const runner = (options) => new Promise((resolve, reject) => { const adminToken = await envHelper.getAdminToken() const copilotToken = await envHelper.getCopilotToken() const userToken = await envHelper.getUserToken() - options.envVar = [ + const originalEnvVars = [ { key: 'M2M_TOKEN', value: `Bearer ${m2mToken}` }, { key: 'admin_token', value: `Bearer ${adminToken}` }, { key: 'copilot_token', value: `Bearer ${copilotToken}` }, { key: 'user_token', value: `Bearer ${userToken}` } ] for (const request of requests) { + options.envVar = [ + ...originalEnvVars, + ..._.map(_.keys(request.iterationData || {}), key => ({ key, value: request.iterationData[key] })) + ] delete require.cache[require.resolve('./resource-api.postman_environment.json')] - options.environment = { - ...require('./resource-api.postman_environment.json'), - ...request.iterationData - } + options.environment = require('./resource-api.postman_environment.json') options.folder = request.folder options.iterationData = request.iterationData try { From fd14f644189e5d69577c2c737d5ffba0e9f4beb5 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 5 May 2021 23:50:54 +0300 Subject: [PATCH 23/60] be able to run newman tests on prod --- ReadMe.md | 12 +- Verification.md | 6 +- config/test.js | 6 +- package.json | 3 +- test/postman/ClearPostmanData.md | 69 +++++++++++ test/postman/clearTestData.js | 109 ++++++++++++++++++ test/postman/newman.js | 42 ++++++- .../resource-api.postman_collection.json | 10 +- .../create-dependency.json | 6 +- .../create-resource-role-by-admin.json | 12 +- .../create-resource-role-by-m2m.json | 12 +- ...reate-resource-role-with-invalid-data.json | 12 +- .../get-resource-role-with-invalid-data.json | 12 +- .../update-resource-role-by-admin.json | 12 +- .../update-resource-role-by-m2m.json | 12 +- ...pdate-resource-role-with-invalid-data.json | 12 +- 16 files changed, 288 insertions(+), 59 deletions(-) create mode 100644 test/postman/ClearPostmanData.md create mode 100644 test/postman/clearTestData.js diff --git a/ReadMe.md b/ReadMe.md index ec59a6d..f9cba77 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -73,7 +73,7 @@ The following parameters can be set in config files or in env variables: - RESOURCE_ROLE_UPDATE_TOPIC: the resource role update topic, default value is 'challenge.action.resource.role.update' Configuration for testing is at `config/test.js`, only add such new configurations different from `config/default.js` -- WAIT_TIME: wait time used in test, default is 1500 or 1.5 second +- WAIT_TIME: wait time used in test, default is 6000 or 6 seconds - MOCK_CHALLENGE_API_PORT: the mock server port, default is 4000. - AUTH_V2_URL: The auth v2 url - AUTH_V2_CLIENT_ID: The auth v2 client id @@ -84,6 +84,8 @@ Configuration for testing is at `config/test.js`, only add such new configuratio - COPILOT_CREDENTIALS_PASSWORD: The user's password with copilot role - USER_CREDENTIALS_USERNAME: The user's username with user role - USER_CREDENTIALS_PASSWORD: The user's password with user role +- POSTMAN_ROLE_NAME_PREFIX: the role name prefix for every `ResourceRole` record +- MOCK_BUS_API_BY_NOCK: indicates whether Nock is used for mocking Bus API. ## Available commands - Install dependencies `npm install` @@ -99,6 +101,8 @@ Configuration for testing is at `config/test.js`, only add such new configuratio - App is running at `http://localhost:3000` - Start mock server `npm run mock-challenge-api` - The mock server is running at `http://localhost:4000` +- Run the Postman tests `npm run test:newman` +- Clear the testing data by Postman tests: `npm run test:newman:clear` ## Local Deployment ### Foreman Setup @@ -214,6 +218,12 @@ To run postman e2e tests. npm run test:newman ``` +To clear the testing data from postman e2e tests. + +```bash +npm run test:newman:clear +``` + ## Running tests in CI - TBD diff --git a/Verification.md b/Verification.md index 64e56c4..cffa15d 100644 --- a/Verification.md +++ b/Verification.md @@ -90,4 +90,8 @@ Iteration 4/4 ├───────────────────────────────────────────────────────────────┤ │ average response time: 18ms [min: 11ms, max: 24ms, s.d.: 4ms] │ └───────────────────────────────────────────────────────────────┘ -``` \ No newline at end of file +``` + +Then you can run `npm run test:newman:clear` to delete all testing data by above postman tests. +If 'socket hang up' appears while running the `npm run test:newman`. You can increase the `WAIT_TIME` from the `default/test.js`. + Then run `npm run test:newman:clear` before calling `npm run test:newman` again. \ No newline at end of file diff --git a/config/test.js b/config/test.js index bfe7ccb..8bc6d21 100644 --- a/config/test.js +++ b/config/test.js @@ -6,7 +6,7 @@ module.exports = { TERMS_API_URL: 'http://localhost:4000/v5/terms', BUSAPI_URL: 'http://localhost:4000/v5', CHALLENGE_PHASES_API_URL: 'http://localhost:4000/v5/challenge-phases', - WAIT_TIME: 1500, + WAIT_TIME: 6000, MOCK_CHALLENGE_API_PORT: 4000, AUTH_V2_URL: process.env.AUTH_V2_URL || 'https://topcoder-dev.auth0.com/oauth/ro', AUTH_V2_CLIENT_ID: process.env.AUTH_V2_CLIENT_ID || '', @@ -16,5 +16,7 @@ module.exports = { COPILOT_CREDENTIALS_USERNAME: process.env.COPILOT_CREDENTIALS_USERNAME || '', COPILOT_CREDENTIALS_PASSWORD: process.env.COPILOT_CREDENTIALS_PASSWORD || '', USER_CREDENTIALS_USERNAME: process.env.USER_CREDENTIALS_USERNAME || '', - USER_CREDENTIALS_PASSWORD: process.env.USER_CREDENTIALS_PASSWORD || '' + USER_CREDENTIALS_PASSWORD: process.env.USER_CREDENTIALS_PASSWORD || '', + POSTMAN_ROLE_NAME_PREFIX: process.env.POSTMAN_ROLE_NAME_PREFIX || 'POSTMANE2E-', + MOCK_BUS_API_BY_NOCK: process.env.MOCK_BUS_API_BY_NOCK ? process.env.MOCK_BUS_API_BY_NOCK === 'true' : true } diff --git a/package.json b/package.json index 3cff6d9..05af8a5 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "view-data": "node src/scripts/view-data.js", "mock-challenge-api": "NODE_ENV=test node mock/mock-challenge-api", "test": "nyc --reporter=html --reporter=text mocha test/unit/test.js --require test/common/prepare.js --timeout 60000 --exit", - "test:newman": "NODE_ENV=test node test/postman/newman.js" + "test:newman": "NODE_ENV=test node test/postman/newman.js", + "test:newman:clear": "NODE_ENV=test node test/postman/clearTestData.js" }, "author": "TCSCODER", "license": "none", diff --git a/test/postman/ClearPostmanData.md b/test/postman/ClearPostmanData.md new file mode 100644 index 0000000..a80745c --- /dev/null +++ b/test/postman/ClearPostmanData.md @@ -0,0 +1,69 @@ +# Clear Testing data which are from Postman Tests + +## How to clear the Postman related testing data +- To summarize, simply run below command after running the Postman tests. +``` + npm run test:newman:clear +``` +- You should follow the ReadMe.md and Verification.md to run the tests. Then you will get output like below: +``` +> NODE_ENV=test node test/postman/clearTestData.js + +info: Clear the Postman test data. +clear the test data from postman test! +ResourceRole to be deleted addd9ae8-9610-4c20-9849-95587fbfa318 +ResourceRolePhaseDependency to be deleted d775f701-e440-451d-b5cb-e675fd5db89e +ResourceRolePhaseDependency to be deleted 4aac6a0b-5375-4cc5-8af0-c3feb64ac51e +Resource to be deleted 82823bde-4acb-437a-8ab1-03aef7f30ea0 +Resource to be deleted c02514c9-93ef-4da9-8771-df0fbb931d86 +Resource to be deleted 262528be-94c3-4ae7-96be-9c643a54c457 +Resource to be deleted 03eac62d-93ed-4be1-a061-4d58595d0833 +Resource to be deleted e61a2997-f995-47ff-98ca-aeb42831aec1 +Resource to be deleted 2572f829-1076-470e-b142-59d07cc59a1f +Resource to be deleted 2a9f228d-0981-48fd-80e7-988b23f1dc8c +Resource to be deleted 15093b6b-13aa-4f7c-964a-6b5708e302e4 +Resource to be deleted eaf6b9c9-b0ca-4804-ba6f-654127d4feaf +ResourceRole to be deleted 9a72f8cb-93b3-4f3e-b9ed-7bbe09255521 +ResourceRole to be deleted f722e872-897f-442f-980c-e92d00fe70fb +ResourceRole to be deleted 1d28eb17-4085-4269-b5a2-c73cc28aa5b9 +ResourceRole to be deleted c4b53497-d6d2-43dc-b5bc-f09a681ae33a +ResourceRole to be deleted 47f3191d-1596-4155-b8da-35dc9288d820 +ResourceRole to be deleted c5032dba-5da1-4846-a46c-845d74e880be +ResourceRole to be deleted 1da92cb3-8658-46d7-b147-4c913634fac1 +clear the test data from postman test completed! +info: Done! +``` +## Strategy +1. Setup the `POSTMAN_ROLE_NAME_PREFIX` from the test environment. This prefix should be a name that will never be used +set as part of the role name. e.g. 'POSTMANE2E-'. In this case, the created `ResourceRole` will have a name like 'POSTMANE2E-submitter'. + +2. Choose either one solution for mocking the Bus API. We can not ignore this, becuase in production environment, it is +not allowed to send the Kafka messge to the Bus API. +a. Set `MOCK_BUS_API_BY_NOCK` to `true` from the test environment. In this way, Nock will return the response if any events + is posted to the Bus API. +b. You can use use Postman's mock server. You can refer to https://drive.google.com/file/d/1GXMzyqpzwix-LDBwieiRFfpJlJxrTIgI/view?usp=sharing + for details. You need to update the environment variable `BUSAPI_URL` to your Postman mock server. + +3. Steps of clearing the test data from Postman tests. + * Find all `ResourceRole` record whose names are starting with `POSTMAN_ROLE_NAME_PREFIX`. + * For each `ResourceRole` record, find all `ResourceRolePhaseDependency` records whose `resourceRoleId` are the same + as the `id` of `RecourceRole`. Delete those `ResourceRolePhaseDependency` records. + * For each `ResourceRole` record, find all `Resource` records whose `roleId` are the same + as the `id` of `RecourceRole`. + * Delete those `Resource` records. + * Delete the ES index by the resource id too. (Only **Resource** are indexed by ES.) + * Delete the `ResourceRole` record. + +4. Note, in production enviroment, there is no need to run `npm run init-es force` or `npm run init-db`. + +## Questions from the spec +* The DB is getting filled up with dummy/test data. You need to suggest a way to delete/clean up the data created from executing the tests without affecting existing data. + _Check above strategy section._ +* Lookup data may not be required to get created as it may already exist or in some cases must not get created as there will be conflicts with existing data. You need to suggest how to overcome this issue. + _All data from the Postman tests can be easily deleted._ +* Existing lookup data should not be deleted. You need to suggest how to avoid accidentally deleting lookup data. + _The Postman tests only use the testing data created by itself._ +* Existing production data should not be affected by the tests. You need to suggest how to avoid this possible issue. + _Check the strategy section. All testing data are removed at last._ +* If possible, we should be able to differentiate the test data from the actual data so we can filter it out from the search results of the production API. Please suggest how to achieve this. + _Check the strategy section. We can easy find all `ResourceRole` records with the given role name prefix. Then we can find all the related `ResourceRolePhaseDependency` and `Resource`._ \ No newline at end of file diff --git a/test/postman/clearTestData.js b/test/postman/clearTestData.js new file mode 100644 index 0000000..88e2030 --- /dev/null +++ b/test/postman/clearTestData.js @@ -0,0 +1,109 @@ +/** + * Clear the postman test data. All data created by postman e2e tests will be cleared. + */ + +const models = require('../../src/models') +const logger = require('../../src/common/logger') +const helper = require('../../src/common/helper') +const config = require('config') +const _ = require('lodash') + +logger.info('Clear the Postman test data.') + +/** + * Delete the Resource from the ES by the given id + * @param id the resource id + * @returns {Promise} + */ +const deleteFromESById = async (id) => { + // delete from ES + const esClient = await helper.getESClient() + await esClient.delete({ + index: config.ES.ES_INDEX, + type: config.ES.ES_TYPE, + id: id, + refresh: 'true' // refresh ES so that it is effective for read operations instantly + }) +} + +/** + * Get Data by model id. + * @param {Object} modelName The dynamoose model name + * @param {String} id The id value + * @returns {Promise} + */ +const getById = async (modelName, id) => { + return new Promise((resolve, reject) => { + models[modelName].query('id').eq(id).exec((err, result) => { + if (err) { + console.log('ERROR') + return reject(err) + } + if (result.length > 0) { + return resolve(result[0]) + } else { + return resolve(null) + } + }) + }) +} + +/** + * Delete the record from database by the given id. + * @param modelName the model name + * @param id the id + * @returns {Promise} + */ +const deleteFromDBById = async (modelName, id) => { + if (id && id.length > 0) { + try { + const entity = await getById(modelName, id) + if (entity) { + await entity.delete() + } + } catch (err) { + throw err + } + } +} + +/** + * Clear the postman test data. The main function of this class. + * @returns {Promise} + */ +const clearTestData = async () => { + console.log('clear the test data from postman test!') + let roles = await helper.scanAll('ResourceRole') + roles = _.filter(roles, r => (r.name.startsWith(config.POSTMAN_ROLE_NAME_PREFIX))) + for (const role of roles) { + let roleId = role.id + let rolePhaseDeps = await helper.scanAll('ResourceRolePhaseDependency') + rolePhaseDeps = _.filter(rolePhaseDeps, d => (d.resourceRoleId === roleId)) + for (const dep of rolePhaseDeps) { + console.log('ResourceRolePhaseDependency to be deleted', dep.id) + await deleteFromDBById('ResourceRolePhaseDependency', dep.id) + } + let resources = await helper.scanAll('Resource') + resources = _.filter(resources, r => (r.roleId === roleId)) + for (const res of resources) { + console.log('Resource to be deleted', res.id) + await deleteFromDBById('Resource', res.id) + await deleteFromESById(res.id) + } + console.log('ResourceRole to be deleted', roleId) + await deleteFromDBById('ResourceRole', roleId) + } + console.log('clear the test data from postman test completed!') +} + +clearTestData().then(() => { + logger.info('Done!') + process.exit() +}).catch((e) => { + logger.logFullError(e) + process.exit(1) +}) + +module.exports = { + clearTestData +} diff --git a/test/postman/newman.js b/test/postman/newman.js index 58752db..8272db2 100644 --- a/test/postman/newman.js +++ b/test/postman/newman.js @@ -1,6 +1,8 @@ const newman = require('newman') const _ = require('lodash') const envHelper = require('./envHelper') +const nock = require('nock') +const config = require('config') const requests = [ { @@ -184,17 +186,41 @@ const runner = (options) => new Promise((resolve, reject) => { }) }) +/** + * Sleep for the given time + * @param ms the miliseconds + * @returns {Promise} + */ +function sleep (ms) { + return new Promise(resolve => setTimeout(resolve, ms)) +} + +/** + * Clean the Nock. + */ +function cleanNock () { + if (config.MOCK_BUS_API_BY_NOCK) { + nock.cleanAll() + } +} + ;(async () => { const m2mToken = await envHelper.getM2MToken() const adminToken = await envHelper.getAdminToken() const copilotToken = await envHelper.getCopilotToken() const userToken = await envHelper.getUserToken() const originalEnvVars = [ - { key: 'M2M_TOKEN', value: `Bearer ${m2mToken}` }, - { key: 'admin_token', value: `Bearer ${adminToken}` }, - { key: 'copilot_token', value: `Bearer ${copilotToken}` }, - { key: 'user_token', value: `Bearer ${userToken}` } + { key: 'M2M_TOKEN', value: `${m2mToken}` }, + { key: 'admin_token', value: `${adminToken}` }, + { key: 'copilot_token', value: `${copilotToken}` }, + { key: 'user_token', value: `${userToken}` } ] + if (config.MOCK_BUS_API_BY_NOCK) { + nock(config.BUSAPI_URL) + .persist() + .post('/bus/events') + .reply(204) + } for (const request of requests) { options.envVar = [ ...originalEnvVars, @@ -207,16 +233,20 @@ const runner = (options) => new Promise((resolve, reject) => { try { const results = await runner(options) if (_.get(results, 'run.failures.length', 0) > 0) { + cleanNock() process.exit(-1) } } catch (err) { console.log(err) } + await sleep(config.WAIT_TIME) } -})().then(() => { +})().then(async () => { + cleanNock() console.log('newman test completed!') process.exit(0) -}).catch((err) => { +}).catch(async (err) => { + cleanNock() console.log(err) process.exit(1) }) diff --git a/test/postman/resource-api.postman_collection.json b/test/postman/resource-api.postman_collection.json index 4464a7f..83fe0cc 100644 --- a/test/postman/resource-api.postman_collection.json +++ b/test/postman/resource-api.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "c24b7751-3c89-4248-9d7c-6d2499985af2", + "_postman_id": "751f9f67-b079-4916-be2e-58d19e423484", "name": "resource-api", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -821,6 +821,7 @@ "exec": [ "const iterationData = pm.iterationData", "const httpCode = iterationData.get('httpCode')", + "const idLabel = iterationData.get('idLabel')", "pm.test(`Status code is ${httpCode}`, function () {", " pm.response.to.have.status(httpCode);", " if(httpCode === 200){", @@ -829,6 +830,7 @@ " pm.expect(response.resourceRoleId).to.eq(pm.environment.get('COPILOT_RESOURCE_ROLE_ID'))", " pm.expect(response.phaseState).to.eq(iterationData.get('phaseState'))", " pm.environment.set(\"DEPENDENCY_ID_2\", pm.response.json().id);", + " pm.environment.set(idLabel, pm.response.json().id);", " }", "});" ], @@ -914,7 +916,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"phaseId\": \"{{PHASE_ID}}\",\n\t\"resourceRoleId\": \"{{SUBMITTER_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": false\n}" + "raw": "{\n\t\"phaseId\": \"{{PHASE_ID}}\",\n\t\"resourceRoleId\": \"{{COPILOT_RESOURCE_ROLE_ID}}\",\n\t\"phaseState\": false\n}" }, "url": { "raw": "{{URL}}/resource-roles/Phase-dependencies", @@ -1707,14 +1709,14 @@ "raw": "" }, "url": { - "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_2}}", + "raw": "{{URL}}/resource-roles/Phase-dependencies/{{DEPENDENCY_ID_3}}", "host": [ "{{URL}}" ], "path": [ "resource-roles", "Phase-dependencies", - "{{DEPENDENCY_ID_2}}" + "{{DEPENDENCY_ID_3}}" ] } }, diff --git a/test/postman/testData/resource-role-phase-dependency/create-dependency.json b/test/postman/testData/resource-role-phase-dependency/create-dependency.json index 6eea897..4469b8f 100644 --- a/test/postman/testData/resource-role-phase-dependency/create-dependency.json +++ b/test/postman/testData/resource-role-phase-dependency/create-dependency.json @@ -2,11 +2,13 @@ { "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", "phaseState": true, - "httpCode": 200 + "httpCode": 200, + "idLabel": "DEPENDENCY_ID_3" }, { "phaseId": "aa5a3f78-79e0-4bf7-93ff-b11e8f5b398b", "phaseState": false, - "httpCode": 200 + "httpCode": 200, + "idLabel": "DEPENDENCY_ID_4" } ] \ No newline at end of file diff --git a/test/postman/testData/resource-role/create-resource-role-by-admin.json b/test/postman/testData/resource-role/create-resource-role-by-admin.json index 6a74f27..303c7c6 100644 --- a/test/postman/testData/resource-role/create-resource-role-by-admin.json +++ b/test/postman/testData/resource-role/create-resource-role-by-admin.json @@ -1,6 +1,6 @@ [ { - "name": "co-pilot", + "name": "POSTMANE2E-co-pilot", "fullReadAccess": true, "fullWriteAccess": false, "isActive": true, @@ -8,7 +8,7 @@ "httpCode": 200 }, { - "name": "Observer", + "name": "POSTMANE2E-Observer", "fullReadAccess": true, "fullWriteAccess": true, "isActive": false, @@ -16,7 +16,7 @@ "httpCode": 200 }, { - "name": "submitter", + "name": "POSTMANE2E-submitter", "fullReadAccess": true, "fullWriteAccess": true, "isActive": true, @@ -24,7 +24,7 @@ "httpCode": 200 }, { - "name": "reviewer", + "name": "POSTMANE2E-reviewer", "fullReadAccess": false, "fullWriteAccess": false, "isActive": true, @@ -39,13 +39,13 @@ "httpCode": 400 }, { - "name": "failure-test", + "name": "POSTMANE2E-failure-test", "fullReadAccess": true, "fullWriteAccess": false, "httpCode": 400 }, { - "name": "submitter", + "name": "POSTMANE2E-submitter", "fullReadAccess": true, "fullWriteAccess": true, "isActive": true, diff --git a/test/postman/testData/resource-role/create-resource-role-by-m2m.json b/test/postman/testData/resource-role/create-resource-role-by-m2m.json index 25a6b97..fcf816e 100644 --- a/test/postman/testData/resource-role/create-resource-role-by-m2m.json +++ b/test/postman/testData/resource-role/create-resource-role-by-m2m.json @@ -1,6 +1,6 @@ [ { - "name": "co-pilot-m2m", + "name": "POSTMANE2E-co-pilot-m2m", "fullReadAccess": true, "fullWriteAccess": false, "isActive": true, @@ -8,7 +8,7 @@ "httpCode": 200 }, { - "name": "Observer-m2m", + "name": "POSTMANE2E-Observer-m2m", "fullReadAccess": true, "fullWriteAccess": true, "isActive": false, @@ -16,7 +16,7 @@ "httpCode": 200 }, { - "name": "submitter-m2m", + "name": "POSTMANE2E-submitter-m2m", "fullReadAccess": true, "fullWriteAccess": true, "isActive": true, @@ -24,7 +24,7 @@ "httpCode": 200 }, { - "name": "reviewer-m2m", + "name": "POSTMANE2E-reviewer-m2m", "fullReadAccess": false, "fullWriteAccess": false, "isActive": true, @@ -39,13 +39,13 @@ "httpCode": 400 }, { - "name": "failure-test-m2m", + "name": "POSTMANE2E-failure-test-m2m", "fullReadAccess": true, "fullWriteAccess": false, "httpCode": 400 }, { - "name": "submitter-m2m", + "name": "POSTMANE2E-submitter-m2m", "fullReadAccess": true, "fullWriteAccess": true, "isActive": true, diff --git a/test/postman/testData/resource-role/create-resource-role-with-invalid-data.json b/test/postman/testData/resource-role/create-resource-role-with-invalid-data.json index 9826bf8..9a05fba 100644 --- a/test/postman/testData/resource-role/create-resource-role-with-invalid-data.json +++ b/test/postman/testData/resource-role/create-resource-role-with-invalid-data.json @@ -11,7 +11,7 @@ "message": "\"name\" is not allowed to be empty" }, { - "name": "co-pilot", + "name": "POSTMANE2E-co-pilot", "fullReadAccess": true, "fullWriteAccess": false, "required_field_1": "isActive", @@ -22,7 +22,7 @@ "message": "\"selfObtainable\" is required" }, { - "name": "co-pilot", + "name": "POSTMANE2E-co-pilot", "fullReadAccess": true, "fullWriteAccess": false, "required_field_1": "isActiveNotProvided", @@ -33,7 +33,7 @@ "message": "\"isActive\" is required" }, { - "name": "co-pilot", + "name": "POSTMANE2E-co-pilot", "fullReadAccess": "123", "fullWriteAccess": false, "required_field_1": "isActive", @@ -44,7 +44,7 @@ "message": "\"fullReadAccess\" must be a boolean" }, { - "name": "Observer", + "name": "POSTMANE2E-Observer", "fullReadAccess": true, "fullWriteAccess": "123", "required_field_1": "isActive", @@ -55,7 +55,7 @@ "message": "\"fullWriteAccess\" must be a boolean" }, { - "name": "submitter", + "name": "POSTMANE2E-submitter", "fullReadAccess": true, "fullWriteAccess": true, "required_field_1": "isActive", @@ -66,7 +66,7 @@ "message": "\"isActive\" must be a boolean" }, { - "name": "reviewer", + "name": "POSTMANE2E-reviewer", "fullReadAccess": false, "fullWriteAccess": false, "required_field_1": "isActive", diff --git a/test/postman/testData/resource-role/get-resource-role-with-invalid-data.json b/test/postman/testData/resource-role/get-resource-role-with-invalid-data.json index 761131f..00181e7 100644 --- a/test/postman/testData/resource-role/get-resource-role-with-invalid-data.json +++ b/test/postman/testData/resource-role/get-resource-role-with-invalid-data.json @@ -11,7 +11,7 @@ "message": "\"name\" is not allowed to be empty" }, { - "name": "test-copilot", + "name": "POSTMANE2E-test-copilot", "legacyId": "", "fullReadAccess": true, "fullWriteAccess": false, @@ -22,7 +22,7 @@ "message": "\"legacyId\" must be a number" }, { - "name": "test-copilot", + "name": "POSTMANE2E-test-copilot", "legacyId": 1, "fullReadAccess": 123, "fullWriteAccess": false, @@ -33,7 +33,7 @@ "message": "\"fullReadAccess\" must be a boolean" }, { - "name": "test-copilot", + "name": "POSTMANE2E-test-copilot", "legacyId": 1, "fullReadAccess": true, "fullWriteAccess": 123, @@ -44,7 +44,7 @@ "message": "\"fullWriteAccess\" must be a boolean" }, { - "name": "test-copilot", + "name": "POSTMANE2E-test-copilot", "legacyId": 1, "fullReadAccess": true, "fullWriteAccess": false, @@ -55,7 +55,7 @@ "message": "\"isActive\" must be a boolean" }, { - "name": "test-copilot", + "name": "POSTMANE2E-test-copilot", "legacyId": 1, "fullReadAccess": true, "fullWriteAccess": false, @@ -66,7 +66,7 @@ "message": "\"selfObtainable\" must be a boolean" }, { - "name": "test-copilot", + "name": "POSTMANE2E-test-copilot", "legacyId": 1, "fullReadAccess": true, "fullWriteAccess": false, diff --git a/test/postman/testData/resource-role/update-resource-role-by-admin.json b/test/postman/testData/resource-role/update-resource-role-by-admin.json index 6b6f274..acab0d5 100644 --- a/test/postman/testData/resource-role/update-resource-role-by-admin.json +++ b/test/postman/testData/resource-role/update-resource-role-by-admin.json @@ -1,6 +1,6 @@ [ { - "name": "UPDATE_CO-PILOT-admin", + "name": "POSTMANE2E-UPDATE_CO-PILOT-admin", "fullReadAccess": true, "fullWriteAccess": true, "isActive": true, @@ -8,7 +8,7 @@ "httpCode": 200 }, { - "name": "UPDATE_OBSERVER-admin", + "name": "POSTMANE2E-UPDATE_OBSERVER-admin", "fullReadAccess": true, "fullWriteAccess": true, "isActive": false, @@ -16,7 +16,7 @@ "httpCode": 200 }, { - "name": "UPDATE_SUBMITTER-admin", + "name": "POSTMANE2E-UPDATE_SUBMITTER-admin", "fullReadAccess": true, "fullWriteAccess": true, "isActive": true, @@ -24,7 +24,7 @@ "httpCode": 200 }, { - "name": "UPDATE_REVIEWER-admin", + "name": "POSTMANE2E-UPDATE_REVIEWER-admin", "fullReadAccess": false, "fullWriteAccess": false, "isActive": true, @@ -32,13 +32,13 @@ "httpCode": 200 }, { - "name": "UPDATE_REVIEWER-admin1", + "name": "POSTMANE2E-UPDATE_REVIEWER-admin1", "isActive": true, "selfObtainable": false, "httpCode": 400 }, { - "name": "SUBMITTER", + "name": "POSTMANE2E-SUBMITTER", "fullReadAccess": true, "fullWriteAccess": false, "isActive": true, diff --git a/test/postman/testData/resource-role/update-resource-role-by-m2m.json b/test/postman/testData/resource-role/update-resource-role-by-m2m.json index 3d1196f..d251464 100644 --- a/test/postman/testData/resource-role/update-resource-role-by-m2m.json +++ b/test/postman/testData/resource-role/update-resource-role-by-m2m.json @@ -1,6 +1,6 @@ [ { - "name": "UPDATE_CO-PILOT-m2m", + "name": "POSTMANE2E-UPDATE_CO-PILOT-m2m", "fullReadAccess": true, "fullWriteAccess": true, "isActive": true, @@ -8,7 +8,7 @@ "httpCode": 200 }, { - "name": "UPDATE_OBSERVER-m2m", + "name": "POSTMANE2E-UPDATE_OBSERVER-m2m", "fullReadAccess": true, "fullWriteAccess": true, "isActive": false, @@ -16,7 +16,7 @@ "httpCode": 200 }, { - "name": "UPDATE_SUBMITTER-m2m", + "name": "POSTMANE2E-UPDATE_SUBMITTER-m2m", "fullReadAccess": true, "fullWriteAccess": true, "isActive": true, @@ -24,7 +24,7 @@ "httpCode": 200 }, { - "name": "UPDATE_REVIEWER-m2m", + "name": "POSTMANE2E-UPDATE_REVIEWER-m2m", "fullReadAccess": false, "fullWriteAccess": false, "isActive": true, @@ -32,13 +32,13 @@ "httpCode": 200 }, { - "name": "UPDATE_REVIEWER-m2m1", + "name": "POSTMANE2E-UPDATE_REVIEWER-m2m1", "isActive": true, "selfObtainable": false, "httpCode": 400 }, { - "name": "SUBMITTER", + "name": "POSTMANE2E-SUBMITTER", "fullReadAccess": true, "fullWriteAccess": false, "isActive": true, diff --git a/test/postman/testData/resource-role/update-resource-role-with-invalid-data.json b/test/postman/testData/resource-role/update-resource-role-with-invalid-data.json index 413f983..ab0c78b 100644 --- a/test/postman/testData/resource-role/update-resource-role-with-invalid-data.json +++ b/test/postman/testData/resource-role/update-resource-role-with-invalid-data.json @@ -11,7 +11,7 @@ "message": "\"name\" is not allowed to be empty" }, { - "name": "update-co-pilot", + "name": "POSTMANE2E-update-co-pilot", "fullReadAccess": true, "fullWriteAccess": false, "required_field_1": "isActive", @@ -22,7 +22,7 @@ "message": "\"selfObtainable\" is required" }, { - "name": "update-co-pilot", + "name": "POSTMANE2E-update-co-pilot", "fullReadAccess": true, "fullWriteAccess": false, "required_field_1": "isActiveNotProvided", @@ -33,7 +33,7 @@ "message": "\"isActive\" is required" }, { - "name": "update-co-pilot", + "name": "POSTMANE2E-update-co-pilot", "fullReadAccess": "123", "fullWriteAccess": false, "required_field_1": "isActive", @@ -44,7 +44,7 @@ "message": "\"fullReadAccess\" must be a boolean" }, { - "name": "Observer", + "name": "POSTMANE2E-Observer", "fullReadAccess": true, "fullWriteAccess": "123", "required_field_1": "isActive", @@ -55,7 +55,7 @@ "message": "\"fullWriteAccess\" must be a boolean" }, { - "name": "update-submitter", + "name": "POSTMANE2E-update-submitter", "fullReadAccess": true, "fullWriteAccess": true, "required_field_1": "isActive", @@ -66,7 +66,7 @@ "message": "\"isActive\" must be a boolean" }, { - "name": "update-reviewer", + "name": "POSTMANE2E-update-reviewer", "fullReadAccess": false, "fullWriteAccess": false, "required_field_1": "isActive", From 9d5de354a490300de4781fbd0c42687ecd198b74 Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Wed, 12 May 2021 18:31:45 +0530 Subject: [PATCH 24/60] Update config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f5851a6..1b5301f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,8 +12,8 @@ defaults: &defaults install_dependency: &install_dependency name: Installation of build and deployment dependencies. command: | - sudo apt install jq python-pip - sudo pip install awscli --upgrade + sudo apt install jq python3-pip + sudo pip3 install awscli --upgrade # sudo pip install docker-compose install_deploysuite: &install_deploysuite name: Installation of install_deploysuite. From f08a6edbe23a3a6cc44a2891c5f074374d2c6498 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Wed, 12 May 2021 17:14:40 +0300 Subject: [PATCH 25/60] fix tests --- .../resource-api.postman_environment.json | 96 +++++++++++++++++-- .../create-resource-role-by-admin.json | 5 +- 2 files changed, 94 insertions(+), 7 deletions(-) diff --git a/test/postman/resource-api.postman_environment.json b/test/postman/resource-api.postman_environment.json index fc8fd5a..8e119a2 100644 --- a/test/postman/resource-api.postman_environment.json +++ b/test/postman/resource-api.postman_environment.json @@ -1,7 +1,7 @@ { "_": { "postman_variable_scope": "environment", - "postman_exported_at": "2021-03-26T18:00:05.539Z", + "postman_exported_at": "2021-05-12T14:10:01.398Z", "postman_exported_using": "Newman/5.2.2" }, "id": "8972a3df-731f-4475-b089-ccbb28735083", @@ -24,12 +24,12 @@ }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IFN1cHBvcnQiLCJ0ZXN0Um9sZSIsImFhYSIsInRvbnlfdGVzdF8xIiwiQ29ubmVjdCBNYW5hZ2VyIiwiQ29ubmVjdCBBZG1pbiIsImNvcGlsb3QiLCJDb25uZWN0IENvcGlsb3QgTWFuYWdlciIsIlRvcGNvZGVyIFVzZXIiLCJhZG1pbmlzdHJhdG9yIiwidS1iYWhuIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTYxNjc4MjE1MywidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTYxNjc4MTU1MywiZW1haWwiOiJhamVmdHNAdG9wY29kZXIuY29tIiwianRpIjoiMTQ4ZWZmMjktNjFiZS00ODQzLWI2ZmMtNWE2MTE4YmU4Y2I4In0.ZPb6NrrWK3n7WvG8gNJ2TT3b1pdnrze5jv_CveXqe9g", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90IiwiYWRtaW5pc3RyYXRvciIsIkNvbm5lY3QgQWRtaW4iLCJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJqY29yaSIsImV4cCI6MTYyMDgyOTIyMSwidXNlcklkIjoiNDAwMjk0ODQiLCJpYXQiOjE2MjA4Mjg2MjEsImVtYWlsIjoiamNvcmkrZGV2QHRvcGNvZGVyLmNvbSIsImp0aSI6IjM5MTZmOTc0LWYzM2QtNDBkYi1hNzg4LTU5NzNmNDk1YmE5YiJ9.6AIm8H2DMs6NSxAWG7hCKIH8yvRUBziXhUUQHQ-rdOk", "key": "admin_token" }, { "type": "any", - "value": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5VSkZORGd4UlRVME5EWTBOVVkzTlRkR05qTXlRamxETmpOQk5UYzVRVUV3UlRFeU56TTJRUSJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiakdJZjJwZDNmNDRCMWpxdk9haTMwQklLVFphbllCZlVAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNjE2NzgxNTQ5LCJleHAiOjE2MTY4Njc5NDksImF6cCI6ImpHSWYycGQzZjQ0QjFqcXZPYWkzMEJJS1RaYW5ZQmZVIiwic2NvcGUiOiJ1cGRhdGU6dXNlcl9wcm9maWxlcyB3cml0ZTp1c2VyX3Byb2ZpbGVzIGNyZWF0ZTpjb25uZWN0X3Byb2plY3QgYWxsOmNoYWxsZW5nZXMgcmVhZDpjaGFsbGVuZ2VzIHdyaXRlOmNoYWxsZW5nZXMgYWxsOmdyb3VwcyB3cml0ZTpncm91cHMgcmVhZDpncm91cHMgdXBkYXRlOnN1Ym1pc3Npb24gcmVhZDpzdWJtaXNzaW9uIGRlbGV0ZTpzdWJtaXNzaW9uIGNyZWF0ZTpzdWJtaXNzaW9uIGFsbDpzdWJtaXNzaW9uIHJlYWQ6cHJvamVjdCBhbGw6Y29ubmVjdF9wcm9qZWN0IHJlYWQ6YnVzX3RvcGljcyB3cml0ZTpidXNfYXBpIHJlYWQ6ZW1haWxfdGVtcGxhdGVzIHJlYWQ6dXNlcl9wcm9maWxlcyByZWFkOnJvbGVzIHJlYWQ6cHJvamVjdC11c2VyIHJlYWQ6cHJvamVjdC1wZXJtaXNzaW9uIHJlYWQ6cmVzb3VyY2VzIHdyaXRlOnJlc291cmNlcyBkZWxldGU6cmVzb3VyY2VzIHVwZGF0ZTpyZXNvdXJjZXMgYWxsOnJlc291cmNlcyByZWFkOnRlcm1zIGFsbDp0ZXJtcyBhbGw6cHJvamVjdHMgcmVhZDpwcm9qZWN0cyBhbGw6c2NoZWR1bGVzIHJlYWQ6c2NoZWR1bGVzIGNyZWF0ZTpzY2hlZHVsZXMgdXBkYXRlOnNjaGVkdWxlcyBkZWxldGU6c2NoZWR1bGVzIHJlYWQ6cHJvamVjdC1iaWxsaW5nLWFjY291bnQtZGV0YWlscyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.bElR_f-ps5Yzj4dn1LXpG_3uzdQb9rBtLMGoRFApFcu4SIqkKlIHX1W0Oz7oZjxg3ThhEgpKls2TvFBRrclsoJUJ2xG68i031sE3p_3fvULzuIChGZIbcRKob2UHlMO8Z152dW319rGvlx5z4ubx8rtWpJv6h6tmuOqCmfGUFXzLtFEZ9u9SthZ383dZNNVRaj-d-cCFkS9yo09k8ZHAQ9IUytkhEhO_CKjcGvduEiGGWOLCt3sAMkDIaWp4tEgxQoW_HIeQVYudG8wySn-J19OFcEwr3vgkcz6eHiqSF93ShcnilN-jlLJhOfPu-Qq0s9y37aFLTfchM_QAVc11Cw", + "value": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5VSkZORGd4UlRVME5EWTBOVVkzTlRkR05qTXlRamxETmpOQk5UYzVRVUV3UlRFeU56TTJRUSJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiRWtFOXFVM0V5NmhkSndPc0YxWDBkdXdza3FjRHVFbFdAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNjIwODI4NjE5LCJleHAiOjE2MjA5MTUwMTksImF6cCI6IkVrRTlxVTNFeTZoZEp3T3NGMVgwZHV3c2txY0R1RWxXIiwic2NvcGUiOiJyZWFkOmNoYWxsZW5nZXMgcmVhZDpncm91cHMgcmVhZDpzdWJtaXNzaW9uIHJlYWQ6cmV2aWV3X3R5cGUgcmVhZDpyZXZpZXdfc3VtbWF0aW9uIHJlYWQ6cmV2aWV3IHJlYWQ6cHJvamVjdCByZWFkOmJ1c190b3BpY3Mgd3JpdGU6YnVzX2FwaSByZWFkOmVtYWlsX3RlbXBsYXRlcyByZWFkOnVzZXJfcHJvZmlsZXMgcmVhZDpyb2xlcyByZWFkOnJlc291cmNlcyB3cml0ZTpyZXNvdXJjZXMgZGVsZXRlOnJlc291cmNlcyB1cGRhdGU6cmVzb3VyY2VzIGFsbDpyZXNvdXJjZXMiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMifQ.Keg4Zo_KEaHq15_yjk3pKAOcxO_uv4zyfUwWlH1K2vjfHZYq_JNIwPQGoEp8QJaI3OucMEbivF52_ZUD40QAFPlPfWrf6qn4MAv1ZZjH0ekqA4n28uM9Tp-8qKsW37yIHzWboCkcCZcbDqqKhKKKJhV02_l7HSw03qqc3cNVi8SpOmns6T9DQltzVZVNEsK8E1SDvOOYZ2CoXT7LBT7Dx2nNfnFkDYfM3FdX1eLzyNv7EJG1MCaV3DhnzsXSpgQQTXlSkz8pzHYLF8L9xmfc9AiqhCDu_DM1B_Akj37E_kLdGMv4a89bYejCDrZN5CuOd3io6iMxTaHB7DW79O9BjQ", "key": "M2M_TOKEN" }, { @@ -84,16 +84,100 @@ }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IENvcGlsb3QiLCJjb3BpbG90IiwiVG9wY29kZXIgVXNlciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoiVENDb25uQ29waWxvdCIsImV4cCI6MTYxNjc4MjE1NywidXNlcklkIjoiNDAxNTg5OTQiLCJpYXQiOjE2MTY3ODE1NTcsImVtYWlsIjoidG9wY29kZXJjb25uZWN0K0NvcGlsb3RAZ21haWwuY29tIiwianRpIjoiYTQwZmM5YWItNTUwZC00ODYzLThmZmUtZjBhNmE2MmFiNzNhIn0.fY_SCalqt0d8CEtDq0gJpIY4UlOuM-4n5nf7DSTqGGo", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IENvcGlsb3QiLCJjb3BpbG90IiwiVG9wY29kZXIgVXNlciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoiVENDb25uQ29waWxvdCIsImV4cCI6MTYyMDgyOTIyMywidXNlcklkIjoiNDAxNTg5OTQiLCJpYXQiOjE2MjA4Mjg2MjMsImVtYWlsIjoidG9wY29kZXJjb25uZWN0K0NvcGlsb3RAZ21haWwuY29tIiwianRpIjoiYzU4YTAyYjctNzg1My00M2JkLTlmMWYtNmFiOTAwZWI3M2U4In0.1M28T0jsscp5vBqbMhgP8YPooCqxH-dDh0KpH98Gd9o", "key": "copilot_token" }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJ0ZXN0Y2F0IiwiZXhwIjoxNjE2NzgyMTYxLCJ1c2VySWQiOiI0MDE1NTU3OSIsImlhdCI6MTYxNjc4MTU2MSwiZW1haWwiOiJ0ZXN0LWNhdEBtYWlsLnJ1IiwianRpIjoiYTQ5ZTRhY2MtZTg1YS00NjkwLThhMDktYmU2OTdkZGM2YjE5In0.vWKcBZTuoEHPMxiqBXYA-5CCsXVQvDj-Cc6r8WJIPLs", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90Il0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJhcmdvbGl0ZSIsImV4cCI6MTYyMDgyOTIyNSwidXNlcklkIjoiMjg3NjE0IiwiaWF0IjoxNjIwODI4NjI1LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6ImM3NmJiZGI0LTg0ZmQtNDI4YS1hNDJmLWI4NzlmZDg4YmY3NyJ9.sWU-RRA7spbH81gy-78iV5e13FeIB28nxTd1OonA9b4", "key": "user_token" + }, + { + "type": "any", + "value": { + "name": "POSTMANE2E-co-pilot", + "fullReadAccess": true, + "fullWriteAccess": false, + "isActive": true, + "selfObtainable": false, + "httpCode": 200 + }, + "key": "0" + }, + { + "type": "any", + "value": { + "name": "POSTMANE2E-Observer", + "fullReadAccess": true, + "fullWriteAccess": true, + "isActive": false, + "selfObtainable": false, + "httpCode": 200 + }, + "key": "1" + }, + { + "type": "any", + "value": { + "name": "POSTMANE2E-submitter", + "fullReadAccess": true, + "fullWriteAccess": true, + "isActive": true, + "selfObtainable": true, + "httpCode": 200 + }, + "key": "2" + }, + { + "type": "any", + "value": { + "name": "POSTMANE2E-reviewer", + "fullReadAccess": false, + "fullWriteAccess": false, + "isActive": true, + "selfObtainable": false, + "httpCode": 200 + }, + "key": "3" + }, + { + "type": "any", + "value": { + "invalid": "invalid", + "fullReadAccess": true, + "fullWriteAccess": false, + "selfObtainable": false, + "isActive": true, + "httpCode": 400 + }, + "key": "4" + }, + { + "type": "any", + "value": { + "name": "POSTMANE2E-failure-test", + "fullReadAccess": true, + "fullWriteAccess": false, + "selfObtainable": false, + "isActive": false, + "httpCode": 400 + }, + "key": "5" + }, + { + "type": "any", + "value": { + "name": "POSTMANE2E-submitter", + "fullReadAccess": true, + "fullWriteAccess": true, + "isActive": true, + "selfObtainable": true, + "httpCode": 409 + }, + "key": "6" } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2021-03-26T18:00:06.711Z", + "_postman_exported_at": "2021-05-12T14:10:25.588Z", "_postman_exported_using": "Newman/5.2.2" } \ No newline at end of file diff --git a/test/postman/testData/resource-role/create-resource-role-by-admin.json b/test/postman/testData/resource-role/create-resource-role-by-admin.json index 303c7c6..44a408e 100644 --- a/test/postman/testData/resource-role/create-resource-role-by-admin.json +++ b/test/postman/testData/resource-role/create-resource-role-by-admin.json @@ -35,6 +35,7 @@ "invalid": "invalid", "fullReadAccess": true, "fullWriteAccess": false, + "selfObtainable": false, "isActive": true, "httpCode": 400 }, @@ -42,6 +43,8 @@ "name": "POSTMANE2E-failure-test", "fullReadAccess": true, "fullWriteAccess": false, + "selfObtainable": false, + "isActive": false, "httpCode": 400 }, { @@ -52,4 +55,4 @@ "selfObtainable": true, "httpCode": 409 } -] \ No newline at end of file +] From eb3a3349e933c0e6cc60cbbf33bebd46e6a871a4 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Wed, 12 May 2021 20:09:04 +0300 Subject: [PATCH 26/60] fix configs --- .../resource-api.postman_environment.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/postman/resource-api.postman_environment.json b/test/postman/resource-api.postman_environment.json index 8e119a2..5e7c17c 100644 --- a/test/postman/resource-api.postman_environment.json +++ b/test/postman/resource-api.postman_environment.json @@ -1,7 +1,7 @@ { "_": { "postman_variable_scope": "environment", - "postman_exported_at": "2021-05-12T14:10:01.398Z", + "postman_exported_at": "2021-05-12T17:06:44.084Z", "postman_exported_using": "Newman/5.2.2" }, "id": "8972a3df-731f-4475-b089-ccbb28735083", @@ -9,7 +9,7 @@ "values": [ { "type": "any", - "value": "http://localhost:3000/v5", + "value": "https://api.topcoder-dev.com/v5", "key": "URL" }, { @@ -24,12 +24,12 @@ }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90IiwiYWRtaW5pc3RyYXRvciIsIkNvbm5lY3QgQWRtaW4iLCJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJqY29yaSIsImV4cCI6MTYyMDgyOTIyMSwidXNlcklkIjoiNDAwMjk0ODQiLCJpYXQiOjE2MjA4Mjg2MjEsImVtYWlsIjoiamNvcmkrZGV2QHRvcGNvZGVyLmNvbSIsImp0aSI6IjM5MTZmOTc0LWYzM2QtNDBkYi1hNzg4LTU5NzNmNDk1YmE5YiJ9.6AIm8H2DMs6NSxAWG7hCKIH8yvRUBziXhUUQHQ-rdOk", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IFN1cHBvcnQiLCJ0ZXN0Um9sZSIsImFhYSIsInRvbnlfdGVzdF8xIiwiQ29ubmVjdCBNYW5hZ2VyIiwiQ29ubmVjdCBBZG1pbiIsImNvcGlsb3QiLCJDb25uZWN0IENvcGlsb3QgTWFuYWdlciIsIlRvcGNvZGVyIFVzZXIiLCJhZG1pbmlzdHJhdG9yIiwidS1iYWhuIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTYyMDgzOTg3MywidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTYyMDgzOTI3MywiZW1haWwiOiJhamVmdHNAdG9wY29kZXIuY29tIiwianRpIjoiMDYzZmQ5OGItMDhiMC00YWFmLWI4NDAtOWZiZmUwMWViZTlhIn0.ZbLAHvjKIP5IQ8oDgdHMwGE66k94uFCo_8LPuPq3qXs", "key": "admin_token" }, { "type": "any", - "value": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5VSkZORGd4UlRVME5EWTBOVVkzTlRkR05qTXlRamxETmpOQk5UYzVRVUV3UlRFeU56TTJRUSJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiRWtFOXFVM0V5NmhkSndPc0YxWDBkdXdza3FjRHVFbFdAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNjIwODI4NjE5LCJleHAiOjE2MjA5MTUwMTksImF6cCI6IkVrRTlxVTNFeTZoZEp3T3NGMVgwZHV3c2txY0R1RWxXIiwic2NvcGUiOiJyZWFkOmNoYWxsZW5nZXMgcmVhZDpncm91cHMgcmVhZDpzdWJtaXNzaW9uIHJlYWQ6cmV2aWV3X3R5cGUgcmVhZDpyZXZpZXdfc3VtbWF0aW9uIHJlYWQ6cmV2aWV3IHJlYWQ6cHJvamVjdCByZWFkOmJ1c190b3BpY3Mgd3JpdGU6YnVzX2FwaSByZWFkOmVtYWlsX3RlbXBsYXRlcyByZWFkOnVzZXJfcHJvZmlsZXMgcmVhZDpyb2xlcyByZWFkOnJlc291cmNlcyB3cml0ZTpyZXNvdXJjZXMgZGVsZXRlOnJlc291cmNlcyB1cGRhdGU6cmVzb3VyY2VzIGFsbDpyZXNvdXJjZXMiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMifQ.Keg4Zo_KEaHq15_yjk3pKAOcxO_uv4zyfUwWlH1K2vjfHZYq_JNIwPQGoEp8QJaI3OucMEbivF52_ZUD40QAFPlPfWrf6qn4MAv1ZZjH0ekqA4n28uM9Tp-8qKsW37yIHzWboCkcCZcbDqqKhKKKJhV02_l7HSw03qqc3cNVi8SpOmns6T9DQltzVZVNEsK8E1SDvOOYZ2CoXT7LBT7Dx2nNfnFkDYfM3FdX1eLzyNv7EJG1MCaV3DhnzsXSpgQQTXlSkz8pzHYLF8L9xmfc9AiqhCDu_DM1B_Akj37E_kLdGMv4a89bYejCDrZN5CuOd3io6iMxTaHB7DW79O9BjQ", + "value": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5VSkZORGd4UlRVME5EWTBOVVkzTlRkR05qTXlRamxETmpOQk5UYzVRVUV3UlRFeU56TTJRUSJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiRWtFOXFVM0V5NmhkSndPc0YxWDBkdXdza3FjRHVFbFdAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNjIwODM5MjY5LCJleHAiOjE2MjA5MjU2NjksImF6cCI6IkVrRTlxVTNFeTZoZEp3T3NGMVgwZHV3c2txY0R1RWxXIiwic2NvcGUiOiJyZWFkOmNoYWxsZW5nZXMgcmVhZDpncm91cHMgcmVhZDpzdWJtaXNzaW9uIHJlYWQ6cmV2aWV3X3R5cGUgcmVhZDpyZXZpZXdfc3VtbWF0aW9uIHJlYWQ6cmV2aWV3IHJlYWQ6cHJvamVjdCByZWFkOmJ1c190b3BpY3Mgd3JpdGU6YnVzX2FwaSByZWFkOmVtYWlsX3RlbXBsYXRlcyByZWFkOnVzZXJfcHJvZmlsZXMgcmVhZDpyb2xlcyByZWFkOnJlc291cmNlcyB3cml0ZTpyZXNvdXJjZXMgZGVsZXRlOnJlc291cmNlcyB1cGRhdGU6cmVzb3VyY2VzIGFsbDpyZXNvdXJjZXMiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMifQ.So6O9VodyXcL-m1hRBK0OVmTCu1bWLhxhPEoZSBjwi5pa0KnIXi-NAdQ7ZLw_pnWKD7FLaK_BEF2LM6724DzlKvEmGBCqacXo2THEEffLvMvzfjkyacMh3I9rTDYHLvXeWEDmCEXlxcwuMF9albN5VwDaMzSYll5xNJrGs1pTidKSovtb8_EhmxStgy_7ag04IYyplr8r8z-wpSdVvH7mr2SpnElvzSBGrqcdJqKkgH7c-59JtxDTZuaHSPNvp0kBVEvbg-vxrXzwUFqX5NlXGuSgxC4FE56--jOdkIe_Yhk3P6YWi427tAt3BZtLsTjAePsuz3P2kopFddow7N9CA", "key": "M2M_TOKEN" }, { @@ -84,12 +84,12 @@ }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IENvcGlsb3QiLCJjb3BpbG90IiwiVG9wY29kZXIgVXNlciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoiVENDb25uQ29waWxvdCIsImV4cCI6MTYyMDgyOTIyMywidXNlcklkIjoiNDAxNTg5OTQiLCJpYXQiOjE2MjA4Mjg2MjMsImVtYWlsIjoidG9wY29kZXJjb25uZWN0K0NvcGlsb3RAZ21haWwuY29tIiwianRpIjoiYzU4YTAyYjctNzg1My00M2JkLTlmMWYtNmFiOTAwZWI3M2U4In0.1M28T0jsscp5vBqbMhgP8YPooCqxH-dDh0KpH98Gd9o", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IENvcGlsb3QiLCJjb3BpbG90IiwiVG9wY29kZXIgVXNlciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoiVENDb25uQ29waWxvdCIsImV4cCI6MTYyMDgzOTg3NCwidXNlcklkIjoiNDAxNTg5OTQiLCJpYXQiOjE2MjA4MzkyNzQsImVtYWlsIjoidG9wY29kZXJjb25uZWN0K0NvcGlsb3RAZ21haWwuY29tIiwianRpIjoiOTYwMDU2MmYtYWY5Zi00MmFhLThkMjMtNDk3Mjc0MzkzZjhjIn0.yNZEPT0gyDBYWamSMn4l_tfzOMp79GSxsG17oL-gA_Y", "key": "copilot_token" }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90Il0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJhcmdvbGl0ZSIsImV4cCI6MTYyMDgyOTIyNSwidXNlcklkIjoiMjg3NjE0IiwiaWF0IjoxNjIwODI4NjI1LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6ImM3NmJiZGI0LTg0ZmQtNDI4YS1hNDJmLWI4NzlmZDg4YmY3NyJ9.sWU-RRA7spbH81gy-78iV5e13FeIB28nxTd1OonA9b4", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90Il0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJhcmdvbGl0ZSIsImV4cCI6MTYyMDgzOTg3OSwidXNlcklkIjoiMjg3NjE0IiwiaWF0IjoxNjIwODM5Mjc5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6Ijk2YTY3MmE4LTVlNzMtNDgxOS1hMzUwLWE1NjMyZTA0NWQ2ZCJ9.YEfCVxuWr04Z0tdWWwUKqOqW1dYwsOAvl2iLR3feN4k", "key": "user_token" }, { @@ -178,6 +178,6 @@ } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2021-05-12T14:10:25.588Z", + "_postman_exported_at": "2021-05-12T17:08:00.054Z", "_postman_exported_using": "Newman/5.2.2" -} \ No newline at end of file +} From d9340143c8c030abec50dab413553c4f1fd9963b Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Wed, 12 May 2021 20:10:05 +0300 Subject: [PATCH 27/60] clear data before running tests --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1b5301f..2f8bd1a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -107,7 +107,8 @@ jobs: cd mock (npm run mock-challenge-api&) (NODE_ENV=test npm start&) - npm run test:newman + npm run test:newman:clear + npm run test:newman workflows: version: 2 From 62ebc9df430be1d1eedb560257a16f6364f7d144 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Wed, 12 May 2021 20:24:58 +0300 Subject: [PATCH 28/60] Fix tests --- .../testData/resource-role/create-resource-role-by-admin.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/postman/testData/resource-role/create-resource-role-by-admin.json b/test/postman/testData/resource-role/create-resource-role-by-admin.json index 44a408e..5e3123f 100644 --- a/test/postman/testData/resource-role/create-resource-role-by-admin.json +++ b/test/postman/testData/resource-role/create-resource-role-by-admin.json @@ -36,7 +36,7 @@ "fullReadAccess": true, "fullWriteAccess": false, "selfObtainable": false, - "isActive": true, + "isActive": 5, "httpCode": 400 }, { @@ -44,7 +44,7 @@ "fullReadAccess": true, "fullWriteAccess": false, "selfObtainable": false, - "isActive": false, + "isActive": 5, "httpCode": 400 }, { From 00509d9fb52642811ef7be49f86e9674a57bdb6b Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Wed, 12 May 2021 20:33:52 +0300 Subject: [PATCH 29/60] newman fixes --- .circleci/config.yml | 1 + test/postman/resource-api.postman_environment.json | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2f8bd1a..25183eb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -109,6 +109,7 @@ jobs: (NODE_ENV=test npm start&) npm run test:newman:clear npm run test:newman + npm run test:newman:clear workflows: version: 2 diff --git a/test/postman/resource-api.postman_environment.json b/test/postman/resource-api.postman_environment.json index 5e7c17c..1da5f4f 100644 --- a/test/postman/resource-api.postman_environment.json +++ b/test/postman/resource-api.postman_environment.json @@ -1,7 +1,7 @@ { "_": { "postman_variable_scope": "environment", - "postman_exported_at": "2021-05-12T17:06:44.084Z", + "postman_exported_at": "2021-05-12T17:21:36.173Z", "postman_exported_using": "Newman/5.2.2" }, "id": "8972a3df-731f-4475-b089-ccbb28735083", @@ -24,12 +24,12 @@ }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IFN1cHBvcnQiLCJ0ZXN0Um9sZSIsImFhYSIsInRvbnlfdGVzdF8xIiwiQ29ubmVjdCBNYW5hZ2VyIiwiQ29ubmVjdCBBZG1pbiIsImNvcGlsb3QiLCJDb25uZWN0IENvcGlsb3QgTWFuYWdlciIsIlRvcGNvZGVyIFVzZXIiLCJhZG1pbmlzdHJhdG9yIiwidS1iYWhuIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTYyMDgzOTg3MywidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTYyMDgzOTI3MywiZW1haWwiOiJhamVmdHNAdG9wY29kZXIuY29tIiwianRpIjoiMDYzZmQ5OGItMDhiMC00YWFmLWI4NDAtOWZiZmUwMWViZTlhIn0.ZbLAHvjKIP5IQ8oDgdHMwGE66k94uFCo_8LPuPq3qXs", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IFN1cHBvcnQiLCJ0ZXN0Um9sZSIsImFhYSIsInRvbnlfdGVzdF8xIiwiQ29ubmVjdCBNYW5hZ2VyIiwiQ29ubmVjdCBBZG1pbiIsImNvcGlsb3QiLCJDb25uZWN0IENvcGlsb3QgTWFuYWdlciIsIlRvcGNvZGVyIFVzZXIiLCJhZG1pbmlzdHJhdG9yIiwidS1iYWhuIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTYyMDg0MDc0NSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTYyMDg0MDE0NSwiZW1haWwiOiJhamVmdHNAdG9wY29kZXIuY29tIiwianRpIjoiMWRkOTkxZGYtYzhhNC00MjJmLTkxY2UtMWI3NDgzZjQ2NmEzIn0.tpGhiHChM_5A-gVFfK-TBtgHGhMlIZ9KJ7W3zcoy5Uw", "key": "admin_token" }, { "type": "any", - "value": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5VSkZORGd4UlRVME5EWTBOVVkzTlRkR05qTXlRamxETmpOQk5UYzVRVUV3UlRFeU56TTJRUSJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiRWtFOXFVM0V5NmhkSndPc0YxWDBkdXdza3FjRHVFbFdAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNjIwODM5MjY5LCJleHAiOjE2MjA5MjU2NjksImF6cCI6IkVrRTlxVTNFeTZoZEp3T3NGMVgwZHV3c2txY0R1RWxXIiwic2NvcGUiOiJyZWFkOmNoYWxsZW5nZXMgcmVhZDpncm91cHMgcmVhZDpzdWJtaXNzaW9uIHJlYWQ6cmV2aWV3X3R5cGUgcmVhZDpyZXZpZXdfc3VtbWF0aW9uIHJlYWQ6cmV2aWV3IHJlYWQ6cHJvamVjdCByZWFkOmJ1c190b3BpY3Mgd3JpdGU6YnVzX2FwaSByZWFkOmVtYWlsX3RlbXBsYXRlcyByZWFkOnVzZXJfcHJvZmlsZXMgcmVhZDpyb2xlcyByZWFkOnJlc291cmNlcyB3cml0ZTpyZXNvdXJjZXMgZGVsZXRlOnJlc291cmNlcyB1cGRhdGU6cmVzb3VyY2VzIGFsbDpyZXNvdXJjZXMiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMifQ.So6O9VodyXcL-m1hRBK0OVmTCu1bWLhxhPEoZSBjwi5pa0KnIXi-NAdQ7ZLw_pnWKD7FLaK_BEF2LM6724DzlKvEmGBCqacXo2THEEffLvMvzfjkyacMh3I9rTDYHLvXeWEDmCEXlxcwuMF9albN5VwDaMzSYll5xNJrGs1pTidKSovtb8_EhmxStgy_7ag04IYyplr8r8z-wpSdVvH7mr2SpnElvzSBGrqcdJqKkgH7c-59JtxDTZuaHSPNvp0kBVEvbg-vxrXzwUFqX5NlXGuSgxC4FE56--jOdkIe_Yhk3P6YWi427tAt3BZtLsTjAePsuz3P2kopFddow7N9CA", + "value": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5VSkZORGd4UlRVME5EWTBOVVkzTlRkR05qTXlRamxETmpOQk5UYzVRVUV3UlRFeU56TTJRUSJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiRWtFOXFVM0V5NmhkSndPc0YxWDBkdXdza3FjRHVFbFdAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNjIwODQwMTQxLCJleHAiOjE2MjA5MjY1NDEsImF6cCI6IkVrRTlxVTNFeTZoZEp3T3NGMVgwZHV3c2txY0R1RWxXIiwic2NvcGUiOiJyZWFkOmNoYWxsZW5nZXMgcmVhZDpncm91cHMgcmVhZDpzdWJtaXNzaW9uIHJlYWQ6cmV2aWV3X3R5cGUgcmVhZDpyZXZpZXdfc3VtbWF0aW9uIHJlYWQ6cmV2aWV3IHJlYWQ6cHJvamVjdCByZWFkOmJ1c190b3BpY3Mgd3JpdGU6YnVzX2FwaSByZWFkOmVtYWlsX3RlbXBsYXRlcyByZWFkOnVzZXJfcHJvZmlsZXMgcmVhZDpyb2xlcyByZWFkOnJlc291cmNlcyB3cml0ZTpyZXNvdXJjZXMgZGVsZXRlOnJlc291cmNlcyB1cGRhdGU6cmVzb3VyY2VzIGFsbDpyZXNvdXJjZXMiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMifQ.n5yC4p7HIpAWIqR0MIKsdVw8S5xZnbNkfR033mdnkIpg1HWPl-8-lqm6t4hKGZyZKkgXYaGfldCYW2zKYoKKBBBNckrx41SNqYwD_QjmaMavtejRKbYDnIge-GIN4HcMVvamUSi7rmAlhIRJOI2GCtMYehga_plUYTANkkLzBLBnHXUsz3QlUbLF3V_AxNN3KmWJCQODYMe2A7nd2hBUBG-mViXsZkNPqf0mOwvjVoXKO2-TDsEKW05YX66xjGbEgMye8VqFLUnTRg8NAO0k77PVplEmXjNEV601GGTy4MZs2AI1Q_b3t4xQzPY5pbKNiVwtdGh-rNk7_EkYsPwTCA", "key": "M2M_TOKEN" }, { @@ -84,12 +84,12 @@ }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IENvcGlsb3QiLCJjb3BpbG90IiwiVG9wY29kZXIgVXNlciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoiVENDb25uQ29waWxvdCIsImV4cCI6MTYyMDgzOTg3NCwidXNlcklkIjoiNDAxNTg5OTQiLCJpYXQiOjE2MjA4MzkyNzQsImVtYWlsIjoidG9wY29kZXJjb25uZWN0K0NvcGlsb3RAZ21haWwuY29tIiwianRpIjoiOTYwMDU2MmYtYWY5Zi00MmFhLThkMjMtNDk3Mjc0MzkzZjhjIn0.yNZEPT0gyDBYWamSMn4l_tfzOMp79GSxsG17oL-gA_Y", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IENvcGlsb3QiLCJjb3BpbG90IiwiVG9wY29kZXIgVXNlciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoiVENDb25uQ29waWxvdCIsImV4cCI6MTYyMDg0MDc0OCwidXNlcklkIjoiNDAxNTg5OTQiLCJpYXQiOjE2MjA4NDAxNDgsImVtYWlsIjoidG9wY29kZXJjb25uZWN0K0NvcGlsb3RAZ21haWwuY29tIiwianRpIjoiMDBkNDY2NDYtZmRhOC00MTJlLTg2MGEtYjMzMzk2M2IyYmYxIn0.EVyg988ik9XUyweG7pl0KYLuouhxNFObn-OyP-sEyM8", "key": "copilot_token" }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90Il0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJhcmdvbGl0ZSIsImV4cCI6MTYyMDgzOTg3OSwidXNlcklkIjoiMjg3NjE0IiwiaWF0IjoxNjIwODM5Mjc5LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6Ijk2YTY3MmE4LTVlNzMtNDgxOS1hMzUwLWE1NjMyZTA0NWQ2ZCJ9.YEfCVxuWr04Z0tdWWwUKqOqW1dYwsOAvl2iLR3feN4k", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90Il0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJhcmdvbGl0ZSIsImV4cCI6MTYyMDg0MDc1MSwidXNlcklkIjoiMjg3NjE0IiwiaWF0IjoxNjIwODQwMTUxLCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6ImYzM2I0M2E0LWU3MGEtNGQ0ZS05MmRiLTljODg3NjM3YWIzMCJ9.9BTyeA8LDQmkG8xAObvCnuziYJe5y1MhhHqNnYprYgE", "key": "user_token" }, { @@ -178,6 +178,6 @@ } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2021-05-12T17:08:00.054Z", + "_postman_exported_at": "2021-05-12T17:22:31.673Z", "_postman_exported_using": "Newman/5.2.2" } From 316438f80d920e02875e23153a538eeb67a692ae Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Wed, 12 May 2021 20:48:14 +0300 Subject: [PATCH 30/60] try to fix the clean up script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 05af8a5..60d1a49 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "mock-challenge-api": "NODE_ENV=test node mock/mock-challenge-api", "test": "nyc --reporter=html --reporter=text mocha test/unit/test.js --require test/common/prepare.js --timeout 60000 --exit", "test:newman": "NODE_ENV=test node test/postman/newman.js", - "test:newman:clear": "NODE_ENV=test node test/postman/clearTestData.js" + "test:newman:clear": "node test/postman/clearTestData.js" }, "author": "TCSCODER", "license": "none", From c6100b919262d359a0e956458d17671e80174065 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 13 May 2021 13:08:28 +0300 Subject: [PATCH 31/60] Convert clean up script to endpoint --- src/common/helper.js | 20 +++++- src/controllers/CleanUpController.js | 19 +++++ src/routes.js | 9 +++ src/services/CleanUpService.js | 101 +++++++++++++++++++++++++++ test/postman/clearTestData.js | 83 +--------------------- 5 files changed, 149 insertions(+), 83 deletions(-) create mode 100644 src/controllers/CleanUpController.js create mode 100644 src/services/CleanUpService.js diff --git a/src/common/helper.js b/src/common/helper.js index 0568340..79a78f3 100644 --- a/src/common/helper.js +++ b/src/common/helper.js @@ -321,6 +321,23 @@ async function getRequest (url, query) { .query(query || {}) } +/** + * Uses superagent to proxy post request + * @param {String} url the url + * @param {Object} data the query parameters, optional + * @returns {Object} the response + */ +async function postRequest (url, data) { + const m2mToken = await m2m.getMachineToken(config.AUTH0_CLIENT_ID, config.AUTH0_CLIENT_SECRET) + + return request + .get(url) + .set('Authorization', `Bearer ${m2mToken}`) + .set('Content-Type', 'application/json') + .set('Accept', 'application/json') + .send(data) +} + /** * Get link for a given page. * @param {Object} req the HTTP request @@ -465,5 +482,6 @@ module.exports = { setResHeaders, getAllPages, getESClient, - checkAgreedTerms + checkAgreedTerms, + postRequest } diff --git a/src/controllers/CleanUpController.js b/src/controllers/CleanUpController.js new file mode 100644 index 0000000..b8c6bc0 --- /dev/null +++ b/src/controllers/CleanUpController.js @@ -0,0 +1,19 @@ +/** + * Controller for cleaning up test data + */ + +const service = require('../services/CleanUpService') + +/** + * Get all resources of a challenge + * @param {Object} req the request + * @param {Object} res the response + */ +async function cleanUpTestData (req, res) { + await service.cleanUpTestData() + res.sendStatus(200) +} + +module.exports = { + cleanUpTestData +} diff --git a/src/routes.js b/src/routes.js index 679f3b0..b14931f 100644 --- a/src/routes.js +++ b/src/routes.js @@ -30,6 +30,15 @@ module.exports = { scopes: [DELETE, ALL] } }, + '/resources/internal/jobs/clean': { + post: { + controller: 'CleanUpController', + method: 'cleanUpTestData', + auth: 'jwt', + access: [constants.UserRoles.Admin], + scopes: [ALL] + } + }, '/resources/health': { get: { controller: 'HealthCheckController', diff --git a/src/services/CleanUpService.js b/src/services/CleanUpService.js new file mode 100644 index 0000000..244e508 --- /dev/null +++ b/src/services/CleanUpService.js @@ -0,0 +1,101 @@ +/** + * This service provides operations to clean up the environment for running automated tests. + */ + +const _ = require('lodash') +const config = require('config') +const models = require('../models') +const helper = require('../common/helper') +const logger = require('../common/logger') + +/** + * Delete the Resource from the ES by the given id + * @param id the resource id + * @returns {Promise} + */ +const deleteFromESById = async (id) => { + // delete from ES + const esClient = await helper.getESClient() + await esClient.delete({ + index: config.ES.ES_INDEX, + type: config.ES.ES_TYPE, + id: id, + refresh: 'true' // refresh ES so that it is effective for read operations instantly + }) +} + +/** + * Get Data by model id. + * @param {Object} modelName The dynamoose model name + * @param {String} id The id value + * @returns {Promise} + */ +const getById = async (modelName, id) => { + return new Promise((resolve, reject) => { + models[modelName].query('id').eq(id).exec((err, result) => { + if (err) { + logger.info('ERROR') + return reject(err) + } + if (result.length > 0) { + return resolve(result[0]) + } else { + return resolve(null) + } + }) + }) +} + +/** + * Delete the record from database by the given id. + * @param modelName the model name + * @param id the id + * @returns {Promise} + */ +const deleteFromDBById = async (modelName, id) => { + if (id && id.length > 0) { + try { + const entity = await getById(modelName, id) + if (entity) { + await entity.delete() + } + } catch (err) { + throw err + } + } +} + +/** + * Clear the postman test data. The main function of this class. + * @returns {Promise} + */ +const cleanUpTestData = async () => { + logger.info('clear the test data from postman test!') + let roles = await helper.scanAll('ResourceRole') + roles = _.filter(roles, r => (r.name.startsWith(config.POSTMAN_ROLE_NAME_PREFIX))) + for (const role of roles) { + let roleId = role.id + let rolePhaseDeps = await helper.scanAll('ResourceRolePhaseDependency') + rolePhaseDeps = _.filter(rolePhaseDeps, d => (d.resourceRoleId === roleId)) + for (const dep of rolePhaseDeps) { + logger.info('ResourceRolePhaseDependency to be deleted', dep.id) + await deleteFromDBById('ResourceRolePhaseDependency', dep.id) + } + let resources = await helper.scanAll('Resource') + resources = _.filter(resources, r => (r.roleId === roleId)) + for (const res of resources) { + logger.info('Resource to be deleted', res.id) + await deleteFromDBById('Resource', res.id) + await deleteFromESById(res.id) + } + logger.info('ResourceRole to be deleted', roleId) + await deleteFromDBById('ResourceRole', roleId) + } + logger.info('clear the test data from postman test completed!') +} + +module.exports = { + cleanUpTestData +} + +logger.buildService(module.exports) diff --git a/test/postman/clearTestData.js b/test/postman/clearTestData.js index 88e2030..77783b5 100644 --- a/test/postman/clearTestData.js +++ b/test/postman/clearTestData.js @@ -1,99 +1,18 @@ /** * Clear the postman test data. All data created by postman e2e tests will be cleared. */ - -const models = require('../../src/models') const logger = require('../../src/common/logger') const helper = require('../../src/common/helper') const config = require('config') -const _ = require('lodash') logger.info('Clear the Postman test data.') -/** - * Delete the Resource from the ES by the given id - * @param id the resource id - * @returns {Promise} - */ -const deleteFromESById = async (id) => { - // delete from ES - const esClient = await helper.getESClient() - await esClient.delete({ - index: config.ES.ES_INDEX, - type: config.ES.ES_TYPE, - id: id, - refresh: 'true' // refresh ES so that it is effective for read operations instantly - }) -} - -/** - * Get Data by model id. - * @param {Object} modelName The dynamoose model name - * @param {String} id The id value - * @returns {Promise} - */ -const getById = async (modelName, id) => { - return new Promise((resolve, reject) => { - models[modelName].query('id').eq(id).exec((err, result) => { - if (err) { - console.log('ERROR') - return reject(err) - } - if (result.length > 0) { - return resolve(result[0]) - } else { - return resolve(null) - } - }) - }) -} - -/** - * Delete the record from database by the given id. - * @param modelName the model name - * @param id the id - * @returns {Promise} - */ -const deleteFromDBById = async (modelName, id) => { - if (id && id.length > 0) { - try { - const entity = await getById(modelName, id) - if (entity) { - await entity.delete() - } - } catch (err) { - throw err - } - } -} - /** * Clear the postman test data. The main function of this class. * @returns {Promise} */ const clearTestData = async () => { - console.log('clear the test data from postman test!') - let roles = await helper.scanAll('ResourceRole') - roles = _.filter(roles, r => (r.name.startsWith(config.POSTMAN_ROLE_NAME_PREFIX))) - for (const role of roles) { - let roleId = role.id - let rolePhaseDeps = await helper.scanAll('ResourceRolePhaseDependency') - rolePhaseDeps = _.filter(rolePhaseDeps, d => (d.resourceRoleId === roleId)) - for (const dep of rolePhaseDeps) { - console.log('ResourceRolePhaseDependency to be deleted', dep.id) - await deleteFromDBById('ResourceRolePhaseDependency', dep.id) - } - let resources = await helper.scanAll('Resource') - resources = _.filter(resources, r => (r.roleId === roleId)) - for (const res of resources) { - console.log('Resource to be deleted', res.id) - await deleteFromDBById('Resource', res.id) - await deleteFromESById(res.id) - } - console.log('ResourceRole to be deleted', roleId) - await deleteFromDBById('ResourceRole', roleId) - } - console.log('clear the test data from postman test completed!') + await helper.postRequest(`${config.API_BASE_URL}/${config.API_VERSION}/resources/internal/jobs/clean`) } clearTestData().then(() => { From 4745d36ed9224f0e03529f133307411e47791e32 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 13 May 2021 13:21:08 +0300 Subject: [PATCH 32/60] remove create-tables script from tests --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 25183eb..69bb39c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -101,9 +101,6 @@ jobs: ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-qa-appvar source buildenvvar npm i - cd local - cd .. - npm run create-tables:test cd mock (npm run mock-challenge-api&) (NODE_ENV=test npm start&) From 21af113e5afe1dbe2ffe3a3c94821ad802f46466 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 13 May 2021 13:42:30 +0300 Subject: [PATCH 33/60] trigger deployment --- test/postman/clearTestData.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/postman/clearTestData.js b/test/postman/clearTestData.js index 77783b5..95424e0 100644 --- a/test/postman/clearTestData.js +++ b/test/postman/clearTestData.js @@ -16,7 +16,7 @@ const clearTestData = async () => { } clearTestData().then(() => { - logger.info('Done!') + logger.info('Completed!') process.exit() }).catch((e) => { logger.logFullError(e) From 395b750a5ce7e4485cf053ccaff23882d6559dd8 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 13 May 2021 13:50:50 +0300 Subject: [PATCH 34/60] fix postRequest helper method --- src/common/helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/helper.js b/src/common/helper.js index 79a78f3..ec97ab4 100644 --- a/src/common/helper.js +++ b/src/common/helper.js @@ -331,7 +331,7 @@ async function postRequest (url, data) { const m2mToken = await m2m.getMachineToken(config.AUTH0_CLIENT_ID, config.AUTH0_CLIENT_SECRET) return request - .get(url) + .post(url) .set('Authorization', `Bearer ${m2mToken}`) .set('Content-Type', 'application/json') .set('Accept', 'application/json') From 607200674cd803e156c446ba774fc8fac336e0c9 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 13 May 2021 15:19:32 +0300 Subject: [PATCH 35/60] fix clean up --- ReadMe.md | 4 +- app-routes.js | 1 + config/default.js | 4 +- config/test.js | 2 +- src/services/CleanUpService.js | 2 +- test/postman/ClearPostmanData.md | 6 +- .../resource-api.postman_environment.json | 68 +++++++------------ 7 files changed, 36 insertions(+), 51 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index f9cba77..6e4d18f 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -84,7 +84,7 @@ Configuration for testing is at `config/test.js`, only add such new configuratio - COPILOT_CREDENTIALS_PASSWORD: The user's password with copilot role - USER_CREDENTIALS_USERNAME: The user's username with user role - USER_CREDENTIALS_PASSWORD: The user's password with user role -- POSTMAN_ROLE_NAME_PREFIX: the role name prefix for every `ResourceRole` record +- AUTOMATED_TESTING_NAME_PREFIX: the role name prefix for every `ResourceRole` record - MOCK_BUS_API_BY_NOCK: indicates whether Nock is used for mocking Bus API. ## Available commands @@ -229,4 +229,4 @@ npm run test:newman:clear ## Verification -Refer to the verification document `Verification.md`. \ No newline at end of file +Refer to the verification document `Verification.md`. diff --git a/app-routes.js b/app-routes.js index 8392e2a..1467cea 100644 --- a/app-routes.js +++ b/app-routes.js @@ -58,6 +58,7 @@ module.exports = (app) => { } else { // User req.authUser.userId = String(req.authUser.userId) + console.log(req.authUser) if (!req.authUser.roles || !helper.checkIfExists(def.access, req.authUser.roles)) { next(new errors.ForbiddenError('You are not allowed to perform this action!')) } else { diff --git a/config/default.js b/config/default.js index d633280..99f5931 100644 --- a/config/default.js +++ b/config/default.js @@ -63,5 +63,7 @@ module.exports = { RESOURCE_CREATE_TOPIC: process.env.RESOURCE_CREATE_TOPIC || 'challenge.action.resource.create', RESOURCE_DELETE_TOPIC: process.env.RESOURCE_DELETE_TOPIC || 'challenge.action.resource.delete', RESOURCE_ROLE_CREATE_TOPIC: process.env.RESOURCE_ROLE_CREATE_TOPIC || 'challenge.action.resource.role.create', - RESOURCE_ROLE_UPDATE_TOPIC: process.env.RESOURCE_ROLE_UPDATE_TOPIC || 'challenge.action.resource.role.update' + RESOURCE_ROLE_UPDATE_TOPIC: process.env.RESOURCE_ROLE_UPDATE_TOPIC || 'challenge.action.resource.role.update', + + AUTOMATED_TESTING_NAME_PREFIX: process.env.AUTOMATED_TESTING_NAME_PREFIX || 'POSTMANE2E-', } diff --git a/config/test.js b/config/test.js index 8bc6d21..b4cf69b 100644 --- a/config/test.js +++ b/config/test.js @@ -17,6 +17,6 @@ module.exports = { COPILOT_CREDENTIALS_PASSWORD: process.env.COPILOT_CREDENTIALS_PASSWORD || '', USER_CREDENTIALS_USERNAME: process.env.USER_CREDENTIALS_USERNAME || '', USER_CREDENTIALS_PASSWORD: process.env.USER_CREDENTIALS_PASSWORD || '', - POSTMAN_ROLE_NAME_PREFIX: process.env.POSTMAN_ROLE_NAME_PREFIX || 'POSTMANE2E-', + AUTOMATED_TESTING_NAME_PREFIX: process.env.AUTOMATED_TESTING_NAME_PREFIX || 'POSTMANE2E-', MOCK_BUS_API_BY_NOCK: process.env.MOCK_BUS_API_BY_NOCK ? process.env.MOCK_BUS_API_BY_NOCK === 'true' : true } diff --git a/src/services/CleanUpService.js b/src/services/CleanUpService.js index 244e508..bd93ede 100644 --- a/src/services/CleanUpService.js +++ b/src/services/CleanUpService.js @@ -72,7 +72,7 @@ const deleteFromDBById = async (modelName, id) => { const cleanUpTestData = async () => { logger.info('clear the test data from postman test!') let roles = await helper.scanAll('ResourceRole') - roles = _.filter(roles, r => (r.name.startsWith(config.POSTMAN_ROLE_NAME_PREFIX))) + roles = _.filter(roles, r => (r.name.startsWith(config.AUTOMATED_TESTING_NAME_PREFIX))) for (const role of roles) { let roleId = role.id let rolePhaseDeps = await helper.scanAll('ResourceRolePhaseDependency') diff --git a/test/postman/ClearPostmanData.md b/test/postman/ClearPostmanData.md index a80745c..e210de8 100644 --- a/test/postman/ClearPostmanData.md +++ b/test/postman/ClearPostmanData.md @@ -34,7 +34,7 @@ clear the test data from postman test completed! info: Done! ``` ## Strategy -1. Setup the `POSTMAN_ROLE_NAME_PREFIX` from the test environment. This prefix should be a name that will never be used +1. Setup the `AUTOMATED_TESTING_NAME_PREFIX` from the test environment. This prefix should be a name that will never be used set as part of the role name. e.g. 'POSTMANE2E-'. In this case, the created `ResourceRole` will have a name like 'POSTMANE2E-submitter'. 2. Choose either one solution for mocking the Bus API. We can not ignore this, becuase in production environment, it is @@ -45,7 +45,7 @@ b. You can use use Postman's mock server. You can refer to https://drive.google. for details. You need to update the environment variable `BUSAPI_URL` to your Postman mock server. 3. Steps of clearing the test data from Postman tests. - * Find all `ResourceRole` record whose names are starting with `POSTMAN_ROLE_NAME_PREFIX`. + * Find all `ResourceRole` record whose names are starting with `AUTOMATED_TESTING_NAME_PREFIX`. * For each `ResourceRole` record, find all `ResourceRolePhaseDependency` records whose `resourceRoleId` are the same as the `id` of `RecourceRole`. Delete those `ResourceRolePhaseDependency` records. * For each `ResourceRole` record, find all `Resource` records whose `roleId` are the same @@ -66,4 +66,4 @@ b. You can use use Postman's mock server. You can refer to https://drive.google. * Existing production data should not be affected by the tests. You need to suggest how to avoid this possible issue. _Check the strategy section. All testing data are removed at last._ * If possible, we should be able to differentiate the test data from the actual data so we can filter it out from the search results of the production API. Please suggest how to achieve this. - _Check the strategy section. We can easy find all `ResourceRole` records with the given role name prefix. Then we can find all the related `ResourceRolePhaseDependency` and `Resource`._ \ No newline at end of file + _Check the strategy section. We can easy find all `ResourceRole` records with the given role name prefix. Then we can find all the related `ResourceRolePhaseDependency` and `Resource`._ diff --git a/test/postman/resource-api.postman_environment.json b/test/postman/resource-api.postman_environment.json index 1da5f4f..a3f2a4c 100644 --- a/test/postman/resource-api.postman_environment.json +++ b/test/postman/resource-api.postman_environment.json @@ -1,7 +1,7 @@ { "_": { "postman_variable_scope": "environment", - "postman_exported_at": "2021-05-12T17:21:36.173Z", + "postman_exported_at": "2021-05-13T11:09:00.610Z", "postman_exported_using": "Newman/5.2.2" }, "id": "8972a3df-731f-4475-b089-ccbb28735083", @@ -9,7 +9,7 @@ "values": [ { "type": "any", - "value": "https://api.topcoder-dev.com/v5", + "value": "http://localhost:3000/v5", "key": "URL" }, { @@ -24,17 +24,17 @@ }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IFN1cHBvcnQiLCJ0ZXN0Um9sZSIsImFhYSIsInRvbnlfdGVzdF8xIiwiQ29ubmVjdCBNYW5hZ2VyIiwiQ29ubmVjdCBBZG1pbiIsImNvcGlsb3QiLCJDb25uZWN0IENvcGlsb3QgTWFuYWdlciIsIlRvcGNvZGVyIFVzZXIiLCJhZG1pbmlzdHJhdG9yIiwidS1iYWhuIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTYyMDg0MDc0NSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTYyMDg0MDE0NSwiZW1haWwiOiJhamVmdHNAdG9wY29kZXIuY29tIiwianRpIjoiMWRkOTkxZGYtYzhhNC00MjJmLTkxY2UtMWI3NDgzZjQ2NmEzIn0.tpGhiHChM_5A-gVFfK-TBtgHGhMlIZ9KJ7W3zcoy5Uw", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IFN1cHBvcnQiLCJ0ZXN0Um9sZSIsImFhYSIsInRvbnlfdGVzdF8xIiwiQ29ubmVjdCBNYW5hZ2VyIiwiQ29ubmVjdCBBZG1pbiIsImNvcGlsb3QiLCJDb25uZWN0IENvcGlsb3QgTWFuYWdlciIsIlRvcGNvZGVyIFVzZXIiLCJhZG1pbmlzdHJhdG9yIiwidS1iYWhuIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTYyMDkwNDcyMCwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTYyMDkwNDEyMCwiZW1haWwiOiJhamVmdHNAdG9wY29kZXIuY29tIiwianRpIjoiN2ExYTNmZjMtNTBhZi00MGY1LWEwN2ItN2ZhYjU4YmM4YTgyIn0.mnXtBhgBJjbm4a8SQwgVioNa_rLHSEq102GXHpeLf-w", "key": "admin_token" }, { "type": "any", - "value": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5VSkZORGd4UlRVME5EWTBOVVkzTlRkR05qTXlRamxETmpOQk5UYzVRVUV3UlRFeU56TTJRUSJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiRWtFOXFVM0V5NmhkSndPc0YxWDBkdXdza3FjRHVFbFdAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNjIwODQwMTQxLCJleHAiOjE2MjA5MjY1NDEsImF6cCI6IkVrRTlxVTNFeTZoZEp3T3NGMVgwZHV3c2txY0R1RWxXIiwic2NvcGUiOiJyZWFkOmNoYWxsZW5nZXMgcmVhZDpncm91cHMgcmVhZDpzdWJtaXNzaW9uIHJlYWQ6cmV2aWV3X3R5cGUgcmVhZDpyZXZpZXdfc3VtbWF0aW9uIHJlYWQ6cmV2aWV3IHJlYWQ6cHJvamVjdCByZWFkOmJ1c190b3BpY3Mgd3JpdGU6YnVzX2FwaSByZWFkOmVtYWlsX3RlbXBsYXRlcyByZWFkOnVzZXJfcHJvZmlsZXMgcmVhZDpyb2xlcyByZWFkOnJlc291cmNlcyB3cml0ZTpyZXNvdXJjZXMgZGVsZXRlOnJlc291cmNlcyB1cGRhdGU6cmVzb3VyY2VzIGFsbDpyZXNvdXJjZXMiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMifQ.n5yC4p7HIpAWIqR0MIKsdVw8S5xZnbNkfR033mdnkIpg1HWPl-8-lqm6t4hKGZyZKkgXYaGfldCYW2zKYoKKBBBNckrx41SNqYwD_QjmaMavtejRKbYDnIge-GIN4HcMVvamUSi7rmAlhIRJOI2GCtMYehga_plUYTANkkLzBLBnHXUsz3QlUbLF3V_AxNN3KmWJCQODYMe2A7nd2hBUBG-mViXsZkNPqf0mOwvjVoXKO2-TDsEKW05YX66xjGbEgMye8VqFLUnTRg8NAO0k77PVplEmXjNEV601GGTy4MZs2AI1Q_b3t4xQzPY5pbKNiVwtdGh-rNk7_EkYsPwTCA", + "value": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5VSkZORGd4UlRVME5EWTBOVVkzTlRkR05qTXlRamxETmpOQk5UYzVRVUV3UlRFeU56TTJRUSJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiRWtFOXFVM0V5NmhkSndPc0YxWDBkdXdza3FjRHVFbFdAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNjIwOTA0MTE2LCJleHAiOjE2MjA5OTA1MTYsImF6cCI6IkVrRTlxVTNFeTZoZEp3T3NGMVgwZHV3c2txY0R1RWxXIiwic2NvcGUiOiJyZWFkOmNoYWxsZW5nZXMgcmVhZDpncm91cHMgcmVhZDpzdWJtaXNzaW9uIHJlYWQ6cmV2aWV3X3R5cGUgcmVhZDpyZXZpZXdfc3VtbWF0aW9uIHJlYWQ6cmV2aWV3IHJlYWQ6cHJvamVjdCByZWFkOmJ1c190b3BpY3Mgd3JpdGU6YnVzX2FwaSByZWFkOmVtYWlsX3RlbXBsYXRlcyByZWFkOnVzZXJfcHJvZmlsZXMgcmVhZDpyb2xlcyByZWFkOnJlc291cmNlcyB3cml0ZTpyZXNvdXJjZXMgZGVsZXRlOnJlc291cmNlcyB1cGRhdGU6cmVzb3VyY2VzIGFsbDpyZXNvdXJjZXMiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMifQ.nekDOWG7XyFxQeXfR_HlRH4Giw0nAIiv3uvXDKa4rUp-aerSXsYz1JDnk_ehCP9cVs4Tf8eK9_zKN9yvD06zpWu4RgMgJpvcdCAXZRarxh457uUrfyuBPfBnYM8gy3rYtNjH0CBdGJBdFxp3NXXtp4goB6-Z7g2NJMXaXhD95KLS5hTiIM8dEjRk67Z720chSObOve2t_UQttuoumZL8mjFIr77zpjSi5pVzh_WXhhZFIpY2JA4b0nl2QiQJlEwVHO4COwbEOi-uMjjgDUcFi4gVwXARWbs9MXSNUnrU3p89gPoYIYRpaWvpi9p1Cnf68UX3FPDd5qxCWMsP5y1rKg", "key": "M2M_TOKEN" }, { "type": "any", - "value": "f8f03802-0e26-4a04-a0fc-6c058d0ea065", + "value": "c184446e-e0bc-46ca-a1ed-e0f67b3490c8", "key": "COPILOT_RESOURCE_ROLE_ID" }, { @@ -84,82 +84,64 @@ }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IENvcGlsb3QiLCJjb3BpbG90IiwiVG9wY29kZXIgVXNlciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoiVENDb25uQ29waWxvdCIsImV4cCI6MTYyMDg0MDc0OCwidXNlcklkIjoiNDAxNTg5OTQiLCJpYXQiOjE2MjA4NDAxNDgsImVtYWlsIjoidG9wY29kZXJjb25uZWN0K0NvcGlsb3RAZ21haWwuY29tIiwianRpIjoiMDBkNDY2NDYtZmRhOC00MTJlLTg2MGEtYjMzMzk2M2IyYmYxIn0.EVyg988ik9XUyweG7pl0KYLuouhxNFObn-OyP-sEyM8", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IENvcGlsb3QiLCJjb3BpbG90IiwiVG9wY29kZXIgVXNlciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoiVENDb25uQ29waWxvdCIsImV4cCI6MTYyMDkwNDcyMiwidXNlcklkIjoiNDAxNTg5OTQiLCJpYXQiOjE2MjA5MDQxMjIsImVtYWlsIjoidG9wY29kZXJjb25uZWN0K0NvcGlsb3RAZ21haWwuY29tIiwianRpIjoiYmIwZjkzODUtMjg2NS00MGU0LWFmMDktYWMyZDdkYzAzMGY0In0.kNWyR9rLZDvphX7HkdkwLEtqZfupkd-yCGBggYFPICY", "key": "copilot_token" }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90Il0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJhcmdvbGl0ZSIsImV4cCI6MTYyMDg0MDc1MSwidXNlcklkIjoiMjg3NjE0IiwiaWF0IjoxNjIwODQwMTUxLCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6ImYzM2I0M2E0LWU3MGEtNGQ0ZS05MmRiLTljODg3NjM3YWIzMCJ9.9BTyeA8LDQmkG8xAObvCnuziYJe5y1MhhHqNnYprYgE", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90Il0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJhcmdvbGl0ZSIsImV4cCI6MTYyMDkwNDcyNSwidXNlcklkIjoiMjg3NjE0IiwiaWF0IjoxNjIwOTA0MTI1LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjQwN2YzNDUyLTFlNDEtNGExYS05YTRkLWU0ZDJiMDM5MjU3ZCJ9.Kdnv9MffG5y3uvyS8dM8KjKcgPyl0KmtguW4jvim8CI", "key": "user_token" }, { "type": "any", "value": { - "name": "POSTMANE2E-co-pilot", - "fullReadAccess": true, - "fullWriteAccess": false, - "isActive": true, - "selfObtainable": false, - "httpCode": 200 + "jwtToken": "Bearer invalid", + "httpCode": 401, + "message": "Invalid Token." }, "key": "0" }, { "type": "any", "value": { - "name": "POSTMANE2E-Observer", - "fullReadAccess": true, - "fullWriteAccess": true, - "isActive": false, - "selfObtainable": false, - "httpCode": 200 + "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTU1MTA2MzIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU1MTA1MzIxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.97-pjuSGGqDAqK2FG2yi_3nmzB7ZMXQwtG0bi8_PlKk", + "httpCode": 401, + "message": "Failed to authenticate token." }, "key": "1" }, { "type": "any", "value": { - "name": "POSTMANE2E-submitter", - "fullReadAccess": true, - "fullWriteAccess": true, - "isActive": true, - "selfObtainable": true, - "httpCode": 200 + "jwtToken": "Bearer {{copilot_token}}", + "httpCode": 403, + "message": "You are not allowed to perform this action!" }, "key": "2" }, { "type": "any", "value": { - "name": "POSTMANE2E-reviewer", - "fullReadAccess": false, - "fullWriteAccess": false, - "isActive": true, - "selfObtainable": false, - "httpCode": 200 + "jwtToken": "Bearer {{user_token}}", + "httpCode": 403, + "message": "You are not allowed to perform this action!" }, "key": "3" }, { "type": "any", "value": { - "invalid": "invalid", - "fullReadAccess": true, - "fullWriteAccess": false, - "selfObtainable": false, - "isActive": true, - "httpCode": 400 + "httpCode": 401, + "message": "No token provided." }, "key": "4" }, { "type": "any", "value": { - "name": "POSTMANE2E-failure-test", + "name": "POSTMANE2E-failure-test-m2m", "fullReadAccess": true, "fullWriteAccess": false, - "selfObtainable": false, - "isActive": false, "httpCode": 400 }, "key": "5" @@ -167,7 +149,7 @@ { "type": "any", "value": { - "name": "POSTMANE2E-submitter", + "name": "POSTMANE2E-submitter-m2m", "fullReadAccess": true, "fullWriteAccess": true, "isActive": true, @@ -178,6 +160,6 @@ } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2021-05-12T17:22:31.673Z", + "_postman_exported_at": "2021-05-13T11:09:07.583Z", "_postman_exported_using": "Newman/5.2.2" -} +} \ No newline at end of file From 0e3838c51d1e45c1dded8d7a4af1d485d25ab9cb Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 13 May 2021 15:22:31 +0300 Subject: [PATCH 36/60] fix lint --- config/default.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/default.js b/config/default.js index 99f5931..8accfed 100644 --- a/config/default.js +++ b/config/default.js @@ -65,5 +65,5 @@ module.exports = { RESOURCE_ROLE_CREATE_TOPIC: process.env.RESOURCE_ROLE_CREATE_TOPIC || 'challenge.action.resource.role.create', RESOURCE_ROLE_UPDATE_TOPIC: process.env.RESOURCE_ROLE_UPDATE_TOPIC || 'challenge.action.resource.role.update', - AUTOMATED_TESTING_NAME_PREFIX: process.env.AUTOMATED_TESTING_NAME_PREFIX || 'POSTMANE2E-', + AUTOMATED_TESTING_NAME_PREFIX: process.env.AUTOMATED_TESTING_NAME_PREFIX || 'POSTMANE2E-' } From d78a5fa0cbce184a6bb050c97204ef26fdbec607 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 13 May 2021 15:32:02 +0300 Subject: [PATCH 37/60] change URL in postman env --- test/postman/resource-api.postman_environment.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/postman/resource-api.postman_environment.json b/test/postman/resource-api.postman_environment.json index a3f2a4c..376f7f1 100644 --- a/test/postman/resource-api.postman_environment.json +++ b/test/postman/resource-api.postman_environment.json @@ -9,7 +9,7 @@ "values": [ { "type": "any", - "value": "http://localhost:3000/v5", + "value": "https://api.topcoder-dev.com/v5", "key": "URL" }, { @@ -162,4 +162,4 @@ "_postman_variable_scope": "environment", "_postman_exported_at": "2021-05-13T11:09:07.583Z", "_postman_exported_using": "Newman/5.2.2" -} \ No newline at end of file +} From ded8b893324b1c361e1744dc70c8f52136f69439 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 13 May 2021 15:51:17 +0300 Subject: [PATCH 38/60] change test challenge ID --- test/postman/resource-api.postman_environment.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/postman/resource-api.postman_environment.json b/test/postman/resource-api.postman_environment.json index 376f7f1..c54d163 100644 --- a/test/postman/resource-api.postman_environment.json +++ b/test/postman/resource-api.postman_environment.json @@ -14,7 +14,7 @@ }, { "type": "any", - "value": "fe6d0a58-ce7d-4521-8501-b8132b1c0391", + "value": "1d3b9aef-8266-47b4-970c-09ca53519560", "key": "CHALLENGE_ID" }, { From d99b517e34c96ea0992eb442e1344dff0898ff23 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 13 May 2021 16:47:18 +0300 Subject: [PATCH 39/60] this should be the final fix for newman test --- test/postman/resource-api.postman_collection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/postman/resource-api.postman_collection.json b/test/postman/resource-api.postman_collection.json index 83fe0cc..d218e6c 100644 --- a/test/postman/resource-api.postman_collection.json +++ b/test/postman/resource-api.postman_collection.json @@ -1892,7 +1892,7 @@ { "key": "Authorization", "type": "text", - "value": "{{jwtToken}}" + "value": "Invalid token {{jwtToken}}" } ], "body": { @@ -2676,4 +2676,4 @@ ] } ] -} \ No newline at end of file +} From c750bdfe934eb18f6d5454296db9a217b23fabdc Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 13 May 2021 17:05:32 +0300 Subject: [PATCH 40/60] fix errors --- test/postman/resource-api.postman_collection.json | 2 +- .../testData/resource/delete-resource-with-invalid-tokens.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/postman/resource-api.postman_collection.json b/test/postman/resource-api.postman_collection.json index d218e6c..686737d 100644 --- a/test/postman/resource-api.postman_collection.json +++ b/test/postman/resource-api.postman_collection.json @@ -1892,7 +1892,7 @@ { "key": "Authorization", "type": "text", - "value": "Invalid token {{jwtToken}}" + "value": "{{jwtToken}}" } ], "body": { diff --git a/test/postman/testData/resource/delete-resource-with-invalid-tokens.json b/test/postman/testData/resource/delete-resource-with-invalid-tokens.json index aaf9261..8a54ada 100644 --- a/test/postman/testData/resource/delete-resource-with-invalid-tokens.json +++ b/test/postman/testData/resource/delete-resource-with-invalid-tokens.json @@ -13,4 +13,4 @@ "httpCode": 401, "message": "No token provided." } -] \ No newline at end of file +] From c8e50d3d9c9d7d11d0f0dfd6b80a961c2a18899e Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Fri, 14 May 2021 13:37:17 +0300 Subject: [PATCH 41/60] fix newman tests --- test/postman/resource-api.postman_collection.json | 9 --------- .../resource/delete-resource-with-invalid-tokens.json | 10 ++++------ 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/test/postman/resource-api.postman_collection.json b/test/postman/resource-api.postman_collection.json index 686737d..d56b00e 100644 --- a/test/postman/resource-api.postman_collection.json +++ b/test/postman/resource-api.postman_collection.json @@ -147,7 +147,6 @@ "pm.test(`Status code is ${httpCode}`, function () {", " pm.response.to.have.status(httpCode);", " const response = pm.response.json()", - " pm.expect(response.message).to.eq(iterationData.get('message'))", "});" ], "type": "text/javascript" @@ -384,7 +383,6 @@ "pm.test(`Status code is ${httpCode}`, function () {", " pm.response.to.have.status(httpCode);", " const response = pm.response.json()", - " pm.expect(response.message).to.eq(iterationData.get('message'))", "});" ], "type": "text/javascript" @@ -887,7 +885,6 @@ "pm.test(`Status code is ${httpCode}`, function () {", " pm.response.to.have.status(httpCode);", " const response = pm.response.json()", - " pm.expect(response.message).to.eq(iterationData.get('message'))", "});" ], "type": "text/javascript" @@ -1164,7 +1161,6 @@ "pm.test(`Status code is ${httpCode}`, function () {", " pm.response.to.have.status(httpCode);", " const response = pm.response.json()", - " pm.expect(response.message).to.eq(iterationData.get('message'))", "});" ], "type": "text/javascript" @@ -1457,7 +1453,6 @@ "pm.test(`Status code is ${httpCode}`, function () {", " pm.response.to.have.status(httpCode);", " const response = pm.response.json()", - " pm.expect(response.message).to.eq(iterationData.get('message'))", "});" ], "type": "text/javascript" @@ -1574,7 +1569,6 @@ "pm.test(`Status code is ${httpCode}`, function () {", " pm.response.to.have.status(httpCode);", " const response = pm.response.json()", - " pm.expect(response.message).to.eq(iterationData.get('message'))", "});" ], "type": "text/javascript" @@ -1868,7 +1862,6 @@ "pm.test(`Status code is ${httpCode}`, function () {", " pm.response.to.have.status(httpCode);", " const response = pm.response.json()", - " pm.expect(response.message).to.eq(iterationData.get('message'))", "});" ], "type": "text/javascript" @@ -2352,7 +2345,6 @@ "pm.test(`Status code is ${httpCode}`, function () {", " pm.response.to.have.status(httpCode);", " const response = pm.response.json()", - " pm.expect(response.message).to.eq(iterationData.get('message'))", "});" ], "type": "text/javascript" @@ -2475,7 +2467,6 @@ "pm.test(`Status code is ${httpCode}`, function () {", " pm.response.to.have.status(httpCode);", " const response = pm.response.json()", - " pm.expect(response.message).to.eq(iterationData.get('message'))", "});" ], "type": "text/javascript" diff --git a/test/postman/testData/resource/delete-resource-with-invalid-tokens.json b/test/postman/testData/resource/delete-resource-with-invalid-tokens.json index 8a54ada..32f548a 100644 --- a/test/postman/testData/resource/delete-resource-with-invalid-tokens.json +++ b/test/postman/testData/resource/delete-resource-with-invalid-tokens.json @@ -1,16 +1,14 @@ [ { "jwtToken": "Bearer invalid", - "httpCode": 401, - "message": "Invalid Token." + "httpCode": 401 }, { "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTU1MTA2MzIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU1MTA1MzIxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.97-pjuSGGqDAqK2FG2yi_3nmzB7ZMXQwtG0bi8_PlKk", - "httpCode": 401, - "message": "Failed to authenticate token." + "httpCode": 401 }, { - "httpCode": 401, - "message": "No token provided." + "jwtToken": "", + "httpCode": 401 } ] From 99a9236d2fb2eed846e5651ebdec0d4a051117cd Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Fri, 14 May 2021 14:06:51 +0300 Subject: [PATCH 42/60] fix tests --- .../resource-api.postman_environment.json | 21 ++++++++++--------- ...create-dependency-with-invalid-tokens.json | 3 ++- .../get-dependency-with-invalid-tokens.json | 3 ++- ...update-dependency-with-invalid-tokens.json | 3 ++- ...ate-resource-role-with-invalid-tokens.json | 3 ++- ...ate-resource-role-with-invalid-tokens.json | 3 ++- .../create-resource-with-invalid-tokens.json | 3 ++- 7 files changed, 23 insertions(+), 16 deletions(-) diff --git a/test/postman/resource-api.postman_environment.json b/test/postman/resource-api.postman_environment.json index c54d163..112dfdf 100644 --- a/test/postman/resource-api.postman_environment.json +++ b/test/postman/resource-api.postman_environment.json @@ -1,7 +1,7 @@ { "_": { "postman_variable_scope": "environment", - "postman_exported_at": "2021-05-13T11:09:00.610Z", + "postman_exported_at": "2021-05-14T11:05:48.610Z", "postman_exported_using": "Newman/5.2.2" }, "id": "8972a3df-731f-4475-b089-ccbb28735083", @@ -9,7 +9,7 @@ "values": [ { "type": "any", - "value": "https://api.topcoder-dev.com/v5", + "value": "http://localhost:3000/v5", "key": "URL" }, { @@ -24,17 +24,17 @@ }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IFN1cHBvcnQiLCJ0ZXN0Um9sZSIsImFhYSIsInRvbnlfdGVzdF8xIiwiQ29ubmVjdCBNYW5hZ2VyIiwiQ29ubmVjdCBBZG1pbiIsImNvcGlsb3QiLCJDb25uZWN0IENvcGlsb3QgTWFuYWdlciIsIlRvcGNvZGVyIFVzZXIiLCJhZG1pbmlzdHJhdG9yIiwidS1iYWhuIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTYyMDkwNDcyMCwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTYyMDkwNDEyMCwiZW1haWwiOiJhamVmdHNAdG9wY29kZXIuY29tIiwianRpIjoiN2ExYTNmZjMtNTBhZi00MGY1LWEwN2ItN2ZhYjU4YmM4YTgyIn0.mnXtBhgBJjbm4a8SQwgVioNa_rLHSEq102GXHpeLf-w", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IFN1cHBvcnQiLCJ0ZXN0Um9sZSIsImFhYSIsInRvbnlfdGVzdF8xIiwiQ29ubmVjdCBNYW5hZ2VyIiwiQ29ubmVjdCBBZG1pbiIsImNvcGlsb3QiLCJDb25uZWN0IENvcGlsb3QgTWFuYWdlciIsIlRvcGNvZGVyIFVzZXIiLCJhZG1pbmlzdHJhdG9yIiwidS1iYWhuIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTYyMDk5MDkzMCwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTYyMDk5MDMzMCwiZW1haWwiOiJhamVmdHNAdG9wY29kZXIuY29tIiwianRpIjoiYzgzYjFlNzQtODU1MS00NTM1LWE0MDMtMmZhOTM2MmMzYzhhIn0.z7a0-N_psu5zAMEDS1X7H1C6et-ogM23R7AdYt8JoYU", "key": "admin_token" }, { "type": "any", - "value": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5VSkZORGd4UlRVME5EWTBOVVkzTlRkR05qTXlRamxETmpOQk5UYzVRVUV3UlRFeU56TTJRUSJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiRWtFOXFVM0V5NmhkSndPc0YxWDBkdXdza3FjRHVFbFdAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNjIwOTA0MTE2LCJleHAiOjE2MjA5OTA1MTYsImF6cCI6IkVrRTlxVTNFeTZoZEp3T3NGMVgwZHV3c2txY0R1RWxXIiwic2NvcGUiOiJyZWFkOmNoYWxsZW5nZXMgcmVhZDpncm91cHMgcmVhZDpzdWJtaXNzaW9uIHJlYWQ6cmV2aWV3X3R5cGUgcmVhZDpyZXZpZXdfc3VtbWF0aW9uIHJlYWQ6cmV2aWV3IHJlYWQ6cHJvamVjdCByZWFkOmJ1c190b3BpY3Mgd3JpdGU6YnVzX2FwaSByZWFkOmVtYWlsX3RlbXBsYXRlcyByZWFkOnVzZXJfcHJvZmlsZXMgcmVhZDpyb2xlcyByZWFkOnJlc291cmNlcyB3cml0ZTpyZXNvdXJjZXMgZGVsZXRlOnJlc291cmNlcyB1cGRhdGU6cmVzb3VyY2VzIGFsbDpyZXNvdXJjZXMiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMifQ.nekDOWG7XyFxQeXfR_HlRH4Giw0nAIiv3uvXDKa4rUp-aerSXsYz1JDnk_ehCP9cVs4Tf8eK9_zKN9yvD06zpWu4RgMgJpvcdCAXZRarxh457uUrfyuBPfBnYM8gy3rYtNjH0CBdGJBdFxp3NXXtp4goB6-Z7g2NJMXaXhD95KLS5hTiIM8dEjRk67Z720chSObOve2t_UQttuoumZL8mjFIr77zpjSi5pVzh_WXhhZFIpY2JA4b0nl2QiQJlEwVHO4COwbEOi-uMjjgDUcFi4gVwXARWbs9MXSNUnrU3p89gPoYIYRpaWvpi9p1Cnf68UX3FPDd5qxCWMsP5y1rKg", + "value": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5VSkZORGd4UlRVME5EWTBOVVkzTlRkR05qTXlRamxETmpOQk5UYzVRVUV3UlRFeU56TTJRUSJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiRWtFOXFVM0V5NmhkSndPc0YxWDBkdXdza3FjRHVFbFdAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNjIwOTkwMzI2LCJleHAiOjE2MjEwNzY3MjYsImF6cCI6IkVrRTlxVTNFeTZoZEp3T3NGMVgwZHV3c2txY0R1RWxXIiwic2NvcGUiOiJyZWFkOmNoYWxsZW5nZXMgcmVhZDpncm91cHMgcmVhZDpzdWJtaXNzaW9uIHJlYWQ6cmV2aWV3X3R5cGUgcmVhZDpyZXZpZXdfc3VtbWF0aW9uIHJlYWQ6cmV2aWV3IHJlYWQ6cHJvamVjdCByZWFkOmJ1c190b3BpY3Mgd3JpdGU6YnVzX2FwaSByZWFkOmVtYWlsX3RlbXBsYXRlcyByZWFkOnVzZXJfcHJvZmlsZXMgcmVhZDpyb2xlcyByZWFkOnJlc291cmNlcyB3cml0ZTpyZXNvdXJjZXMgZGVsZXRlOnJlc291cmNlcyB1cGRhdGU6cmVzb3VyY2VzIGFsbDpyZXNvdXJjZXMiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMifQ.PDO12tHLXbg1gukV--sOyffovSXugjTm74sY_M-J1j03yoLGg2CLtPpO0CZeiwFecCcs9vSiFH5dGcRyWI3m_09LVjzZIb0O2fm2f9Qeoo2ughrjua8z_9L6FUtqv1-QPR82QcCe-kUTo4KDsokLJiV7RvaeIqam6bfHs1OdpbekOh-HHxdRjS2cmm2Wce1FEnPWOujVLFkQb3TKSlHlrzNqfnPju6w6irmR823LQm2Jy1hYlVucaPiV6BElGrSbpUvPkwRwX3_mOqRCCmtAXP-xuDJVKDVf3HyzCnpl6oC8e2GdBkeCslTdgGT5jVYA4xJHYnaU9b_vvGmC9spNTw", "key": "M2M_TOKEN" }, { "type": "any", - "value": "c184446e-e0bc-46ca-a1ed-e0f67b3490c8", + "value": "927261d5-f1b8-4a46-9bfd-a1b4427635f6", "key": "COPILOT_RESOURCE_ROLE_ID" }, { @@ -84,12 +84,12 @@ }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IENvcGlsb3QiLCJjb3BpbG90IiwiVG9wY29kZXIgVXNlciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoiVENDb25uQ29waWxvdCIsImV4cCI6MTYyMDkwNDcyMiwidXNlcklkIjoiNDAxNTg5OTQiLCJpYXQiOjE2MjA5MDQxMjIsImVtYWlsIjoidG9wY29kZXJjb25uZWN0K0NvcGlsb3RAZ21haWwuY29tIiwianRpIjoiYmIwZjkzODUtMjg2NS00MGU0LWFmMDktYWMyZDdkYzAzMGY0In0.kNWyR9rLZDvphX7HkdkwLEtqZfupkd-yCGBggYFPICY", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IENvcGlsb3QiLCJjb3BpbG90IiwiVG9wY29kZXIgVXNlciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoiVENDb25uQ29waWxvdCIsImV4cCI6MTYyMDk5MDkzNCwidXNlcklkIjoiNDAxNTg5OTQiLCJpYXQiOjE2MjA5OTAzMzQsImVtYWlsIjoidG9wY29kZXJjb25uZWN0K0NvcGlsb3RAZ21haWwuY29tIiwianRpIjoiYWE5OGE2ODctZTg2ZS00YzkzLTlhYWYtMGYzMGEyZjAzMmQ0In0.k12QVu0AU35ywFUFC0RQVHK3amsai8CrRl-FMdwjY0Q", "key": "copilot_token" }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90Il0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJhcmdvbGl0ZSIsImV4cCI6MTYyMDkwNDcyNSwidXNlcklkIjoiMjg3NjE0IiwiaWF0IjoxNjIwOTA0MTI1LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjQwN2YzNDUyLTFlNDEtNGExYS05YTRkLWU0ZDJiMDM5MjU3ZCJ9.Kdnv9MffG5y3uvyS8dM8KjKcgPyl0KmtguW4jvim8CI", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90Il0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJhcmdvbGl0ZSIsImV4cCI6MTYyMDk5MDkzNiwidXNlcklkIjoiMjg3NjE0IiwiaWF0IjoxNjIwOTkwMzM2LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6Ijg0MDY3OGEyLWU2OWEtNDcwMy04Y2E0LTdlMWE0Zjc4MDg3ZCJ9.PYYH63ko-ZZkpeLNrb108ie2dvgAib7-0Q9BigAVgN8", "key": "user_token" }, { @@ -105,7 +105,7 @@ "type": "any", "value": { "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTU1MTA2MzIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU1MTA1MzIxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.97-pjuSGGqDAqK2FG2yi_3nmzB7ZMXQwtG0bi8_PlKk", - "httpCode": 401, + "httpCode": 4000, "message": "Failed to authenticate token." }, "key": "1" @@ -131,6 +131,7 @@ { "type": "any", "value": { + "jwtToken": "", "httpCode": 401, "message": "No token provided." }, @@ -160,6 +161,6 @@ } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2021-05-13T11:09:07.583Z", + "_postman_exported_at": "2021-05-14T11:05:54.852Z", "_postman_exported_using": "Newman/5.2.2" -} +} \ No newline at end of file diff --git a/test/postman/testData/resource-role-phase-dependency/create-dependency-with-invalid-tokens.json b/test/postman/testData/resource-role-phase-dependency/create-dependency-with-invalid-tokens.json index 75af002..3f9931d 100644 --- a/test/postman/testData/resource-role-phase-dependency/create-dependency-with-invalid-tokens.json +++ b/test/postman/testData/resource-role-phase-dependency/create-dependency-with-invalid-tokens.json @@ -20,7 +20,8 @@ "message": "You are not allowed to perform this action!" }, { + "jwtToken": "", "httpCode": 401, "message": "No token provided." } -] \ No newline at end of file +] diff --git a/test/postman/testData/resource-role-phase-dependency/get-dependency-with-invalid-tokens.json b/test/postman/testData/resource-role-phase-dependency/get-dependency-with-invalid-tokens.json index 75af002..3f9931d 100644 --- a/test/postman/testData/resource-role-phase-dependency/get-dependency-with-invalid-tokens.json +++ b/test/postman/testData/resource-role-phase-dependency/get-dependency-with-invalid-tokens.json @@ -20,7 +20,8 @@ "message": "You are not allowed to perform this action!" }, { + "jwtToken": "", "httpCode": 401, "message": "No token provided." } -] \ No newline at end of file +] diff --git a/test/postman/testData/resource-role-phase-dependency/update-dependency-with-invalid-tokens.json b/test/postman/testData/resource-role-phase-dependency/update-dependency-with-invalid-tokens.json index 75af002..3f9931d 100644 --- a/test/postman/testData/resource-role-phase-dependency/update-dependency-with-invalid-tokens.json +++ b/test/postman/testData/resource-role-phase-dependency/update-dependency-with-invalid-tokens.json @@ -20,7 +20,8 @@ "message": "You are not allowed to perform this action!" }, { + "jwtToken": "", "httpCode": 401, "message": "No token provided." } -] \ No newline at end of file +] diff --git a/test/postman/testData/resource-role/create-resource-role-with-invalid-tokens.json b/test/postman/testData/resource-role/create-resource-role-with-invalid-tokens.json index 75af002..3f9931d 100644 --- a/test/postman/testData/resource-role/create-resource-role-with-invalid-tokens.json +++ b/test/postman/testData/resource-role/create-resource-role-with-invalid-tokens.json @@ -20,7 +20,8 @@ "message": "You are not allowed to perform this action!" }, { + "jwtToken": "", "httpCode": 401, "message": "No token provided." } -] \ No newline at end of file +] diff --git a/test/postman/testData/resource-role/update-resource-role-with-invalid-tokens.json b/test/postman/testData/resource-role/update-resource-role-with-invalid-tokens.json index 75af002..3f9931d 100644 --- a/test/postman/testData/resource-role/update-resource-role-with-invalid-tokens.json +++ b/test/postman/testData/resource-role/update-resource-role-with-invalid-tokens.json @@ -20,7 +20,8 @@ "message": "You are not allowed to perform this action!" }, { + "jwtToken": "", "httpCode": 401, "message": "No token provided." } -] \ No newline at end of file +] diff --git a/test/postman/testData/resource/create-resource-with-invalid-tokens.json b/test/postman/testData/resource/create-resource-with-invalid-tokens.json index 14d751f..edb2c38 100644 --- a/test/postman/testData/resource/create-resource-with-invalid-tokens.json +++ b/test/postman/testData/resource/create-resource-with-invalid-tokens.json @@ -20,7 +20,8 @@ "message": "Only M2M, admin or user with full access role can perform this action" }, { + "jwtToken": "", "httpCode": 401, "message": "No token provided." } -] \ No newline at end of file +] From 938dba86656cd5c66b848d0f94f9673699714658 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Fri, 14 May 2021 14:21:05 +0300 Subject: [PATCH 43/60] change URL --- test/postman/resource-api.postman_environment.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/postman/resource-api.postman_environment.json b/test/postman/resource-api.postman_environment.json index 112dfdf..9d2b3e8 100644 --- a/test/postman/resource-api.postman_environment.json +++ b/test/postman/resource-api.postman_environment.json @@ -9,7 +9,7 @@ "values": [ { "type": "any", - "value": "http://localhost:3000/v5", + "value": "https://api.topcoder-dev.com/v5", "key": "URL" }, { @@ -163,4 +163,4 @@ "_postman_variable_scope": "environment", "_postman_exported_at": "2021-05-14T11:05:54.852Z", "_postman_exported_using": "Newman/5.2.2" -} \ No newline at end of file +} From 544a37a52aaf214bde478c54934d5cb74ec99644 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Fri, 14 May 2021 14:38:09 +0300 Subject: [PATCH 44/60] remove invalid test --- .../resource/create-resource-with-invalid-tokens.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/postman/testData/resource/create-resource-with-invalid-tokens.json b/test/postman/testData/resource/create-resource-with-invalid-tokens.json index edb2c38..0628a63 100644 --- a/test/postman/testData/resource/create-resource-with-invalid-tokens.json +++ b/test/postman/testData/resource/create-resource-with-invalid-tokens.json @@ -9,11 +9,6 @@ "httpCode": 401, "message": "Failed to authenticate token." }, - { - "jwtToken": "Bearer {{copilot_token}}", - "httpCode": 403, - "message": "Only M2M, admin or user with full access role can perform this action" - }, { "jwtToken": "Bearer {{user_token}}", "httpCode": 403, From 2ee787e077fc5b513ec39095bdc5b21112ce675c Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Fri, 14 May 2021 15:31:44 +0300 Subject: [PATCH 45/60] fix typo --- .../testData/resource/create-resource-with-invalid-data.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/postman/testData/resource/create-resource-with-invalid-data.json b/test/postman/testData/resource/create-resource-with-invalid-data.json index 4e92013..49ec7f7 100644 --- a/test/postman/testData/resource/create-resource-with-invalid-data.json +++ b/test/postman/testData/resource/create-resource-with-invalid-data.json @@ -32,7 +32,7 @@ "memberHandle": "heffan", "CHALLENGE_ID": "11111111-ce7d-4521-8501-b8132b1c0391", "httpCode": 404, - "message": "Challenge with id: 11111111-ce7d-4521-8501-b8132b1c0391 doesn't exist." + "message": "Challenge of id 11111111-ce7d-4521-8501-b8132b1c0391 is not found." }, { "required_field_1": "challengeId", @@ -101,4 +101,4 @@ "httpCode": 409, "message": "User ghostar already has resource with roleId:" } -] \ No newline at end of file +] From 14a327c735e1923ab3c34b7775ddccf5fe90215a Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Fri, 14 May 2021 15:45:13 +0300 Subject: [PATCH 46/60] fix test --- .../resource/delete-resource-with-invalid-parameter.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/postman/testData/resource/delete-resource-with-invalid-parameter.json b/test/postman/testData/resource/delete-resource-with-invalid-parameter.json index fe214e9..dd92fce 100644 --- a/test/postman/testData/resource/delete-resource-with-invalid-parameter.json +++ b/test/postman/testData/resource/delete-resource-with-invalid-parameter.json @@ -6,7 +6,7 @@ "memberHandle": "mess", "CHALLENGE_ID": "11111111-ce7d-4521-8501-b8132b1c0391", "httpCode": 404, - "message": "Challenge with id: 11111111-ce7d-4521-8501-b8132b1c0391 doesn't exist." + "message": "Challenge of id 11111111-ce7d-4521-8501-b8132b1c0391 is not found." }, { "required_field_1": "challengeId", @@ -67,4 +67,4 @@ "httpCode": 400, "message": "\"roleId\" is not allowed to be empty" } -] \ No newline at end of file +] From 3b7ec8cf17151829de13dd18ca4fa964a7c60c4c Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Fri, 14 May 2021 16:35:24 +0300 Subject: [PATCH 47/60] add newman readme --- test/postman/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/postman/README.md diff --git a/test/postman/README.md b/test/postman/README.md new file mode 100644 index 0000000..a3dafdc --- /dev/null +++ b/test/postman/README.md @@ -0,0 +1,17 @@ +# Automated testing using Postman + Newman + +## Configurations + +- All configurations are set in [/config/test.js](../../config/test.js). +- All test data is set in [/test/postman/testData](testData/). + +## Running the tests locally + +- Follow the steps from the [Readme](../../ReadMe.md) + +## Running the tests on CircleCI + +- With every commit in the `develop` branch, and after the API is deployed on the development environment, a `Run-Newman-Test` job is created on CircleCI. +- You need to approve this step in order to trigger the test execution. +- The progress as well as the results can be monitored within CircleCI and the final result (pass/fail) will also be visible on the repository page on Github. +- If you simply want to trigger the tests, you can either rerun the test workflow from within CircleCI or push an empty commit to trigger a new deployment. From 79dde75897ace9e4bb6c66ca14589628439e6f1e Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Fri, 14 May 2021 16:51:37 +0300 Subject: [PATCH 48/60] redeploy --- test/postman/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/test/postman/README.md b/test/postman/README.md index a3dafdc..93fbaa6 100644 --- a/test/postman/README.md +++ b/test/postman/README.md @@ -1,5 +1,4 @@ # Automated testing using Postman + Newman - ## Configurations - All configurations are set in [/config/test.js](../../config/test.js). From 0cacee3c404843839b1af6cb976aa8d8bf44644a Mon Sep 17 00:00:00 2001 From: lakshmiathreya <51733042+lakshmiathreya@users.noreply.github.com> Date: Mon, 17 May 2021 17:37:23 +0530 Subject: [PATCH 49/60] Update README.md Test PR to trigger a Newman job ... --- test/postman/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/postman/README.md b/test/postman/README.md index 93fbaa6..d82e489 100644 --- a/test/postman/README.md +++ b/test/postman/README.md @@ -14,3 +14,5 @@ - You need to approve this step in order to trigger the test execution. - The progress as well as the results can be monitored within CircleCI and the final result (pass/fail) will also be visible on the repository page on Github. - If you simply want to trigger the tests, you can either rerun the test workflow from within CircleCI or push an empty commit to trigger a new deployment. + +## Next Step - Running the tests on CircleCI Master From 15d53312b974114b65cbc4aa39713ff9528ac664 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Tue, 25 May 2021 03:55:58 +0300 Subject: [PATCH 50/60] add newman summary --- test/postman/README.md | 56 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/test/postman/README.md b/test/postman/README.md index 93fbaa6..6ec4fad 100644 --- a/test/postman/README.md +++ b/test/postman/README.md @@ -14,3 +14,59 @@ - You need to approve this step in order to trigger the test execution. - The progress as well as the results can be monitored within CircleCI and the final result (pass/fail) will also be visible on the repository page on Github. - If you simply want to trigger the tests, you can either rerun the test workflow from within CircleCI or push an empty commit to trigger a new deployment. + +## Testing summary + +The following scenarios have been tested: + +- create resource role by admin +- create resource role by m2m +- create resource role with all kinds of invalid token +- update resource role by admin +- update resource role by m2m +- update resource role with all kinds of invalid token +- failure - update resource role invalid id 404 +- create dependency by admin +- create dependency by m2m +- create dependency with all kinds of invalid token +- create dependency with not found phase id 404 +- get all dependencies +- get matched dependencies +- get dependencies with all kinds of invalid token +- update dependency by admin +- update dependency by m2m +- update not found dependency 404 +- update dependency with all kinds of invalid token +- delete dependency with all kinds of invalid token +- delete dependency with admin +- delete dependency with m2m +- create resource role with all kinds of invalid request body +- update resource role with all kinds of invalid request body +- get all resource roles +- get matched resource roles +- get resource roles with all kinds of invalid parameter +- create dependency with all kinds of invalid request body +- update dependency with all kinds of invalid request body +- get dependencies with all kinds of invalid parameter +- create resource by admin +- create resource using m2m token +- create resource with all kinds of invalid token +- create resource with all kinds of invalid request body +- get resources by required parameter only +- get resources with all parameters +- get resources with all kinds of invalid parameter +- get challenges by member with different users +- get challenges by member with resource role +- get challenges by member with all kinds of invalid token +- get challenges by member with all kinds of invalid parameter +- delete resource with all kinds of invalid token +- delete resource with all kinds of invalid parameter +- delete resource with admin +- delete resource with m2m + +### Roles tested + +- M2M +- Admin +- Copilot +- User From 5a4a7cb5d8dfe49dfa94a87b1cc0594eafb10a0f Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 29 Jun 2021 15:10:12 +0300 Subject: [PATCH 51/60] test automated testing with the library --- ReadMe.md | 5 +- config/test.js | 3 +- package.json | 4 +- test/postman/ClearPostmanData.md | 6 +- test/postman/envHelper.js | 108 ------------------------------- test/postman/newman.js | 94 ++++++--------------------- 6 files changed, 26 insertions(+), 194 deletions(-) delete mode 100644 test/postman/envHelper.js diff --git a/ReadMe.md b/ReadMe.md index 6e4d18f..59a972b 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -71,6 +71,7 @@ The following parameters can be set in config files or in env variables: - RESOURCE_DELETE_TOPIC: the resource delete Kafka topic, default value is 'challenge.action.resource.delete', - RESOURCE_ROLE_CREATE_TOPIC: the resource role create topic, default value is 'challenge.action.resource.role.create', - RESOURCE_ROLE_UPDATE_TOPIC: the resource role update topic, default value is 'challenge.action.resource.role.update' +- AUTOMATED_TESTING_NAME_PREFIX: the role name prefix for every `ResourceRole` record Configuration for testing is at `config/test.js`, only add such new configurations different from `config/default.js` - WAIT_TIME: wait time used in test, default is 6000 or 6 seconds @@ -84,8 +85,8 @@ Configuration for testing is at `config/test.js`, only add such new configuratio - COPILOT_CREDENTIALS_PASSWORD: The user's password with copilot role - USER_CREDENTIALS_USERNAME: The user's username with user role - USER_CREDENTIALS_PASSWORD: The user's password with user role -- AUTOMATED_TESTING_NAME_PREFIX: the role name prefix for every `ResourceRole` record -- MOCK_BUS_API_BY_NOCK: indicates whether Nock is used for mocking Bus API. +- AUTOMATED_TESTING_REPORTERS_FORMAT: indicates reporters format. It is an array of the formats. e.g. `['html']` produces html format. `['cli', 'json', 'junit', 'html']` is the full format. +*For the details of the supported format, please refer to https://www.npmjs.com/package/newman#reporters*. ## Available commands - Install dependencies `npm install` diff --git a/config/test.js b/config/test.js index b4cf69b..81cb802 100644 --- a/config/test.js +++ b/config/test.js @@ -17,6 +17,5 @@ module.exports = { COPILOT_CREDENTIALS_PASSWORD: process.env.COPILOT_CREDENTIALS_PASSWORD || '', USER_CREDENTIALS_USERNAME: process.env.USER_CREDENTIALS_USERNAME || '', USER_CREDENTIALS_PASSWORD: process.env.USER_CREDENTIALS_PASSWORD || '', - AUTOMATED_TESTING_NAME_PREFIX: process.env.AUTOMATED_TESTING_NAME_PREFIX || 'POSTMANE2E-', - MOCK_BUS_API_BY_NOCK: process.env.MOCK_BUS_API_BY_NOCK ? process.env.MOCK_BUS_API_BY_NOCK === 'true' : true + AUTOMATED_TESTING_REPORTERS_FORMAT: process.env.AUTOMATED_TESTING_REPORTERS_FORMAT || ['cli', 'html'] } diff --git a/package.json b/package.json index 60d1a49..9feda35 100644 --- a/package.json +++ b/package.json @@ -26,10 +26,10 @@ "should": "^13.2.3", "mocha": "^5.2.0", "mocha-prepare": "^0.1.0", - "newman": "^5.2.2", "nyc": "^14.0.0", "standard": "^12.0.1", - "nock": "^10.0.6" + "nock": "^10.0.6", + "tc-api-testing-lib": "topcoder-platform/api-automated-testing.git" }, "dependencies": { "aws-sdk": "^2.466.0", diff --git a/test/postman/ClearPostmanData.md b/test/postman/ClearPostmanData.md index e210de8..6e467e6 100644 --- a/test/postman/ClearPostmanData.md +++ b/test/postman/ClearPostmanData.md @@ -37,11 +37,7 @@ info: Done! 1. Setup the `AUTOMATED_TESTING_NAME_PREFIX` from the test environment. This prefix should be a name that will never be used set as part of the role name. e.g. 'POSTMANE2E-'. In this case, the created `ResourceRole` will have a name like 'POSTMANE2E-submitter'. -2. Choose either one solution for mocking the Bus API. We can not ignore this, becuase in production environment, it is -not allowed to send the Kafka messge to the Bus API. -a. Set `MOCK_BUS_API_BY_NOCK` to `true` from the test environment. In this way, Nock will return the response if any events - is posted to the Bus API. -b. You can use use Postman's mock server. You can refer to https://drive.google.com/file/d/1GXMzyqpzwix-LDBwieiRFfpJlJxrTIgI/view?usp=sharing +2. You can use use Postman's mock server for the bus api. You can refer to https://drive.google.com/file/d/1GXMzyqpzwix-LDBwieiRFfpJlJxrTIgI/view?usp=sharing for details. You need to update the environment variable `BUSAPI_URL` to your Postman mock server. 3. Steps of clearing the test data from Postman tests. diff --git a/test/postman/envHelper.js b/test/postman/envHelper.js deleted file mode 100644 index 031cbab..0000000 --- a/test/postman/envHelper.js +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This file defines methods for getting access tokens - */ - -const _ = require('lodash') -const axios = require('axios') -const config = require('config') -const m2mAuth = require('tc-core-library-js').auth.m2m -const m2m = m2mAuth(_.pick(config, ['AUTH0_URL', 'AUTH0_AUDIENCE', 'TOKEN_CACHE_TIME', 'AUTH0_PROXY_SERVER_URL'])) - -/** - * Get m2mToken - * @returns {String} the M2MToken - */ -async function getM2MToken () { - return m2m.getMachineToken(config.AUTH0_CLIENT_ID, config.AUTH0_CLIENT_SECRET) -} - -/** - * Get user tokens from V2 API - * @param {String} userName the user name - * @param {String} userPassword the user password - * @returns {Object} the user tokens - */ -async function getUserTokenV2 (userName, userPassword) { - const { data } = await axios({ - method: 'post', - url: config.AUTH_V2_URL, - data: { - username: userName, - password: userPassword, - client_id: config.AUTH_V2_CLIENT_ID, - sso: false, - scope: 'openid profile offline_access', - response_type: 'token', - connection: 'TC-User-Database', - grant_type: 'password', - device: 'Browser' - }, - headers: { - 'cache-control': 'no-cache', - 'content-type': 'application/json' - } - }) - return data -} - -/** - * Get user token from V3 API - * @param {String} idToken the id_token - * @param {String} refreshToken the refresh_token - * @returns {String} the user token - */ -async function getUserTokenV3 (idToken, refreshToken) { - const { data } = await axios({ - method: 'post', - url: config.AUTH_V3_URL, - data: { - param: { - externalToken: idToken, - refreshToken: refreshToken - } - }, - headers: { - 'cache-control': 'no-cache', - authorization: `Bearer ${this.v2_token}`, - 'content-type': 'application/json;charset=UTF-8' - } - }) - return data -} - -/** - * Get admin token from V3 API - * @returns {String} The admin token - */ -async function getAdminToken () { - const v2 = await getUserTokenV2(config.ADMIN_CREDENTIALS_USERNAME, config.ADMIN_CREDENTIALS_PASSWORD) - const v3 = await getUserTokenV3(v2.id_token, v2.refresh_token) - return _.get(v3, 'result.content.token') -} - -/** - * Get copilot token from V3 API - * @returns {String} The copilot token - */ -async function getCopilotToken () { - const v2 = await getUserTokenV2(config.COPILOT_CREDENTIALS_USERNAME, config.COPILOT_CREDENTIALS_PASSWORD) - const v3 = await getUserTokenV3(v2.id_token, v2.refresh_token) - return _.get(v3, 'result.content.token') -} - -/** - * Get regular user token from V3 API - * @returns {String} The user token - */ -async function getUserToken () { - const v2 = await getUserTokenV2(config.USER_CREDENTIALS_USERNAME, config.USER_CREDENTIALS_PASSWORD) - const v3 = await getUserTokenV3(v2.id_token, v2.refresh_token) - return _.get(v3, 'result.content.token') -} - -module.exports = { - getM2MToken, - getAdminToken, - getCopilotToken, - getUserToken -} diff --git a/test/postman/newman.js b/test/postman/newman.js index 8272db2..63c9e82 100644 --- a/test/postman/newman.js +++ b/test/postman/newman.js @@ -1,8 +1,7 @@ -const newman = require('newman') -const _ = require('lodash') -const envHelper = require('./envHelper') -const nock = require('nock') const config = require('config') +const apiTestLib = require('tc-api-testing-lib') +const helper = require('../../src/common/helper') +const logger = require('../../src/common/logger') const requests = [ { @@ -171,82 +170,27 @@ const requests = [ } ] -const options = { - collection: require('./resource-api.postman_collection.json'), - exportEnvironment: 'test/postman/resource-api.postman_environment.json', - reporters: 'cli' -} -const runner = (options) => new Promise((resolve, reject) => { - newman.run(options, function (err, results) { - if (err) { - reject(err) - return - } - resolve(results) - }) -}) - /** - * Sleep for the given time - * @param ms the miliseconds - * @returns {Promise} + * Clear the test data. + * @return {Promise} */ -function sleep (ms) { - return new Promise(resolve => setTimeout(resolve, ms)) +async function clearTestData () { + logger.info('Clear the Postman test data.') + await helper.postRequest(`${config.API_BASE_URL}/${config.API_VERSION}/resources/internal/jobs/clean`) + logger.info('Finished clear the Postman test data.') } /** - * Clean the Nock. + * Run the postman tests. */ -function cleanNock () { - if (config.MOCK_BUS_API_BY_NOCK) { - nock.cleanAll() - } -} - -;(async () => { - const m2mToken = await envHelper.getM2MToken() - const adminToken = await envHelper.getAdminToken() - const copilotToken = await envHelper.getCopilotToken() - const userToken = await envHelper.getUserToken() - const originalEnvVars = [ - { key: 'M2M_TOKEN', value: `${m2mToken}` }, - { key: 'admin_token', value: `${adminToken}` }, - { key: 'copilot_token', value: `${copilotToken}` }, - { key: 'user_token', value: `${userToken}` } - ] - if (config.MOCK_BUS_API_BY_NOCK) { - nock(config.BUSAPI_URL) - .persist() - .post('/bus/events') - .reply(204) - } - for (const request of requests) { - options.envVar = [ - ...originalEnvVars, - ..._.map(_.keys(request.iterationData || {}), key => ({ key, value: request.iterationData[key] })) - ] - delete require.cache[require.resolve('./resource-api.postman_environment.json')] - options.environment = require('./resource-api.postman_environment.json') - options.folder = request.folder - options.iterationData = request.iterationData - try { - const results = await runner(options) - if (_.get(results, 'run.failures.length', 0) > 0) { - cleanNock() - process.exit(-1) - } - } catch (err) { - console.log(err) - } - await sleep(config.WAIT_TIME) - } -})().then(async () => { - cleanNock() - console.log('newman test completed!') - process.exit(0) +apiTestLib.runTests(requests, require.resolve('./resource-api.postman_collection.json'), + require.resolve('./resource-api.postman_environment.json')).then(async () => { + logger.info('newman test completed!') + await clearTestData() }).catch(async (err) => { - cleanNock() - console.log(err) - process.exit(1) + logger.logFullError(err) + // Only calling the clean up function when it is not validation error. + if (err.name !== 'ValidationError') { + await clearTestData() + } }) From 798d974857b719bdd03f429a026f0a4f210a8540 Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Wed, 30 Jun 2021 16:23:46 +0530 Subject: [PATCH 52/60] Update config.yml [skip ci] --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 69bb39c..f88f8a4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -107,6 +107,8 @@ jobs: npm run test:newman:clear npm run test:newman npm run test:newman:clear + - store_artifacts: + path: /newman workflows: version: 2 From 8016d2fd3b27b73db77907f56d07c3e953086693 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Wed, 30 Jun 2021 15:17:10 +0300 Subject: [PATCH 53/60] redeploy --- test/postman/newman.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/postman/newman.js b/test/postman/newman.js index 63c9e82..7f029d5 100644 --- a/test/postman/newman.js +++ b/test/postman/newman.js @@ -189,6 +189,7 @@ apiTestLib.runTests(requests, require.resolve('./resource-api.postman_collection await clearTestData() }).catch(async (err) => { logger.logFullError(err) + // Only calling the clean up function when it is not validation error. if (err.name !== 'ValidationError') { await clearTestData() From e535928d9b872e4d4adfada25a9a03e19d146043 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Wed, 30 Jun 2021 17:06:34 +0300 Subject: [PATCH 54/60] fix artifacts on circleci --- .circleci/config.yml | 2 +- .gitignore | 3 + package-lock.json | 8053 ++++++++++++++++- package.json | 4 +- .../resource-api.postman_environment.json | 291 +- 5 files changed, 7836 insertions(+), 517 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f88f8a4..c86be2c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -108,7 +108,7 @@ jobs: npm run test:newman npm run test:newman:clear - store_artifacts: - path: /newman + path: ./newman workflows: version: 2 diff --git a/.gitignore b/.gitignore index d354fe4..05e3156 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,9 @@ lib-cov # Coverage directory used by tools like istanbul coverage +# Newman tests +newman + # nyc test coverage .nyc_output diff --git a/package-lock.json b/package-lock.json index 064c7b5..fed7fb5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,8 +1,7173 @@ { "name": "topcoder-challenge-recources-api", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "topcoder-challenge-recources-api", + "version": "1.0.0", + "license": "none", + "dependencies": { + "aws-sdk": "^2.466.0", + "bluebird": "^3.5.1", + "body-parser": "^1.15.1", + "config": "^3.0.1", + "cors": "^2.7.1", + "dynamoose": "^1.7.2", + "elasticsearch": "^16.1.1", + "express": "^4.16.4", + "express-interceptor": "^1.2.0", + "get-parameter-names": "^0.3.0", + "http-aws-es": "^6.0.0", + "http-json-response": "^1.0.1", + "http-status-codes": "^1.3.0", + "joi": "^14.0.0", + "lodash": "^4.17.19", + "superagent": "^4.1.0", + "swagger-ui-express": "^4.1.3", + "tc-bus-api-wrapper": "topcoder-platform/tc-bus-api-wrapper.git", + "tc-core-library-js": "appirio-tech/tc-core-library-js.git#v2.6.4", + "uuid": "^8.3.0", + "winston": "^3.2.1", + "xss": "^1.0.7", + "yamljs": "^0.3.0" + }, + "devDependencies": { + "mocha": "^5.2.0", + "mocha-prepare": "^0.1.0", + "nock": "^10.0.6", + "nyc": "^14.0.0", + "should": "^13.2.3", + "standard": "^12.0.1", + "tc-api-testing-lib": "topcoder-platform/api-automated-testing.git" + }, + "engines": { + "node": "10.x" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.0.0" + } + }, + "node_modules/@babel/generator": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz", + "integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.4.4", + "jsesc": "^2.5.1", + "lodash": "^4.17.11", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", + "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "dev": true, + "dependencies": { + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@babel/helper-get-function-arity": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", + "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", + "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "dev": true, + "dependencies": { + "@babel/types": "^7.4.4" + } + }, + "node_modules/@babel/highlight": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "dev": true, + "dependencies": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.4.tgz", + "integrity": "sha512-5pCS4mOsL+ANsFZGdvNLybx4wtqAZJ0MJjMHxvzI3bvIsz6sQvzW8XX92EYIkiPtIvcfG3Aj+Ir5VNyjnZhP7w==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", + "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.4.4", + "@babel/types": "^7.4.4" + } + }, + "node_modules/@babel/traverse": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.4.tgz", + "integrity": "sha512-Gw6qqkw/e6AGzlyj9KnkabJX7VcubqPtkUQVAwkc0wUMldr3A/hezNB3Rc5eIvId95iSGkGIOe5hh1kMKf951A==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.4.4", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/parser": "^7.4.4", + "@babel/types": "^7.4.4", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.11" + } + }, + "node_modules/@babel/traverse/node_modules/debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/@babel/traverse/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "node_modules/@babel/types": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz", + "integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2", + "lodash": "^4.17.11", + "to-fast-properties": "^2.0.0" + } + }, + "node_modules/@dabh/diagnostics": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.2.tgz", + "integrity": "sha512-+A1YivoVDNNVCdfozHSR8v/jyuuLTMXwjWuxPFlFlUapXoGc+Gj9mDlTDDfrwl7rXCl2tNZ0kE8sIBO6YOn96Q==", + "dependencies": { + "colorspace": "1.1.x", + "enabled": "2.0.x", + "kuler": "^2.0.0" + } + }, + "node_modules/@hapi/hoek": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.0.tgz", + "integrity": "sha512-sqKVVVOe5ivCaXDWivIJYVSaEgdQK9ul7a4Kity5Iw7u9+wBAPbX1RMSnLLmp7O4Vzj0WOWwMAJsTL00xwaNug==", + "dev": true + }, + "node_modules/@hapi/topo": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", + "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@postman/form-data": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@postman/form-data/-/form-data-3.1.1.tgz", + "integrity": "sha512-vjh8Q2a8S6UCm/KKs31XFJqEEgmbjBmpPNVV2eVav6905wyFAwaUOBGA1NPBI4ERH9MMZc6w0umFgM6WbEPMdg==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@postman/tunnel-agent": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@postman/tunnel-agent/-/tunnel-agent-0.6.3.tgz", + "integrity": "sha512-k57fzmAZ2PJGxfOA4SGR05ejorHbVAa/84Hxh/2nAztjNXc4ZjOm9NUIk6/Z6LCrBvJZqjRZbN8e/nROVUPVdg==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@sideway/address": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.2.tgz", + "integrity": "sha512-idTz8ibqWFrPU8kMirL0CoPH/A29XOzzAzpyN3zQ4kAWnzmNfFmRaoMNN6VI8ske5M73HZyhIaW4OuSFIdM4oA==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@sideway/formula": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz", + "integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==", + "dev": true + }, + "node_modules/@sideway/pinpoint": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", + "dev": true + }, + "node_modules/@types/body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-W98JrE0j2K78swW4ukqMleo8R7h/pFETjM2DQ90MF6XK2i4LO4W3gQ71Lt4w3bfm2EvVSyWHplECvB5sK22yFQ==", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.33", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.33.tgz", + "integrity": "sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/express": { + "version": "4.17.6", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.6.tgz", + "integrity": "sha512-n/mr9tZI83kd4azlPG5y997C/M4DNABK9yErhFM6hKdym4kkmd9j0vtsJyjFIwfRBxtrxZtAfGZCNRIBMFLK5w==", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "*", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-jwt": { + "version": "0.0.42", + "resolved": "https://registry.npmjs.org/@types/express-jwt/-/express-jwt-0.0.42.tgz", + "integrity": "sha512-WszgUddvM1t5dPpJ3LhWNH8kfNN8GPIBrAGxgIYXVCEGx6Bx4A036aAuf/r5WH9DIEdlmp7gHOYvSM6U87B0ag==", + "dependencies": { + "@types/express": "*", + "@types/express-unless": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.7", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.7.tgz", + "integrity": "sha512-EMgTj/DF9qpgLXyc+Btimg+XoH7A2liE8uKul8qSmMTHCeNYzydDKFdsJskDvw42UsesCnhO63dO0Grbj8J4Dw==", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, + "node_modules/@types/express-unless": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@types/express-unless/-/express-unless-0.5.1.tgz", + "integrity": "sha512-5fuvg7C69lemNgl0+v+CUxDYWVPSfXHhJPst4yTLcqi4zKJpORCxnDrnnilk3k0DTq/WrAUdvXFs01+vUqUZHw==", + "dependencies": { + "@types/express": "*" + } + }, + "node_modules/@types/mime": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.2.tgz", + "integrity": "sha512-4kPlzbljFcsttWEq6aBW0OZe6BDajAmyvr2xknBG92tejQnvdGtT9+kXSZ580DqpxY9qG2xeQVF9Dq0ymUTo5Q==" + }, + "node_modules/@types/node": { + "version": "14.0.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.5.tgz", + "integrity": "sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA==" + }, + "node_modules/@types/qs": { + "version": "6.9.3", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.3.tgz", + "integrity": "sha512-7s9EQWupR1fTc2pSMtXRQ9w9gLOcrJn+h7HOXw4evxyvVqMi4f+q7d2tnFe3ng3SNHjtK+0EzGMGFUQX4/AQRA==" + }, + "node_modules/@types/range-parser": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.3.tgz", + "integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==" + }, + "node_modules/@types/serve-static": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.4.tgz", + "integrity": "sha512-jTDt0o/YbpNwZbQmE/+2e+lfjJEJJR0I3OFaKQKPWkASkCoW3i6fsUnqudSMcNAfbtmADGu8f4MV4q+GqULmug==", + "dependencies": { + "@types/express-serve-static-core": "*", + "@types/mime": "*" + } + }, + "node_modules/accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dependencies": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", + "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "dev": true + }, + "node_modules/agentkeepalive": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz", + "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/ajv": { + "version": "6.9.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.2.tgz", + "integrity": "sha512-4UFy0/LgDo7Oa/+wOAlj44tp9K78u38E5/359eSrqEp1Z5PdVfimCcs7SluXMP755RUQu6d2b4AvF0R1C9RZjg==", + "dependencies": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "node_modules/ajv-keywords": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.0.tgz", + "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==", + "dev": true + }, + "node_modules/ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/append-transform": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", + "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "dev": true, + "dependencies": { + "default-require-extensions": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "node_modules/array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "dev": true, + "dependencies": { + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "node_modules/aws-sdk": { + "version": "2.692.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.692.0.tgz", + "integrity": "sha512-fQRbZq+urzE4VjciEr6KNY7vbzougcVg7UqbHKGcgBT7EPtSbog9C2i9YY9Yum8PRuP1GAmfvC2Vthlw6dVTGw==", + "dependencies": { + "buffer": "4.9.2", + "events": "1.1.1", + "ieee754": "1.1.13", + "jmespath": "0.15.0", + "querystring": "0.2.0", + "sax": "1.2.1", + "url": "0.10.3", + "uuid": "3.3.2", + "xml2js": "0.4.19" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/aws-sdk/node_modules/uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "node_modules/axios": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "dependencies": { + "follow-redirects": "1.5.10" + } + }, + "node_modules/babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "dependencies": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "node_modules/babel-code-frame/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "node_modules/babel-code-frame/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/babel-runtime": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.6.1.tgz", + "integrity": "sha1-eIuUtvY04luRvWxd9y1GdFevsAA=", + "dependencies": { + "core-js": "^2.1.0" + } + }, + "node_modules/backoff": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/backoff/-/backoff-2.5.0.tgz", + "integrity": "sha1-9hbtqdPktmuMp/ynn2lXIsX44m8=", + "dependencies": { + "precond": "0.2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "node_modules/base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/bluebird": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", + "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==" + }, + "node_modules/body-parser": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "dependencies": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "~1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "~2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "~1.6.16" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/brotli": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.2.tgz", + "integrity": "sha1-UlqcrU/LqWR119OI9q7LE+7VL0Y=", + "dev": true, + "dependencies": { + "base64-js": "^1.1.2" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "node_modules/buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "node_modules/bunyan": { + "version": "1.8.12", + "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.12.tgz", + "integrity": "sha1-8VDw9nSKvdcq6uhPBEA74u8RN5c=", + "engines": [ + "node >=0.10.0" + ], + "bin": { + "bunyan": "bin/bunyan" + }, + "optionalDependencies": { + "dtrace-provider": "~0.8", + "moment": "^2.10.6", + "mv": "~2", + "safe-json-stringify": "~1" + } + }, + "node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/caching-transform": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz", + "integrity": "sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==", + "dev": true, + "dependencies": { + "hasha": "^3.0.0", + "make-dir": "^2.0.0", + "package-hash": "^3.0.0", + "write-file-atomic": "^2.4.2" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "dependencies": { + "callsites": "^0.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "node_modules/chai": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", + "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "node_modules/charset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/charset/-/charset-1.0.1.tgz", + "integrity": "sha512-6dVyOOYjpfFcL1Y4qChrAoQLRHvj2ziyhcm0QJlhOcAhykL/k1kTUPbeo+87MNRTRdk2OIIsIXbuF3x2wi5EXg==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, + "node_modules/cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "dependencies": { + "restore-cursor": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cli-progress": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.9.0.tgz", + "integrity": "sha512-g7rLWfhAo/7pF+a/STFH/xPyosaL1zgADhI0OM83hl3c7S43iGvJWEAV2QuDOnQ8i6EMBj/u4+NTd0d5L+4JfA==", + "dev": true, + "dependencies": { + "colors": "^1.1.2", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cli-progress/node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-progress/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/cli-progress/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-progress/node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-progress/node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-table3": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.0.tgz", + "integrity": "sha512-gnB85c3MGC7Nm9I/FkiasNBOKjOiO1RNuXXarQms37q4QMpWdlbBgD/VnOStA2faG1dpXMv31RFApjX1/QdgWQ==", + "dev": true, + "dependencies": { + "colors": "^1.1.2", + "object-assign": "^4.1.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + } + }, + "node_modules/cli-table3/node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-table3/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/cli-table3/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-table3/node_modules/string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-table3/node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "node_modules/cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "dependencies": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/codependency": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/codependency/-/codependency-0.1.4.tgz", + "integrity": "sha1-0XY6tyZL1wyR2WJumIYtN5K/jUo=", + "dependencies": { + "semver": "5.0.1" + } + }, + "node_modules/codependency/node_modules/semver": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.1.tgz", + "integrity": "sha1-n7P0AE+QDYPEeWj+QvdYPgWDLMk=", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/color": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", + "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", + "dependencies": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "node_modules/color-string": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.5.tgz", + "integrity": "sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/colors": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", + "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/colorspace": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.2.tgz", + "integrity": "sha512-vt+OoIP2d76xLhjwbBaucYlNSpPsrJWPlBTtwCpQKIu6/CSMutyzX93O/Do0qzpH3YoHEes8YEFXyZ797rEhzQ==", + "dependencies": { + "color": "3.0.x", + "text-hex": "1.0.x" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "node_modules/component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "node_modules/config": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/config/-/config-3.3.6.tgz", + "integrity": "sha512-Hj5916C5HFawjYJat1epbyY2PlAgLpBtDUlr0MxGLgo3p5+7kylyvnRY18PqJHgnNWXcdd0eWDemT7eYWuFgwg==", + "dependencies": { + "json5": "^2.1.1" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "node_modules/cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" + }, + "node_modules/core-js": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", + "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==" + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cp-file": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz", + "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "make-dir": "^2.0.0", + "nested-error-stacks": "^2.0.0", + "pify": "^4.0.1", + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/cp-file/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/cssfilter": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/cssfilter/-/cssfilter-0.0.10.tgz", + "integrity": "sha1-xtJnJjKi5cg+AT5oZKQs6N79IK4=" + }, + "node_modules/csv-parse": { + "version": "4.16.0", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-4.16.0.tgz", + "integrity": "sha512-Zb4tGPANH4SW0LgC9+s9Mnequs9aqn7N3/pCqNbVjs2XhEF6yWNU2Vm4OGl1v2Go9nw8rXt87Cm2QN/o6Vpqgg==", + "dev": true + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dbug": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/dbug/-/dbug-0.4.2.tgz", + "integrity": "sha1-MrSzEF6IYQQ6b5rHVdgOVC02WzE=", + "dev": true + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/debug-log": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", + "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" + }, + "node_modules/deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "node_modules/default-require-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", + "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "dev": true, + "dependencies": { + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "dependencies": { + "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/deglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/deglob/-/deglob-2.1.1.tgz", + "integrity": "sha512-2kjwuGGonL7gWE1XU4Fv79+vVzpoQCl0V+boMwWtOQJV2AGDabCwez++nB1Nli/8BabAfZQ/UuHPlp6AymKdWw==", + "dev": true, + "dependencies": { + "find-root": "^1.0.0", + "glob": "^7.0.5", + "ignore": "^3.0.9", + "pkg-config": "^1.1.0", + "run-parallel": "^1.1.2", + "uniq": "^1.0.1" + } + }, + "node_modules/deglob/node_modules/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/deglob/node_modules/ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "dev": true + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dtrace-provider": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.8.7.tgz", + "integrity": "sha1-3JObTT4GIM/gwc2APQ0tftBP/QQ=", + "optional": true, + "dependencies": { + "nan": "^2.10.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dynamoose": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/dynamoose/-/dynamoose-1.7.2.tgz", + "integrity": "sha512-cRXX+ixgFYeLHIYA/rvVu+byPPHHfkUrO26IgUyqd/6apyGnAUtKAOeCEsS6M7fjVouuavxl+Va51cexRcCOkw==", + "dependencies": { + "@types/node": "11.11.0", + "aws-sdk": "2.395.0", + "debug": "4.1.1", + "deep-equal": "1.0.1", + "hooks": "0.3.2", + "object-path": "0.11.4", + "q": "1.5.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/dynamoose/node_modules/@types/node": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.0.tgz", + "integrity": "sha512-D5Rt+HXgEywr3RQJcGlZUCTCx1qVbCZpVk3/tOOA6spLNZdGm8BU+zRgdRYDoF1pO3RuXLxADzMrF903JlQXqg==" + }, + "node_modules/dynamoose/node_modules/aws-sdk": { + "version": "2.395.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.395.0.tgz", + "integrity": "sha512-ldTTjctniZT4E2lq2z3D8Y2u+vpkp+laoEnDkXgjKXTKbiJ0QEtfWsUdx/IQ7awCt8stoxyqZK47DJOxIbRNoA==", + "dependencies": { + "buffer": "4.9.1", + "events": "1.1.1", + "ieee754": "1.1.8", + "jmespath": "0.15.0", + "querystring": "0.2.0", + "sax": "1.2.1", + "url": "0.10.3", + "uuid": "3.3.2", + "xml2js": "0.4.19" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/dynamoose/node_modules/aws-sdk/node_modules/uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/dynamoose/node_modules/buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "node_modules/dynamoose/node_modules/debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/dynamoose/node_modules/ieee754": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", + "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" + }, + "node_modules/dynamoose/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "node_modules/elasticsearch": { + "version": "16.7.1", + "resolved": "https://registry.npmjs.org/elasticsearch/-/elasticsearch-16.7.1.tgz", + "integrity": "sha512-PL/BxB03VGbbghJwISYvVcrR9KbSSkuQ7OM//jHJg/End/uC2fvXg4QI7RXLvCGbhBuNQ8dPue7DOOPra73PCw==", + "dependencies": { + "agentkeepalive": "^3.4.1", + "chalk": "^1.0.0", + "lodash": "^4.17.10" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/elasticsearch/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/elasticsearch/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/elasticsearch/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/elasticsearch/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "node_modules/enabled": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/error-ex/node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "node_modules/es-abstract": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", + "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", + "dev": true, + "dependencies": { + "es-to-primitive": "^1.2.0", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", + "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.4.0.tgz", + "integrity": "sha512-UIpL91XGex3qtL6qwyCQJar2j3osKxK9e3ano3OcGEIRM4oWIpCkDg9x95AXEC2wMs7PnxzOkPZ2gq+tsMS9yg==", + "dev": true, + "dependencies": { + "ajv": "^6.5.0", + "babel-code-frame": "^6.26.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^4.0.0", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.2", + "imurmurhash": "^0.1.4", + "inquirer": "^5.2.0", + "is-resolvable": "^1.1.0", + "js-yaml": "^3.11.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^2.0.0", + "require-uncached": "^1.0.3", + "semver": "^5.5.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^4.0.3", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^6.14.0 || ^8.10.0 || >=9.10.0" + } + }, + "node_modules/eslint-config-standard": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz", + "integrity": "sha512-COUz8FnXhqFitYj4DTqHzidjIL/t4mumGZto5c7DrBpvWoie+Sn3P4sLEzUGeYhRElWuFEf8K1S1EfvD1vixCQ==", + "dev": true + }, + "node_modules/eslint-config-standard-jsx": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-6.0.2.tgz", + "integrity": "sha512-D+YWAoXw+2GIdbMBRAzWwr1ZtvnSf4n4yL0gKGg7ShUOGXkSOLerI17K4F6LdQMJPNMoWYqepzQD/fKY+tXNSg==", + "dev": true + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", + "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", + "dev": true, + "dependencies": { + "debug": "^2.6.9", + "resolve": "^1.5.0" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.3.0.tgz", + "integrity": "sha512-lmDJgeOOjk8hObTysjqH7wyMi+nsHwwvfBykwfhjR1LNdd7C2uFJBvx4OpWYpXOw4df1yE1cDEVd1yLHitk34w==", + "dev": true, + "dependencies": { + "debug": "^2.6.8", + "pkg-dir": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-es": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.4.0.tgz", + "integrity": "sha512-XfFmgFdIUDgvaRAlaXUkxrRg5JSADoRC8IkKLc/cISeR3yHVMefFHQZpcyXXEUUPHfy5DwviBcrfqlyqEwlQVw==", + "dev": true, + "dependencies": { + "eslint-utils": "^1.3.0", + "regexpp": "^2.0.1" + }, + "engines": { + "node": ">=6.5.0" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz", + "integrity": "sha512-FpuRtniD/AY6sXByma2Wr0TXvXJ4nA/2/04VPlfpmUDPOpOY264x+ILiwnrk/k4RINgDAyFZByxqPUbSQ5YE7g==", + "dev": true, + "dependencies": { + "contains-path": "^0.1.0", + "debug": "^2.6.8", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.1", + "eslint-module-utils": "^2.2.0", + "has": "^1.0.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.3", + "read-pkg-up": "^2.0.0", + "resolve": "^1.6.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "dependencies": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-node": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-7.0.1.tgz", + "integrity": "sha512-lfVw3TEqThwq0j2Ba/Ckn2ABdwmL5dkOgAux1rvOk6CO7A6yGyPI2+zIxN6FyNkp1X1X/BSvKOceD6mBWSj4Yw==", + "dev": true, + "dependencies": { + "eslint-plugin-es": "^1.3.1", + "eslint-utils": "^1.3.1", + "ignore": "^4.0.2", + "minimatch": "^3.0.4", + "resolve": "^1.8.1", + "semver": "^5.5.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-plugin-promise": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.0.1.tgz", + "integrity": "sha512-Si16O0+Hqz1gDHsys6RtFRrW7cCTB6P7p3OJmKp3Y3dxpQE2qwOA7d3xnV+0mBmrPoi0RBnxlCKvqu70te6wjg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-plugin-react": { + "version": "7.11.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz", + "integrity": "sha512-cVVyMadRyW7qsIUh3FHp3u6QHNhOgVrLQYdQEB1bPWBsgbNCHdFAeNMquBMCcZJu59eNthX053L70l7gRt4SCw==", + "dev": true, + "dependencies": { + "array-includes": "^3.0.3", + "doctrine": "^2.1.0", + "has": "^1.0.3", + "jsx-ast-utils": "^2.0.1", + "prop-types": "^15.6.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-standard": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.0.tgz", + "integrity": "sha512-OwxJkR6TQiYMmt1EsNRMe5qG3GsbjlcOhbGUBY4LtavF9DsLaTcoR+j2Tdjqi23oUwKNUqX7qcn5fPStafMdlA==", + "dev": true + }, + "node_modules/eslint-scope": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.2.tgz", + "integrity": "sha512-5q1+B/ogmHl8+paxtOKx38Z8LtWkVGuNt3+GQNErqwLl6ViNp/gdJGMCjZNxZ8j/VYjDNZ2Fo+eQc1TAVPIzbg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint/node_modules/debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint/node_modules/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "node_modules/espree": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", + "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", + "dev": true, + "dependencies": { + "acorn": "^6.0.2", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "dependencies": { + "estraverse": "^4.0.0" + }, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "dependencies": { + "estraverse": "^4.1.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true + }, + "node_modules/events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "dependencies": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/express": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "dependencies": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.3", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.4", + "qs": "6.5.2", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.2", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express-interceptor": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/express-interceptor/-/express-interceptor-1.2.0.tgz", + "integrity": "sha1-M0YKjhHc5+WgIsr1VdN35F3bgio=", + "dependencies": { + "debug": "^2.2.0" + } + }, + "node_modules/express/node_modules/statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/external-editor": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "dev": true, + "dependencies": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/faker": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/faker/-/faker-5.5.3.tgz", + "integrity": "sha512-wLTv2a28wjUyWkbnX7u/ABZBkUkIF2fCd73V6P2oFqEGEktDfzWx4UxrSqtPRw0xPRAcjeAOIiJWqZm3pP4u3g==", + "dev": true + }, + "node_modules/fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "node_modules/fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" + }, + "node_modules/fecha": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.1.tgz", + "integrity": "sha512-MMMQ0ludy/nBs1/o0zVOiKTpG7qMbonKUzjJgQFEuvq6INZ1OraKPRAWkBq5vlKLOUMpmNYG1JoN3oDPUQ9m3Q==" + }, + "node_modules/figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "dependencies": { + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/filesize": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.3.0.tgz", + "integrity": "sha512-ytx0ruGpDHKWVoiui6+BY/QMNngtDQ/pJaFwfBpQif0J63+E8DLdFyqS3NkKQn7vIruUEpoGD9JUJSg7Kp+I0g==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/finalhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-cache-dir/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-cache-dir/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-cache-dir/node_modules/p-limit": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-cache-dir/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-cache-dir/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-cache-dir/node_modules/pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "dependencies": { + "find-up": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", + "dev": true + }, + "node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/flat-cache": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", + "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", + "dev": true, + "dependencies": { + "circular-json": "^0.3.1", + "graceful-fs": "^4.1.2", + "rimraf": "~2.6.2", + "write": "^0.2.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/flat-cache/node_modules/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/flat-cache/node_modules/rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true + }, + "node_modules/fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" + }, + "node_modules/follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "dependencies": { + "debug": "=3.1.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/follow-redirects/node_modules/debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/foreground-child": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", + "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", + "dev": true, + "dependencies": { + "cross-spawn": "^4", + "signal-exit": "^3.0.0" + } + }, + "node_modules/foreground-child/node_modules/cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "dev": true, + "dependencies": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/formidable": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", + "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==" + }, + "node_modules/forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-parameter-names": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/get-parameter-names/-/get-parameter-names-0.3.0.tgz", + "integrity": "sha1-LSI3zVkubFuFmrLv2rQ18Ajlu5c=", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "optional": true, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/globals": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", + "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true, + "engines": { + "node": ">=4.x" + } + }, + "node_modules/handlebars": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz", + "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==", + "dev": true, + "dependencies": { + "neo-async": "^2.6.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "dependencies": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hasha": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", + "integrity": "sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk=", + "dev": true, + "dependencies": { + "is-stream": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/hoek": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-6.1.2.tgz", + "integrity": "sha512-6qhh/wahGYZHFSFw12tBbJw5fsAhhwrrG/y3Cs0YMTv2WzMnL0oLPnQJjv1QJvEfylRSOFuP+xCu+tdx0tD16Q==" + }, + "node_modules/hooks": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/hooks/-/hooks-0.3.2.tgz", + "integrity": "sha1-ox8GDCAmzqbPHKPrF4Qw5xjhxKM=", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/http-aws-es": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/http-aws-es/-/http-aws-es-6.0.0.tgz", + "integrity": "sha512-g+qp7J110/m4aHrR3iit4akAlnW0UljZ6oTq/rCcbsI8KP9x+95vqUtx49M2XQ2JMpwJio3B6gDYx+E8WDxqiA==" + }, + "node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-json-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/http-json-response/-/http-json-response-1.0.1.tgz", + "integrity": "sha1-ryQ2POlMcqre78x6rh8nRo7PS3I=" + }, + "node_modules/http-reasons": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/http-reasons/-/http-reasons-0.1.0.tgz", + "integrity": "sha1-qVPKZwB4Zp3eFCzomUAbnW6F07Q=", + "dev": true + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/http-status-codes": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/http-status-codes/-/http-status-codes-1.3.0.tgz", + "integrity": "sha1-nNDnE5F3PQZxtInUHLxQlKpBY7Y=" + }, + "node_modules/httpntlm": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.7.7.tgz", + "integrity": "sha512-Pv2Rvrz8H0qv1Dne5mAdZ9JegG1uc6Vu5lwLflIY6s8RKHdZQbW39L4dYswSgqMDT0pkJILUTKjeyU0VPNRZjA==", + "dev": true, + "dependencies": { + "httpreq": ">=0.4.22", + "underscore": "~1.12.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/httpreq": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.5.2.tgz", + "integrity": "sha512-2Jm+x9WkExDOeFRrdBCBSpLPT5SokTcRHkunV3pjKmX/cx6av8zQ0WtHUMDrYb6O4hBFzNU6sxJEypvRUVYKnw==", + "dev": true, + "engines": { + "node": ">= 6.15.1" + } + }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + }, + "node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "node_modules/inquirer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", + "dev": true, + "dependencies": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.1.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^5.5.2", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/intel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/intel/-/intel-1.2.0.tgz", + "integrity": "sha1-EdEUfraz9Fgr31M3s31UFYTp5B4=", + "dev": true, + "dependencies": { + "chalk": "^1.1.0", + "dbug": "~0.4.2", + "stack-trace": "~0.0.9", + "strftime": "~0.10.0", + "symbol": "~0.3.1", + "utcstring": "~0.1.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/intel/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/intel/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/intel/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/intel/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ip-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", + "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + }, + "node_modules/is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "node_modules/is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "dependencies": { + "has": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, + "node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-symbol": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", + "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "node_modules/isemail": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/isemail/-/isemail-3.2.0.tgz", + "integrity": "sha512-zKqkK+O+dGqevc93KNsbZ/TqTUFd46MwWjYOoMrjIMZ51eU7DtQG3Wmd9SQQT7i7RVnuTPEiYEWHU3MSbxC1Tg==", + "dependencies": { + "punycode": "2.x.x" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/isemail/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "node_modules/istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-hook": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", + "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", + "dev": true, + "dependencies": { + "append-transform": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", + "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", + "dev": true, + "dependencies": { + "@babel/generator": "^7.4.0", + "@babel/parser": "^7.4.3", + "@babel/template": "^7.4.0", + "@babel/traverse": "^7.4.3", + "@babel/types": "^7.4.0", + "istanbul-lib-coverage": "^2.0.5", + "semver": "^6.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz", + "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/istanbul-lib-report": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", + "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "supports-color": "^6.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", + "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "rimraf": "^2.6.3", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "node_modules/istanbul-lib-source-maps/node_modules/rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-reports": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz", + "integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jmespath": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", + "integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/joi": { + "version": "14.3.1", + "resolved": "https://registry.npmjs.org/joi/-/joi-14.3.1.tgz", + "integrity": "sha512-LQDdM+pkOrpAn4Lp+neNIFV3axv1Vna3j38bisbQhETPMANYRbFJFUyOZcOClYvM/hppMhGWuKSFEK9vjrB+bQ==", + "dependencies": { + "hoek": "6.x.x", + "isemail": "3.x.x", + "topo": "3.x.x" + } + }, + "node_modules/js-sha512": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha512/-/js-sha512-0.8.0.tgz", + "integrity": "sha512-PWsmefG6Jkodqt+ePTvBZCSMFgN7Clckjd0O7su3I0+BW2QWUTJNzjktHsztGLhncP2h8mcF9V9Y2Ha59pAViQ==", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "node_modules/json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "node_modules/json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=4", + "npm": ">=1.4.28" + } + }, + "node_modules/jsonwebtoken/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "node_modules/jsx-ast-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", + "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", + "dev": true, + "dependencies": { + "array-includes": "^3.0.3" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jwks-rsa": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/jwks-rsa/-/jwks-rsa-1.8.1.tgz", + "integrity": "sha512-CcE8ypsATHwGmzELwzeFjLzPBXTXTrMmDYbn92LTQwYsZdOedp+ZIuYTofUdrWreu8CKRuXmhk17+6/li2sR6g==", + "dependencies": { + "@types/express-jwt": "0.0.42", + "axios": "^0.19.2", + "debug": "^4.1.0", + "jsonwebtoken": "^8.5.1", + "limiter": "^1.1.5", + "lru-memoizer": "^2.1.2", + "ms": "^2.1.2" + } + }, + "node_modules/jwks-rsa/node_modules/debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/jwks-rsa/node_modules/limiter": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.5.tgz", + "integrity": "sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA==" + }, + "node_modules/jwks-rsa/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/kuler": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" + }, + "node_modules/lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "dependencies": { + "invert-kv": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/limiter": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.4.tgz", + "integrity": "sha512-XCpr5bElgDI65vVgstP8TWjv6/QKWm9GU5UG0Pr5sLQ3QLo8NVKsioe+Jed5/3vFOe3IQuqE7DKwTvKQkjTHvg==" + }, + "node_modules/liquid-json": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/liquid-json/-/liquid-json-0.3.1.tgz", + "integrity": "sha1-kVWhgTbYprJhXl8W+aJEira1Duo=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" + }, + "node_modules/lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" + }, + "node_modules/logform": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz", + "integrity": "sha512-N0qPlqfypFx7UHNn4B3lzS/b0uLqt2hmuoa+PpuXNYgozdJYAyauF5Ky0BWVjrxDlMWiT3qN4zPq3vVAfZy7Yg==", + "dependencies": { + "colors": "^1.2.1", + "fast-safe-stringify": "^2.0.4", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "triple-beam": "^1.3.0" + } + }, + "node_modules/logform/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz", + "integrity": "sha1-HRdnnAac2l0ECZGgnbwsDbN35V4=", + "dependencies": { + "pseudomap": "^1.0.1", + "yallist": "^2.0.0" + } + }, + "node_modules/lru-memoizer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/lru-memoizer/-/lru-memoizer-2.1.2.tgz", + "integrity": "sha512-N5L5xlnVcbIinNn/TJ17vHBZwBMt9t7aJDz2n97moWubjNl6VO9Ao2XuAGBBddkYdjrwR9HfzXbT6NfMZXAZ/A==", + "dependencies": { + "lodash.clonedeep": "^4.5.0", + "lru-cache": "~4.0.0" + } + }, + "node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/make-dir/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, + "dependencies": { + "p-defer": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mem": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "dev": true, + "dependencies": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/mem/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "node_modules/merge-source-map": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", + "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "dev": true, + "dependencies": { + "source-map": "^0.6.1" + } + }, + "node_modules/merge-source-map/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/millisecond": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/millisecond/-/millisecond-0.1.2.tgz", + "integrity": "sha1-bMWtOGJByrjniv+WT4cCjuyS2sU=" + }, + "node_modules/mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==", + "bin": { + "mime": "cli.js" + } + }, + "node_modules/mime-db": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", + "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-format": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mime-format/-/mime-format-2.0.1.tgz", + "integrity": "sha512-XxU3ngPbEnrYnNbIX+lYSaYg0M01v6p2ntd2YaFksTu0vayaw5OJvbdRyWs07EYRlLED5qadUZ+xo+XhOvFhwg==", + "dev": true, + "dependencies": { + "charset": "^1.0.0" + } + }, + "node_modules/mime-types": { + "version": "2.1.31", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", + "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", + "dependencies": { + "mime-db": "1.48.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "devOptional": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mocha": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", + "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", + "dev": true, + "dependencies": { + "browser-stdout": "1.3.1", + "commander": "2.15.1", + "debug": "3.1.0", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.5", + "he": "1.1.1", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "supports-color": "5.4.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/mocha-prepare": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/mocha-prepare/-/mocha-prepare-0.1.0.tgz", + "integrity": "sha1-VRMidoEiLkNJSB7k5GJHLzHGu4I=", + "dev": true + }, + "node_modules/mocha/node_modules/debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mocha/node_modules/minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "node_modules/mocha/node_modules/mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "dependencies": { + "minimist": "0.0.8" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/moment": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", + "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==", + "optional": true, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "node_modules/mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "node_modules/mv": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/mv/-/mv-2.1.1.tgz", + "integrity": "sha1-rmzg1vbV4KT32JN5jQPB6pVZtqI=", + "optional": true, + "dependencies": { + "mkdirp": "~0.5.1", + "ncp": "~2.0.0", + "rimraf": "~2.4.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "optional": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node_modules/ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", + "optional": true, + "bin": { + "ncp": "bin/ncp" + } + }, + "node_modules/negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/nested-error-stacks": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.0.tgz", + "integrity": "sha512-AO81vsIO1k1sM4Zrd6Hu7regmJN1NSiAja10gc4bX3F0wd+9rQmcuHQaHVQCYIEC8iFXnE+mavh23GOt7wBgug==", + "dev": true + }, + "node_modules/newman": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/newman/-/newman-5.2.4.tgz", + "integrity": "sha512-RFo3Bteh8CMDD4/eld+ItQ1trrtLN9Mlwk/6mnk2/lBKG08U+ysREwk8Jy74X+a0vmpVCljlGk5MifdcCdkkRg==", + "dev": true, + "dependencies": { + "async": "3.2.0", + "chardet": "1.3.0", + "cli-progress": "3.9.0", + "cli-table3": "0.6.0", + "colors": "1.4.0", + "commander": "7.2.0", + "csv-parse": "4.16.0", + "eventemitter3": "4.0.7", + "filesize": "6.3.0", + "lodash": "4.17.21", + "mkdirp": "1.0.4", + "postman-collection": "4.0.0", + "postman-collection-transformer": "4.1.2", + "postman-request": "2.88.1-postman.30", + "postman-runtime": "7.28.2", + "pretty-ms": "7.0.1", + "semver": "7.3.5", + "serialised-error": "1.1.3", + "tough-cookie": "3.0.1", + "word-wrap": "1.2.3", + "xmlbuilder": "15.1.1" + }, + "bin": { + "newman": "bin/newman.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/newman-reporter-html": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/newman-reporter-html/-/newman-reporter-html-1.0.5.tgz", + "integrity": "sha512-Kz8ejzJqDaasyqNuP8F7bBYzsts7JP3wBfdRQDOYPCUchVQF63KsbxtxbGadyzOeXcZsXs6YT3pe4FFlN51jcw==", + "dev": true, + "dependencies": { + "filesize": "6.0.1", + "handlebars": "4.5.3", + "lodash": "4.17.15", + "pretty-ms": "5.1.0" + }, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "newman": "4" + } + }, + "node_modules/newman-reporter-html/node_modules/filesize": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.0.1.tgz", + "integrity": "sha512-u4AYWPgbI5GBhs6id1KdImZWn5yfyFrrQ8OWZdN7ZMfA8Bf4HcO0BGo9bmUIEV8yrp8I1xVfJ/dn90GtFNNJcg==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/newman-reporter-html/node_modules/lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "node_modules/newman-reporter-html/node_modules/pretty-ms": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-5.1.0.tgz", + "integrity": "sha512-4gaK1skD2gwscCfkswYQRmddUb2GJZtzDGRjHWadVHtK/DIKFufa12MvES6/xu1tVbUYeia5bmLcwJtZJQUqnw==", + "dev": true, + "dependencies": { + "parse-ms": "^2.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/newman/node_modules/async": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==", + "dev": true + }, + "node_modules/newman/node_modules/chardet": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-1.3.0.tgz", + "integrity": "sha512-cyTQGGptIjIT+CMGT5J/0l9c6Fb+565GCFjjeUTKxUO7w3oR+FcNCMEKTn5xtVKaLFmladN7QF68IiQsv5Fbdw==", + "dev": true + }, + "node_modules/newman/node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/newman/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/newman/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/newman/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/newman/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/newman/node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/newman/node_modules/tough-cookie": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", + "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", + "dev": true, + "dependencies": { + "ip-regex": "^2.1.0", + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/newman/node_modules/xmlbuilder": { + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", + "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==", + "dev": true, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/newman/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node_modules/nock": { + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/nock/-/nock-10.0.6.tgz", + "integrity": "sha512-b47OWj1qf/LqSQYnmokNWM8D88KvUl2y7jT0567NB3ZBAZFz2bWp2PC81Xn7u8F2/vJxzkzNZybnemeFa7AZ2w==", + "dev": true, + "dependencies": { + "chai": "^4.1.2", + "debug": "^4.1.0", + "deep-equal": "^1.0.0", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.5", + "mkdirp": "^0.5.0", + "propagate": "^1.0.0", + "qs": "^6.5.1", + "semver": "^5.5.0" + }, + "engines": { + "node": ">= 6.0" + } + }, + "node_modules/nock/node_modules/debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/nock/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "node_modules/node-oauth1": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/node-oauth1/-/node-oauth1-1.3.0.tgz", + "integrity": "sha512-0yggixNfrA1KcBwvh/Hy2xAS1Wfs9dcg6TdFf2zN7gilcAigMdrtZ4ybrBSXBgLvGDw9V1p2MRnGBMq7XjTWLg==", + "dev": true + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "dependencies": { + "path-key": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nyc": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-14.1.0.tgz", + "integrity": "sha512-iy9fEV8Emevz3z/AanIZsoGa8F4U2p0JKevZ/F0sk+/B2r9E6Qn+EPs0bpxEhnAt6UPlTL8mQZIaSJy8sK0ZFw==", + "dev": true, + "dependencies": { + "archy": "^1.0.0", + "caching-transform": "^3.0.2", + "convert-source-map": "^1.6.0", + "cp-file": "^6.2.0", + "find-cache-dir": "^2.1.0", + "find-up": "^3.0.0", + "foreground-child": "^1.5.6", + "glob": "^7.1.3", + "istanbul-lib-coverage": "^2.0.5", + "istanbul-lib-hook": "^2.0.7", + "istanbul-lib-instrument": "^3.3.0", + "istanbul-lib-report": "^2.0.8", + "istanbul-lib-source-maps": "^3.0.6", + "istanbul-reports": "^2.2.4", + "js-yaml": "^3.13.1", + "make-dir": "^2.1.0", + "merge-source-map": "^1.1.0", + "resolve-from": "^4.0.0", + "rimraf": "^2.6.3", + "signal-exit": "^3.0.2", + "spawn-wrap": "^1.4.2", + "test-exclude": "^5.2.3", + "uuid": "^3.3.2", + "yargs": "^13.2.2", + "yargs-parser": "^13.0.0" + }, + "bin": { + "nyc": "bin/nyc.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/nyc/node_modules/find-up": { + "version": "3.0.0", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/nyc/node_modules/glob": { + "version": "7.1.3", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/nyc/node_modules/locate-path": { + "version": "3.0.0", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/nyc/node_modules/p-limit": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/nyc/node_modules/p-locate": { + "version": "3.0.0", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/nyc/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/nyc/node_modules/resolve-from": { + "version": "4.0.0", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/nyc/node_modules/rimraf": { + "version": "2.6.3", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/nyc/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "engines": { + "node": "*" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", + "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/object-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.0.tgz", + "integrity": "sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-path": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.11.4.tgz", + "integrity": "sha1-NwrnUvvzfePqcKhhwju6iRVpGUk=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "dependencies": { + "fn.name": "1.x.x" + } + }, + "node_modules/onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "dependencies": { + "mimic-fn": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "dependencies": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "node_modules/optimist/node_modules/minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + }, + "node_modules/optimist/node_modules/wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "dependencies": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/package-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz", + "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.15", + "hasha": "^3.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "dependencies": { + "error-ex": "^1.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse-ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", + "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "node_modules/path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "dependencies": { + "pify": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pkg-conf": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", + "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", + "dev": true, + "dependencies": { + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-conf/node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-conf/node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-conf/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-config": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.1.tgz", + "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", + "dev": true, + "dependencies": { + "debug-log": "^1.0.0", + "find-root": "^1.0.0", + "xtend": "^4.0.1" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "dependencies": { + "find-up": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/postman-collection": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-4.0.0.tgz", + "integrity": "sha512-vDrXG/dclSu6RMqPqBz4ZqoQBwcj/a80sJYsQZmzWJ6dWgXiudPhwu6Vm3C1Hy7zX5W8A6am1Z6vb/TB4eyURA==", + "dev": true, + "dependencies": { + "faker": "5.5.3", + "file-type": "3.9.0", + "http-reasons": "0.1.0", + "iconv-lite": "0.6.3", + "liquid-json": "0.3.1", + "lodash": "4.17.21", + "mime-format": "2.0.1", + "mime-types": "2.1.31", + "postman-url-encoder": "3.0.1", + "semver": "7.3.5", + "uuid": "8.3.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-collection-transformer": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/postman-collection-transformer/-/postman-collection-transformer-4.1.2.tgz", + "integrity": "sha512-3mRM18QALmasbza1LznlwQkymAYM0H79VY1LkR1BUAe8B7hwELofltMNSmpDn27MPGf0w9rPJJOcRSI3MWCCZg==", + "dev": true, + "dependencies": { + "commander": "7.2.0", + "inherits": "2.0.4", + "intel": "1.2.0", + "lodash": "4.17.21", + "semver": "7.3.5", + "strip-json-comments": "3.1.1" + }, + "bin": { + "postman-collection-transformer": "bin/transform-collection.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-collection-transformer/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/postman-collection-transformer/node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/postman-collection-transformer/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-collection-transformer/node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-collection-transformer/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/postman-collection-transformer/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/postman-collection/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postman-collection/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-collection/node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-collection/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/postman-collection/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/postman-request": { + "version": "2.88.1-postman.30", + "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.30.tgz", + "integrity": "sha512-zsGvs8OgNeno1Q44zTgGP2IL7kCqUy4DAtl8/ms0AQpqkIoysrxzR/Zg4kM1Kz8/duBvwxt8NN717wB7SMNm6w==", + "dev": true, + "dependencies": { + "@postman/form-data": "~3.1.1", + "@postman/tunnel-agent": "^0.6.3", + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "brotli": "~1.3.2", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "har-validator": "~5.1.3", + "http-signature": "~1.3.1", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "stream-length": "^1.0.2", + "tough-cookie": "~2.5.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/postman-request/node_modules/http-signature": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.5.tgz", + "integrity": "sha512-NwoTQYSJoFt34jSBbwzDHDofoA61NGXzu6wXh95o1Ry62EnmKjXb/nR/RknLeZ3G/uGwrlKNY2z7uPt+Cdl7Tw==", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.14.1" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/postman-request/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/postman-request/node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/postman-request/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/postman-runtime": { + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/postman-runtime/-/postman-runtime-7.28.2.tgz", + "integrity": "sha512-YjcJwipcOfDFMOTM1/z9t/UB1zhF3ONZuffGhaP+FMG9aDAH2J1moO+PuUbLIcddggWR9ljtDk+O3TBxBmmvtQ==", + "dev": true, + "dependencies": { + "async": "2.6.3", + "aws4": "1.11.0", + "eventemitter3": "4.0.7", + "handlebars": "4.7.7", + "http-reasons": "0.1.0", + "httpntlm": "1.7.7", + "inherits": "2.0.4", + "js-sha512": "0.8.0", + "lodash": "4.17.21", + "node-oauth1": "1.3.0", + "performance-now": "2.1.0", + "postman-collection": "4.0.0", + "postman-request": "2.88.1-postman.30", + "postman-sandbox": "4.0.3", + "postman-url-encoder": "3.0.1", + "resolve-from": "5.0.0", + "serialised-error": "1.1.3", + "tough-cookie": "3.0.1", + "uuid": "3.4.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/postman-runtime/node_modules/handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/postman-runtime/node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/postman-runtime/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/postman-runtime/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/postman-runtime/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postman-runtime/node_modules/tough-cookie": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", + "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", + "dev": true, + "dependencies": { + "ip-regex": "^2.1.0", + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/postman-runtime/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/postman-sandbox": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postman-sandbox/-/postman-sandbox-4.0.3.tgz", + "integrity": "sha512-FCPJsiyxCKU0Rtyz9SnXXCzR54LUlln8u913JHyt0SkqMEbM/Y0qe+6m8zRt/SPxx+rzAZOqWfrCk5oiDyuTsg==", + "dev": true, + "dependencies": { + "lodash": "4.17.21", + "teleport-javascript": "1.0.0", + "uvm": "2.0.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-url-encoder": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/postman-url-encoder/-/postman-url-encoder-3.0.1.tgz", + "integrity": "sha512-dMPqXnkDlstM2Eya+Gw4MIGWEan8TzldDcUKZIhZUsJ/G5JjubfQPhFhVWKzuATDMvwvrWbSjF+8VmAvbu6giw==", + "dev": true, + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/postman-url-encoder/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/precond": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz", + "integrity": "sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/pretty-ms": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", + "integrity": "sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==", + "dev": true, + "dependencies": { + "parse-ms": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "dev": true, + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "node_modules/propagate": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/propagate/-/propagate-1.0.0.tgz", + "integrity": "sha1-AMLa7t2iDofjeCs0Stuhzd1q1wk=", + "dev": true, + "engines": [ + "node >= 0.8.1" + ] + }, + "node_modules/proxy-addr": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", + "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "dependencies": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.9.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "node_modules/psl": { + "version": "1.1.33", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.33.tgz", + "integrity": "sha512-LTDP2uSrsc7XCb5lO7A8BI1qYxRe/8EqlRvMeEl6rsnYAqDOl8xHR+8lSAIVfrNaSAlTPTNOCgNjWcoUL3AZsw==" + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + }, + "node_modules/q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "engines": { + "node": ">=0.6.0", + "teleport": ">=0.2.0" + } + }, + "node_modules/qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/r7insight_node": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/r7insight_node/-/r7insight_node-1.8.4.tgz", + "integrity": "sha512-6cQrzLkaOxdv/SRFXWRJjgFr8a3nXUOT/4IMFuBv+mWzBnu5DJl+HzONAsWYvclrlZnvfa54PaIPqPuPRSlbrQ==", + "dependencies": { + "babel-runtime": "6.6.1", + "codependency": "0.1.4", + "json-stringify-safe": "5.0.1", + "lodash": "4.17.15", + "reconnect-core": "1.3.0", + "semver": "5.1.0" + }, + "engines": { + "iojs": ">=0.10", + "node": ">=0.8.0", + "npm": ">=1.4.6" + } + }, + "node_modules/r7insight_node/node_modules/lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, + "node_modules/r7insight_node/node_modules/semver": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.1.0.tgz", + "integrity": "sha1-hfLPhVBGXE3wAM99hvawVBBqueU=", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "dependencies": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/react-is": { + "version": "16.8.3", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.3.tgz", + "integrity": "sha512-Y4rC1ZJmsxxkkPuMLwvKvlL1Zfpbcu+Bf4ZigkHup3v9EfdYhAlWAaVyA19olXq2o2mGn0w+dFKvk3pVVlYcIA==", + "dev": true + }, + "node_modules/read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "dependencies": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "dependencies": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/reconnect-core": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/reconnect-core/-/reconnect-core-1.3.0.tgz", + "integrity": "sha1-+65SkZp4d9hE4yRtAaLyZwHIM8g=", + "dependencies": { + "backoff": "~2.5.0" + } + }, + "node_modules/regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true, + "engines": { + "node": ">=6.5.0" + } + }, + "node_modules/release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "dependencies": { + "es6-error": "^4.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/request/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "node_modules/require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "dependencies": { + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "dev": true, + "dependencies": { + "path-parse": "^1.0.6" + } + }, + "node_modules/resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "dependencies": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/rimraf": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz", + "integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=", + "optional": true, + "dependencies": { + "glob": "^6.0.1" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "dependencies": { + "is-promise": "^2.1.0" + }, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/run-parallel": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", + "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", + "dev": true + }, + "node_modules/rxjs": { + "version": "5.5.12", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", + "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", + "dev": true, + "dependencies": { + "symbol-observable": "1.0.1" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/safe-json-stringify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.2.0.tgz", + "integrity": "sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==", + "optional": true + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/sax": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", + "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=" + }, + "node_modules/semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "dependencies": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serialised-error": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/serialised-error/-/serialised-error-1.1.3.tgz", + "integrity": "sha512-vybp3GItaR1ZtO2nxZZo8eOo7fnVaNtP3XE2vJKgzkKR2bagCkdJ1EpYYhEMd3qu/80DwQk9KjsNSxE3fXWq0g==", + "dev": true, + "dependencies": { + "object-hash": "^1.1.2", + "stack-trace": "0.0.9", + "uuid": "^3.0.0" + } + }, + "node_modules/serialised-error/node_modules/stack-trace": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", + "integrity": "sha1-qPbq7KkGdMMz58Q5U/J1tFFRBpU=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/serialised-error/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/should": { + "version": "13.2.3", + "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", + "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", + "dev": true, + "dependencies": { + "should-equal": "^2.0.0", + "should-format": "^3.0.3", + "should-type": "^1.4.0", + "should-type-adaptors": "^1.0.1", + "should-util": "^1.0.0" + } + }, + "node_modules/should-equal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", + "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", + "dev": true, + "dependencies": { + "should-type": "^1.4.0" + } + }, + "node_modules/should-format": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", + "dev": true, + "dependencies": { + "should-type": "^1.3.0", + "should-type-adaptors": "^1.0.1" + } + }, + "node_modules/should-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=", + "dev": true + }, + "node_modules/should-type-adaptors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", + "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", + "dev": true, + "dependencies": { + "should-type": "^1.3.0", + "should-util": "^1.0.0" + } + }, + "node_modules/should-util": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.0.tgz", + "integrity": "sha1-yYzaN0qmsZDfi6h8mInCtNtiAGM=", + "dev": true + }, + "node_modules/signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "dev": true, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spawn-wrap": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.3.tgz", + "integrity": "sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw==", + "dev": true, + "dependencies": { + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" + } + }, + "node_modules/spawn-wrap/node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/spawn-wrap/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", + "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "node_modules/sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "engines": { + "node": "*" + } + }, + "node_modules/standard": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/standard/-/standard-12.0.1.tgz", + "integrity": "sha512-UqdHjh87OG2gUrNCSM4QRLF5n9h3TFPwrCNyVlkqu31Hej0L/rc8hzKqVvkb2W3x0WMq7PzZdkLfEcBhVOR6lg==", + "dev": true, + "dependencies": { + "eslint": "~5.4.0", + "eslint-config-standard": "12.0.0", + "eslint-config-standard-jsx": "6.0.2", + "eslint-plugin-import": "~2.14.0", + "eslint-plugin-node": "~7.0.1", + "eslint-plugin-promise": "~4.0.0", + "eslint-plugin-react": "~7.11.1", + "eslint-plugin-standard": "~4.0.0", + "standard-engine": "~9.0.0" + }, + "bin": { + "standard": "bin/cmd.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/standard-engine": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-9.0.0.tgz", + "integrity": "sha512-ZfNfCWZ2Xq67VNvKMPiVMKHnMdvxYzvZkf1AH8/cw2NLDBm5LRsxMqvEJpsjLI/dUosZ3Z1d6JlHDp5rAvvk2w==", + "dev": true, + "dependencies": { + "deglob": "^2.1.0", + "get-stdin": "^6.0.0", + "minimist": "^1.1.0", + "pkg-conf": "^2.0.0" + } + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/stream-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-length/-/stream-length-1.0.2.tgz", + "integrity": "sha1-gnfzy+5JpNqrz9tOL0qbXp8snwA=", + "dev": true, + "dependencies": { + "bluebird": "^2.6.2" + } + }, + "node_modules/stream-length/node_modules/bluebird": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", + "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=", + "dev": true + }, + "node_modules/strftime": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/strftime/-/strftime-0.10.0.tgz", + "integrity": "sha1-s/D6QZKVICpaKJ9ta+n0kJphcZM=", + "dev": true, + "engines": { + "node": ">=0.2.0" + } + }, + "node_modules/string_decoder": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", + "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-ansi/node_modules/ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/superagent": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-4.1.0.tgz", + "integrity": "sha512-FT3QLMasz0YyCd4uIi5HNe+3t/onxMyEho7C3PSqmti3Twgy2rXT4fmkTz6wRL6bTF4uzPcfkUCa8u4JWHw8Ag==", + "dependencies": { + "component-emitter": "^1.2.0", + "cookiejar": "^2.1.2", + "debug": "^4.1.0", + "form-data": "^2.3.3", + "formidable": "^1.2.0", + "methods": "^1.1.1", + "mime": "^2.4.0", + "qs": "^6.6.0", + "readable-stream": "^3.0.6" + }, + "engines": { + "node": ">= 6.0" + } + }, + "node_modules/superagent/node_modules/debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/superagent/node_modules/mime": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", + "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/superagent/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "node_modules/superagent/node_modules/qs": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.6.0.tgz", + "integrity": "sha512-KIJqT9jQJDQx5h5uAVPimw6yVg2SekOKu959OCtktD3FjzbpvaPr8i4zzg07DOMz+igA4W/aNM7OV8H37pFYfA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/swagger-ui-dist": { + "version": "3.25.0", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.25.0.tgz", + "integrity": "sha512-vwvJPPbdooTvDwLGzjIXinOXizDJJ6U1hxnJL3y6U3aL1d2MSXDmKg2139XaLBhsVZdnQJV2bOkX4reB+RXamg==" + }, + "node_modules/swagger-ui-express": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/swagger-ui-express/-/swagger-ui-express-4.1.3.tgz", + "integrity": "sha512-f8SEn4YWkKh/HGK0ZjuA2VqA78i1aY6OIa5cqYNgOkBobfHV6Mz4dphQW/us8HYhEFfbENq329PyfIonWfzFrw==", + "dependencies": { + "swagger-ui-dist": "^3.18.1" + }, + "engines": { + "node": ">= v0.10.32" + } + }, + "node_modules/symbol": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/symbol/-/symbol-0.3.1.tgz", + "integrity": "sha1-tvmpANSWpX8CQI8iGYwQndoGMEE=", + "dev": true + }, + "node_modules/symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/table": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", + "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", + "dev": true, + "dependencies": { + "ajv": "^6.0.1", + "ajv-keywords": "^3.0.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", + "slice-ansi": "1.0.0", + "string-width": "^2.1.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/tc-api-testing-lib": { + "version": "1.0.0", + "resolved": "git+ssh://git@github.com/topcoder-platform/api-automated-testing.git#79e62f50bd2e80f5aba3a3acc41af9ffbfbfa405", + "dev": true, + "license": "none", + "dependencies": { + "axios": "^0.21.1", + "config": "^3.3.6", + "handlebars": "^4.7.7", + "joi": "^17.4.0", + "lodash": "^4.17.21", + "newman": "^5.2.3", + "newman-reporter-html": "^1.0.5", + "tc-core-library-js": "appirio-tech/tc-core-library-js.git#v2.6.4", + "winston": "^3.3.3" + } + }, + "node_modules/tc-api-testing-lib/node_modules/axios": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.10.0" + } + }, + "node_modules/tc-api-testing-lib/node_modules/follow-redirects": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz", + "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/tc-api-testing-lib/node_modules/handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/tc-api-testing-lib/node_modules/joi": { + "version": "17.4.0", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.4.0.tgz", + "integrity": "sha512-F4WiW2xaV6wc1jxete70Rw4V/VuMd6IN+a5ilZsxG4uYtUXWu2kq9W5P2dz30e7Gmw8RCbY/u/uk+dMPma9tAg==", + "dev": true, + "dependencies": { + "@hapi/hoek": "^9.0.0", + "@hapi/topo": "^5.0.0", + "@sideway/address": "^4.1.0", + "@sideway/formula": "^3.0.0", + "@sideway/pinpoint": "^2.0.0" + } + }, + "node_modules/tc-api-testing-lib/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tc-bus-api-wrapper": { + "resolved": "git+ssh://git@github.com/topcoder-platform/tc-bus-api-wrapper.git#a52f69ef72a80d27aeeab790fb18eb419a904862", + "dependencies": { + "joi": "^13.4.0", + "lodash": "^4.17.15", + "superagent": "^3.8.3", + "tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.4" + } + }, + "node_modules/tc-bus-api-wrapper/node_modules/debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/tc-bus-api-wrapper/node_modules/hoek": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-5.0.4.tgz", + "integrity": "sha512-Alr4ZQgoMlnere5FZJsIyfIjORBqZll5POhDsF4q64dPuJR6rNxXdDxtHSQq8OXRurhmx+PWYEE8bXRROY8h0w==", + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/tc-bus-api-wrapper/node_modules/joi": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/joi/-/joi-13.7.0.tgz", + "integrity": "sha512-xuY5VkHfeOYK3Hdi91ulocfuFopwgbSORmIwzcwHKESQhC7w1kD5jaVSPnqDxS2I8t3RZ9omCKAxNwXN5zG1/Q==", + "dependencies": { + "hoek": "5.x.x", + "isemail": "3.x.x", + "topo": "3.x.x" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/tc-bus-api-wrapper/node_modules/lru-memoizer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/lru-memoizer/-/lru-memoizer-2.1.2.tgz", + "integrity": "sha512-N5L5xlnVcbIinNn/TJ17vHBZwBMt9t7aJDz2n97moWubjNl6VO9Ao2XuAGBBddkYdjrwR9HfzXbT6NfMZXAZ/A==", + "dependencies": { + "lodash.clonedeep": "^4.5.0", + "lru-cache": "~4.0.0" + } + }, + "node_modules/tc-bus-api-wrapper/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + }, + "node_modules/tc-bus-api-wrapper/node_modules/readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/tc-bus-api-wrapper/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/tc-bus-api-wrapper/node_modules/superagent": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz", + "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", + "dependencies": { + "component-emitter": "^1.2.0", + "cookiejar": "^2.1.0", + "debug": "^3.1.0", + "extend": "^3.0.0", + "form-data": "^2.3.1", + "formidable": "^1.2.0", + "methods": "^1.1.1", + "mime": "^1.4.1", + "qs": "^6.5.1", + "readable-stream": "^2.3.5" + }, + "engines": { + "node": ">= 4.0" + } + }, + "node_modules/tc-bus-api-wrapper/node_modules/tc-core-library-js": { + "resolved": "git+ssh://git@github.com/appirio-tech/tc-core-library-js.git#df0b36c51cf80918194cbff777214b3c0cf5a151", + "dependencies": { + "axios": "^0.19.0", + "bunyan": "^1.8.12", + "jsonwebtoken": "^8.5.1", + "jwks-rsa": "^1.6.0", + "lodash": "^4.17.15", + "millisecond": "^0.1.2", + "r7insight_node": "^1.8.4", + "request": "^2.88.0" + }, + "engines": { + "node": ">= 5" + } + }, + "node_modules/tc-bus-api-wrapper/node_modules/tc-core-library-js/node_modules/axios": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "dependencies": { + "follow-redirects": "1.5.10" + } + }, + "node_modules/tc-bus-api-wrapper/node_modules/tc-core-library-js/node_modules/debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/tc-bus-api-wrapper/node_modules/tc-core-library-js/node_modules/jwks-rsa": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/jwks-rsa/-/jwks-rsa-1.8.0.tgz", + "integrity": "sha512-+HYROHD5fsYQCNrJ37RSr2NjbN2/V9YT+yVF3oJxLmPIZWrmp1SOl1hMw2RcuNh+LGA2bGZIhRKGiMjhQa/b7Q==", + "dependencies": { + "@types/express-jwt": "0.0.42", + "axios": "^0.19.2", + "debug": "^4.1.0", + "jsonwebtoken": "^8.5.1", + "limiter": "^1.1.4", + "lru-memoizer": "^2.0.1", + "ms": "^2.1.2" + } + }, + "node_modules/tc-bus-api-wrapper/node_modules/tc-core-library-js/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/tc-core-library-js": { + "resolved": "git+ssh://git@github.com/appirio-tech/tc-core-library-js.git#df0b36c51cf80918194cbff777214b3c0cf5a151", + "dependencies": { + "axios": "^0.19.0", + "bunyan": "^1.8.12", + "jsonwebtoken": "^8.5.1", + "jwks-rsa": "^1.6.0", + "lodash": "^4.17.15", + "millisecond": "^0.1.2", + "r7insight_node": "^1.8.4", + "request": "^2.88.0" + }, + "engines": { + "node": ">= 5" + } + }, + "node_modules/teleport-javascript": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/teleport-javascript/-/teleport-javascript-1.0.0.tgz", + "integrity": "sha512-j1llvWVFyEn/6XIFDfX5LAU43DXe0GCt3NfXDwJ8XpRRMkS+i50SAkonAONBy+vxwPFBd50MFU8a2uj8R/ccLg==", + "dev": true + }, + "node_modules/test-exclude": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", + "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", + "dev": true, + "dependencies": { + "glob": "^7.1.3", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/test-exclude/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/test-exclude/node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/test-exclude/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/test-exclude/node_modules/p-limit": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/test-exclude/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/test-exclude/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/test-exclude/node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/test-exclude/node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/test-exclude/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/test-exclude/node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/test-exclude/node_modules/read-pkg-up": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", + "dev": true, + "dependencies": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/topo": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/topo/-/topo-3.0.3.tgz", + "integrity": "sha512-IgpPtvD4kjrJ7CRA3ov2FhWQADwv+Tdqbsf1ZnPUSAtCJ9e1Z44MmoSGDXGk4IppoZA7jd/QRkNddlLJWlUZsQ==", + "dependencies": { + "hoek": "6.x.x" + } + }, + "node_modules/tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dependencies": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tough-cookie/node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "node_modules/trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/triple-beam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", + "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.18" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/uglify-js": { + "version": "3.12.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.4.tgz", + "integrity": "sha512-L5i5jg/SHkEqzN18gQMTWsZk3KelRsfD1wUVNqtq0kzqWQqcJjyL8yc1o8hJgRrWqrAl2mUFbhfznEIoi7zi2A==", + "dev": true, + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/underscore": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==", + "dev": true + }, + "node_modules/uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uri-js/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", + "dependencies": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "node_modules/utcstring": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/utcstring/-/utcstring-0.1.0.tgz", + "integrity": "sha1-Qw/VEKt/yVtdWRDJAteYgMIIQ2s=", + "dev": true + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", + "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/uvm": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/uvm/-/uvm-2.0.2.tgz", + "integrity": "sha512-Ra+aPiS5GXAbwXmyNExqdS42sTqmmx4XWEDF8uJlsTfOkKf9Rd9xNgav1Yckv4HfVEZg4iOFODWHFYuJ+9Fzfg==", + "dev": true, + "dependencies": { + "flatted": "3.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "node_modules/winston": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", + "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", + "dependencies": { + "@dabh/diagnostics": "^2.0.2", + "async": "^3.1.0", + "is-stream": "^2.0.0", + "logform": "^2.2.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.4.0" + }, + "engines": { + "node": ">= 6.4.0" + } + }, + "node_modules/winston-transport": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.4.0.tgz", + "integrity": "sha512-Lc7/p3GtqtqPBYYtS6KCN3c77/2QCev51DvcJKbkFPQNoj1sinkGwLGFDxkXY9J6p9+EPnYs+D90uwbnaiURTw==", + "dependencies": { + "readable-stream": "^2.3.7", + "triple-beam": "^1.2.0" + }, + "engines": { + "node": ">= 6.4.0" + } + }, + "node_modules/winston-transport/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/winston-transport/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/winston/node_modules/async": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==" + }, + "node_modules/winston/node_modules/is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "dependencies": { + "mkdirp": "^0.5.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/write-file-atomic": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.2.tgz", + "integrity": "sha512-s0b6vB3xIVRLWywa6X9TOMA7k9zio0TMOsl9ZnDkliA/cfJlpHXAscj0gbHVJiTdIuAYpIyqS5GW91fqm6gG5g==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "node_modules/xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "node_modules/xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/xss": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/xss/-/xss-1.0.7.tgz", + "integrity": "sha512-A9v7tblGvxu8TWXQC9rlpW96a+LN1lyw6wyhpTmmGW+FwRMactchBR3ROKSi33UPCUcUHSu8s9YP6F+K3Mw//w==", + "dependencies": { + "commander": "^2.20.3", + "cssfilter": "0.0.10" + }, + "bin": { + "xss": "bin/xss" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/xss/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "node_modules/yamljs": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.3.0.tgz", + "integrity": "sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==", + "dependencies": { + "argparse": "^1.0.7", + "glob": "^7.0.5" + }, + "bin": { + "json2yaml": "bin/json2yaml", + "yaml2json": "bin/yaml2json" + } + }, + "node_modules/yamljs/node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/yargs": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz", + "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==", + "dev": true, + "dependencies": { + "cliui": "^4.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "os-locale": "^3.1.0", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.0.0" + } + }, + "node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/p-limit": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + } + }, "dependencies": { "@babel/code-frame": { "version": "7.0.0", @@ -128,6 +7293,31 @@ "to-fast-properties": "^2.0.0" } }, + "@dabh/diagnostics": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.2.tgz", + "integrity": "sha512-+A1YivoVDNNVCdfozHSR8v/jyuuLTMXwjWuxPFlFlUapXoGc+Gj9mDlTDDfrwl7rXCl2tNZ0kE8sIBO6YOn96Q==", + "requires": { + "colorspace": "1.1.x", + "enabled": "2.0.x", + "kuler": "^2.0.0" + } + }, + "@hapi/hoek": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.0.tgz", + "integrity": "sha512-sqKVVVOe5ivCaXDWivIJYVSaEgdQK9ul7a4Kity5Iw7u9+wBAPbX1RMSnLLmp7O4Vzj0WOWwMAJsTL00xwaNug==", + "dev": true + }, + "@hapi/topo": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", + "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "dev": true, + "requires": { + "@hapi/hoek": "^9.0.0" + } + }, "@postman/form-data": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@postman/form-data/-/form-data-3.1.1.tgz", @@ -137,17 +7327,6 @@ "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "mime-types": "^2.1.12" - }, - "dependencies": { - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - } } }, "@postman/tunnel-agent": { @@ -159,6 +7338,27 @@ "safe-buffer": "^5.0.1" } }, + "@sideway/address": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.2.tgz", + "integrity": "sha512-idTz8ibqWFrPU8kMirL0CoPH/A29XOzzAzpyN3zQ4kAWnzmNfFmRaoMNN6VI8ske5M73HZyhIaW4OuSFIdM4oA==", + "dev": true, + "requires": { + "@hapi/hoek": "^9.0.0" + } + }, + "@sideway/formula": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz", + "integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==", + "dev": true + }, + "@sideway/pinpoint": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", + "dev": true + }, "@types/body-parser": { "version": "1.19.0", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.0.tgz", @@ -250,21 +7450,6 @@ "requires": { "mime-types": "~2.1.24", "negotiator": "0.6.2" - }, - "dependencies": { - "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" - }, - "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", - "requires": { - "mime-db": "1.40.0" - } - } } }, "acorn": { @@ -362,12 +7547,6 @@ "es-abstract": "^1.7.0" } }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -388,11 +7567,12 @@ "dev": true }, "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, "requires": { - "lodash": "^4.17.11" + "lodash": "^4.17.14" } }, "asynckit": { @@ -429,9 +7609,9 @@ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "axios": { "version": "0.19.2", @@ -702,9 +7882,9 @@ } }, "cli-progress": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.8.2.tgz", - "integrity": "sha512-qRwBxLldMSfxB+YGFgNRaj5vyyHe1yMpVeDL79c+7puGujdKJHQHydgqXDcrkvQgJ5U/d3lpf6vffSoVVUftVQ==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.9.0.tgz", + "integrity": "sha512-g7rLWfhAo/7pF+a/STFH/xPyosaL1zgADhI0OM83hl3c7S43iGvJWEAV2QuDOnQ8i6EMBj/u4+NTd0d5L+4JfA==", "dev": true, "requires": { "colors": "^1.1.2", @@ -730,9 +7910,9 @@ "dev": true }, "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", "dev": true, "requires": { "emoji-regex": "^8.0.0", @@ -863,37 +8043,32 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "color-string": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", - "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.5.tgz", + "integrity": "sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==", "requires": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" } }, - "colornames": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/colornames/-/colornames-1.1.1.tgz", - "integrity": "sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y=" - }, "colors": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==" }, "colorspace": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.1.tgz", - "integrity": "sha512-pI3btWyiuz7Ken0BWh9Elzsmv2bM9AhA7psXib4anUXy/orfZ/E0MbQwhSOG/9L8hLlalqrU0UhOuqxW1YjmVw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.2.tgz", + "integrity": "sha512-vt+OoIP2d76xLhjwbBaucYlNSpPsrJWPlBTtwCpQKIu6/CSMutyzX93O/Do0qzpH3YoHEes8YEFXyZ797rEhzQ==", "requires": { "color": "3.0.x", "text-hex": "1.0.x" } }, "combined-stream": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "requires": { "delayed-stream": "~1.0.0" } @@ -921,11 +8096,11 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "config": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/config/-/config-3.0.1.tgz", - "integrity": "sha512-TBNrrk2b6AybUohqXw2AydglFBL9b/+1GG93Di6Fm6x1SyVJ5PYgo+mqY2X0KpU9m0PJDSbFaC5H95utSphtLw==", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/config/-/config-3.3.6.tgz", + "integrity": "sha512-Hj5916C5HFawjYJat1epbyY2PlAgLpBtDUlr0MxGLgo3p5+7kylyvnRY18PqJHgnNWXcdd0eWDemT7eYWuFgwg==", "requires": { - "json5": "^1.0.1" + "json5": "^2.1.1" } }, "contains-path": { @@ -1027,9 +8202,9 @@ "integrity": "sha1-xtJnJjKi5cg+AT5oZKQs6N79IK4=" }, "csv-parse": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-4.14.2.tgz", - "integrity": "sha512-YE2xlTKtM035/94llhgsp9qFQxGi47EkQJ1pZ+mLT/98GpIsbjkMGAb7Rmu9hNxVfYFOLf10hP+rPVqnoccLgw==", + "version": "4.16.0", + "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-4.16.0.tgz", + "integrity": "sha512-Zb4tGPANH4SW0LgC9+s9Mnequs9aqn7N3/pCqNbVjs2XhEF6yWNU2Vm4OGl1v2Go9nw8rXt87Cm2QN/o6Vpqgg==", "dev": true }, "dashdash": { @@ -1151,19 +8326,9 @@ "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" }, "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" - }, - "diagnostics": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/diagnostics/-/diagnostics-1.1.1.tgz", - "integrity": "sha512-8wn1PmdunLJ9Tqbx+Fx/ZEuHfJf4NKSN2ZBj7SJC/OWRWha843+WsTjqMe1B5E3p28jqBlp+mJ2fPVxPyNgYKQ==", - "requires": { - "colorspace": "1.1.x", - "enabled": "1.0.x", - "kuler": "1.0.x" - } + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, "diff": { "version": "3.5.0", @@ -1180,55 +8345,6 @@ "esutils": "^2.0.2" } }, - "dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", - "dev": true, - "requires": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - }, - "dependencies": { - "domelementtype": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", - "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==", - "dev": true - }, - "entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", - "dev": true - } - } - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, "dtrace-provider": { "version": "0.8.7", "resolved": "https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.8.7.tgz", @@ -1381,12 +8497,9 @@ "dev": true }, "enabled": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/enabled/-/enabled-1.0.2.tgz", - "integrity": "sha1-ll9lE9LC0cX0ZStkouM5ZGf8L5M=", - "requires": { - "env-variable": "0.0.x" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" }, "encodeurl": { "version": "1.0.2", @@ -1402,17 +8515,6 @@ "once": "^1.4.0" } }, - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", - "dev": true - }, - "env-variable": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/env-variable/-/env-variable-0.0.5.tgz", - "integrity": "sha512-zoB603vQReOFvTg5xMl9I1P2PnHsHQQKTEowsKKD7nseUfJq6UWzK+4YtlWUO1nhiQUxe6XMkk+JleSZD1NZFA==" - }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -1844,9 +8946,9 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "faker": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/faker/-/faker-5.1.0.tgz", - "integrity": "sha512-RrWKFSSA/aNLP0g3o2WW1Zez7/MnMr7xkiZmoCfAGZmdkDQZ6l2KtuXHN5XjdvpRjDl8+3vf+Rrtl06Z352+Mw==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/faker/-/faker-5.5.3.tgz", + "integrity": "sha512-wLTv2a28wjUyWkbnX7u/ABZBkUkIF2fCd73V6P2oFqEGEktDfzWx4UxrSqtPRw0xPRAcjeAOIiJWqZm3pP4u3g==", "dev": true }, "fast-deep-equal": { @@ -1866,14 +8968,14 @@ "dev": true }, "fast-safe-stringify": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz", - "integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg==" + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" }, "fecha": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fecha/-/fecha-2.3.3.tgz", - "integrity": "sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg==" + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.1.tgz", + "integrity": "sha512-MMMQ0ludy/nBs1/o0zVOiKTpG7qMbonKUzjJgQFEuvq6INZ1OraKPRAWkBq5vlKLOUMpmNYG1JoN3oDPUQ9m3Q==" }, "figures": { "version": "2.0.0", @@ -1901,9 +9003,9 @@ "dev": true }, "filesize": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.1.0.tgz", - "integrity": "sha512-LpCHtPQ3sFx67z+uh2HnSyWSLLu5Jxo21795uRDuar/EOuYWXib5EmPaGIBuSnRqH2IODiKA2k5re/K9OnN/Yg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.3.0.tgz", + "integrity": "sha512-ytx0ruGpDHKWVoiui6+BY/QMNngtDQ/pJaFwfBpQif0J63+E8DLdFyqS3NkKQn7vIruUEpoGD9JUJSg7Kp+I0g==", "dev": true }, "finalhandler": { @@ -2045,11 +9147,16 @@ } }, "flatted": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz", - "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", "dev": true }, + "fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" + }, "follow-redirects": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", @@ -2209,16 +9316,15 @@ "dev": true }, "handlebars": { - "version": "4.7.6", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", - "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz", + "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==", "dev": true, "requires": { - "minimist": "^1.2.5", "neo-async": "^2.6.0", + "optimist": "^0.6.1", "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" + "uglify-js": "^3.1.4" }, "dependencies": { "source-map": { @@ -2309,20 +9415,6 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, - "htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "dev": true, - "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - } - }, "http-aws-es": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/http-aws-es/-/http-aws-es-6.0.0.tgz", @@ -2366,19 +9458,19 @@ "integrity": "sha1-nNDnE5F3PQZxtInUHLxQlKpBY7Y=" }, "httpntlm": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.7.6.tgz", - "integrity": "sha1-aZHoNSg2AH1nEBuD247Q+RX5BtA=", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.7.7.tgz", + "integrity": "sha512-Pv2Rvrz8H0qv1Dne5mAdZ9JegG1uc6Vu5lwLflIY6s8RKHdZQbW39L4dYswSgqMDT0pkJILUTKjeyU0VPNRZjA==", "dev": true, "requires": { "httpreq": ">=0.4.22", - "underscore": "~1.7.0" + "underscore": "~1.12.1" } }, "httpreq": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.4.24.tgz", - "integrity": "sha1-QzX/2CzZaWaKOUZckprGHWOTYn8=", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.5.2.tgz", + "integrity": "sha512-2Jm+x9WkExDOeFRrdBCBSpLPT5SokTcRHkunV3pjKmX/cx6av8zQ0WtHUMDrYb6O4hBFzNU6sxJEypvRUVYKnw==", "dev": true }, "humanize-ms": { @@ -2563,7 +9655,8 @@ "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true }, "is-symbol": { "version": "1.0.2", @@ -2814,11 +9907,11 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", "requires": { - "minimist": "^1.2.0" + "minimist": "^1.2.5" } }, "jsonwebtoken": { @@ -2919,12 +10012,9 @@ } }, "kuler": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/kuler/-/kuler-1.0.1.tgz", - "integrity": "sha512-J9nVUucG1p/skKul6DU3PUZrhs0LPulNaeUOox0IyXDi8S4CztTHs1gQphhuZmzXG7VOQSf6NJfKuzteQLv9gQ==", - "requires": { - "colornames": "^1.1.1" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" }, "lcid": { "version": "2.0.0", @@ -2979,21 +10069,15 @@ } }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" }, - "lodash.escaperegexp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", - "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=", - "dev": true - }, "lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", @@ -3030,33 +10114,27 @@ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" }, - "lodash.mergewith": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", - "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", - "dev": true - }, "lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" }, "logform": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.1.2.tgz", - "integrity": "sha512-+lZh4OpERDBLqjiwDLpAWNQu6KMjnlXH2ByZwCuSqVPJletw0kTWJf5CgSNAUKn1KUkv3m2cUz/LK8zyEy7wzQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz", + "integrity": "sha512-N0qPlqfypFx7UHNn4B3lzS/b0uLqt2hmuoa+PpuXNYgozdJYAyauF5Ky0BWVjrxDlMWiT3qN4zPq3vVAfZy7Yg==", "requires": { "colors": "^1.2.1", "fast-safe-stringify": "^2.0.4", - "fecha": "^2.3.3", + "fecha": "^4.2.0", "ms": "^2.1.1", "triple-beam": "^1.3.0" }, "dependencies": { "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" } } }, @@ -3114,12 +10192,6 @@ "p-defer": "^1.0.0" } }, - "marked": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/marked/-/marked-1.2.7.tgz", - "integrity": "sha512-No11hFYcXr/zkBvL6qFmAp1z6BKY3zqLMHny/JN/ey+al7qwCM2+CMBL9BOgqMxZU36fz4cCWfn2poWIf7QRXA==", - "dev": true - }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -3182,25 +10254,25 @@ "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" }, "mime-db": { - "version": "1.38.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", - "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==" + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", + "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==" }, "mime-format": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mime-format/-/mime-format-2.0.0.tgz", - "integrity": "sha1-4p+IkeKE14JwJG8AUNaDS9u+EzI=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mime-format/-/mime-format-2.0.1.tgz", + "integrity": "sha512-XxU3ngPbEnrYnNbIX+lYSaYg0M01v6p2ntd2YaFksTu0vayaw5OJvbdRyWs07EYRlLED5qadUZ+xo+XhOvFhwg==", "dev": true, "requires": { "charset": "^1.0.0" } }, "mime-types": { - "version": "2.1.22", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", - "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", + "version": "2.1.31", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", + "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", "requires": { - "mime-db": "~1.38.0" + "mime-db": "1.48.0" } }, "mimic-fn": { @@ -3226,6 +10298,7 @@ "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "devOptional": true, "requires": { "minimist": "^1.2.5" } @@ -3359,28 +10432,28 @@ "dev": true }, "newman": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/newman/-/newman-5.2.2.tgz", - "integrity": "sha512-aRkh8eeRkKBlwxwBSdYQFZVLvSNMfRDmwPUfddlYR6PwZVKwukmoJmo9QTkRmo6vehgMmt2RTVkfwIIp73X1gg==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/newman/-/newman-5.2.4.tgz", + "integrity": "sha512-RFo3Bteh8CMDD4/eld+ItQ1trrtLN9Mlwk/6mnk2/lBKG08U+ysREwk8Jy74X+a0vmpVCljlGk5MifdcCdkkRg==", "dev": true, "requires": { "async": "3.2.0", "chardet": "1.3.0", - "cli-progress": "3.8.2", + "cli-progress": "3.9.0", "cli-table3": "0.6.0", "colors": "1.4.0", - "commander": "6.2.1", - "csv-parse": "4.14.2", + "commander": "7.2.0", + "csv-parse": "4.16.0", "eventemitter3": "4.0.7", - "filesize": "6.1.0", - "lodash": "4.17.20", + "filesize": "6.3.0", + "lodash": "4.17.21", "mkdirp": "1.0.4", - "postman-collection": "3.6.9", - "postman-collection-transformer": "4.0.0", - "postman-request": "2.88.1-postman.28", - "postman-runtime": "7.26.10", + "postman-collection": "4.0.0", + "postman-collection-transformer": "4.1.2", + "postman-request": "2.88.1-postman.30", + "postman-runtime": "7.28.2", "pretty-ms": "7.0.1", - "semver": "7.3.4", + "semver": "7.3.5", "serialised-error": "1.1.3", "tough-cookie": "3.0.1", "word-wrap": "1.2.3", @@ -3406,15 +10479,9 @@ "dev": true }, "commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", - "dev": true - }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", "dev": true }, "lru-cache": { @@ -3439,9 +10506,9 @@ "dev": true }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -3472,6 +10539,41 @@ } } }, + "newman-reporter-html": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/newman-reporter-html/-/newman-reporter-html-1.0.5.tgz", + "integrity": "sha512-Kz8ejzJqDaasyqNuP8F7bBYzsts7JP3wBfdRQDOYPCUchVQF63KsbxtxbGadyzOeXcZsXs6YT3pe4FFlN51jcw==", + "dev": true, + "requires": { + "filesize": "6.0.1", + "handlebars": "4.5.3", + "lodash": "4.17.15", + "pretty-ms": "5.1.0" + }, + "dependencies": { + "filesize": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.0.1.tgz", + "integrity": "sha512-u4AYWPgbI5GBhs6id1KdImZWn5yfyFrrQ8OWZdN7ZMfA8Bf4HcO0BGo9bmUIEV8yrp8I1xVfJ/dn90GtFNNJcg==", + "dev": true + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "pretty-ms": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-5.1.0.tgz", + "integrity": "sha512-4gaK1skD2gwscCfkswYQRmddUb2GJZtzDGRjHWadVHtK/DIKFufa12MvES6/xu1tVbUYeia5bmLcwJtZJQUqnw==", + "dev": true, + "requires": { + "parse-ms": "^2.1.0" + } + } + } + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -3580,7 +10682,6 @@ "dependencies": { "find-up": { "version": "3.0.0", - "resolved": false, "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { @@ -3589,7 +10690,6 @@ }, "glob": { "version": "7.1.3", - "resolved": false, "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "requires": { @@ -3603,7 +10703,6 @@ }, "locate-path": { "version": "3.0.0", - "resolved": false, "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { @@ -3622,7 +10721,6 @@ }, "p-locate": { "version": "3.0.0", - "resolved": false, "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { @@ -3637,13 +10735,11 @@ }, "resolve-from": { "version": "4.0.0", - "resolved": false, "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, "rimraf": { "version": "2.6.3", - "resolved": false, "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { @@ -3702,9 +10798,12 @@ } }, "one-time": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/one-time/-/one-time-0.0.4.tgz", - "integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "requires": { + "fn.name": "1.x.x" + } }, "onetime": { "version": "2.0.1", @@ -3715,6 +10814,30 @@ "mimic-fn": "^1.0.0" } }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } + }, "optionator": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", @@ -3952,71 +11075,34 @@ "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", "dev": true }, - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, "postman-collection": { - "version": "3.6.9", - "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-3.6.9.tgz", - "integrity": "sha512-R3A4tM/Ll6ekkfsXqqefR2r/jSyubXc9Pa/DQSbocEUKzdT3QMMb0QR5SHNjDuR1qE+bywC5dyD2FO2+DFXJ6w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-4.0.0.tgz", + "integrity": "sha512-vDrXG/dclSu6RMqPqBz4ZqoQBwcj/a80sJYsQZmzWJ6dWgXiudPhwu6Vm3C1Hy7zX5W8A6am1Z6vb/TB4eyURA==", "dev": true, "requires": { - "escape-html": "1.0.3", - "faker": "5.1.0", + "faker": "5.5.3", "file-type": "3.9.0", "http-reasons": "0.1.0", - "iconv-lite": "0.6.2", + "iconv-lite": "0.6.3", "liquid-json": "0.3.1", - "lodash": "4.17.20", - "marked": "1.2.7", - "mime-format": "2.0.0", - "mime-types": "2.1.28", + "lodash": "4.17.21", + "mime-format": "2.0.1", + "mime-types": "2.1.31", "postman-url-encoder": "3.0.1", - "sanitize-html": "1.20.1", - "semver": "7.3.4", - "uuid": "3.4.0" + "semver": "7.3.5", + "uuid": "8.3.2" }, "dependencies": { "iconv-lite": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", - "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", - "dev": true - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -4026,34 +11112,19 @@ "yallist": "^4.0.0" } }, - "mime-db": { - "version": "1.45.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", - "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==", - "dev": true - }, - "mime-types": { - "version": "2.1.28", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", - "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", - "dev": true, - "requires": { - "mime-db": "1.45.0" - } - }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" } }, "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true }, "yallist": { @@ -4065,23 +11136,23 @@ } }, "postman-collection-transformer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postman-collection-transformer/-/postman-collection-transformer-4.0.0.tgz", - "integrity": "sha512-AGNGiSvMR7uJpuf2PpYbteYTsE/xsutyuUTaIRCcBhw8h0PS4vyQHua15uNB+PRaNsV8wKFm30T6z23yUg0rKg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/postman-collection-transformer/-/postman-collection-transformer-4.1.2.tgz", + "integrity": "sha512-3mRM18QALmasbza1LznlwQkymAYM0H79VY1LkR1BUAe8B7hwELofltMNSmpDn27MPGf0w9rPJJOcRSI3MWCCZg==", "dev": true, "requires": { - "commander": "6.2.0", + "commander": "7.2.0", "inherits": "2.0.4", "intel": "1.2.0", - "lodash": "4.17.20", - "semver": "7.3.4", + "lodash": "4.17.21", + "semver": "7.3.5", "strip-json-comments": "3.1.1" }, "dependencies": { "commander": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz", - "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", "dev": true }, "inherits": { @@ -4090,12 +11161,6 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", - "dev": true - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -4106,9 +11171,9 @@ } }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -4129,9 +11194,9 @@ } }, "postman-request": { - "version": "2.88.1-postman.28", - "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.28.tgz", - "integrity": "sha512-QjhC9tIuHZTlYJafzCz7u+Nq57NgtOhJmt94RjcNyzpIts1QbihmAgYm0OhNoqcOIU91sNi2aYw2PCyAJR3kcQ==", + "version": "2.88.1-postman.30", + "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.30.tgz", + "integrity": "sha512-zsGvs8OgNeno1Q44zTgGP2IL7kCqUy4DAtl8/ms0AQpqkIoysrxzR/Zg4kM1Kz8/duBvwxt8NN717wB7SMNm6w==", "dev": true, "requires": { "@postman/form-data": "~3.1.1", @@ -4194,25 +11259,25 @@ } }, "postman-runtime": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/postman-runtime/-/postman-runtime-7.26.10.tgz", - "integrity": "sha512-rYrSF/G0FoWHvOfbEuKVAgKYU8Nl6ow4+iYfdpRfJuTNcrHmfsdumzzdRJ8n0ZY0awAyrrtcAUr/NvSfdof3qA==", + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/postman-runtime/-/postman-runtime-7.28.2.tgz", + "integrity": "sha512-YjcJwipcOfDFMOTM1/z9t/UB1zhF3ONZuffGhaP+FMG9aDAH2J1moO+PuUbLIcddggWR9ljtDk+O3TBxBmmvtQ==", "dev": true, "requires": { "async": "2.6.3", "aws4": "1.11.0", "eventemitter3": "4.0.7", - "handlebars": "4.7.6", + "handlebars": "4.7.7", "http-reasons": "0.1.0", - "httpntlm": "1.7.6", + "httpntlm": "1.7.7", "inherits": "2.0.4", "js-sha512": "0.8.0", - "lodash": "4.17.20", + "lodash": "4.17.21", "node-oauth1": "1.3.0", "performance-now": "2.1.0", - "postman-collection": "3.6.9", - "postman-request": "2.88.1-postman.28", - "postman-sandbox": "4.0.1", + "postman-collection": "4.0.0", + "postman-request": "2.88.1-postman.30", + "postman-sandbox": "4.0.3", "postman-url-encoder": "3.0.1", "resolve-from": "5.0.0", "serialised-error": "1.1.3", @@ -4220,33 +11285,25 @@ "uuid": "3.4.0" }, "dependencies": { - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", "dev": true, "requires": { - "lodash": "^4.17.14" + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" } }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true - }, "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", - "dev": true - }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -4259,6 +11316,12 @@ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, "tough-cookie": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", @@ -4279,22 +11342,14 @@ } }, "postman-sandbox": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postman-sandbox/-/postman-sandbox-4.0.1.tgz", - "integrity": "sha512-m0Jw95y5kzSdCY3yWf/hZlkqYxRyBG5sxqiI2D/48nKiHnYLkyMSHErRDJbMj7K4tjXBXn+BKWpWnRsf+iBdlw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postman-sandbox/-/postman-sandbox-4.0.3.tgz", + "integrity": "sha512-FCPJsiyxCKU0Rtyz9SnXXCzR54LUlln8u913JHyt0SkqMEbM/Y0qe+6m8zRt/SPxx+rzAZOqWfrCk5oiDyuTsg==", "dev": true, "requires": { - "lodash": "4.17.20", + "lodash": "4.17.21", "teleport-javascript": "1.0.0", - "uvm": "2.0.1" - }, - "dependencies": { - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", - "dev": true - } + "uvm": "2.0.2" } }, "postman-url-encoder": { @@ -4480,9 +11535,9 @@ } }, "readable-stream": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.2.0.tgz", - "integrity": "sha512-RV20kLjdmpZuTF1INEb9IA3L68Nmi+Ri7ppZqo78wj//Pn62fCoJyV9zalccNzDD/OuJpMG4f+pfMl8+L6QdGw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -4642,24 +11697,6 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "sanitize-html": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.20.1.tgz", - "integrity": "sha512-txnH8TQjaQvg2Q0HY06G6CDJLVYCpbnxrdO0WN8gjCKaU5J0KbyGYhZxx5QJg3WLZ1lB7XU9kDkfrCXUozqptA==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "htmlparser2": "^3.10.0", - "lodash.clonedeep": "^4.5.0", - "lodash.escaperegexp": "^4.1.2", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.mergewith": "^4.6.1", - "postcss": "^7.0.5", - "srcset": "^1.0.0", - "xtend": "^4.0.1" - } - }, "sax": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", @@ -4918,16 +11955,6 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, - "srcset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/srcset/-/srcset-1.0.0.tgz", - "integrity": "sha1-pWad4StC87HV6D7QPHEEb8SPQe8=", - "dev": true, - "requires": { - "array-uniq": "^1.0.2", - "number-is-nan": "^1.0.0" - } - }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", @@ -5006,6 +12033,14 @@ "integrity": "sha1-s/D6QZKVICpaKJ9ta+n0kJphcZM=", "dev": true }, + "string_decoder": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", + "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -5016,14 +12051,6 @@ "strip-ansi": "^4.0.0" } }, - "string_decoder": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", - "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -5148,9 +12175,74 @@ "string-width": "^2.1.1" } }, + "tc-api-testing-lib": { + "version": "git+ssh://git@github.com/topcoder-platform/api-automated-testing.git#79e62f50bd2e80f5aba3a3acc41af9ffbfbfa405", + "dev": true, + "from": "tc-api-testing-lib@topcoder-platform/api-automated-testing.git", + "requires": { + "axios": "^0.21.1", + "config": "^3.3.6", + "handlebars": "^4.7.7", + "joi": "^17.4.0", + "lodash": "^4.17.21", + "newman": "^5.2.3", + "newman-reporter-html": "^1.0.5", + "tc-core-library-js": "appirio-tech/tc-core-library-js.git#v2.6.4", + "winston": "^3.3.3" + }, + "dependencies": { + "axios": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "dev": true, + "requires": { + "follow-redirects": "^1.10.0" + } + }, + "follow-redirects": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz", + "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==", + "dev": true + }, + "handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + } + }, + "joi": { + "version": "17.4.0", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.4.0.tgz", + "integrity": "sha512-F4WiW2xaV6wc1jxete70Rw4V/VuMd6IN+a5ilZsxG4uYtUXWu2kq9W5P2dz30e7Gmw8RCbY/u/uk+dMPma9tAg==", + "dev": true, + "requires": { + "@hapi/hoek": "^9.0.0", + "@hapi/topo": "^5.0.0", + "@sideway/address": "^4.1.0", + "@sideway/formula": "^3.0.0", + "@sideway/pinpoint": "^2.0.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "tc-bus-api-wrapper": { - "version": "github:topcoder-platform/tc-bus-api-wrapper#a52f69ef72a80d27aeeab790fb18eb419a904862", - "from": "github:topcoder-platform/tc-bus-api-wrapper", + "version": "git+ssh://git@github.com/topcoder-platform/tc-bus-api-wrapper.git#a52f69ef72a80d27aeeab790fb18eb419a904862", + "from": "tc-bus-api-wrapper@topcoder-platform/tc-bus-api-wrapper.git", "requires": { "joi": "^13.4.0", "lodash": "^4.17.15", @@ -5181,11 +12273,6 @@ "topo": "3.x.x" } }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" - }, "lru-memoizer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/lru-memoizer/-/lru-memoizer-2.1.2.tgz", @@ -5240,8 +12327,8 @@ } }, "tc-core-library-js": { - "version": "github:appirio-tech/tc-core-library-js#df0b36c51cf80918194cbff777214b3c0cf5a151", - "from": "github:appirio-tech/tc-core-library-js#v2.6.4", + "version": "git+ssh://git@github.com/appirio-tech/tc-core-library-js.git#df0b36c51cf80918194cbff777214b3c0cf5a151", + "from": "tc-core-library-js@github:appirio-tech/tc-core-library-js#v2.6.4", "requires": { "axios": "^0.19.0", "bunyan": "^1.8.12", @@ -5293,8 +12380,8 @@ } }, "tc-core-library-js": { - "version": "github:appirio-tech/tc-core-library-js#df0b36c51cf80918194cbff777214b3c0cf5a151", - "from": "github:appirio-tech/tc-core-library-js#v2.6.4", + "version": "git+ssh://git@github.com/appirio-tech/tc-core-library-js.git#df0b36c51cf80918194cbff777214b3c0cf5a151", + "from": "tc-core-library-js@appirio-tech/tc-core-library-js.git#v2.6.4", "requires": { "axios": "^0.19.0", "bunyan": "^1.8.12", @@ -5553,9 +12640,9 @@ "optional": true }, "underscore": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", - "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==", "dev": true }, "uniq": { @@ -5615,12 +12702,12 @@ "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==" }, "uvm": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/uvm/-/uvm-2.0.1.tgz", - "integrity": "sha512-bZAckfNKnr95YkTCVZWyzK+7w1c8sYJuTresCBqhiizByVRtfPqhGJpTwFUSaS2YkaVfsMoN5xZcOCNxTx9uCA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/uvm/-/uvm-2.0.2.tgz", + "integrity": "sha512-Ra+aPiS5GXAbwXmyNExqdS42sTqmmx4XWEDF8uJlsTfOkKf9Rd9xNgav1Yckv4HfVEZg4iOFODWHFYuJ+9Fzfg==", "dev": true, "requires": { - "flatted": "3.1.0" + "flatted": "3.1.1" } }, "validate-npm-package-license": { @@ -5664,34 +12751,46 @@ "dev": true }, "winston": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.2.1.tgz", - "integrity": "sha512-zU6vgnS9dAWCEKg/QYigd6cgMVVNwyTzKs81XZtTFuRwJOcDdBg7AU0mXVyNbs7O5RH2zdv+BdNZUlx7mXPuOw==", - "requires": { - "async": "^2.6.1", - "diagnostics": "^1.1.1", - "is-stream": "^1.1.0", - "logform": "^2.1.1", - "one-time": "0.0.4", - "readable-stream": "^3.1.1", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", + "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", + "requires": { + "@dabh/diagnostics": "^2.0.2", + "async": "^3.1.0", + "is-stream": "^2.0.0", + "logform": "^2.2.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", "stack-trace": "0.0.x", "triple-beam": "^1.3.0", - "winston-transport": "^4.3.0" + "winston-transport": "^4.4.0" + }, + "dependencies": { + "async": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==" + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + } } }, "winston-transport": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.3.0.tgz", - "integrity": "sha512-B2wPuwUi3vhzn/51Uukcao4dIduEiPOcOt9HJ3QeaXgkJ5Z7UwpBzxS4ZGNHtrxrUvTwemsQiSys0ihOf8Mp1A==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.4.0.tgz", + "integrity": "sha512-Lc7/p3GtqtqPBYYtS6KCN3c77/2QCev51DvcJKbkFPQNoj1sinkGwLGFDxkXY9J6p9+EPnYs+D90uwbnaiURTw==", "requires": { - "readable-stream": "^2.3.6", + "readable-stream": "^2.3.7", "triple-beam": "^1.2.0" }, "dependencies": { "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", diff --git a/package.json b/package.json index 9feda35..c04a802 100644 --- a/package.json +++ b/package.json @@ -23,12 +23,12 @@ "author": "TCSCODER", "license": "none", "devDependencies": { - "should": "^13.2.3", "mocha": "^5.2.0", "mocha-prepare": "^0.1.0", + "nock": "^10.0.6", "nyc": "^14.0.0", + "should": "^13.2.3", "standard": "^12.0.1", - "nock": "^10.0.6", "tc-api-testing-lib": "topcoder-platform/api-automated-testing.git" }, "dependencies": { diff --git a/test/postman/resource-api.postman_environment.json b/test/postman/resource-api.postman_environment.json index 9d2b3e8..e91d6c8 100644 --- a/test/postman/resource-api.postman_environment.json +++ b/test/postman/resource-api.postman_environment.json @@ -1,8 +1,8 @@ { "_": { "postman_variable_scope": "environment", - "postman_exported_at": "2021-05-14T11:05:48.610Z", - "postman_exported_using": "Newman/5.2.2" + "postman_exported_at": "2021-06-30T14:04:02.209Z", + "postman_exported_using": "Newman/5.2.4" }, "id": "8972a3df-731f-4475-b089-ccbb28735083", "name": "resource-api", @@ -24,17 +24,17 @@ }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IFN1cHBvcnQiLCJ0ZXN0Um9sZSIsImFhYSIsInRvbnlfdGVzdF8xIiwiQ29ubmVjdCBNYW5hZ2VyIiwiQ29ubmVjdCBBZG1pbiIsImNvcGlsb3QiLCJDb25uZWN0IENvcGlsb3QgTWFuYWdlciIsIlRvcGNvZGVyIFVzZXIiLCJhZG1pbmlzdHJhdG9yIiwidS1iYWhuIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTYyMDk5MDkzMCwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTYyMDk5MDMzMCwiZW1haWwiOiJhamVmdHNAdG9wY29kZXIuY29tIiwianRpIjoiYzgzYjFlNzQtODU1MS00NTM1LWE0MDMtMmZhOTM2MmMzYzhhIn0.z7a0-N_psu5zAMEDS1X7H1C6et-ogM23R7AdYt8JoYU", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IFN1cHBvcnQiLCJ0ZXN0Um9sZSIsImFhYSIsInRvbnlfdGVzdF8xIiwiQ29ubmVjdCBNYW5hZ2VyIiwiQ29ubmVjdCBBZG1pbiIsImNvcGlsb3QiLCJDb25uZWN0IENvcGlsb3QgTWFuYWdlciIsIlRvcGNvZGVyIFVzZXIiLCJhZG1pbmlzdHJhdG9yIiwidS1iYWhuIiwiYm9va2luZ21hbmFnZXIiXSwiaXNzIjoiaHR0cHM6Ly9hcGkudG9wY29kZXItZGV2LmNvbSIsImhhbmRsZSI6IlRvbnlKIiwiZXhwIjoxNjI1MDYyMTM4LCJ1c2VySWQiOiI4NTQ3ODk5IiwiaWF0IjoxNjI1MDYxNTM4LCJlbWFpbCI6ImFqZWZ0c0B0b3Bjb2Rlci5jb20iLCJqdGkiOiJhOTIyMmIyNC02OGM1LTQ5NDUtYmQ0Yy1kZDQwN2QzNGZjZDkifQ.DIZF1CDMJHugQ6s4ombCmPMe6A26JrSNpue3RXhBvQU", "key": "admin_token" }, { "type": "any", - "value": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5VSkZORGd4UlRVME5EWTBOVVkzTlRkR05qTXlRamxETmpOQk5UYzVRVUV3UlRFeU56TTJRUSJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiRWtFOXFVM0V5NmhkSndPc0YxWDBkdXdza3FjRHVFbFdAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNjIwOTkwMzI2LCJleHAiOjE2MjEwNzY3MjYsImF6cCI6IkVrRTlxVTNFeTZoZEp3T3NGMVgwZHV3c2txY0R1RWxXIiwic2NvcGUiOiJyZWFkOmNoYWxsZW5nZXMgcmVhZDpncm91cHMgcmVhZDpzdWJtaXNzaW9uIHJlYWQ6cmV2aWV3X3R5cGUgcmVhZDpyZXZpZXdfc3VtbWF0aW9uIHJlYWQ6cmV2aWV3IHJlYWQ6cHJvamVjdCByZWFkOmJ1c190b3BpY3Mgd3JpdGU6YnVzX2FwaSByZWFkOmVtYWlsX3RlbXBsYXRlcyByZWFkOnVzZXJfcHJvZmlsZXMgcmVhZDpyb2xlcyByZWFkOnJlc291cmNlcyB3cml0ZTpyZXNvdXJjZXMgZGVsZXRlOnJlc291cmNlcyB1cGRhdGU6cmVzb3VyY2VzIGFsbDpyZXNvdXJjZXMiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMifQ.PDO12tHLXbg1gukV--sOyffovSXugjTm74sY_M-J1j03yoLGg2CLtPpO0CZeiwFecCcs9vSiFH5dGcRyWI3m_09LVjzZIb0O2fm2f9Qeoo2ughrjua8z_9L6FUtqv1-QPR82QcCe-kUTo4KDsokLJiV7RvaeIqam6bfHs1OdpbekOh-HHxdRjS2cmm2Wce1FEnPWOujVLFkQb3TKSlHlrzNqfnPju6w6irmR823LQm2Jy1hYlVucaPiV6BElGrSbpUvPkwRwX3_mOqRCCmtAXP-xuDJVKDVf3HyzCnpl6oC8e2GdBkeCslTdgGT5jVYA4xJHYnaU9b_vvGmC9spNTw", + "value": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5VSkZORGd4UlRVME5EWTBOVVkzTlRkR05qTXlRamxETmpOQk5UYzVRVUV3UlRFeU56TTJRUSJ9.eyJpc3MiOiJodHRwczovL3RvcGNvZGVyLWRldi5hdXRoMC5jb20vIiwic3ViIjoiakdJZjJwZDNmNDRCMWpxdk9haTMwQklLVFphbllCZlVAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vbTJtLnRvcGNvZGVyLWRldi5jb20vIiwiaWF0IjoxNjI1MDYxNTM2LCJleHAiOjE2MjUxNDc5MzYsImF6cCI6ImpHSWYycGQzZjQ0QjFqcXZPYWkzMEJJS1RaYW5ZQmZVIiwic2NvcGUiOiJ1cGRhdGU6dXNlcl9wcm9maWxlcyB3cml0ZTp1c2VyX3Byb2ZpbGVzIGNyZWF0ZTpjb25uZWN0X3Byb2plY3QgYWxsOmNoYWxsZW5nZXMgcmVhZDpjaGFsbGVuZ2VzIHdyaXRlOmNoYWxsZW5nZXMgYWxsOmdyb3VwcyB3cml0ZTpncm91cHMgcmVhZDpncm91cHMgdXBkYXRlOnN1Ym1pc3Npb24gcmVhZDpzdWJtaXNzaW9uIGRlbGV0ZTpzdWJtaXNzaW9uIGNyZWF0ZTpzdWJtaXNzaW9uIGFsbDpzdWJtaXNzaW9uIHVwZGF0ZTpyZXZpZXdfdHlwZSByZWFkOnJldmlld190eXBlIGRlbGV0ZTpyZXZpZXdfdHlwZSBhbGw6cmV2aWV3X3R5cGUgdXBkYXRlOnJldmlld19zdW1tYXRpb24gcmVhZDpyZXZpZXdfc3VtbWF0aW9uIGRlbGV0ZTpyZXZpZXdfc3VtbWF0aW9uIGNyZWF0ZTpyZXZpZXdfc3VtbWF0aW9uIGFsbDpyZXZpZXdfc3VtbWF0aW9uIHVwZGF0ZTpyZXZpZXcgcmVhZDpyZXZpZXcgZGVsZXRlOnJldmlldyBjcmVhdGU6cmV2aWV3IGFsbDpyZXZpZXcgcmVhZDpwcm9qZWN0IGFsbDpjb25uZWN0X3Byb2plY3QgcmVhZDpidXNfdG9waWNzIHdyaXRlOmJ1c19hcGkgcmVhZDplbWFpbF90ZW1wbGF0ZXMgcmVhZDp1c2VyX3Byb2ZpbGVzIHJlYWQ6cm9sZXMgcmVhZDpwcm9qZWN0LXVzZXIgcmVhZDpwcm9qZWN0LXBlcm1pc3Npb24gcmVhZDpyZXNvdXJjZXMgd3JpdGU6cmVzb3VyY2VzIGRlbGV0ZTpyZXNvdXJjZXMgdXBkYXRlOnJlc291cmNlcyBhbGw6cmVzb3VyY2VzIHJlYWQ6dGVybXMgYWxsOnRlcm1zIGFsbDpwcm9qZWN0cyByZWFkOnByb2plY3RzIGFsbDpzY2hlZHVsZXMgcmVhZDpzY2hlZHVsZXMgY3JlYXRlOnNjaGVkdWxlcyB1cGRhdGU6c2NoZWR1bGVzIGRlbGV0ZTpzY2hlZHVsZXMgcmVhZDpwcm9qZWN0LWJpbGxpbmctYWNjb3VudC1kZXRhaWxzIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0.SqkSb8F6Te0b1ypDdh4__LfW9-b3N9KlgOZ5rrlXR3ZTDEAt4ENoajOJIG4xxIwGnKF8djMS8mk1EgW2e7bGKj1ZWdpSK5gANmLgQFlw_51essK_u8LYS_WvL7IFC4WGBEvh0zMtDvqRK3LUI4ijW48IfKRMSKodXUpkz5XZ5Pw1AQNcekML6Y56Aei488uGccJH5a4eEQxXk6eikwSjg6x2d1NxAdOm6NCos7qaCpgF_KpdcMEIb9Tfc0W6T0nf2FnR_MMzdlu_5BusaSAiWrpzt5eL2ueDf4U2Yvu8X_dyqxKgL9I13FfhaU6F3ZuTMbYHS8uOPw56t1Eq48jmLg", "key": "M2M_TOKEN" }, { "type": "any", - "value": "927261d5-f1b8-4a46-9bfd-a1b4427635f6", + "value": "cf430147-674b-4efa-9546-0873edfb8923", "key": "COPILOT_RESOURCE_ROLE_ID" }, { @@ -69,12 +69,12 @@ }, { "type": "any", - "value": "dfb7dedb-6ad9-475f-9d1f-1bc354e83136", + "value": "c744c91d-f4e7-4ffa-9342-389e079c8d95", "key": "DEPENDENCY_ID_1" }, { "type": "any", - "value": "715b63f9-aa90-47af-885c-5cd205abfb6a", + "value": "91991730-bb35-4fe8-8dec-06a51f97ec24", "key": "DEPENDENCY_ID_2" }, { @@ -84,83 +84,300 @@ }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IENvcGlsb3QiLCJjb3BpbG90IiwiVG9wY29kZXIgVXNlciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoiVENDb25uQ29waWxvdCIsImV4cCI6MTYyMDk5MDkzNCwidXNlcklkIjoiNDAxNTg5OTQiLCJpYXQiOjE2MjA5OTAzMzQsImVtYWlsIjoidG9wY29kZXJjb25uZWN0K0NvcGlsb3RAZ21haWwuY29tIiwianRpIjoiYWE5OGE2ODctZTg2ZS00YzkzLTlhYWYtMGYzMGEyZjAzMmQ0In0.k12QVu0AU35ywFUFC0RQVHK3amsai8CrRl-FMdwjY0Q", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJDb25uZWN0IENvcGlsb3QiLCJjb3BpbG90IiwiVG9wY29kZXIgVXNlciJdLCJpc3MiOiJodHRwczovL2FwaS50b3Bjb2Rlci1kZXYuY29tIiwiaGFuZGxlIjoiVENDb25uQ29waWxvdCIsImV4cCI6MTYyNTA2MjE0MiwidXNlcklkIjoiNDAxNTg5OTQiLCJpYXQiOjE2MjUwNjE1NDIsImVtYWlsIjoidG9wY29kZXJjb25uZWN0K0NvcGlsb3RAZ21haWwuY29tIiwianRpIjoiYWYxOWI2ZGItMTg2OC00NWZlLWFmMGQtNGJjZGRiYTAyMjEwIn0.oTcs59IPZtVrdfKqbj7Im2iLhMFlUSYnDiJ4UW-zAm8", "key": "copilot_token" }, { "type": "any", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90Il0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJhcmdvbGl0ZSIsImV4cCI6MTYyMDk5MDkzNiwidXNlcklkIjoiMjg3NjE0IiwiaWF0IjoxNjIwOTkwMzM2LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6Ijg0MDY3OGEyLWU2OWEtNDcwMy04Y2E0LTdlMWE0Zjc4MDg3ZCJ9.PYYH63ko-ZZkpeLNrb108ie2dvgAib7-0Q9BigAVgN8", + "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90Il0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJhcmdvbGl0ZSIsImV4cCI6MTYyNTA2MjE0NSwidXNlcklkIjoiMjg3NjE0IiwiaWF0IjoxNjI1MDYxNTQ1LCJlbWFpbCI6ImVtYWlsQGRvbWFpbi5jb20ueiIsImp0aSI6IjhiN2EyYmZlLTMwN2MtNDllMy05Y2VlLWRlZWE2MjM0YmY1YSJ9.Sfb5377JM7MiE-pn4Z0Y21pz1UP0gOa2mweiiMOlkwg", "key": "user_token" }, { "type": "any", "value": { - "jwtToken": "Bearer invalid", - "httpCode": 401, - "message": "Invalid Token." + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "mess", + "CHALLENGE_ID": "11111111-ce7d-4521-8501-b8132b1c0391", + "httpCode": 404, + "message": "Challenge of id 11111111-ce7d-4521-8501-b8132b1c0391 is not found." }, "key": "0" }, { "type": "any", "value": { - "jwtToken": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29ubmVjdCBTdXBwb3J0IiwiYWRtaW5pc3RyYXRvciIsInRlc3RSb2xlIiwiYWFhIiwidG9ueV90ZXN0XzEiLCJDb25uZWN0IE1hbmFnZXIiLCJDb25uZWN0IEFkbWluIiwiY29waWxvdCIsIkNvbm5lY3QgQ29waWxvdCBNYW5hZ2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJUb255SiIsImV4cCI6MTU1MTA2MzIxMSwidXNlcklkIjoiODU0Nzg5OSIsImlhdCI6MTU1MTA1MzIxMSwiZW1haWwiOiJ0amVmdHMrZml4QHRvcGNvZGVyLmNvbSIsImp0aSI6ImY5NGQxZTI2LTNkMGUtNDZjYS04MTE1LTg3NTQ1NDRhMDhmMSJ9.97-pjuSGGqDAqK2FG2yi_3nmzB7ZMXQwtG0bi8_PlKk", - "httpCode": 4000, - "message": "Failed to authenticate token." + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "mess", + "COPILOT_RESOURCE_ROLE_ID": "11111111-ce7d-4521-8501-b8132b1c0391", + "httpCode": 400, + "message": "No resource role found with id: 11111111-ce7d-4521-8501-b8132b1c0391." }, "key": "1" }, { "type": "any", "value": { - "jwtToken": "Bearer {{copilot_token}}", - "httpCode": 403, - "message": "You are not allowed to perform this action!" + "required_field_1": "challengeId_not_provided", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "mess", + "httpCode": 400, + "message": "\"challengeId\" is required" }, "key": "2" }, { "type": "any", "value": { - "jwtToken": "Bearer {{user_token}}", - "httpCode": 403, - "message": "You are not allowed to perform this action!" + "required_field_1": "challengeId", + "required_field_2": "memberHandle_not_provided", + "required_field_3": "roleId", + "memberHandle": "mess", + "httpCode": 400, + "message": "\"memberHandle\" is required" }, "key": "3" }, { "type": "any", "value": { - "jwtToken": "", - "httpCode": 401, - "message": "No token provided." + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId_not_provided", + "memberHandle": "mess", + "httpCode": 400, + "message": "\"roleId\" is required" }, "key": "4" }, { "type": "any", "value": { - "name": "POSTMANE2E-failure-test-m2m", - "fullReadAccess": true, - "fullWriteAccess": false, - "httpCode": 400 + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "CHALLENGE_ID": "", + "memberHandle": "mess", + "httpCode": 400, + "message": "\"challengeId\" is not allowed to be empty" }, "key": "5" }, { "type": "any", "value": { - "name": "POSTMANE2E-submitter-m2m", - "fullReadAccess": true, - "fullWriteAccess": true, - "isActive": true, - "selfObtainable": true, - "httpCode": 409 + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "memberHandle": "", + "httpCode": 400, + "message": "\"memberHandle\" is not allowed to be empty" }, "key": "6" + }, + { + "type": "any", + "value": "43a30cd9-07b0-467c-82c9-f0457c5e7819", + "key": "DEPENDENCY_ID_3" + }, + { + "type": "any", + "value": "91991730-bb35-4fe8-8dec-06a51f97ec24", + "key": "DEPENDENCY_ID_4" + }, + { + "type": "any", + "value": { + "required_field_1": "challengeId", + "required_field_2": "memberHandle", + "required_field_3": "roleId", + "COPILOT_RESOURCE_ROLE_ID": "", + "memberHandle": "mess", + "httpCode": 400, + "message": "\"roleId\" is not allowed to be empty" + }, + "key": "7" + }, + { + "type": "any", + "value": { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": 1, + "perPage": 10, + "memberId": "", + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"memberId\" is not allowed to be empty" + }, + "key": "8" + }, + { + "type": "any", + "value": { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"memberHandle\" is not allowed to be empty" + }, + "key": "9" + }, + { + "type": "any", + "value": { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"sortBy\" is not allowed to be empty" + }, + "key": "10" + }, + { + "type": "any", + "value": { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberId", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"sortBy\" must be one of [memberHandle, created]" + }, + "key": "11" + }, + { + "type": "any", + "value": { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "", + "httpCode": 400, + "message": "\"sortOrder\" is not allowed to be empty" + }, + "key": "12" + }, + { + "type": "any", + "value": { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "invalid", + "httpCode": 400, + "message": "\"sortOrder\" must be one of [desc, asc]" + }, + "key": "13" + }, + { + "type": "any", + "value": { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "CHALLENGE_ID": "123", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"challengeId\" must be a valid GUID" + }, + "key": "14" + }, + { + "type": "any", + "value": { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "CHALLENGE_ID": "11111111-ce7d-4521-8501-b8132b1c0391", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 404, + "message": "Challenge ID 11111111-ce7d-4521-8501-b8132b1c0391 not found" + }, + "key": "15" + }, + { + "type": "any", + "value": { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "COPILOT_RESOURCE_ROLE_ID": "", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"roleId\" is not allowed to be empty" + }, + "key": "16" + }, + { + "type": "any", + "value": { + "required_field_1": "challengeId", + "required_field_2": "memberId", + "required_field_3": "memberHandle", + "COPILOT_RESOURCE_ROLE_ID": "123", + "page": 1, + "perPage": 10, + "memberId": 305384, + "memberHandle": "mess", + "sortBy": "memberHandle", + "sortOrder": "desc", + "httpCode": 400, + "message": "\"roleId\" must be a valid GUID" + }, + "key": "17" } ], "_postman_variable_scope": "environment", - "_postman_exported_at": "2021-05-14T11:05:54.852Z", - "_postman_exported_using": "Newman/5.2.2" -} + "_postman_exported_at": "2021-06-30T14:04:08.744Z", + "_postman_exported_using": "Newman/5.2.4" +} \ No newline at end of file From 89e265179e424609dbe15cbd5c0926a459b99915 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Wed, 21 Jul 2021 22:45:00 +0300 Subject: [PATCH 55/60] update tc core lib version to 2.6.6 --- package-lock.json | 5 +++-- package.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index fed7fb5..d5a5444 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "superagent": "^4.1.0", "swagger-ui-express": "^4.1.3", "tc-bus-api-wrapper": "topcoder-platform/tc-bus-api-wrapper.git", - "tc-core-library-js": "appirio-tech/tc-core-library-js.git#v2.6.4", + "tc-core-library-js": "appirio-tech/tc-core-library-js.git#v2.6.6", "uuid": "^8.3.0", "winston": "^3.2.1", "xss": "^1.0.7", @@ -1420,6 +1420,7 @@ "version": "0.8.7", "resolved": "https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.8.7.tgz", "integrity": "sha1-3JObTT4GIM/gwc2APQ0tftBP/QQ=", + "hasInstallScript": true, "optional": true, "dependencies": { "nan": "^2.10.0" @@ -12381,7 +12382,7 @@ }, "tc-core-library-js": { "version": "git+ssh://git@github.com/appirio-tech/tc-core-library-js.git#df0b36c51cf80918194cbff777214b3c0cf5a151", - "from": "tc-core-library-js@appirio-tech/tc-core-library-js.git#v2.6.4", + "from": "tc-core-library-js@appirio-tech/tc-core-library-js.git#v2.6.6", "requires": { "axios": "^0.19.0", "bunyan": "^1.8.12", diff --git a/package.json b/package.json index c04a802..dd0ae8a 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "superagent": "^4.1.0", "swagger-ui-express": "^4.1.3", "tc-bus-api-wrapper": "topcoder-platform/tc-bus-api-wrapper.git", - "tc-core-library-js": "appirio-tech/tc-core-library-js.git#v2.6.4", + "tc-core-library-js": "appirio-tech/tc-core-library-js.git#v2.6.6", "uuid": "^8.3.0", "winston": "^3.2.1", "xss": "^1.0.7", From ea57759231009def6567e8c2d63be27d02a54cca Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Wed, 21 Jul 2021 22:55:07 +0300 Subject: [PATCH 56/60] fix issue with getting resources by memberId --- src/services/ResourceService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/ResourceService.js b/src/services/ResourceService.js index e271959..71b292d 100644 --- a/src/services/ResourceService.js +++ b/src/services/ResourceService.js @@ -85,7 +85,7 @@ async function getResources (currentUser, challengeId, roleId, memberId, memberH hasFullAccess = false } } - if (memberId && memberId !== currentUser.userId) { + if (memberId && _.toString(memberId) !== _.toString(currentUser.userId)) { throw new errors.ForbiddenError('You are not allowed to perform this operation!') } if (memberHandle && memberHandle !== currentUser.handle) { From 3c8d13c1d8656b1bab786d7989510ff2a02d8993 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Mon, 1 Nov 2021 20:16:40 +0200 Subject: [PATCH 57/60] Redeploy --- ReadMe.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ReadMe.md b/ReadMe.md index 59a972b..0dbf820 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -226,6 +226,7 @@ npm run test:newman:clear ``` ## Running tests in CI + - TBD ## Verification From 48b2d57129caf95c3bf86c20672b2f9e1701a8c5 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Wed, 19 Jan 2022 22:31:24 +0200 Subject: [PATCH 58/60] Allow copilots to be self-assigned on self service challenges --- src/services/ResourceService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/ResourceService.js b/src/services/ResourceService.js index 71b292d..a43cd82 100644 --- a/src/services/ResourceService.js +++ b/src/services/ResourceService.js @@ -255,7 +255,7 @@ async function init (currentUser, challengeId, resource, isCreated) { if (!currentUser.isMachine && !helper.hasAdminRole(currentUser)) { // Check if user has agreed to the challenge terms resources = await helper.query('Resource', { challengeId }) - if (!resourceRole.selfObtainable || _.toString(memberId) !== _.toString(currentUser.userId)) { + if (!(resourceRole.selfObtainable && _.get(challenge, 'legacy.selfService')) || _.toString(memberId) !== _.toString(currentUser.userId)) { // if user is not creating/deleting a self obtainable resource for itself // we need to perform check access first await checkAccess(currentUser, resources) From 4fa02238a09038b9995954d3432d1000b207219c Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 27 Jan 2022 17:51:57 +0200 Subject: [PATCH 59/60] fix checks for self service --- src/services/ResourceService.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/services/ResourceService.js b/src/services/ResourceService.js index a43cd82..ec9aa69 100644 --- a/src/services/ResourceService.js +++ b/src/services/ResourceService.js @@ -255,10 +255,12 @@ async function init (currentUser, challengeId, resource, isCreated) { if (!currentUser.isMachine && !helper.hasAdminRole(currentUser)) { // Check if user has agreed to the challenge terms resources = await helper.query('Resource', { challengeId }) - if (!(resourceRole.selfObtainable && _.get(challenge, 'legacy.selfService')) || _.toString(memberId) !== _.toString(currentUser.userId)) { - // if user is not creating/deleting a self obtainable resource for itself - // we need to perform check access first - await checkAccess(currentUser, resources) + if (!_.get(challenge, 'legacy.selfService')) { + if (resourceRole.selfObtainable || _.toString(memberId) !== _.toString(currentUser.userId)) { + // if user is not creating/deleting a self obtainable resource for itself + // we need to perform check access first + await checkAccess(currentUser, resources) + } } } else { // fetch resources for specified challenge and member From 40544e3fee5fda76a1215465807527d57d40a646 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Wed, 2 Feb 2022 17:10:26 +0200 Subject: [PATCH 60/60] fix access checks --- src/services/ResourceService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/ResourceService.js b/src/services/ResourceService.js index ec9aa69..7054975 100644 --- a/src/services/ResourceService.js +++ b/src/services/ResourceService.js @@ -256,7 +256,7 @@ async function init (currentUser, challengeId, resource, isCreated) { // Check if user has agreed to the challenge terms resources = await helper.query('Resource', { challengeId }) if (!_.get(challenge, 'legacy.selfService')) { - if (resourceRole.selfObtainable || _.toString(memberId) !== _.toString(currentUser.userId)) { + if (!resourceRole.selfObtainable || _.toString(memberId) !== _.toString(currentUser.userId)) { // if user is not creating/deleting a self obtainable resource for itself // we need to perform check access first await checkAccess(currentUser, resources)