diff --git a/.github/README_CICD.md b/.github/README_CICD.md index 486f7dd1c..4fb9975eb 100644 --- a/.github/README_CICD.md +++ b/.github/README_CICD.md @@ -11,8 +11,7 @@ account that: the user is not confused. - It handles the creation and wiring of many cloud components, which are lots of moving pieces, so everything is double-checked to prevent errors in deployed environments. -- It is a multi-cloud framework, and behavior is double-checked both on AWS and Azure, as they are the officially supported cloud - providers. Ensuring everything runs smoothly, regardless of the choice of the user. +- It is a multi-cloud framework, and behavior is double-checked both on AWS and Azure. Ensuring everything runs smoothly, regardless of the choice of the user. We always keep improving our CI/CD processes, but we always make sure that we have the above covered. diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 6024b0341..045a85887 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -5,7 +5,7 @@ runs: steps: - uses: actions/setup-node@v3 with: - node-version: 16.14 + node-version: 18.18 # First we cache the rush project, to ensure we don't build multiple times, nor we download more dependencies than needed - name: Cache Rush project diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 95468b4fc..209fb3b92 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,10 +13,12 @@ name: 'CodeQL' on: push: - branches: [main] + branches: + - main pull_request: # The branches below must be a subset of the branches above - branches: [main] + branches: + - main schedule: - cron: '17 3 * * 4' diff --git a/.github/workflows/re_test-integration-prepare.yml b/.github/workflows/re_test-integration-prepare.yml index 1e325dd9e..758b48ef7 100644 --- a/.github/workflows/re_test-integration-prepare.yml +++ b/.github/workflows/re_test-integration-prepare.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 16.14 + node-version: 18.18 # If this was triggered by a /integration command, check out merge commit - name: Fork based /integration checkout diff --git a/.github/workflows/wf_check-changes.yml b/.github/workflows/wf_check-changes.yml index 49ab7ffdf..e5e3ff426 100644 --- a/.github/workflows/wf_check-changes.yml +++ b/.github/workflows/wf_check-changes.yml @@ -3,7 +3,6 @@ on: push: branches: - main - - '1.0.0' paths-ignore: - '**.md' - 'website/**' diff --git a/.github/workflows/wf_check-lint.yml b/.github/workflows/wf_check-lint.yml index 35ae56437..c9d64e2c6 100644 --- a/.github/workflows/wf_check-lint.yml +++ b/.github/workflows/wf_check-lint.yml @@ -3,7 +3,6 @@ on: pull_request: branches: - main - - '1.0.0' paths-ignore: - '**.md' - 'website/**' diff --git a/.github/workflows/wf_publish-docs.yml b/.github/workflows/wf_publish-docs.yml index 9f3571745..98736f46a 100644 --- a/.github/workflows/wf_publish-docs.yml +++ b/.github/workflows/wf_publish-docs.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 18.18 cache: npm cache-dependency-path: website/package-lock.json diff --git a/.github/workflows/wf_publish-npm.yml b/.github/workflows/wf_publish-npm.yml index 764fdc270..f7750f2d3 100644 --- a/.github/workflows/wf_publish-npm.yml +++ b/.github/workflows/wf_publish-npm.yml @@ -46,7 +46,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 16.x + node-version: 18.18 registry-url: https://registry.npmjs.org/ - name: Rush Update diff --git a/.github/workflows/wf_test-unit.yml b/.github/workflows/wf_test-unit.yml index eb60f3070..145786650 100644 --- a/.github/workflows/wf_test-unit.yml +++ b/.github/workflows/wf_test-unit.yml @@ -3,7 +3,6 @@ on: push: branches: - main - - '1.0.0' paths-ignore: - '**.md' - 'website/**' diff --git a/.nvmrc b/.nvmrc index 53d838af2..c32828c2c 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -lts/gallium +lts/hydrogen \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eaae4e367..59c8c3e25 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,7 +53,7 @@ Booster is divided in many different packages. The criteria to split the code in - They must be run separately, for instance, the CLI is run locally, while the support code for the project is run on the cloud. - They contain code that is used by at least two of the other packages. -- They're a vendor-specific specialization of some abstract part of the framework (for instance, all the code that is required by AWS is in separate packages). +- They're a vendor-specific specialization of some abstract part of the framework (for instance, all the code that is required to support Azure is in separate packages). The packages are managed using [rush](https://rushjs.io/) and [npm](https://npmjs.com), if you run `rush build`, it will build all the packages. @@ -62,8 +62,8 @@ The packages are published to `npmjs` under the prefix `@boostercloud/`, their p - `cli` - You guessed it! This package is the `boost` command-line tool, it interacts only with the core package in order to load the project configuration. The specific provider packages to interact with the cloud providers are loaded dynamically from the project config. - `framework-core` - This one contains all the framework runtime vendor-independent logic. Stuff like the generation of the config or the commands and events handling happens here. The specific provider packages to interact with the cloud providers are loaded dynamically from the project config. - `framework-integration-tests` - Implements integration tests for all supported vendors. Tests are run on real infrastructure using the same mechanisms than a production application. This package `src` folder includes a synthetic Booster application that can be deployed to a real provider for testing purposes. -- `framework-provider-aws` - Implements all the required adapters to make the booster core run on top of AWS technologies like Lambda and DynamoDB using the AWS SDK under the hoods. -- `framework-provider-aws-infrastructure` - Implements all the required adapters to allow Booster applications to be deployed to AWS using the AWS CDK under the hoods. +- `framework-provider-aws` (Deprecated) - Implements all the required adapters to make the booster core run on top of AWS technologies like Lambda and DynamoDB using the AWS SDK under the hoods. +- `framework-provider-aws-infrastructure` (Deprecated) - Implements all the required adapters to allow Booster applications to be deployed to AWS using the AWS CDK under the hoods. - `framework-provider-local` - Implements all the required adapters to run the Booster application on a local express server to be able to debug your code before deploying it to a real cloud provider. - `framework-provider-local-infrastructure` - Implements all the required code to run the local development server. - `framework-types` - This package defines types that the rest of the project will use. This is useful for avoiding cyclic dependencies. Note that this package should not contain stuff that are not types, or very simple methods related directly to them, i.e. a getter or setter. This package defines the main booster concepts like: @@ -252,7 +252,7 @@ The Booster Framework project is organized following the ["rush monorepo"](https - The "package.json" files that are on each package root should contain the dependencies used by that specific package. Be sure to correctly differentiate which dependency is only for development and which one is for production. -Finally, **always use exact numbers for dependency versions**. This means that if you want to add the dependency "aws-sdk" in version 1.2.3, you should add `"aws-sdk": "1.2.3"` to the corresponding "package.json" file, and never `"aws-sdk": "^1.2.3"` or `"aws-sdk": "~1.2.3"`. This restriction comes from hard problems we've had in the past. +Finally, **always use exact numbers for dependency versions**. This means that if you want to add the dependency "graphql" in version 1.2.3, you should add `"graphql": "1.2.3"` to the corresponding "package.json" file, and never `"graphql": "^1.2.3"` or `"graphql": "~1.2.3"`. This restriction comes from hard problems we've had in the past. ### Running unit tests @@ -275,15 +275,36 @@ Still, it is recommendable to run them locally before submitting a PR for review These are the available scripts to run integration tests: -- `rushx integration -v`: Run all the integration test suites in the right order. -- `rushx integration/aws-deploy -v`: This test just checks that the sample project in `packages/framework-integration-tests/src` can be successfully deployed to AWS. The deployment process takes several minutes and this project is used by all the other AWS integration tests, so it's a requirement to run this test before. -- `rushx integration/aws-func -v`: AWS functional integration tests. They stress the deployed app write API and checks that the results are the expected ones both in the databases and the read APIs. -- `rushx integration/end-to-end -v`: Runs complete and realistic use cases on several cloud providers. This tests are intended to verify that a single project can be deployed to different cloud providers. Currently, only AWS is implemented though. -- `rushx integration/aws-nuke -v`: This test checks that the application deployed to AWS can be properly nuked. This test should be the last one after other test suites related to AWS have finished. -- `rushx integration/local -v`: Checks that the test application can be launched locally and that the APIs and the databases behave as expected. -- `rushx integration/cli -v`: Checks cli commands and check that they produce the expected results. - -AWS integration tests are run in real AWS resources, so you'll need to have your AWS credentials properly set in your development machine. By default, the sample project will be deployed to your default account. Basically, if you can deploy a Booster project to AWS, you should be good to go ([See more details about setting up an AWS account in the docs](https://github.com/boostercloud/booster/tree/main/docs#set-up-an-aws-account)). Notice that while all resources used by Booster are included in the AWS free tier, running these tests in your own AWS account could incur in some expenses. +1. **General Integration Tests:** + - `rushx integration -v`: Run all integration test scripts. + +2. **CLI Integration Tests:** + - `rushx integration/cli -v`: Tests CLI commands and verifies that they produce the expected results. + +3. **Local Integration Tests:** + - `rushx integration/local -v`: Runs all integration scripts in the local development server. + - `rushx integration/local-ongoing -v`: Runs the start and stop integration tests. + - `rushx integration/local-start -v`: Checks the start functionality of the local environment. + - `rushx integration/local-func -v`: Functional tests for the local environment. + - `rushx integration/local-end-to-end -v`: Runs end-to-end tests in the local environment. + - `rushx integration/local-stop -v`: Checks the stop functionality of the local environment. + +4. **AWS Integration Tests:** + - `rushx integration/aws -v`: Runs all integration test scripts for provider AWS. + - `rushx integration/aws-deploy -v`: Tests the deployment of a sample project to AWS. + - `rushx integration/aws-func -v`: Runs functional tests on AWS, stressing the deployed app's write API and verifying the results in databases and read APIs. + - `rushx integration/aws-end-to-end -v`: Performs end-to-end tests on AWS. + - `rushx integration/aws-load -v`: (Currently skipped) Intended for load tests on AWS. + - `rushx integration/aws-nuke -v`: Verifies that the deployed application on AWS can be properly nuked. + +5. **Azure Integration Tests:** + - `rushx integration/azure -v`: Runs all integration test scripts for provider Azure. + - `rushx integration/azure-deploy -v`: Tests the deployment of a project to Azure. + - `rushx integration/azure-func -v`: Runs functional tests on Azure. + - `rushx integration/azure-end-to-end -v`: Performs end-to-end tests on Azure. + - `rushx integration/azure-nuke -v`: Verifies that the deployed application on Azure can be properly nuked. + +Azure and AWS integration tests run in real environments, so you'll need to have your credentials properly set in your development machine in order to run them. They will deploy a sample project to your default account, run the tests and nuke the application when the process finishes. Notice that running integration tests in your cloud account could incur in some expenses. ### Github flow diff --git a/README.md b/README.md index 19aa4fd30..ae52255fb 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ [Booster Framework](https://boosterframework.com) is a software development framework designed to create event-driven backend microservices that focus on extreme development productivity. It provides a highly opinionated implementation of the CQRS and Event Sourcing patterns in Typescript, using [DDD (Domain-Driven Design)](https://en.wikipedia.org/wiki/Domain-driven_design) semantics that makes business logic fit naturally within the code. Thanks to Booster, business, product, and technical teams can collaborate, sharing a much closer language. -Booster uses advanced static analysis techniques and takes advantage of the Typescript type system to understand the structure and semantics of your code and minimize the amount of glue code. It’s capable not just of building an entirely functioning GraphQL API for you, but also to build an optimal, production-ready and scalable cloud infrastructure for your application in your preferred cloud provider (Azure or AWS). +Booster uses advanced static analysis techniques and takes advantage of the Typescript type system to understand the structure and semantics of your code and minimize the amount of glue code. It’s capable not just of building an entirely functioning GraphQL API for you, but also to build an optimal, production-ready and scalable cloud infrastructure for your application in Azure or AWS. Combining these features, Booster provides an unprecedented developer experience. On the one hand, it helps you write simpler code, defining your application in terms of commands, events, entities, and read models. On the other hand, you don't have to worry about the tremendous amount of low-level configuration details of conventional tools. You write highly semantic code, and if it compiles, you can run it on the cloud at scale. diff --git a/common/changes/@boostercloud/framework-core/upgrade-node-18_2023-10-03-21-51.json b/common/changes/@boostercloud/framework-core/upgrade-node-18_2023-10-03-21-51.json new file mode 100644 index 000000000..4d01ff46f --- /dev/null +++ b/common/changes/@boostercloud/framework-core/upgrade-node-18_2023-10-03-21-51.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@boostercloud/framework-core", + "comment": "Upgraded for Node18 support", + "type": "minor" + } + ], + "packageName": "@boostercloud/framework-core" +} \ No newline at end of file diff --git a/common/changes/@boostercloud/framework-core/upgrade-ts-patch_2023-09-24-17-59.json b/common/changes/@boostercloud/framework-core/upgrade-ts-patch_2023-09-24-17-59.json new file mode 100644 index 000000000..e90d1088c --- /dev/null +++ b/common/changes/@boostercloud/framework-core/upgrade-ts-patch_2023-09-24-17-59.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@boostercloud/framework-core", + "comment": "Replaced the deprecated dependency `ttypescript` with `ts-patch`", + "type": "minor" + } + ], + "packageName": "@boostercloud/framework-core" +} \ No newline at end of file diff --git a/common/changes/@boostercloud/framework-core/v2.x.x_2023-10-31-16-26.json b/common/changes/@boostercloud/framework-core/v2.x.x_2023-10-31-16-26.json new file mode 100644 index 000000000..856737b15 --- /dev/null +++ b/common/changes/@boostercloud/framework-core/v2.x.x_2023-10-31-16-26.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@boostercloud/framework-core", + "comment": "Bump version to 2.0.0", + "type": "major" + } + ], + "packageName": "@boostercloud/framework-core" +} \ No newline at end of file diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index cb788aac4..2ec8a9d5b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -8,11 +8,11 @@ importers: ../../packages/application-tester: specifiers: '@apollo/client': 3.7.13 - '@boostercloud/eslint-config': workspace:^1.19.0 - '@boostercloud/framework-types': workspace:^1.19.0 + '@boostercloud/eslint-config': workspace:^1.20.0 + '@boostercloud/framework-types': workspace:^1.20.0 '@effect-ts/core': ^0.60.4 '@types/jsonwebtoken': 9.0.1 - '@types/node': 16.11.7 + '@types/node': ^18.15.3 '@types/sinon': 10.0.0 '@types/ws': 8.5.4 '@typescript-eslint/eslint-plugin': ^5.0.0 @@ -51,7 +51,7 @@ importers: devDependencies: '@boostercloud/eslint-config': link:../../tools/eslint-config '@types/jsonwebtoken': 9.0.1 - '@types/node': 16.11.7 + '@types/node': 18.18.3 '@types/ws': 8.5.4 '@typescript-eslint/eslint-plugin': 5.59.1_lhpu32umveoeq4t2qgxwjpp3k4 '@typescript-eslint/parser': 5.59.1_cfyxzphvxk6hfgn64jwer55l5m @@ -70,18 +70,14 @@ importers: ../../packages/cli: specifiers: - '@boostercloud/application-tester': workspace:^1.19.0 - '@boostercloud/eslint-config': workspace:^1.19.0 - '@boostercloud/framework-core': workspace:^1.19.0 - '@boostercloud/framework-types': workspace:^1.19.0 + '@boostercloud/application-tester': workspace:^1.20.0 + '@boostercloud/eslint-config': workspace:^1.20.0 + '@boostercloud/framework-core': workspace:^1.20.0 + '@boostercloud/framework-types': workspace:^1.20.0 '@effect-ts/core': ^0.60.4 - '@oclif/command': ^1.8 - '@oclif/config': ^1.18 - '@oclif/dev-cli': ^1.26 - '@oclif/errors': ^1.3 - '@oclif/parser': ^3.8.7 - '@oclif/plugin-help': ^5.1 - '@oclif/test': ^2.1 + '@oclif/core': ^3.9.0 + '@oclif/plugin-help': ^5 + '@oclif/test': ^3.0.3 '@types/chai': 4.2.18 '@types/chai-as-promised': 7.1.4 '@types/child-process-promise': ^2.2.1 @@ -91,7 +87,7 @@ importers: '@types/inquirer': ^6.5.0 '@types/mocha': 10.0.1 '@types/mustache': 4.1.0 - '@types/node': 16.11.7 + '@types/node': ^18.15.3 '@types/rewire': ^2.5.28 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 @@ -109,7 +105,7 @@ importers: eslint-plugin-unicorn: ~44.0.2 execa: ^2.0.3 faker: 5.1.0 - fancy-test: 1.4.3 + fancy-test: ^3.0.1 fp-ts: ^2.11.0 fs-extra: ^8.1.0 inflected: 2.1.0 @@ -131,11 +127,8 @@ importers: '@boostercloud/framework-core': link:../framework-core '@boostercloud/framework-types': link:../framework-types '@effect-ts/core': 0.60.5 - '@oclif/command': 1.8.24_@oclif+config@1.18.8 - '@oclif/config': 1.18.8 - '@oclif/errors': 1.3.6 - '@oclif/parser': 3.8.10 - '@oclif/plugin-help': 5.2.9_t4lrjbt3sxauai4t5o275zsepa + '@oclif/core': 3.9.0 + '@oclif/plugin-help': 5.2.9_xpss65pzqvfdcnzjlkstkx6toy chalk: 2.4.2 child-process-promise: 2.2.1 execa: 2.1.0 @@ -150,8 +143,7 @@ importers: devDependencies: '@boostercloud/application-tester': link:../application-tester '@boostercloud/eslint-config': link:../../tools/eslint-config - '@oclif/dev-cli': 1.26.10 - '@oclif/test': 2.3.17_t4lrjbt3sxauai4t5o275zsepa + '@oclif/test': 3.0.3 '@types/chai': 4.2.18 '@types/chai-as-promised': 7.1.4 '@types/child-process-promise': 2.2.2 @@ -161,7 +153,7 @@ importers: '@types/inquirer': 6.5.0 '@types/mocha': 10.0.1 '@types/mustache': 4.1.0 - '@types/node': 16.11.7 + '@types/node': 18.18.3 '@types/rewire': 2.5.28 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 @@ -176,7 +168,7 @@ importers: eslint-plugin-prettier: 3.4.0_uyy4h6aa7bacputuojct3xmumq eslint-plugin-unicorn: 44.0.2_eslint@8.39.0 faker: 5.1.0 - fancy-test: 1.4.3 + fancy-test: 3.0.1 mocha: 10.2.0 nyc: 15.1.0 prettier: 2.3.0 @@ -184,19 +176,19 @@ importers: rimraf: 5.0.0 sinon: 9.2.3 sinon-chai: 3.5.0_chai@4.2.0+sinon@9.2.3 - ts-node: 10.9.1_t4lrjbt3sxauai4t5o275zsepa + ts-node: 10.9.1_xpss65pzqvfdcnzjlkstkx6toy typescript: 4.7.4 ../../packages/framework-common-helpers: specifiers: - '@boostercloud/eslint-config': workspace:^1.19.0 - '@boostercloud/framework-types': workspace:^1.19.0 + '@boostercloud/eslint-config': workspace:^1.20.0 + '@boostercloud/framework-types': workspace:^1.20.0 '@effect-ts/core': ^0.60.4 '@types/chai': 4.2.18 '@types/chai-as-promised': 7.1.4 '@types/child-process-promise': ^2.2.1 '@types/mocha': 10.0.1 - '@types/node': 16.11.7 + '@types/node': ^18.15.3 '@types/rewire': ^2.5.28 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 @@ -232,7 +224,7 @@ importers: '@types/chai-as-promised': 7.1.4 '@types/child-process-promise': 2.2.2 '@types/mocha': 10.0.1 - '@types/node': 16.11.7 + '@types/node': 18.18.3 '@types/rewire': 2.5.28 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 @@ -253,15 +245,15 @@ importers: rimraf: 5.0.0 sinon: 9.2.3 sinon-chai: 3.5.0_chai@4.2.0+sinon@9.2.3 - ts-node: 10.9.1_t4lrjbt3sxauai4t5o275zsepa + ts-node: 10.9.1_xpss65pzqvfdcnzjlkstkx6toy typescript: 4.7.4 ../../packages/framework-core: specifiers: - '@boostercloud/eslint-config': workspace:^1.19.0 - '@boostercloud/framework-common-helpers': workspace:^1.19.0 - '@boostercloud/framework-types': workspace:^1.19.0 - '@boostercloud/metadata-booster': workspace:^1.19.0 + '@boostercloud/eslint-config': workspace:^1.20.0 + '@boostercloud/framework-common-helpers': workspace:^1.20.0 + '@boostercloud/framework-types': workspace:^1.20.0 + '@boostercloud/metadata-booster': workspace:^1.20.0 '@effect-ts/core': ^0.60.4 '@types/chai': 4.2.18 '@types/chai-as-promised': 7.1.4 @@ -269,7 +261,7 @@ importers: '@types/inflected': 1.1.29 '@types/jsonwebtoken': 9.0.1 '@types/mocha': 10.0.1 - '@types/node': 16.11.7 + '@types/node': ^18.15.3 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 '@types/validator': 13.1.3 @@ -328,7 +320,7 @@ importers: '@types/inflected': 1.1.29 '@types/jsonwebtoken': 9.0.1 '@types/mocha': 10.0.1 - '@types/node': 16.11.7 + '@types/node': 18.18.3 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 '@types/validator': 13.1.3 @@ -352,25 +344,25 @@ importers: rimraf: 5.0.0 sinon: 9.2.3 sinon-chai: 3.5.0_chai@4.2.0+sinon@9.2.3 - ts-node: 10.9.1_t4lrjbt3sxauai4t5o275zsepa + ts-node: 10.9.1_xpss65pzqvfdcnzjlkstkx6toy typescript: 4.7.4 ../../packages/framework-integration-tests: specifiers: '@apollo/client': 3.7.13 - '@boostercloud/application-tester': workspace:^1.19.0 - '@boostercloud/cli': workspace:^1.19.0 - '@boostercloud/eslint-config': workspace:^1.19.0 - '@boostercloud/framework-common-helpers': workspace:^1.19.0 - '@boostercloud/framework-core': workspace:^1.19.0 - '@boostercloud/framework-provider-aws': workspace:^1.19.0 - '@boostercloud/framework-provider-aws-infrastructure': workspace:^1.19.0 - '@boostercloud/framework-provider-azure': workspace:^1.19.0 - '@boostercloud/framework-provider-azure-infrastructure': workspace:^1.19.0 - '@boostercloud/framework-provider-local': workspace:^1.19.0 - '@boostercloud/framework-provider-local-infrastructure': workspace:^1.19.0 - '@boostercloud/framework-types': workspace:^1.19.0 - '@boostercloud/metadata-booster': workspace:^1.19.0 + '@boostercloud/application-tester': workspace:^1.20.0 + '@boostercloud/cli': workspace:^1.20.0 + '@boostercloud/eslint-config': workspace:^1.20.0 + '@boostercloud/framework-common-helpers': workspace:^1.20.0 + '@boostercloud/framework-core': workspace:^1.20.0 + '@boostercloud/framework-provider-aws': workspace:^1.20.0 + '@boostercloud/framework-provider-aws-infrastructure': workspace:^1.20.0 + '@boostercloud/framework-provider-azure': workspace:^1.20.0 + '@boostercloud/framework-provider-azure-infrastructure': workspace:^1.20.0 + '@boostercloud/framework-provider-local': workspace:^1.20.0 + '@boostercloud/framework-provider-local-infrastructure': workspace:^1.20.0 + '@boostercloud/framework-types': workspace:^1.20.0 + '@boostercloud/metadata-booster': workspace:^1.20.0 '@effect-ts/core': ^0.60.4 '@types/aws-lambda': 8.10.48 '@types/chai': 4.2.18 @@ -381,7 +373,7 @@ importers: '@types/jsonwebtoken': 9.0.1 '@types/mocha': 10.0.1 '@types/nedb': ^1.8.12 - '@types/node': 16.11.7 + '@types/node': ^18.15.3 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 '@typescript-eslint/eslint-plugin': ^5.0.0 @@ -419,8 +411,8 @@ importers: sinon: 9.2.3 subscriptions-transport-ws: 0.11.0 ts-node: ^10.9.1 + ts-patch: 2.0.2 tslib: ^2.4.0 - ttypescript: 1.5.15 typescript: 4.7.4 dependencies: '@boostercloud/framework-common-helpers': link:../framework-common-helpers @@ -452,7 +444,7 @@ importers: '@types/jsonwebtoken': 9.0.1 '@types/mocha': 10.0.1 '@types/nedb': 1.8.13 - '@types/node': 16.11.7 + '@types/node': 18.18.3 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 '@typescript-eslint/eslint-plugin': 5.59.1_lhpu32umveoeq4t2qgxwjpp3k4 @@ -486,15 +478,15 @@ importers: serverless-artillery: 0.5.2 sinon: 9.2.3 subscriptions-transport-ws: 0.11.0_graphql@16.6.0 - ts-node: 10.9.1_t4lrjbt3sxauai4t5o275zsepa - ttypescript: 1.5.15_6oasmw356qmm23djlsjgkwvrtm + ts-node: 10.9.1_xpss65pzqvfdcnzjlkstkx6toy + ts-patch: 2.0.2_typescript@4.7.4 typescript: 4.7.4 ../../packages/framework-provider-aws: specifiers: - '@boostercloud/eslint-config': workspace:^1.19.0 - '@boostercloud/framework-common-helpers': workspace:^1.19.0 - '@boostercloud/framework-types': workspace:^1.19.0 + '@boostercloud/eslint-config': workspace:^1.20.0 + '@boostercloud/framework-common-helpers': workspace:^1.20.0 + '@boostercloud/framework-types': workspace:^1.20.0 '@effect-ts/core': ^0.60.4 '@types/aws-lambda': 8.10.48 '@types/chai': 4.2.18 @@ -502,7 +494,7 @@ importers: '@types/chai-as-promised': 7.1.4 '@types/faker': 5.1.5 '@types/mocha': 10.0.1 - '@types/node': 16.11.7 + '@types/node': ^18.15.3 '@types/rewire': ^2.5.28 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 @@ -542,7 +534,7 @@ importers: '@types/chai-as-promised': 7.1.4 '@types/faker': 5.1.5 '@types/mocha': 10.0.1 - '@types/node': 16.11.7 + '@types/node': 18.18.3 '@types/rewire': 2.5.28 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 @@ -565,7 +557,7 @@ importers: rimraf: 5.0.0 sinon: 9.2.3 sinon-chai: 3.5.0_chai@4.2.0+sinon@9.2.3 - ts-node: 10.9.1_t4lrjbt3sxauai4t5o275zsepa + ts-node: 10.9.1_xpss65pzqvfdcnzjlkstkx6toy typescript: 4.7.4 velocityjs: 2.0.6 @@ -588,10 +580,10 @@ importers: '@aws-cdk/core': ^1.170.0 '@aws-cdk/custom-resources': ^1.170.0 '@aws-cdk/cx-api': ^1.170.0 - '@boostercloud/eslint-config': workspace:^1.19.0 - '@boostercloud/framework-common-helpers': workspace:^1.19.0 - '@boostercloud/framework-provider-aws': workspace:^1.19.0 - '@boostercloud/framework-types': workspace:^1.19.0 + '@boostercloud/eslint-config': workspace:^1.20.0 + '@boostercloud/framework-common-helpers': workspace:^1.20.0 + '@boostercloud/framework-provider-aws': workspace:^1.20.0 + '@boostercloud/framework-types': workspace:^1.20.0 '@effect-ts/core': ^0.60.4 '@types/archiver': 5.1.0 '@types/aws-lambda': 8.10.48 @@ -600,7 +592,7 @@ importers: '@types/chai-as-promised': 7.1.4 '@types/faker': 5.1.5 '@types/mocha': 10.0.1 - '@types/node': 16.11.7 + '@types/node': ^18.15.3 '@types/rewire': ^2.5.28 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 @@ -673,7 +665,7 @@ importers: '@types/chai-as-promised': 7.1.4 '@types/faker': 5.1.5 '@types/mocha': 10.0.1 - '@types/node': 16.11.7 + '@types/node': 18.18.3 '@types/rewire': 2.5.28 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 @@ -694,25 +686,25 @@ importers: rimraf: 5.0.0 sinon: 9.2.3 sinon-chai: 3.5.0_chai@4.2.0+sinon@9.2.3 - ts-node: 10.9.1_t4lrjbt3sxauai4t5o275zsepa + ts-node: 10.9.1_xpss65pzqvfdcnzjlkstkx6toy typescript: 4.7.4 velocityjs: 2.0.6 ../../packages/framework-provider-azure: specifiers: - '@azure/cosmos': ^3.17.0 + '@azure/cosmos': ^4.0.0 '@azure/functions': ^1.2.2 '@azure/identity': ~2.1.0 '@azure/web-pubsub': ~1.1.0 - '@boostercloud/eslint-config': workspace:^1.19.0 - '@boostercloud/framework-common-helpers': workspace:^1.19.0 - '@boostercloud/framework-types': workspace:^1.19.0 + '@boostercloud/eslint-config': workspace:^1.20.0 + '@boostercloud/framework-common-helpers': workspace:^1.20.0 + '@boostercloud/framework-types': workspace:^1.20.0 '@effect-ts/core': ^0.60.4 '@types/chai': 4.2.18 '@types/chai-as-promised': 7.1.4 '@types/faker': 5.1.5 '@types/mocha': 10.0.1 - '@types/node': 16.11.7 + '@types/node': ^18.15.3 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 '@typescript-eslint/eslint-plugin': ^5.0.0 @@ -735,7 +727,7 @@ importers: tslib: ^2.4.0 typescript: 4.7.4 dependencies: - '@azure/cosmos': 3.17.3 + '@azure/cosmos': 4.0.0 '@azure/functions': 1.2.3 '@azure/identity': 2.1.0 '@azure/web-pubsub': 1.1.1 @@ -749,7 +741,7 @@ importers: '@types/chai-as-promised': 7.1.4 '@types/faker': 5.1.5 '@types/mocha': 10.0.1 - '@types/node': 16.11.7 + '@types/node': 18.18.3 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 '@typescript-eslint/eslint-plugin': 5.59.1_lhpu32umveoeq4t2qgxwjpp3k4 @@ -768,20 +760,20 @@ importers: rimraf: 5.0.0 sinon: 9.2.3 sinon-chai: 3.5.0_chai@4.2.0+sinon@9.2.3 - ts-node: 10.9.1_t4lrjbt3sxauai4t5o275zsepa + ts-node: 10.9.1_xpss65pzqvfdcnzjlkstkx6toy typescript: 4.7.4 ../../packages/framework-provider-azure-infrastructure: specifiers: '@azure/arm-appservice': ^13.0.0 '@azure/arm-resources': ^5.0.1 - '@azure/cosmos': ^3.17.0 + '@azure/cosmos': ^4.0.0 '@azure/identity': ~2.1.0 - '@boostercloud/eslint-config': workspace:^1.19.0 - '@boostercloud/framework-common-helpers': workspace:^1.19.0 - '@boostercloud/framework-core': workspace:^1.19.0 - '@boostercloud/framework-provider-azure': workspace:^1.19.0 - '@boostercloud/framework-types': workspace:^1.19.0 + '@boostercloud/eslint-config': workspace:^1.20.0 + '@boostercloud/framework-common-helpers': workspace:^1.20.0 + '@boostercloud/framework-core': workspace:^1.20.0 + '@boostercloud/framework-provider-azure': workspace:^1.20.0 + '@boostercloud/framework-types': workspace:^1.20.0 '@cdktf/provider-azurerm': 5.0.13 '@cdktf/provider-time': 5.0.0 '@effect-ts/core': ^0.60.4 @@ -793,7 +785,7 @@ importers: '@types/mocha': 10.0.1 '@types/mustache': 4.1.0 '@types/needle': ^2.0.4 - '@types/node': 16.11.7 + '@types/node': ^18.15.3 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 '@types/uuid': 8.3.0 @@ -831,7 +823,7 @@ importers: dependencies: '@azure/arm-appservice': 13.0.3 '@azure/arm-resources': 5.2.0 - '@azure/cosmos': 3.17.3 + '@azure/cosmos': 4.0.0 '@azure/identity': 2.1.0 '@boostercloud/framework-common-helpers': link:../framework-common-helpers '@boostercloud/framework-core': link:../framework-core @@ -866,7 +858,7 @@ importers: '@types/fs-extra': 9.0.13 '@types/mocha': 10.0.1 '@types/mustache': 4.1.0 - '@types/node': 16.11.7 + '@types/node': 18.18.3 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 '@types/uuid': 8.3.0 @@ -883,14 +875,14 @@ importers: prettier: 2.3.0 rimraf: 5.0.0 sinon: 9.2.3 - ts-node: 10.9.1_t4lrjbt3sxauai4t5o275zsepa + ts-node: 10.9.1_xpss65pzqvfdcnzjlkstkx6toy typescript: 4.7.4 ../../packages/framework-provider-local: specifiers: - '@boostercloud/eslint-config': workspace:^1.19.0 - '@boostercloud/framework-common-helpers': workspace:^1.19.0 - '@boostercloud/framework-types': workspace:^1.19.0 + '@boostercloud/eslint-config': workspace:^1.20.0 + '@boostercloud/framework-common-helpers': workspace:^1.20.0 + '@boostercloud/framework-types': workspace:^1.20.0 '@effect-ts/core': ^0.60.4 '@types/chai': 4.2.18 '@types/chai-as-promised': 7.1.4 @@ -898,7 +890,7 @@ importers: '@types/faker': 5.1.5 '@types/mocha': 10.0.1 '@types/nedb': ^1.8.12 - '@types/node': 16.11.7 + '@types/node': ^18.15.3 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 '@types/sinon-express-mock': ^1.3.9 @@ -941,7 +933,7 @@ importers: '@types/express': 4.17.17 '@types/faker': 5.1.5 '@types/mocha': 10.0.1 - '@types/node': 16.11.7 + '@types/node': 18.18.3 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 '@types/sinon-express-mock': 1.3.9 @@ -964,15 +956,15 @@ importers: sinon: 9.2.3 sinon-chai: 3.5.0_chai@4.2.0+sinon@9.2.3 sinon-express-mock: 2.2.1_sinon@9.2.3 - ts-node: 10.9.1_t4lrjbt3sxauai4t5o275zsepa + ts-node: 10.9.1_xpss65pzqvfdcnzjlkstkx6toy typescript: 4.7.4 ../../packages/framework-provider-local-infrastructure: specifiers: - '@boostercloud/eslint-config': workspace:^1.19.0 - '@boostercloud/framework-common-helpers': workspace:^1.19.0 - '@boostercloud/framework-provider-local': workspace:^1.19.0 - '@boostercloud/framework-types': workspace:^1.19.0 + '@boostercloud/eslint-config': workspace:^1.20.0 + '@boostercloud/framework-common-helpers': workspace:^1.20.0 + '@boostercloud/framework-provider-local': workspace:^1.20.0 + '@boostercloud/framework-types': workspace:^1.20.0 '@effect-ts/core': ^0.60.4 '@types/chai': 4.2.18 '@types/chai-as-promised': 7.1.4 @@ -980,7 +972,7 @@ importers: '@types/express': ^4.17.13 '@types/faker': 5.1.5 '@types/mocha': 10.0.1 - '@types/node': 16.11.7 + '@types/node': ^18.15.3 '@types/node-schedule': ^1.3.2 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 @@ -1025,7 +1017,7 @@ importers: '@types/express': 4.17.17 '@types/faker': 5.1.5 '@types/mocha': 10.0.1 - '@types/node': 16.11.7 + '@types/node': 18.18.3 '@types/node-schedule': 1.3.2 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 @@ -1047,20 +1039,19 @@ importers: sinon: 9.2.3 sinon-chai: 3.5.0_chai@4.2.0+sinon@9.2.3 sinon-express-mock: 2.2.1_sinon@9.2.3 - ts-node: 10.9.1_t4lrjbt3sxauai4t5o275zsepa + ts-node: 10.9.1_xpss65pzqvfdcnzjlkstkx6toy typescript: 4.7.4 ../../packages/framework-types: specifiers: - '@boostercloud/eslint-config': workspace:^1.19.0 - '@boostercloud/metadata-booster': workspace:^1.19.0 + '@boostercloud/eslint-config': workspace:^1.20.0 + '@boostercloud/metadata-booster': workspace:^1.20.0 '@effect-ts/core': ^0.60.4 '@effect-ts/node': ~0.39.0 '@types/chai': 4.2.18 '@types/chai-as-promised': 7.1.4 - '@types/graphql': ^14.5.0 '@types/mocha': 10.0.1 - '@types/node': 16.11.7 + '@types/node': ^18.15.3 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 '@types/uuid': 8.3.0 @@ -1094,9 +1085,8 @@ importers: '@boostercloud/metadata-booster': link:../metadata-booster '@types/chai': 4.2.18 '@types/chai-as-promised': 7.1.4 - '@types/graphql': 14.5.0 '@types/mocha': 10.0.1 - '@types/node': 16.11.7 + '@types/node': 18.18.3 '@types/sinon': 10.0.0 '@types/sinon-chai': 3.2.5 '@types/uuid': 8.3.0 @@ -1121,9 +1111,9 @@ importers: ../../packages/metadata-booster: specifiers: - '@boostercloud/eslint-config': workspace:^1.19.0 + '@boostercloud/eslint-config': workspace:^1.20.0 '@effect-ts/core': ^0.60.4 - '@types/node': 16.11.7 + '@types/node': ^18.15.3 '@typescript-eslint/eslint-plugin': ^5.0.0 '@typescript-eslint/parser': ^5.0.0 eslint: ^8.23.1 @@ -1137,8 +1127,8 @@ importers: sinon: 9.2.3 ts-morph: 15.1.0 ts-node: ^10.9.1 + ts-patch: 2.0.2 tslib: ^2.4.0 - ttypescript: 1.5.15 typescript: 4.7.4 dependencies: '@effect-ts/core': 0.60.5 @@ -1147,7 +1137,7 @@ importers: tslib: 2.5.0 devDependencies: '@boostercloud/eslint-config': link:../../tools/eslint-config - '@types/node': 16.11.7 + '@types/node': 18.18.3 '@typescript-eslint/eslint-plugin': 5.59.1_lhpu32umveoeq4t2qgxwjpp3k4 '@typescript-eslint/parser': 5.59.1_cfyxzphvxk6hfgn64jwer55l5m eslint: 8.39.0 @@ -1158,8 +1148,8 @@ importers: prettier: 2.3.0 rimraf: 5.0.0 sinon: 9.2.3 - ts-node: 10.9.1_t4lrjbt3sxauai4t5o275zsepa - ttypescript: 1.5.15_6oasmw356qmm23djlsjgkwvrtm + ts-node: 10.9.1_xpss65pzqvfdcnzjlkstkx6toy + ts-patch: 2.0.2_typescript@4.7.4 typescript: 4.7.4 ../../tools/eslint-config: @@ -1543,7 +1533,7 @@ packages: '@aws-cdk/aws-logs': 1.199.0_tqi77pcvvujtgay5663ykqn7wy '@aws-cdk/aws-s3': 1.199.0_wim6pvar6pmwiq3fs3ksmix5ru '@aws-cdk/aws-s3-assets': 1.199.0_tqi77pcvvujtgay5663ykqn7wy - '@aws-cdk/aws-secretsmanager': 1.199.0_maqnqwhn36fygp3z4rdnivbxii + '@aws-cdk/aws-secretsmanager': 1.199.0_uxypjio4ejtfqgxognd5fibs2q '@aws-cdk/core': 1.199.0_kscyon7amn7dglog7cugnqvkwm '@aws-cdk/region-info': 1.199.0 constructs: 3.4.293 @@ -1765,7 +1755,7 @@ packages: '@aws-cdk/aws-route53-targets': 1.199.0_6qn3q4quwxpkjgl3z2r2rmaqqi '@aws-cdk/aws-s3': 1.199.0_wim6pvar6pmwiq3fs3ksmix5ru '@aws-cdk/aws-s3-assets': 1.199.0_tqi77pcvvujtgay5663ykqn7wy - '@aws-cdk/aws-secretsmanager': 1.199.0_maqnqwhn36fygp3z4rdnivbxii + '@aws-cdk/aws-secretsmanager': 1.199.0_uxypjio4ejtfqgxognd5fibs2q '@aws-cdk/aws-servicediscovery': 1.199.0_4axszbdsnc7kzhsa3r5g56z4bu '@aws-cdk/aws-sns': 1.199.0_wim6pvar6pmwiq3fs3ksmix5ru '@aws-cdk/aws-sqs': 1.199.0_iumdymv27iwprkm3rzoqxlpuia @@ -2011,7 +2001,7 @@ packages: '@aws-cdk/aws-lambda': 1.199.0_5pbncl2no5vqinyo3n2ekkob5q '@aws-cdk/aws-s3': 1.199.0_wim6pvar6pmwiq3fs3ksmix5ru '@aws-cdk/aws-s3-notifications': 1.199.0_fufarp47blk4okwshjegj2wjg4 - '@aws-cdk/aws-secretsmanager': 1.199.0_maqnqwhn36fygp3z4rdnivbxii + '@aws-cdk/aws-secretsmanager': 1.199.0_uxypjio4ejtfqgxognd5fibs2q '@aws-cdk/aws-sns': 1.199.0_wim6pvar6pmwiq3fs3ksmix5ru '@aws-cdk/aws-sns-subscriptions': 1.199.0_x7skkdpav5hf4ncc76dwztyszi '@aws-cdk/aws-sqs': 1.199.0_iumdymv27iwprkm3rzoqxlpuia @@ -2236,7 +2226,7 @@ packages: constructs: 3.4.293 dev: false - /@aws-cdk/aws-secretsmanager/1.199.0_maqnqwhn36fygp3z4rdnivbxii: + /@aws-cdk/aws-secretsmanager/1.199.0_uxypjio4ejtfqgxognd5fibs2q: resolution: {integrity: sha512-Dj0+q7I9xRwg1hHowrHb9rxmicDGZVmQixFaFuBdsS5zNfBNdC6WJGWhDddJDZIPclip06fXBm/by4+l4XUpNw==} engines: {node: '>= 14.15.0'} peerDependencies: @@ -2246,18 +2236,12 @@ packages: '@aws-cdk/cx-api': 1.199.0 constructs: ^3.3.69 dependencies: - '@aws-cdk/aws-ec2': 1.199.0_ylylsu27pdmlfxyxktlluxtkr4 '@aws-cdk/aws-iam': 1.199.0_xwfh4icwyvj4zfjhzlqde6qllu - '@aws-cdk/aws-kms': 1.199.0_iumdymv27iwprkm3rzoqxlpuia '@aws-cdk/aws-lambda': 1.199.0_5pbncl2no5vqinyo3n2ekkob5q '@aws-cdk/aws-sam': 1.199.0_xwfh4icwyvj4zfjhzlqde6qllu '@aws-cdk/core': 1.199.0_kscyon7amn7dglog7cugnqvkwm '@aws-cdk/cx-api': 1.199.0 constructs: 3.4.293 - transitivePeerDependencies: - - '@aws-cdk/assets' - - '@aws-cdk/aws-logs' - - '@aws-cdk/aws-s3' dev: false /@aws-cdk/aws-servicediscovery/1.199.0_4axszbdsnc7kzhsa3r5g56z4bu: @@ -2626,8 +2610,8 @@ packages: tslib: 2.5.0 dev: false - /@azure/cosmos/3.17.3: - resolution: {integrity: sha512-wBglkQ6Irjv5Vo2iw8fd6eYj60WYRSSg4/0DBkeOP6BwQ4RA91znsOHd6s3qG6UAbNgYuzC9Nnq07vlFFZkHEw==} + /@azure/cosmos/4.0.0: + resolution: {integrity: sha512-/Z27p1+FTkmjmm8jk90zi/HrczPHw2t8WecFnsnTe4xGocWl0Z4clP0YlLUTJPhRLWYa5upwD9rMvKJkS1f1kg==} engines: {node: '>=14.0.0'} dependencies: '@azure/abort-controller': 1.1.0 @@ -3221,108 +3205,7 @@ packages: resolution: {integrity: sha512-3BGrt6FLjqM6br5AhWRKTr3u5GIVkjRYeAFrMp3HjnfICrg4xOrVRwFavKT6tsp++bq5dluL5t8ME/Nha/6c1Q==} deprecated: this package has been deprecated, use `ci-info` instead - /@oclif/command/1.8.24_@oclif+config@1.18.2: - resolution: {integrity: sha512-FbSChfBO2QFeC5eEeXmi8+kZvBCDzYdpEKhOMaz0sfKMerwSlKxsqWQPGWCjTHaowIUMtnMD3VZ8yfX5qE7SAQ==} - engines: {node: '>=12.0.0'} - peerDependencies: - '@oclif/config': ^1 - dependencies: - '@oclif/config': 1.18.2 - '@oclif/errors': 1.3.6 - '@oclif/help': 1.0.5 - '@oclif/parser': 3.8.10 - debug: 4.3.4 - semver: 7.5.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@oclif/command/1.8.24_@oclif+config@1.18.8: - resolution: {integrity: sha512-FbSChfBO2QFeC5eEeXmi8+kZvBCDzYdpEKhOMaz0sfKMerwSlKxsqWQPGWCjTHaowIUMtnMD3VZ8yfX5qE7SAQ==} - engines: {node: '>=12.0.0'} - peerDependencies: - '@oclif/config': ^1 - dependencies: - '@oclif/config': 1.18.8 - '@oclif/errors': 1.3.6 - '@oclif/help': 1.0.5 - '@oclif/parser': 3.8.10 - debug: 4.3.4 - semver: 7.5.0 - transitivePeerDependencies: - - supports-color - - /@oclif/command/1.8.24_idyxfyelz3bjtokfy3m65ptkne: - resolution: {integrity: sha512-FbSChfBO2QFeC5eEeXmi8+kZvBCDzYdpEKhOMaz0sfKMerwSlKxsqWQPGWCjTHaowIUMtnMD3VZ8yfX5qE7SAQ==} - engines: {node: '>=12.0.0'} - peerDependencies: - '@oclif/config': ^1 - dependencies: - '@oclif/config': 1.18.8 - '@oclif/errors': 1.3.6 - '@oclif/help': 1.0.5_supports-color@8.1.1 - '@oclif/parser': 3.8.10 - debug: 4.3.4_supports-color@8.1.1 - semver: 7.5.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@oclif/config/1.18.2: - resolution: {integrity: sha512-cE3qfHWv8hGRCP31j7fIS7BfCflm/BNZ2HNqHexH+fDrdF2f1D5S8VmXWLC77ffv3oDvWyvE9AZeR0RfmHCCaA==} - engines: {node: '>=8.0.0'} - dependencies: - '@oclif/errors': 1.3.6 - '@oclif/parser': 3.8.10 - debug: 4.3.4 - globby: 11.1.0 - is-wsl: 2.2.0 - tslib: 2.5.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@oclif/config/1.18.6: - resolution: {integrity: sha512-OWhCpdu4QqggOPX1YPZ4XVmLLRX+lhGjXV6RNA7sogOwLqlEmSslnN/lhR5dkhcWZbKWBQH29YCrB3LDPRu/IA==} - engines: {node: '>=8.0.0'} - dependencies: - '@oclif/errors': 1.3.6 - '@oclif/parser': 3.8.10 - debug: 4.3.4 - globby: 11.1.0 - is-wsl: 2.2.0 - tslib: 2.5.0 - transitivePeerDependencies: - - supports-color - - /@oclif/config/1.18.6_supports-color@8.1.1: - resolution: {integrity: sha512-OWhCpdu4QqggOPX1YPZ4XVmLLRX+lhGjXV6RNA7sogOwLqlEmSslnN/lhR5dkhcWZbKWBQH29YCrB3LDPRu/IA==} - engines: {node: '>=8.0.0'} - dependencies: - '@oclif/errors': 1.3.6 - '@oclif/parser': 3.8.10 - debug: 4.3.4_supports-color@8.1.1 - globby: 11.1.0 - is-wsl: 2.2.0 - tslib: 2.5.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@oclif/config/1.18.8: - resolution: {integrity: sha512-FetS52+emaZQui0roFSdbBP8ddBkIezEoH2NcjLJRjqkMGdE9Z1V+jsISVqTYXk2KJ1gAI0CHDXFjJlNBYbJBg==} - engines: {node: '>=8.0.0'} - dependencies: - '@oclif/errors': 1.3.6 - '@oclif/parser': 3.8.10 - debug: 4.3.4 - globby: 11.1.0 - is-wsl: 2.2.0 - tslib: 2.5.0 - transitivePeerDependencies: - - supports-color - - /@oclif/core/2.8.2_t4lrjbt3sxauai4t5o275zsepa: + /@oclif/core/2.8.2_xpss65pzqvfdcnzjlkstkx6toy: resolution: {integrity: sha512-g50NrCdEcFlBfuwZb9RxLmxPNQ9wIaBPOiwbxlGYRkHMnsC6LNHcvVtyDnmndU8qoXrmCOZ6ocSZenOMlG+G1w==} engines: {node: '>=14.0.0'} dependencies: @@ -3350,7 +3233,7 @@ packages: strip-ansi: 6.0.1 supports-color: 8.1.1 supports-hyperlinks: 2.3.0 - ts-node: 10.9.1_t4lrjbt3sxauai4t5o275zsepa + ts-node: 10.9.1_xpss65pzqvfdcnzjlkstkx6toy tslib: 2.5.0 widest-line: 3.1.0 wordwrap: 1.0.0 @@ -3360,119 +3243,43 @@ packages: - '@swc/wasm' - '@types/node' - typescript + dev: false - /@oclif/dev-cli/1.26.10: - resolution: {integrity: sha512-dJ+II9rVXckzFvG+82PbfphMTnoqiHvsuAAbcHrLdZWPBnFAiDKhNYE0iHnA/knAC4VGXhogsrAJ3ERT5d5r2g==} - engines: {node: '>=8.10.0'} - hasBin: true - dependencies: - '@oclif/command': 1.8.24_@oclif+config@1.18.8 - '@oclif/config': 1.18.8 - '@oclif/errors': 1.3.6 - '@oclif/plugin-help': 3.2.18 - cli-ux: 5.6.7_@oclif+config@1.18.8 - debug: 4.3.4 - find-yarn-workspace-root: 2.0.0 - fs-extra: 8.1.0 - github-slugger: 1.5.0 - lodash: 4.17.21 - normalize-package-data: 3.0.3 - qqjs: 0.3.11 - tslib: 2.5.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@oclif/errors/1.3.5: - resolution: {integrity: sha512-OivucXPH/eLLlOT7FkCMoZXiaVYf8I/w1eTAM1+gKzfhALwWTusxEx7wBmW0uzvkSg/9ovWLycPaBgJbM3LOCQ==} - engines: {node: '>=8.0.0'} - dependencies: - clean-stack: 3.0.1 - fs-extra: 8.1.0 - indent-string: 4.0.0 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - - /@oclif/errors/1.3.6: - resolution: {integrity: sha512-fYaU4aDceETd89KXP+3cLyg9EHZsLD3RxF2IU9yxahhBpspWjkWi3Dy3bTgcwZ3V47BgxQaGapzJWDM33XIVDQ==} - engines: {node: '>=8.0.0'} - dependencies: - clean-stack: 3.0.1 - fs-extra: 8.1.0 - indent-string: 4.0.0 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - - /@oclif/help/1.0.5: - resolution: {integrity: sha512-77ZXqVXcd+bQ6EafN56KbL4PbNtZM/Lq4GQElekNav+CPIgPNKT3AtMTQrc0fWke6bb/BTLB+1Fu1gWgx643jQ==} - engines: {node: '>=8.0.0'} - dependencies: - '@oclif/config': 1.18.6 - '@oclif/errors': 1.3.6 - chalk: 4.1.2 - indent-string: 4.0.0 - lodash: 4.17.21 - string-width: 4.2.3 - strip-ansi: 6.0.1 - widest-line: 3.1.0 - wrap-ansi: 6.2.0 - transitivePeerDependencies: - - supports-color - - /@oclif/help/1.0.5_supports-color@8.1.1: - resolution: {integrity: sha512-77ZXqVXcd+bQ6EafN56KbL4PbNtZM/Lq4GQElekNav+CPIgPNKT3AtMTQrc0fWke6bb/BTLB+1Fu1gWgx643jQ==} - engines: {node: '>=8.0.0'} - dependencies: - '@oclif/config': 1.18.6_supports-color@8.1.1 - '@oclif/errors': 1.3.6 - chalk: 4.1.2 - indent-string: 4.0.0 - lodash: 4.17.21 - string-width: 4.2.3 - strip-ansi: 6.0.1 - widest-line: 3.1.0 - wrap-ansi: 6.2.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@oclif/linewrap/1.0.0: - resolution: {integrity: sha512-Ups2dShK52xXa8w6iBWLgcjPJWjais6KPJQq3gQ/88AY6BXoTX+MIGFPrWQO1KLMiQfoTpcLnUwloN4brrVUHw==} - - /@oclif/parser/3.8.10: - resolution: {integrity: sha512-J4l/NcnfbIU84+NNdy6bxq9yJt4joFWNvpk59hq+uaQPUNtjmNJDVGuRvf6GUOxHNgRsVK1JRmd/Ez+v7Z9GqQ==} - engines: {node: '>=8.0.0'} - dependencies: - '@oclif/errors': 1.3.6 - '@oclif/linewrap': 1.0.0 - chalk: 4.1.2 - tslib: 2.5.0 - - /@oclif/plugin-help/3.2.18: - resolution: {integrity: sha512-5n5Pkz4L0duknIvFwx2Ko9Xda3miT6RZP8bgaaK3Q/9fzVBrhi4bOM0u05/OThI6V+3NsSdxYS2o1NLcXToWDg==} - engines: {node: '>=8.0.0'} + /@oclif/core/3.9.0: + resolution: {integrity: sha512-9UT0ySJgaUvERUQwDFh0u9Q5cfoBttfyaJ1sorSms6H5AELIjQ2Yvu2QfzPmnAit2rod+hdcDZ+O1Hia5Zcz+Q==} + engines: {node: '>=18.0.0'} dependencies: - '@oclif/command': 1.8.24_@oclif+config@1.18.2 - '@oclif/config': 1.18.2 - '@oclif/errors': 1.3.5 - '@oclif/help': 1.0.5 + ansi-escapes: 4.3.2 + ansi-styles: 4.3.0 + cardinal: 2.1.1 chalk: 4.1.2 + clean-stack: 3.0.1 + cli-progress: 3.12.0 + debug: 4.3.4_supports-color@8.1.1 + ejs: 3.1.9 + get-package-type: 0.1.0 + globby: 11.1.0 + hyperlinker: 1.0.0 indent-string: 4.0.0 - lodash: 4.17.21 + is-wsl: 2.2.0 + js-yaml: 3.14.1 + natural-orderby: 2.0.3 + object-treeify: 1.1.33 + password-prompt: 1.1.2 + slice-ansi: 4.0.0 string-width: 4.2.3 strip-ansi: 6.0.1 + supports-color: 8.1.1 + supports-hyperlinks: 2.3.0 widest-line: 3.1.0 - wrap-ansi: 6.2.0 - transitivePeerDependencies: - - supports-color - dev: true + wordwrap: 1.0.0 + wrap-ansi: 7.0.0 - /@oclif/plugin-help/5.2.9_t4lrjbt3sxauai4t5o275zsepa: + /@oclif/plugin-help/5.2.9_xpss65pzqvfdcnzjlkstkx6toy: resolution: {integrity: sha512-0J3oowPURZJ4Dn1p1WpQ46E4+CoV20KTn1cvsNiDl6Hmbw+qoljKQnArJJzNFeZQxWo4R7/S42PrzKJTVYh68Q==} engines: {node: '>=12.0.0'} dependencies: - '@oclif/core': 2.8.2_t4lrjbt3sxauai4t5o275zsepa + '@oclif/core': 2.8.2_xpss65pzqvfdcnzjlkstkx6toy transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -3480,28 +3287,19 @@ packages: - typescript dev: false - /@oclif/screen/1.0.4: - resolution: {integrity: sha512-60CHpq+eqnTxLZQ4PGHYNwUX572hgpMHGPtTWMjdTMsAvlm69lZV/4ly6O3sAYkomo4NggGcomrDpBe34rxUqw==} - engines: {node: '>=8.0.0'} - deprecated: Deprecated in favor of @oclif/core - dev: true - - /@oclif/test/2.3.17_t4lrjbt3sxauai4t5o275zsepa: - resolution: {integrity: sha512-Ph3Gg1n7Sz2JHsoLHNifzwbeDs8kKlBK+JcFikkoH7Fc+FoNXOsEBY6HTF0/8P3SeVK3H3MyBEvGNsGbeClhtg==} - engines: {node: '>=12.0.0'} + /@oclif/test/3.0.3: + resolution: {integrity: sha512-hhQa732q85z71wur0Tzf9n9Z32Yiq8Hb4suNGeweYHtNQ5DmWgGqHJ57S+zs6ri0GF+xJmzRyr5qFq8KNs3Xqg==} + engines: {node: '>=18.0.0'} dependencies: - '@oclif/core': 2.8.2_t4lrjbt3sxauai4t5o275zsepa - fancy-test: 2.0.19 + '@oclif/core': 3.9.0 + chai: 4.3.10 + fancy-test: 3.0.1 transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' - - '@types/node' - supports-color - - typescript dev: true /@pkgjs/parseargs/0.11.0: - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==, tarball: https://repo1.uhc.com:443/artifactory/api/npm/npm-virtual/@pkgjs/parseargs/-/parseargs-0.11.0.tgz} + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} requiresBuild: true dev: true @@ -3675,6 +3473,24 @@ packages: dependencies: type-detect: 4.0.8 + /@sinonjs/commons/2.0.0: + resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} + dependencies: + type-detect: 4.0.8 + dev: true + + /@sinonjs/commons/3.0.0: + resolution: {integrity: sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==} + dependencies: + type-detect: 4.0.8 + dev: true + + /@sinonjs/fake-timers/10.3.0: + resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} + dependencies: + '@sinonjs/commons': 3.0.0 + dev: true + /@sinonjs/fake-timers/6.0.1: resolution: {integrity: sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==} dependencies: @@ -3692,6 +3508,14 @@ packages: lodash.get: 4.4.2 type-detect: 4.0.8 + /@sinonjs/samsam/8.0.0: + resolution: {integrity: sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==} + dependencies: + '@sinonjs/commons': 2.0.0 + lodash.get: 4.4.2 + type-detect: 4.0.8 + dev: true + /@sinonjs/text-encoding/0.7.2: resolution: {integrity: sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==} @@ -3752,14 +3576,14 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 16.11.7 + '@types/node': 18.18.3 /@types/cacheable-request/6.0.3: resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==} dependencies: '@types/http-cache-semantics': 4.0.1 '@types/keyv': 3.1.4 - '@types/node': 16.11.7 + '@types/node': 18.18.3 '@types/responselike': 1.0.0 dev: true @@ -3782,29 +3606,30 @@ packages: /@types/child-process-promise/2.2.2: resolution: {integrity: sha512-4eGTIhKW0jb9DlS81Fgo/UyZ12DMhDhz3Ec8tdHW53l4ubteynNIuy7Z1HNnyHn1jTzXa/o9iX0WoAdiSoDs+Q==} dependencies: - '@types/node': 16.11.7 + '@types/node': 18.18.3 dev: true /@types/cli-progress/3.11.0: resolution: {integrity: sha512-XhXhBv1R/q2ahF3BM7qT5HLzJNlIL0wbcGyZVjqOTqAybAnsLisd7gy1UCyIqpL+5Iv6XhlSyzjLCnI2sIdbCg==} dependencies: - '@types/node': 16.11.7 + '@types/node': 18.18.3 + dev: false /@types/connect/3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 16.11.7 + '@types/node': 18.18.3 /@types/cors/2.8.13: resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==} dependencies: - '@types/node': 16.11.7 + '@types/node': 18.18.3 dev: true /@types/express-serve-static-core/4.17.34: resolution: {integrity: sha512-fvr49XlCGoUj2Pp730AItckfjat4WNb0lb3kfrLWffd+RLeoGAMsq7UOy04PAPtoL01uKwcp6u8nhzpgpDYr3w==} dependencies: - '@types/node': 16.11.7 + '@types/node': 18.18.3 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 @@ -3824,28 +3649,14 @@ packages: /@types/fs-extra/9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 16.11.7 - dev: true - - /@types/glob/7.2.0: - resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} - dependencies: - '@types/minimatch': 5.1.2 - '@types/node': 16.11.7 + '@types/node': 18.18.3 dev: true /@types/glob/8.1.0: resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 16.11.7 - - /@types/graphql/14.5.0: - resolution: {integrity: sha512-MOkzsEp1Jk5bXuAsHsUi6BVv0zCO+7/2PTiZMXWDSsMXvNU6w/PLMQT2vHn8hy2i0JqojPz1Sz6rsFjHtsU0lA==} - deprecated: This is a stub types definition. graphql provides its own type definitions, so you do not need this installed. - dependencies: - graphql: 16.6.0 - dev: true + '@types/node': 18.18.3 /@types/http-cache-semantics/4.0.1: resolution: {integrity: sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==} @@ -3871,12 +3682,12 @@ packages: /@types/jsonwebtoken/9.0.1: resolution: {integrity: sha512-c5ltxazpWabia/4UzhIoaDcIza4KViOQhdbjRlfcIGVnsE3c3brkz9Z+F/EeJIECOQP7W7US2hNE930cWWkPiw==} dependencies: - '@types/node': 16.11.7 + '@types/node': 18.18.3 /@types/keyv/3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 16.11.7 + '@types/node': 18.18.3 dev: true /@types/lodash/4.14.194: @@ -3903,41 +3714,32 @@ packages: /@types/nedb/1.8.13: resolution: {integrity: sha512-x/aIeHmmiDq1kMzgHvjygxl5RZGzIabFcq2HpRzB3X26AdfPg5Y70EwWrcZM/TuJwNHtWRruD/telSTvPEY6Xw==} dependencies: - '@types/node': 16.11.7 + '@types/node': 18.18.3 /@types/needle/2.5.3: resolution: {integrity: sha512-RwgTwMRaedfyCBe5SSWMpm1Yqzc5UPZEMw0eAd09OSyV93nLRj9/evMGZmgFeHKzUOd4xxtHvgtc+rjcBjI1Qg==} dependencies: - '@types/node': 16.11.7 + '@types/node': 18.18.3 dev: false - /@types/nock/11.1.0: - resolution: {integrity: sha512-jI/ewavBQ7X5178262JQR0ewicPAcJhXS/iFaNJl0VHLfyosZ/kwSrsa6VNQNSO8i9d8SqdRgOtZSOKJ/+iNMw==} - deprecated: This is a stub types definition. nock provides its own type definitions, so you do not need this installed. - dependencies: - nock: 11.8.2 - transitivePeerDependencies: - - supports-color - dev: true - /@types/node-fetch/2.6.3: resolution: {integrity: sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==} dependencies: - '@types/node': 16.11.7 + '@types/node': 18.18.3 form-data: 3.0.1 /@types/node-schedule/1.3.2: resolution: {integrity: sha512-Y0CqdAr+lCpArT8CJJjJq4U2v8Bb5e7ru2nV/NhDdaptCMCRdOL3Y7tAhen39HluQMaIKWvPbDuiFBUQpg7Srw==} dependencies: - '@types/node': 16.11.7 + '@types/node': 18.18.3 dev: true /@types/node/10.17.60: resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} dev: false - /@types/node/16.11.7: - resolution: {integrity: sha512-QB5D2sqfSjCmTuWcBWyJ+/44bcjO7VbjSbOE0ucoVbAsSNQc4Lt6QkgkVXkTDwkL4z/beecZNDvVX15D4P8Jbw==} + /@types/node/18.18.3: + resolution: {integrity: sha512-0OVfGupTl3NBFr8+iXpfZ8NR7jfFO+P1Q+IO/q0wbo02wYkP5gy36phojeYWpLQ6WAMjl+VfmqUk2YbUfp0irA==} /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -3952,7 +3754,7 @@ packages: /@types/responselike/1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: - '@types/node': 16.11.7 + '@types/node': 18.18.3 dev: true /@types/rewire/2.5.28: @@ -3966,13 +3768,13 @@ packages: resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} dependencies: '@types/mime': 1.3.2 - '@types/node': 16.11.7 + '@types/node': 18.18.3 /@types/serve-static/1.15.1: resolution: {integrity: sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==} dependencies: '@types/mime': 3.0.1 - '@types/node': 16.11.7 + '@types/node': 18.18.3 /@types/sinon-chai/3.2.5: resolution: {integrity: sha512-bKQqIpew7mmIGNRlxW6Zli/QVyc3zikpGzCa797B/tRnD9OtHvZ/ts8sYXV+Ilj9u3QRaUEM8xrjgd1gwm1BpQ==} @@ -3996,7 +3798,7 @@ packages: /@types/through/0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 16.11.7 + '@types/node': 18.18.3 dev: true /@types/uuid/8.3.0: @@ -4010,7 +3812,7 @@ packages: /@types/ws/8.5.4: resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} dependencies: - '@types/node': 16.11.7 + '@types/node': 18.18.3 dev: true /@types/yoga-layout/1.9.2: @@ -4809,6 +4611,19 @@ packages: pathval: 1.1.1 type-detect: 4.0.8 + /chai/4.3.10: + resolution: {integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==} + engines: {node: '>=4'} + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.3 + deep-eql: 4.1.3 + get-func-name: 2.0.2 + loupe: 2.3.7 + pathval: 1.1.1 + type-detect: 4.0.8 + dev: true + /chalk/2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -4834,6 +4649,12 @@ packages: /check-error/1.0.2: resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} + /check-error/1.0.3: + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + dependencies: + get-func-name: 2.0.2 + dev: true + /child-process-ext/2.1.1: resolution: {integrity: sha512-0UQ55f51JBkOFa+fvR76ywRzxiPwQS3Xe8oe5bZRphpv+dIMeerW5Zn5e4cUy4COJwVtJyU0R79RMnw+aCqmGA==} dependencies: @@ -4866,10 +4687,6 @@ packages: fsevents: 2.3.2 dev: true - /chownr/1.1.4: - resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} - dev: true - /chownr/2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} @@ -4969,41 +4786,6 @@ packages: slice-ansi: 3.0.0 string-width: 4.2.3 - /cli-ux/5.6.7_@oclif+config@1.18.8: - resolution: {integrity: sha512-dsKAurMNyFDnO6X1TiiRNiVbL90XReLKcvIq4H777NMqXGBxBws23ag8ubCJE97vVZEgWG2eSUhsyLf63Jv8+g==} - engines: {node: '>=8.0.0'} - deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. - dependencies: - '@oclif/command': 1.8.24_idyxfyelz3bjtokfy3m65ptkne - '@oclif/errors': 1.3.6 - '@oclif/linewrap': 1.0.0 - '@oclif/screen': 1.0.4 - ansi-escapes: 4.3.2 - ansi-styles: 4.3.0 - cardinal: 2.1.1 - chalk: 4.1.2 - clean-stack: 3.0.1 - cli-progress: 3.12.0 - extract-stack: 2.0.0 - fs-extra: 8.1.0 - hyperlinker: 1.0.0 - indent-string: 4.0.0 - is-wsl: 2.2.0 - js-yaml: 3.14.1 - lodash: 4.17.21 - natural-orderby: 2.0.3 - object-treeify: 1.1.33 - password-prompt: 1.1.2 - semver: 7.5.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - supports-color: 8.1.1 - supports-hyperlinks: 2.3.0 - tslib: 2.5.0 - transitivePeerDependencies: - - '@oclif/config' - dev: true - /cli-width/3.0.0: resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} engines: {node: '>= 10'} @@ -5393,6 +5175,13 @@ packages: dependencies: type-detect: 4.0.8 + /deep-eql/4.1.3: + resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + engines: {node: '>=6'} + dependencies: + type-detect: 4.0.8 + dev: true + /deep-is/0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} @@ -5454,11 +5243,6 @@ packages: resolution: {integrity: sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g==} engines: {node: '>=4'} - /detect-indent/6.1.0: - resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} - engines: {node: '>=8'} - dev: true - /detect-newline/2.1.0: resolution: {integrity: sha512-CwffZFvlJffUg9zZA0uqrjQayUTC8ob94pnr5sFwaVv3IOmkfUHcWH+jXaQK3askE51Cqe8/9Ql/0uXNwqZ8Zg==} engines: {node: '>=0.10.0'} @@ -5487,7 +5271,6 @@ packages: /diff/5.1.0: resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} engines: {node: '>=0.3.1'} - dev: false /dir-glob/3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} @@ -6013,19 +5796,6 @@ packages: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} - /execa/0.10.0: - resolution: {integrity: sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==} - engines: {node: '>=4'} - dependencies: - cross-spawn: 6.0.5 - get-stream: 3.0.0 - is-stream: 1.1.0 - npm-run-path: 2.0.2 - p-finally: 1.0.0 - signal-exit: 3.0.7 - strip-eof: 1.0.0 - dev: true - /execa/2.1.0: resolution: {integrity: sha512-Y/URAVapfbYy2Xp/gb6A0E7iR8xeqOCXsuuaoMn7A5PzrXUK84E1gyiEfq0wQd/GHA6GsoHWwhNq8anb0mleIw==} engines: {node: ^8.12.0 || >=9.7.0} @@ -6110,43 +5880,22 @@ packages: iconv-lite: 0.4.24 tmp: 0.0.33 - /extract-stack/2.0.0: - resolution: {integrity: sha512-AEo4zm+TenK7zQorGK1f9mJ8L14hnTDi2ZQPR+Mub1NX8zimka1mXpV5LpH8x9HoUmFSHZCfLHqWvp0Y4FxxzQ==} - engines: {node: '>=8'} - dev: true - /faker/5.1.0: resolution: {integrity: sha512-RrWKFSSA/aNLP0g3o2WW1Zez7/MnMr7xkiZmoCfAGZmdkDQZ6l2KtuXHN5XjdvpRjDl8+3vf+Rrtl06Z352+Mw==} dev: true - /fancy-test/1.4.3: - resolution: {integrity: sha512-Lt3mcQ0jn9Kg9JDmobVb4ZANiyT4e2VC5qbQvuzJVNYXyKjSgFWKn7bZN4BKei33v5jYWx28KlbDgsxuqnBRvg==} - engines: {node: '>=8.0.0'} - dependencies: - '@types/chai': 4.2.18 - '@types/lodash': 4.14.194 - '@types/mocha': 10.0.1 - '@types/nock': 11.1.0 - '@types/node': 16.11.7 - '@types/sinon': 10.0.0 - lodash: 4.17.21 - mock-stdin: 0.3.1 - stdout-stderr: 0.1.13 - transitivePeerDependencies: - - supports-color - dev: true - - /fancy-test/2.0.19: - resolution: {integrity: sha512-Zlj9GadzSXMLT11227FvkPOlM7wtzElRRJnUbwmC4tScbRUZx04PrS30fSuQCGT4hjaT8ZHQrEGea8S3xYrwsg==} - engines: {node: '>=12.0.0'} + /fancy-test/3.0.1: + resolution: {integrity: sha512-Ke1IFOGEBxP2dNg0X7ZYPUSwKSRr5GNn3xM/2DpHkP86riF3MFDpesXJuD1TGm7gcfwBtYpuSzuw3m704bThVg==} + engines: {node: '>=18.0.0'} dependencies: '@types/chai': 4.2.18 '@types/lodash': 4.14.194 - '@types/node': 16.11.7 + '@types/node': 18.18.3 '@types/sinon': 10.0.0 lodash: 4.17.21 mock-stdin: 1.0.0 - nock: 13.3.0 + nock: 13.3.6 + sinon: 16.1.3 stdout-stderr: 0.1.13 transitivePeerDependencies: - supports-color @@ -6329,12 +6078,6 @@ packages: locate-path: 6.0.0 path-exists: 4.0.0 - /find-yarn-workspace-root/2.0.0: - resolution: {integrity: sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==} - dependencies: - micromatch: 4.0.5 - dev: true - /flat-cache/2.0.1: resolution: {integrity: sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==} engines: {node: '>=4'} @@ -6445,14 +6188,6 @@ packages: jsonfile: 6.1.0 universalify: 2.0.0 - /fs-extra/6.0.1: - resolution: {integrity: sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==} - dependencies: - graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 - dev: true - /fs-extra/8.1.0: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} engines: {node: '>=6 <7 || >=8'} @@ -6494,7 +6229,7 @@ packages: dev: true /fsevents/2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==, tarball: https://repo1.uhc.com:443/artifactory/api/npm/npm-virtual/fsevents/-/fsevents-2.3.2.tgz} + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true @@ -6531,6 +6266,10 @@ packages: /get-func-name/2.0.0: resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} + /get-func-name/2.0.2: + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + dev: true + /get-intrinsic/1.2.0: resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==} dependencies: @@ -6560,11 +6299,6 @@ packages: pinkie-promise: 2.0.1 dev: true - /get-stream/3.0.0: - resolution: {integrity: sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==} - engines: {node: '>=4'} - dev: true - /get-stream/5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} @@ -6583,10 +6317,6 @@ packages: call-bind: 1.0.2 get-intrinsic: 1.2.0 - /github-slugger/1.5.0: - resolution: {integrity: sha512-wIh+gKBI9Nshz2o46B0B3f5k/W+WI9ZAv6y5Dn5WJ5SK1t0TnDimB4WE5rmTD05ZAIn8HALCZVmCsvj0w0v0lw==} - dev: true - /glob-parent/5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -6632,6 +6362,26 @@ packages: once: 1.4.0 path-is-absolute: 1.0.1 + /glob/8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.6 + once: 1.4.0 + dev: true + + /global-prefix/3.0.0: + resolution: {integrity: sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==} + engines: {node: '>=6'} + dependencies: + ini: 1.3.8 + kind-of: 6.0.3 + which: 1.3.1 + dev: true + /globals/11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} @@ -6656,20 +6406,6 @@ packages: dependencies: define-properties: 1.2.0 - /globby/10.0.2: - resolution: {integrity: sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==} - engines: {node: '>=8'} - dependencies: - '@types/glob': 7.2.0 - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.2.12 - glob: 7.2.3 - ignore: 5.2.4 - merge2: 1.4.1 - slash: 3.0.0 - dev: true - /globby/11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -6826,13 +6562,6 @@ packages: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true - /hosted-git-info/4.1.0: - resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} - engines: {node: '>=10'} - dependencies: - lru-cache: 6.0.0 - dev: true - /html-escaper/2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: true @@ -6841,20 +6570,6 @@ packages: resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} dev: true - /http-call/5.3.0: - resolution: {integrity: sha512-ahwimsC23ICE4kPl9xTBjKB4inbRaeLyZeRunC/1Jy/Z6X8tv22MEAjK+KBOMSVLaqXPTTmd8638waVIKLGx2w==} - engines: {node: '>=8.0.0'} - dependencies: - content-type: 1.0.5 - debug: 4.3.4 - is-retry-allowed: 1.2.0 - is-stream: 2.0.1 - parse-json: 4.0.0 - tunnel-agent: 0.6.0 - transitivePeerDependencies: - - supports-color - dev: true - /http-errors/2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} @@ -6959,6 +6674,10 @@ packages: /inherits/2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + /ini/1.3.8: + resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + dev: true + /ink-select-input/4.2.2_ink@3.2.0+react@17.0.2: resolution: {integrity: sha512-E5AS2Vnd4CSzEa7Rm+hG47wxRQo1ASfh4msKxO7FHmn/ym+GKSSsFIfR+FonqjKNDPXYJClw8lM47RdN3Pi+nw==} engines: {node: '>=10'} @@ -7057,6 +6776,11 @@ packages: has: 1.0.3 side-channel: 1.0.4 + /interpret/1.4.0: + resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==} + engines: {node: '>= 0.10'} + dev: true + /ipaddr.js/1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} @@ -7208,11 +6932,6 @@ packages: call-bind: 1.0.2 has-tostringtag: 1.0.0 - /is-retry-allowed/1.2.0: - resolution: {integrity: sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==} - engines: {node: '>=0.10.0'} - dev: true - /is-shared-array-buffer/1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: @@ -7516,10 +7235,6 @@ packages: engines: {node: '>= 4'} dev: true - /json-parse-better-errors/1.0.2: - resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} - dev: true - /json-parse-even-better-errors/2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: true @@ -7682,6 +7397,11 @@ packages: json-buffer: 3.0.1 dev: true + /kind-of/6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} + dev: true + /lazystream/1.0.1: resolution: {integrity: sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==} engines: {node: '>= 0.6.3'} @@ -7721,16 +7441,6 @@ packages: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true - /load-json-file/6.2.0: - resolution: {integrity: sha512-gUD/epcRms75Cw8RT1pUdHugZYM5ce64ucs2GEISABwkRsOQr0q2wm/MV2TKThycIe5e0ytRweW2RZxclogCdQ==} - engines: {node: '>=8'} - dependencies: - graceful-fs: 4.2.11 - parse-json: 5.2.0 - strip-bom: 4.0.0 - type-fest: 0.6.0 - dev: true - /localforage/1.10.0: resolution: {integrity: sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==} dependencies: @@ -7884,6 +7594,12 @@ packages: dependencies: js-tokens: 4.0.0 + /loupe/2.3.7: + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + dependencies: + get-func-name: 2.0.2 + dev: true + /lowercase-keys/2.0.0: resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} engines: {node: '>=8'} @@ -8102,10 +7818,6 @@ packages: yallist: 4.0.0 dev: true - /mkdirp-classic/0.5.3: - resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} - dev: true - /mkdirp/0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true @@ -8161,10 +7873,6 @@ packages: node-rsa: 0.4.2 dev: true - /mock-stdin/0.3.1: - resolution: {integrity: sha512-90qhQ0WeQjhzWuutBvvKa0ShYkSr13ttqOkN7e+G8ZyWFQmsQt+N6gY0YnFCF9xrV7zBsnCPTkiyd7xXknwIJg==} - dev: true - /mock-stdin/1.0.0: resolution: {integrity: sha512-tukRdb9Beu27t6dN+XztSRHq9J0B/CoAOySGzHfn8UTfmqipA5yNT/sDUEyYdAV3Hpka6Wx6kOMxuObdOex60Q==} dev: true @@ -8265,6 +7973,16 @@ packages: just-extend: 4.2.1 path-to-regexp: 1.8.0 + /nise/5.1.5: + resolution: {integrity: sha512-VJuPIfUFaXNRzETTQEEItTOP8Y171ijr+JLq42wHes3DiryR8vT+1TXQW/Rx8JNUhyYYWyIvjXTU6dOhJcs9Nw==} + dependencies: + '@sinonjs/commons': 2.0.0 + '@sinonjs/fake-timers': 10.3.0 + '@sinonjs/text-encoding': 0.7.2 + just-extend: 4.2.1 + path-to-regexp: 1.8.0 + dev: true + /nock/11.8.2: resolution: {integrity: sha512-udrFXJ/aqPM9NmrKOcNJ67lvrs/zroNq2sbumhaMPW5JLNy/6LsWiZEwU9DiQIUHOcOCR4MPeqIG7uQNbDGExA==} engines: {node: '>= 8.0'} @@ -8278,13 +7996,12 @@ packages: - supports-color dev: true - /nock/13.3.0: - resolution: {integrity: sha512-HHqYQ6mBeiMc+N038w8LkMpDCRquCHWeNmN3v6645P3NhN2+qXOBqvPqo7Rt1VyCMzKhJ733wZqw5B7cQVFNPg==} + /nock/13.3.6: + resolution: {integrity: sha512-lT6YuktKroUFM+27mubf2uqQZVy2Jf+pfGzuh9N6VwdHlFoZqvi4zyxFTVR1w/ChPqGY6yxGehHp6C3wqCASCw==} engines: {node: '>= 10.13'} dependencies: debug: 4.3.4 json-stringify-safe: 5.0.1 - lodash: 4.17.21 propagate: 2.0.1 transitivePeerDependencies: - supports-color @@ -8372,16 +8089,6 @@ packages: validate-npm-package-license: 3.0.4 dev: true - /normalize-package-data/3.0.3: - resolution: {integrity: sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==} - engines: {node: '>=10'} - dependencies: - hosted-git-info: 4.1.0 - is-core-module: 2.12.0 - semver: 7.5.0 - validate-npm-package-license: 3.0.4 - dev: true - /normalize-path/3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -8406,13 +8113,6 @@ packages: - encoding dev: true - /npm-run-path/2.0.2: - resolution: {integrity: sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==} - engines: {node: '>=4'} - dependencies: - path-key: 2.0.1 - dev: true - /npm-run-path/3.1.0: resolution: {integrity: sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==} engines: {node: '>=8'} @@ -8691,14 +8391,6 @@ packages: dependencies: callsites: 3.1.0 - /parse-json/4.0.0: - resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} - engines: {node: '>=4'} - dependencies: - error-ex: 1.3.2 - json-parse-better-errors: 1.0.2 - dev: true - /parse-json/5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} @@ -8945,27 +8637,6 @@ packages: resolution: {integrity: sha512-BwQpbqxSCBJVpamI6ydzcKqyFmnd5msMWUGvzXLm1aXvusbbgkbOto/EUPM00hjveJEaJtdbhUjKSzWRhQVkaw==} dev: true - /qqjs/0.3.11: - resolution: {integrity: sha512-pB2X5AduTl78J+xRSxQiEmga1jQV0j43jOPs/MTgTLApGFEOn6NgdE2dEjp7nvDtjkIOZbvFIojAiYUx6ep3zg==} - engines: {node: '>=8.0.0'} - dependencies: - chalk: 2.4.2 - debug: 4.3.4 - execa: 0.10.0 - fs-extra: 6.0.1 - get-stream: 5.2.0 - glob: 7.2.3 - globby: 10.0.2 - http-call: 5.3.0 - load-json-file: 6.2.0 - pkg-dir: 4.2.0 - tar-fs: 2.1.1 - tmp: 0.1.0 - write-json-file: 4.3.0 - transitivePeerDependencies: - - supports-color - dev: true - /qs/6.11.0: resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==} engines: {node: '>=0.6'} @@ -9119,6 +8790,13 @@ packages: picomatch: 2.3.1 dev: true + /rechoir/0.6.2: + resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} + engines: {node: '>= 0.10'} + dependencies: + resolve: 1.22.2 + dev: true + /redeyed/2.1.1: resolution: {integrity: sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==} dependencies: @@ -9499,6 +9177,16 @@ packages: /shell-quote/1.8.1: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} + /shelljs/0.8.5: + resolution: {integrity: sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==} + engines: {node: '>=4'} + hasBin: true + dependencies: + glob: 7.2.3 + interpret: 1.4.0 + rechoir: 0.6.2 + dev: true + /shortid/2.2.16: resolution: {integrity: sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g==} dependencies: @@ -9547,6 +9235,17 @@ packages: sinon: 9.2.3 dev: true + /sinon/16.1.3: + resolution: {integrity: sha512-mjnWWeyxcAf9nC0bXcPmiDut+oE8HYridTNzBbF98AYVLmWwGRp2ISEpyhYflG1ifILT+eNn3BmKUJPxjXUPlA==} + dependencies: + '@sinonjs/commons': 3.0.0 + '@sinonjs/fake-timers': 10.3.0 + '@sinonjs/samsam': 8.0.0 + diff: 5.1.0 + nise: 5.1.5 + supports-color: 7.2.0 + dev: true + /sinon/9.2.3: resolution: {integrity: sha512-m+DyAWvqVHZtjnjX/nuShasykFeiZ+nPuEfD4G3gpvKGkXRhkF/6NSt2qN2FjZhfrcHXFzUzI+NLnk+42fnLEw==} dependencies: @@ -9585,7 +9284,6 @@ packages: ansi-styles: 4.3.0 astral-regex: 2.0.0 is-fullwidth-code-point: 3.0.0 - dev: false /sort-json/2.0.1: resolution: {integrity: sha512-s8cs2bcsQCzo/P2T/uoU6Js4dS/jnX8+4xunziNoq9qmSpZNCrRIAIvp4avsz0ST18HycV4z/7myJ7jsHWB2XQ==} @@ -9609,13 +9307,6 @@ packages: is-plain-obj: 1.1.0 dev: true - /sort-keys/4.2.0: - resolution: {integrity: sha512-aUYIEU/UviqPgc8mHR6IW1EGxkAXpeRETYcrzg8cLAvUPZcpAlleSXHV2mY7G12GphSH6Gzv+4MMVSSkbdteHg==} - engines: {node: '>=8'} - dependencies: - is-plain-obj: 2.1.0 - dev: true - /sorted-array-functions/1.3.0: resolution: {integrity: sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA==} dev: false @@ -9827,11 +9518,6 @@ packages: is-natural-number: 4.0.1 dev: true - /strip-eof/1.0.0: - resolution: {integrity: sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==} - engines: {node: '>=0.10.0'} - dev: true - /strip-final-newline/2.0.0: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} @@ -9964,15 +9650,6 @@ packages: strip-ansi: 6.0.1 dev: false - /tar-fs/2.1.1: - resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} - dependencies: - chownr: 1.1.4 - mkdirp-classic: 0.5.3 - pump: 3.0.0 - tar-stream: 2.2.0 - dev: true - /tar-stream/1.6.2: resolution: {integrity: sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==} engines: {node: '>= 0.8.0'} @@ -10046,13 +9723,6 @@ packages: dependencies: os-tmpdir: 1.0.2 - /tmp/0.1.0: - resolution: {integrity: sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==} - engines: {node: '>=6'} - dependencies: - rimraf: 2.7.1 - dev: true - /to-buffer/1.1.1: resolution: {integrity: sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==} dev: true @@ -10106,7 +9776,7 @@ packages: code-block-writer: 11.0.3 dev: false - /ts-node/10.9.1_t4lrjbt3sxauai4t5o275zsepa: + /ts-node/10.9.1_xpss65pzqvfdcnzjlkstkx6toy: resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -10125,7 +9795,7 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.3 - '@types/node': 16.11.7 + '@types/node': 18.18.3 acorn: 8.8.2 acorn-walk: 8.2.0 arg: 4.1.3 @@ -10136,6 +9806,22 @@ packages: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + /ts-patch/2.0.2_typescript@4.7.4: + resolution: {integrity: sha512-NbgdS/J/ylaARJVaF1w4cPw378yvw6C1026fU5NKC2GO4jCwRlkuE/G7gwknNMHwkAOhwamKjuzkuLw/u4KlBg==} + hasBin: true + peerDependencies: + typescript: '>=4.0.0' + dependencies: + chalk: 4.1.2 + glob: 8.1.0 + global-prefix: 3.0.0 + minimist: 1.2.8 + resolve: 1.22.2 + shelljs: 0.8.5 + strip-ansi: 6.0.1 + typescript: 4.7.4 + dev: true + /tsconfig-paths/3.14.2: resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} dependencies: @@ -10159,18 +9845,6 @@ packages: tslib: 1.14.1 typescript: 4.7.4 - /ttypescript/1.5.15_6oasmw356qmm23djlsjgkwvrtm: - resolution: {integrity: sha512-48ykDNHzFnPMnv4hYX1P8Q84TvCZyL1QlFxeuxsuZ48X2+ameBgPenvmCkHJtoOSxpoWTWi8NcgNrRnVDOmfSg==} - hasBin: true - peerDependencies: - ts-node: '>=8.0.2' - typescript: '>=3.2.2' - dependencies: - resolve: 1.22.2 - ts-node: 10.9.1_t4lrjbt3sxauai4t5o275zsepa - typescript: 4.7.4 - dev: true - /tunnel-agent/0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} dependencies: @@ -10511,18 +10185,6 @@ packages: signal-exit: 3.0.7 dev: true - /write-json-file/4.3.0: - resolution: {integrity: sha512-PxiShnxf0IlnQuMYOPPhPkhExoCQuTUNPOa/2JWCYTmBquU9njyyDuwRKN26IZBlp4yn1nt+Agh2HOOBl+55HQ==} - engines: {node: '>=8.3'} - dependencies: - detect-indent: 6.1.0 - graceful-fs: 4.2.11 - is-plain-obj: 2.1.0 - make-dir: 3.1.0 - sort-keys: 4.2.0 - write-file-atomic: 3.0.3 - dev: true - /write/1.0.3: resolution: {integrity: sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==} engines: {node: '>=4'} diff --git a/packages/application-tester/package.json b/packages/application-tester/package.json index 17f288256..aa1d72ffa 100644 --- a/packages/application-tester/package.json +++ b/packages/application-tester/package.json @@ -24,13 +24,16 @@ "lint:check": "eslint --ext '.js,.ts' **/*.ts", "lint:fix": "eslint --quiet --fix --ext '.js,.ts' **/*.ts", "build": "tsc -b tsconfig.json", - "clean": "npx rimraf ./dist tsconfig.tsbuildinfo", + "clean": "rimraf ./dist tsconfig.tsbuildinfo", "prepack": "tsc -b tsconfig.json", "test": "" }, "bugs": { "url": "https://github.com/boostercloud/booster/issues" }, + "engines": { + "node": ">=18.0.0 <19.0.0" + }, "dependencies": { "@apollo/client": "3.7.13", "@boostercloud/framework-types": "workspace:^1.21.0", @@ -53,7 +56,7 @@ "eslint-plugin-import": "^2.26.0", "eslint-plugin-prettier": "3.4.0", "@types/jsonwebtoken": "9.0.1", - "@types/node": "16.11.7", + "@types/node": "^18.15.3", "@types/ws": "8.5.4", "chai": "4.2.0", "chai-as-promised": "7.1.1", diff --git a/packages/cli/bin/run b/packages/cli/bin/run index 30b14e177..eaa62fea3 100755 --- a/packages/cli/bin/run +++ b/packages/cli/bin/run @@ -1,5 +1,5 @@ #!/usr/bin/env node -require('@oclif/command').run() -.then(require('@oclif/command/flush')) -.catch(require('@oclif/errors/handle')) +require('@oclif/core').run() +.then(require('@oclif/core/flush')) +.catch(require('@oclif/core/handle')) diff --git a/packages/cli/package.json b/packages/cli/package.json index 4359968b6..f2aba0645 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -14,11 +14,8 @@ "dependencies": { "@boostercloud/framework-core": "workspace:^1.21.0", "@boostercloud/framework-types": "workspace:^1.21.0", - "@oclif/command": "^1.8", - "@oclif/config": "^1.18", - "@oclif/errors": "^1.3", - "@oclif/parser": "^3.8.7", - "@oclif/plugin-help": "^5.1", + "@oclif/core" : "^3.9.0", + "@oclif/plugin-help": "^5", "chalk": "^2.4.2", "child-process-promise": "^2.2.1", "execa": "^2.0.3", @@ -35,8 +32,7 @@ "devDependencies": { "@boostercloud/eslint-config": "workspace:^1.21.0", "@boostercloud/application-tester": "workspace:^1.21.0", - "@oclif/dev-cli": "^1.26", - "@oclif/test": "^2.1", + "@oclif/test": "^3.0.3", "@types/chai": "4.2.18", "@types/chai-as-promised": "7.1.4", "@types/child-process-promise": "^2.2.1", @@ -46,7 +42,7 @@ "@types/inquirer": "^6.5.0", "@types/mocha": "10.0.1", "@types/mustache": "4.1.0", - "@types/node": "16.11.7", + "@types/node": "^18.15.3", "@types/rewire": "^2.5.28", "@types/sinon": "10.0.0", "@types/sinon-chai": "3.2.5", @@ -60,7 +56,7 @@ "eslint-plugin-import": "^2.26.0", "eslint-plugin-prettier": "3.4.0", "faker": "5.1.0", - "fancy-test": "1.4.3", + "fancy-test": "^3.0.1", "mocha": "10.2.0", "nyc": "^15.1.0", "prettier": "2.3.0", @@ -73,7 +69,7 @@ "eslint-plugin-unicorn": "~44.0.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0 <19.0.0" }, "files": [ "/bin", diff --git a/packages/cli/src/commands/add/projection.ts b/packages/cli/src/commands/add/projection.ts index 1dde81c3c..12ee8501f 100644 --- a/packages/cli/src/commands/add/projection.ts +++ b/packages/cli/src/commands/add/projection.ts @@ -1,4 +1,4 @@ -import * as Oclif from '@oclif/command' +import { Flags } from '@oclif/core' import BaseCommand from '../../common/base-command' import { HasName, HasProjection, joinParsers, parseName, parseProjectionField } from '../../services/generator/target' import { Script } from '../../common/script' @@ -17,14 +17,14 @@ export default class Projection extends BaseCommand { ] public static flags = { - help: Oclif.flags.help({ char: 'h' }), - 'read-model': Oclif.flags.string({ + help: Flags.help({ char: 'h' }), + 'read-model': Flags.string({ description: 'read-model name', required: true, multiple: false, dependsOn: ['entity'], }), - entity: Oclif.flags.string({ + entity: Flags.string({ description: 'an entity name', required: true, multiple: false, @@ -33,7 +33,7 @@ export default class Projection extends BaseCommand { } public async run(): Promise { - const { flags } = this.parse(Projection) + const { flags } = await this.parse(Projection) const readModel = flags['read-model'] const entity = flags.entity diff --git a/packages/cli/src/commands/add/reducer.ts b/packages/cli/src/commands/add/reducer.ts index 9b5c28c15..ee7df4458 100644 --- a/packages/cli/src/commands/add/reducer.ts +++ b/packages/cli/src/commands/add/reducer.ts @@ -1,4 +1,4 @@ -import * as Oclif from '@oclif/command' +import { Flags } from '@oclif/core' import BaseCommand from '../../common/base-command' import { HasName, HasReaction, joinParsers, parseName, parseReaction } from '../../services/generator/target' import { Script } from '../../common/script' @@ -17,14 +17,14 @@ export default class Reducer extends BaseCommand { ] public static flags = { - help: Oclif.flags.help({ char: 'h' }), - entity: Oclif.flags.string({ + help: Flags.help({ char: 'h' }), + entity: Flags.string({ description: 'an entity name', required: true, multiple: false, dependsOn: ['event'], }), - event: Oclif.flags.string({ + event: Flags.string({ description: 'an event name', required: true, multiple: true, @@ -33,7 +33,7 @@ export default class Reducer extends BaseCommand { } public async run(): Promise { - const { flags } = this.parse(Reducer) + const { flags } = await this.parse(Reducer) const entity = flags.entity const events = flags.event diff --git a/packages/cli/src/commands/build.ts b/packages/cli/src/commands/build.ts index 047b54f78..0f872f421 100644 --- a/packages/cli/src/commands/build.ts +++ b/packages/cli/src/commands/build.ts @@ -1,4 +1,4 @@ -import { flags } from '@oclif/command' +import { Flags } from '@oclif/core' import BaseCommand from '../common/base-command' import { compileProject } from '../services/config-service' import { checkCurrentDirIsABoosterProject } from '../services/project-checker' @@ -16,8 +16,8 @@ export default class Build extends BaseCommand { public static description = 'Build the current application as configured in your `index.ts` file.' public static flags = { - help: flags.help({ char: 'h' }), - verbose: flags.boolean({ + help: Flags.help({ char: 'h' }), + verbose: Flags.boolean({ description: 'display full error messages', default: false, }), @@ -30,7 +30,7 @@ export default class Build extends BaseCommand { async catch(fullError: Error) { const { flags: { verbose }, - } = this.parse(Build) + } = await this.parse(Build) if (verbose) { console.error(fullError.message) diff --git a/packages/cli/src/commands/clean.ts b/packages/cli/src/commands/clean.ts index 4268b167c..ffd517914 100644 --- a/packages/cli/src/commands/clean.ts +++ b/packages/cli/src/commands/clean.ts @@ -1,4 +1,4 @@ -import { flags } from '@oclif/command' +import { Flags } from '@oclif/core' import BaseCommand from '../common/base-command' import { cleanProject } from '../services/config-service' import { checkCurrentDirIsABoosterProject } from '../services/project-checker' @@ -16,8 +16,8 @@ export default class Clean extends BaseCommand { public static description = 'Clean the current application as configured in your `index.ts` file.' public static flags = { - help: flags.help({ char: 'h' }), - verbose: flags.boolean({ + help: Flags.help({ char: 'h' }), + verbose: Flags.boolean({ description: 'display full error messages', default: false, }), @@ -30,7 +30,7 @@ export default class Clean extends BaseCommand { async catch(fullError: Error) { const { flags: { verbose }, - } = this.parse(Clean) + } = await this.parse(Clean) if (verbose) { console.error(fullError.message) diff --git a/packages/cli/src/commands/deploy.ts b/packages/cli/src/commands/deploy.ts index 257db5dec..d4641dc47 100644 --- a/packages/cli/src/commands/deploy.ts +++ b/packages/cli/src/commands/deploy.ts @@ -1,4 +1,4 @@ -import { flags } from '@oclif/command' +import { Flags } from '@oclif/core' import BaseCommand from '../common/base-command' import { deployToCloudProvider } from '../services/provider-service' import { @@ -26,19 +26,19 @@ export default class Deploy extends BaseCommand { public static description = 'Deploy the current application as configured in your `index.ts` file.' public static flags = { - help: flags.help({ char: 'h' }), - environment: flags.string({ + help: Flags.help({ char: 'h' }), + environment: Flags.string({ char: 'e', description: 'environment configuration to run', }), - verbose: flags.boolean({ + verbose: Flags.boolean({ description: 'display full error messages', default: false, }), } public async run(): Promise { - const { flags } = this.parse(Deploy) + const { flags } = await this.parse(Deploy) if (initializeEnvironment(logger, flags.environment)) { const deploymentProjectPath = await createDeploymentSandbox() @@ -49,7 +49,7 @@ export default class Deploy extends BaseCommand { async catch(fullError: Error) { const { flags: { verbose }, - } = this.parse(Deploy) + } = await this.parse(Deploy) if (verbose) { console.error(fullError.message) diff --git a/packages/cli/src/commands/new/command.ts b/packages/cli/src/commands/new/command.ts index 61950106a..bdd7d765a 100644 --- a/packages/cli/src/commands/new/command.ts +++ b/packages/cli/src/commands/new/command.ts @@ -1,4 +1,4 @@ -import * as Oclif from '@oclif/command' +import { Flags, Args } from '@oclif/core' import BaseCommand from '../../common/base-command' import { Script } from '../../common/script' import Brand from '../../common/brand' @@ -15,20 +15,23 @@ import * as path from 'path' import { checkCurrentDirIsABoosterProject } from '../../services/project-checker' export default class Command extends BaseCommand { - public static description = "generate new resource, write 'boost new' to see options" + public static description = "Generate new resource, write 'boost new' to see options" + public static flags = { - help: Oclif.flags.help({ char: 'h' }), - fields: Oclif.flags.string({ + help: Flags.help({ char: 'h' }), + fields: Flags.string({ char: 'f', - description: 'field that this command will contain', + description: 'Field that this command will contain', multiple: true, }), } - public static args = [{ name: 'commandName' }] + public static args = { + commandName: Args.string(), + } public async run(): Promise { - const { args, flags } = this.parse(Command) + const { args, flags } = await this.parse(Command) try { const fields = flags.fields || [] if (!args.commandName) throw "You haven't provided a command name, but it is required, run with --help for usage" diff --git a/packages/cli/src/commands/new/entity.ts b/packages/cli/src/commands/new/entity.ts index 7e624f049..dea86d6a3 100644 --- a/packages/cli/src/commands/new/entity.ts +++ b/packages/cli/src/commands/new/entity.ts @@ -1,4 +1,4 @@ -import * as Oclif from '@oclif/command' +import { Flags, Args } from '@oclif/core' import BaseCommand from '../../common/base-command' import { Script } from '../../common/script' import Brand from '../../common/brand' @@ -20,23 +20,25 @@ import { classNameToFileName } from '../../common/filenames' export default class Entity extends BaseCommand { public static description = 'create a new entity' public static flags = { - help: Oclif.flags.help({ char: 'h' }), - fields: Oclif.flags.string({ + help: Flags.help({ char: 'h' }), + fields: Flags.string({ char: 'f', description: 'fields that this entity will contain', multiple: true, }), - reduces: Oclif.flags.string({ + reduces: Flags.string({ char: 'r', description: 'events that this entity will reduce to build its state', multiple: true, }), } - public static args = [{ name: 'entityName' }] + public static args = { + entityName: Args.string(), + } public async run(): Promise { - const { args, flags } = this.parse(Entity) + const { args, flags } = await this.parse(Entity) try { const fields = flags.fields || [] diff --git a/packages/cli/src/commands/new/event-handler.ts b/packages/cli/src/commands/new/event-handler.ts index d912eb142..312e1dd0c 100644 --- a/packages/cli/src/commands/new/event-handler.ts +++ b/packages/cli/src/commands/new/event-handler.ts @@ -1,4 +1,4 @@ -import * as Oclif from '@oclif/command' +import { Flags, Args } from '@oclif/core' import BaseCommand from '../../common/base-command' import { HasEvent, @@ -18,18 +18,20 @@ import { classNameToFileName } from '../../common/filenames' export default class EventHandler extends BaseCommand { public static description = 'create a new event handler' public static flags = { - help: Oclif.flags.help({ char: 'h' }), - event: Oclif.flags.string({ + help: Flags.help({ char: 'h' }), + event: Flags.string({ char: 'e', description: 'event that this event handler with handle', multiple: false, }), } - public static args = [{ name: 'eventHandlerName' }] + public static args = { + eventHandlerName: Args.string(), + } public async run(): Promise { - const { args, flags } = this.parse(EventHandler) + const { args, flags } = await this.parse(EventHandler) try { const event = flags.event diff --git a/packages/cli/src/commands/new/event.ts b/packages/cli/src/commands/new/event.ts index be570b3d0..2160f97ab 100644 --- a/packages/cli/src/commands/new/event.ts +++ b/packages/cli/src/commands/new/event.ts @@ -1,4 +1,4 @@ -import * as Oclif from '@oclif/command' +import { Flags, Args } from '@oclif/core' import BaseCommand from '../../common/base-command' import { Script } from '../../common/script' import Brand from '../../common/brand' @@ -17,18 +17,20 @@ import { checkCurrentDirIsABoosterProject } from '../../services/project-checker export default class Event extends BaseCommand { public static description = 'create a new event' public static flags = { - help: Oclif.flags.help({ char: 'h' }), - fields: Oclif.flags.string({ + help: Flags.help({ char: 'h' }), + fields: Flags.string({ char: 'f', description: 'field that this event will contain', multiple: true, }), } - public static args = [{ name: 'eventName' }] + public static args = { + eventName: Args.string(), + } public async run(): Promise { - const { args, flags } = this.parse(Event) + const { args, flags } = await this.parse(Event) try { const fields = flags.fields || [] diff --git a/packages/cli/src/commands/new/project.ts b/packages/cli/src/commands/new/project.ts index e76bbebb5..73274dd10 100644 --- a/packages/cli/src/commands/new/project.ts +++ b/packages/cli/src/commands/new/project.ts @@ -1,4 +1,4 @@ -import { Command, flags } from '@oclif/command' +import { Command, Flags, Args } from '@oclif/core' import { Script } from '../../common/script' import Brand from '../../common/brand' import { @@ -16,54 +16,56 @@ import { checkProjectAlreadyExists } from '../../services/project-checker' export default class Project extends Command { public static description = 'create a new project from scratch' public static flags = { - help: flags.help({ char: 'h' }), - description: flags.string({ + help: Flags.help({ char: 'h' }), + description: Flags.string({ char: 'd', description: 'a short description', }), - version: flags.string({ + version: Flags.string({ char: 'v', description: 'the initial version', }), - author: flags.string({ + author: Flags.string({ char: 'a', description: 'who is writing this?', }), - homepage: flags.string({ + homepage: Flags.string({ char: 'H', description: 'the website of this project', }), - license: flags.string({ + license: Flags.string({ char: 'l', description: 'which license will you use?', }), - repository: flags.string({ + repository: Flags.string({ char: 'r', description: 'the URL of the repository', }), - providerPackageName: flags.string({ + providerPackageName: Flags.string({ char: 'p', description: - 'package name implementing the cloud provider integration where the application will be deployed (i.e: "@boostercloud/framework-provider-aws"', + 'package name implementing the cloud provider integration where the application will be deployed (i.e: "@boostercloud/framework-provider-azure")', }), - default: flags.boolean({ + default: Flags.boolean({ description: 'generates the project with default parameters (i.e. --license=MIT)', default: false, }), - skipInstall: flags.boolean({ + skipInstall: Flags.boolean({ description: 'skip dependencies installation', default: false, }), - skipGit: flags.boolean({ + skipGit: Flags.boolean({ description: 'skip git initialization', default: false, }), } - public static args = [{ name: 'projectName' }] + public static args = { + projectName: Args.string(), + } public async run(): Promise { - const { args, flags } = this.parse(Project) + const { args, flags } = await this.parse(Project) const { projectName } = args try { @@ -112,7 +114,7 @@ const getProviderPackageName = async (prompter: Prompter, providerPackageName?: if (providerSelection === Provider.OTHER) { return await prompter.defaultOrPrompt( undefined, - "What's the other provider integration library? e.g. @boostercloud/framework-provider-aws" + "What's the other provider integration library? e.g. @boostercloud/framework-provider-azure" ) } else { return getSelectedProviderPackage(providerSelection) diff --git a/packages/cli/src/commands/new/query.ts b/packages/cli/src/commands/new/query.ts index dc6bf2bb7..77741a59e 100644 --- a/packages/cli/src/commands/new/query.ts +++ b/packages/cli/src/commands/new/query.ts @@ -1,4 +1,4 @@ -import * as Oclif from '@oclif/command' +import { Flags, Args } from '@oclif/core' import BaseCommand from '../../common/base-command' import { Script } from '../../common/script' import Brand from '../../common/brand' @@ -17,18 +17,20 @@ import { checkCurrentDirIsABoosterProject } from '../../services/project-checker export default class Query extends BaseCommand { public static description = "generate new query resource, write 'boost new' to see options" public static flags = { - help: Oclif.flags.help({ char: 'h' }), - fields: Oclif.flags.string({ + help: Flags.help({ char: 'h' }), + fields: Flags.string({ char: 'f', description: 'field list that this query will contain', multiple: true, }), } - public static args = [{ name: 'queryName' }] + public static args = { + queryName: Args.string(), + } public async run(): Promise { - const { args, flags } = this.parse(Query) + const { args, flags } = await this.parse(Query) try { const fields = flags.fields || [] if (!args.queryName) throw "You haven't provided a query name, but it is required, run with --help for usage" diff --git a/packages/cli/src/commands/new/read-model.ts b/packages/cli/src/commands/new/read-model.ts index aac3d5a78..970737353 100644 --- a/packages/cli/src/commands/new/read-model.ts +++ b/packages/cli/src/commands/new/read-model.ts @@ -1,4 +1,4 @@ -import * as Oclif from '@oclif/command' +import { Flags, Args } from '@oclif/core' import BaseCommand from '../../common/base-command' import { Script } from '../../common/script' import Brand from '../../common/brand' @@ -20,23 +20,25 @@ import { classNameToFileName } from '../../common/filenames' export default class ReadModel extends BaseCommand { public static description = 'create a new read model' public static flags = { - help: Oclif.flags.help({ char: 'h' }), - fields: Oclif.flags.string({ + help: Flags.help({ char: 'h' }), + fields: Flags.string({ char: 'f', description: 'fields that this read model will contain', multiple: true, }), - projects: Oclif.flags.string({ + projects: Flags.string({ char: 'p', description: 'entities that this read model will project to build its state', multiple: true, }), } - public static args = [{ name: 'readModelName' }] + public static args = { + readModelName: Args.string(), + } public async run(): Promise { - const { args, flags } = this.parse(ReadModel) + const { args, flags } = await this.parse(ReadModel) try { const fields = flags.fields ?? [] diff --git a/packages/cli/src/commands/new/scheduled-command.ts b/packages/cli/src/commands/new/scheduled-command.ts index d9e7202c4..7e904f29d 100644 --- a/packages/cli/src/commands/new/scheduled-command.ts +++ b/packages/cli/src/commands/new/scheduled-command.ts @@ -1,4 +1,4 @@ -import * as Oclif from '@oclif/command' +import { Flags, Args } from '@oclif/core' import BaseCommand from '../../common/base-command' import { Script } from '../../common/script' import Brand from '../../common/brand' @@ -10,13 +10,15 @@ import { checkCurrentDirIsABoosterProject } from '../../services/project-checker export default class ScheduledCommand extends BaseCommand { public static description = "generate new scheduled command, write 'boost new:scheduled-command -h' to see options" public static flags = { - help: Oclif.flags.help({ char: 'h' }), + help: Flags.help({ char: 'h' }), } - public static args = [{ name: 'scheduledCommandName' }] + public static args = { + scheduledCommandName: Args.string(), + } public async run(): Promise { - const { args } = this.parse(ScheduledCommand) + const { args } = await this.parse(ScheduledCommand) try { if (!args.scheduledCommandName) diff --git a/packages/cli/src/commands/new/type.ts b/packages/cli/src/commands/new/type.ts index 9c77bc153..62f2ed7b1 100644 --- a/packages/cli/src/commands/new/type.ts +++ b/packages/cli/src/commands/new/type.ts @@ -1,4 +1,4 @@ -import * as Oclif from '@oclif/command' +import { Flags, Args } from '@oclif/core' import BaseCommand from '../../common/base-command' import { Script } from '../../common/script' import Brand from '../../common/brand' @@ -11,18 +11,20 @@ export default class Type extends BaseCommand { public static description = 'create a new type' public static flags = { - help: Oclif.flags.help({ char: 'h' }), - fields: Oclif.flags.string({ + help: Flags.help({ char: 'h' }), + fields: Flags.string({ char: 'f', description: 'field that this type will contain', multiple: true, }), } - public static args = [{ name: 'typeName' }] + public static args = { + typeName: Args.string(), + } public async run(): Promise { - const { args, flags } = this.parse(Type) + const { args, flags } = await this.parse(Type) try { const fields = flags.fields || [] diff --git a/packages/cli/src/commands/nuke.ts b/packages/cli/src/commands/nuke.ts index 3eb17479a..0f75648ca 100644 --- a/packages/cli/src/commands/nuke.ts +++ b/packages/cli/src/commands/nuke.ts @@ -1,4 +1,4 @@ -import { flags } from '@oclif/command' +import { Flags } from '@oclif/core' import BaseCommand from '../common/base-command' import { nukeCloudProviderResources } from '../services/provider-service' import { compileProjectAndLoadConfig } from '../services/config-service' @@ -41,24 +41,24 @@ export default class Nuke extends BaseCommand { 'Remove all resources used by the current application as configured in your `index.ts` file.' public static flags = { - help: flags.help({ char: 'h' }), - environment: flags.string({ + help: Flags.help({ char: 'h' }), + environment: Flags.string({ char: 'e', description: 'environment configuration to run', }), - force: flags.boolean({ + force: Flags.boolean({ char: 'f', description: 'Run nuke without asking for confirmation. Be EXTRA CAUTIOUS with this option, all your application data will be irreversibly DELETED without confirmation.', }), - verbose: flags.boolean({ + verbose: Flags.boolean({ description: 'display full error messages', default: false, }), } public async run(): Promise { - const { flags } = this.parse(Nuke) + const { flags } = await this.parse(Nuke) if (initializeEnvironment(logger, flags.environment)) { await runTasks( @@ -71,7 +71,7 @@ export default class Nuke extends BaseCommand { async catch(fullError: Error) { const { flags: { verbose }, - } = this.parse(Nuke) + } = await this.parse(Nuke) if (verbose) { console.error(fullError.message) diff --git a/packages/cli/src/commands/start.ts b/packages/cli/src/commands/start.ts index ef79902e0..f3fc72901 100644 --- a/packages/cli/src/commands/start.ts +++ b/packages/cli/src/commands/start.ts @@ -1,4 +1,4 @@ -import { flags } from '@oclif/command' +import { Flags } from '@oclif/core' import BaseCommand from '../common/base-command' import { startProvider } from '../services/provider-service' import { compileProjectAndLoadConfig } from '../services/config-service' @@ -21,24 +21,24 @@ export default class Start extends BaseCommand { public static description = 'Start local debug server.' public static flags = { - help: flags.help({ char: 'h' }), - port: flags.integer({ + help: Flags.help({ char: 'h' }), + port: Flags.integer({ char: 'p', description: 'port to run the local runtime on', default: 3000, }), - environment: flags.string({ + environment: Flags.string({ char: 'e', description: 'environment configuration to run', }), - verbose: flags.boolean({ + verbose: Flags.boolean({ description: 'display full error messages', default: false, }), } public async run(): Promise { - const { flags } = this.parse(Start) + const { flags } = await this.parse(Start) if (initializeEnvironment(logger, flags.environment)) { await runTasks(flags.port, compileProjectAndLoadConfig(process.cwd()), startProvider.bind(null, flags.port)) @@ -48,7 +48,7 @@ export default class Start extends BaseCommand { async catch(fullError: Error) { const { flags: { verbose }, - } = this.parse(Start) + } = await this.parse(Start) if (verbose) { console.error(fullError.message) diff --git a/packages/cli/src/commands/stub/publish.ts b/packages/cli/src/commands/stub/publish.ts index 3dcd4898c..7d0578a99 100644 --- a/packages/cli/src/commands/stub/publish.ts +++ b/packages/cli/src/commands/stub/publish.ts @@ -1,4 +1,4 @@ -import { flags } from '@oclif/command' +import { Flags } from '@oclif/core' import BaseCommand from '../../common/base-command' import { Script } from '../../common/script' import Brand from '../../common/brand' @@ -14,14 +14,14 @@ export default class Publish extends BaseCommand { public static examples = ['$ boost stub:publish --force', '$ boost stub:publish'] public static flags = { - force: flags.boolean({ + force: Flags.boolean({ char: 'f', description: 'Overwrite any existing stub files', }), } public async run(): Promise { - const { flags } = this.parse(Publish) + const { flags } = await this.parse(Publish) const stubFolderExists: boolean = checkStubsFolderExists() diff --git a/packages/cli/src/commands/synth.ts b/packages/cli/src/commands/synth.ts index 53915b3e7..a42129f2b 100644 --- a/packages/cli/src/commands/synth.ts +++ b/packages/cli/src/commands/synth.ts @@ -1,4 +1,4 @@ -import { flags } from '@oclif/command' +import { Flags } from '@oclif/core' import BaseCommand from '../common/base-command' import { cleanDeploymentSandbox, @@ -26,19 +26,19 @@ export default class Synth extends BaseCommand { public static description = 'Generate the required cloud templates to deploy your app manually.' public static flags = { - help: flags.help({ char: 'h' }), - environment: flags.string({ + help: Flags.help({ char: 'h' }), + environment: Flags.string({ char: 'e', description: 'environment configuration to run', }), - verbose: flags.boolean({ + verbose: Flags.boolean({ description: 'display full error messages', default: false, }), } public async run(): Promise { - const { flags } = this.parse(Synth) + const { flags } = await this.parse(Synth) if (initializeEnvironment(logger, flags.environment)) { const deploymentProjectPath = await createDeploymentSandbox() @@ -49,7 +49,7 @@ export default class Synth extends BaseCommand { async catch(fullError: Error) { const { flags: { verbose }, - } = this.parse(Synth) + } = await this.parse(Synth) if (verbose) { console.error(fullError.message) diff --git a/packages/cli/src/common/base-command.ts b/packages/cli/src/common/base-command.ts index 806e6b4a3..adb1069b4 100644 --- a/packages/cli/src/common/base-command.ts +++ b/packages/cli/src/common/base-command.ts @@ -1,4 +1,4 @@ -import Command from '@oclif/command' +import { Command } from '@oclif/core' import { checkCurrentDirBoosterVersion } from '../services/project-checker' import { appendOnErrorsFile } from '../services/logger' diff --git a/packages/cli/src/common/provider.ts b/packages/cli/src/common/provider.ts index 75b669128..1a4ba82c8 100644 --- a/packages/cli/src/common/provider.ts +++ b/packages/cli/src/common/provider.ts @@ -1,5 +1,5 @@ export const enum Provider { - AWS = '@boostercloud/framework-provider-aws (AWS)', + AWS = '@boostercloud/framework-provider-aws (AWS) - Currently deprecated', AZURE = '@boostercloud/framework-provider-azure (Azure)', OTHER = 'Other', } diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 088abcf77..0237950aa 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -1 +1 @@ -export { run } from '@oclif/command' +export { run } from '@oclif/core' diff --git a/packages/cli/src/templates/project/package-json.ts b/packages/cli/src/templates/project/package-json.ts index 6e58d544f..35fb765f1 100644 --- a/packages/cli/src/templates/project/package-json.ts +++ b/packages/cli/src/templates/project/package-json.ts @@ -31,21 +31,22 @@ export const template = `{ "prettier": "2.3.0", "typescript": "4.7.4", "ts-node": "9.1.1", - "@types/node": "16.11.7", - "ttypescript": "1.5.15", + "@types/node": "^18.15.3", + "ts-patch": "2.0.2", "graphql": "^16.6.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0 <19.0.0" }, "homepage": "{{{homepage}}}", "license": "{{{license}}}", "main": "dist/index.js", "repository": "{{{repository}}}", "scripts": { + "prepare": "ts-patch install -s", "lint:check": "eslint --ext '.js,.ts' **/*.ts", "lint:fix": "eslint --quiet --fix --ext '.js,.ts' **/*.ts", - "build": "ttsc -b tsconfig.json", + "build": "tsc -b tsconfig.json", "clean": "rimraf ./dist tsconfig.tsbuildinfo" }, "types": "lib/index.d.ts" diff --git a/packages/cli/test/commands/add/projection.test.ts b/packages/cli/test/commands/add/projection.test.ts index fb841eed3..cef90ef30 100644 --- a/packages/cli/test/commands/add/projection.test.ts +++ b/packages/cli/test/commands/add/projection.test.ts @@ -1,5 +1,5 @@ import { fake, replace, restore, spy, stub } from 'sinon' -import { IConfig } from '@oclif/config' +import { Config } from '@oclif/core' import { ClassDeclaration, MethodDeclarationStructure, Project, SourceFile } from 'ts-morph' import * as ProjectChecker from '../../../src/services/project-checker' import { expect } from '../../expect' @@ -35,7 +35,7 @@ describe('add', async () => { }) it('init calls checkCurrentDirBoosterVersion', async () => { - await new Projection([], {} as IConfig).init() + await new Projection([], {} as Config).init() expect(ProjectChecker.checkCurrentDirBoosterVersion).to.have.been.called }) @@ -54,7 +54,7 @@ describe('add', async () => { stub(SourceFile.prototype, 'fixMissingImports').returnsThis() stub(SourceFile.prototype, 'save').resolves() - await new Projection(['--read-model', readModelName, '--entity', projectionName], {} as IConfig).run() + await new Projection(['--read-model', readModelName, '--entity', projectionName], {} as Config).run() expect(Filenames.fileNameWithExtension).to.have.been.calledWith(readModelName) expect(Project.prototype.getSourceFileOrThrow).to.have.been.calledOnceWith('post-read-model.ts') @@ -70,15 +70,14 @@ describe('add', async () => { let exceptionMessage = null try { - await new Projection([], {} as IConfig).run() + await new Projection([], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message } - + console.log(exceptionMessage) expect(exceptionThrown).to.be.true - expect(exceptionMessage).to.contain('Missing required flag') - expect(exceptionMessage).to.contain('--read-model READ-MODEL') + expect(exceptionMessage).to.contain('Missing required flag read-model') }) it('with empty --read-model', async () => { @@ -86,7 +85,7 @@ describe('add', async () => { let exceptionMessage = null try { - await new Projection(['--entity', projectionName, '--read-model'], {} as IConfig).run() + await new Projection(['--entity', projectionName, '--read-model'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -101,7 +100,7 @@ describe('add', async () => { let exceptionMessage = null try { - await new Projection(['--read-model', readModelName, '--entity'], {} as IConfig).run() + await new Projection(['--read-model', readModelName, '--entity'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -116,7 +115,7 @@ describe('add', async () => { let exceptionMessage = null try { - await new Projection(['--read-model', readModelName, '--entity', 'Post'], {} as IConfig).run() + await new Projection(['--read-model', readModelName, '--entity', 'Post'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -133,7 +132,7 @@ describe('add', async () => { let exceptionMessage = null try { - await new Projection(['--read-model', readModelName, '--entity', 'Post:'], {} as IConfig).run() + await new Projection(['--read-model', readModelName, '--entity', 'Post:'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -150,7 +149,7 @@ describe('add', async () => { let exceptionMessage = null try { - await new Projection(['--read-model', readModelName, '--entity', ':id'], {} as IConfig).run() + await new Projection(['--read-model', readModelName, '--entity', ':id'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -171,7 +170,7 @@ describe('add', async () => { let exceptionThrown = false try { - await new Projection(['--read-model', readModelName, '--entity', projectionName], {} as IConfig).run() + await new Projection(['--read-model', readModelName, '--entity', projectionName], {} as Config).run() } catch (e) { exceptionThrown = true } @@ -201,7 +200,7 @@ describe('add', async () => { let exceptionThrown = false try { - await new Projection(['--read-model', readModelName, '--entity', projectionName], {} as IConfig).run() + await new Projection(['--read-model', readModelName, '--entity', projectionName], {} as Config).run() } catch (e) { exceptionThrown = true } diff --git a/packages/cli/test/commands/add/reducer.test.ts b/packages/cli/test/commands/add/reducer.test.ts index c06336f2d..d29ab4950 100644 --- a/packages/cli/test/commands/add/reducer.test.ts +++ b/packages/cli/test/commands/add/reducer.test.ts @@ -1,5 +1,5 @@ import { fake, replace, restore, spy, stub } from 'sinon' -import { IConfig } from '@oclif/config' +import { Config } from '@oclif/core' import { ClassDeclaration, MethodDeclarationStructure, Project, SourceFile } from 'ts-morph' import * as ProjectChecker from '../../../src/services/project-checker' import { expect } from '../../expect' @@ -32,7 +32,7 @@ describe('add', async () => { }) it('init calls checkCurrentDirBoosterVersion', async () => { - await new Reducer([], {} as IConfig).init() + await new Reducer([], {} as Config).init() expect(ProjectChecker.checkCurrentDirBoosterVersion).to.have.been.called }) @@ -58,7 +58,7 @@ describe('add', async () => { }) it('generates reducer correctly', async () => { - await new Reducer(['--entity', entityName, '--event', 'PostCreated'], {} as IConfig).run() + await new Reducer(['--entity', entityName, '--event', 'PostCreated'], {} as Config).run() expect(Filenames.fileNameWithExtension).to.have.been.calledWith(entityName) expect(Project.prototype.getSourceFileOrThrow).to.have.been.calledOnceWith('post.ts') @@ -70,7 +70,7 @@ describe('add', async () => { }) it('generates multiple reducers correctly', async () => { - await new Reducer(['--entity', entityName, '--event', 'PostCreated', 'PostUpdated'], {} as IConfig).run() + await new Reducer(['--entity', entityName, '--event', 'PostCreated', 'PostUpdated'], {} as Config).run() expect(Filenames.fileNameWithExtension).to.have.been.calledWith(entityName) expect(Project.prototype.getSourceFileOrThrow).to.have.been.calledOnceWith('post.ts') @@ -91,15 +91,14 @@ describe('add', async () => { let exceptionMessage = null try { - await new Reducer([], {} as IConfig).run() + await new Reducer([], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message } expect(exceptionThrown).to.be.true - expect(exceptionMessage).to.contain('Missing required flag') - expect(exceptionMessage).to.contain('--entity ENTITY') + expect(exceptionMessage).to.contain('Missing required flag entity') }) it('with empty --entity flag', async () => { @@ -107,7 +106,7 @@ describe('add', async () => { let exceptionMessage = null try { - await new Reducer(['--event', 'PostCreated', '--entity'], {} as IConfig).run() + await new Reducer(['--event', 'PostCreated', '--entity'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -122,7 +121,7 @@ describe('add', async () => { let exceptionMessage = null try { - await new Reducer(['--entity', entityName, '--event'], {} as IConfig).run() + await new Reducer(['--entity', entityName, '--event'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -141,7 +140,7 @@ describe('add', async () => { let exceptionThrown = false try { - await new Reducer(['--entity', entityName, '--event', 'PostCreated'], {} as IConfig).run() + await new Reducer(['--entity', entityName, '--event', 'PostCreated'], {} as Config).run() } catch (e) { exceptionThrown = true } @@ -171,7 +170,7 @@ describe('add', async () => { let exceptionThrown = false try { - await new Reducer(['--entity', entityName, '--event', 'PostUpdated'], {} as IConfig).run() + await new Reducer(['--entity', entityName, '--event', 'PostUpdated'], {} as Config).run() } catch (e) { exceptionThrown = true } diff --git a/packages/cli/test/commands/build.test.ts b/packages/cli/test/commands/build.test.ts index fe83fef1b..7e37ae2d4 100644 --- a/packages/cli/test/commands/build.test.ts +++ b/packages/cli/test/commands/build.test.ts @@ -4,7 +4,7 @@ import * as Build from '../../src/commands/build' import * as configService from '../../src/services/config-service' import * as projectChecker from '../../src/services/project-checker' import { oraLogger } from '../../src/services/logger' -import { IConfig } from '@oclif/config' +import { Config } from '@oclif/core' describe('build', () => { describe('Build class', () => { @@ -21,12 +21,12 @@ describe('build', () => { }) it('init calls checkCurrentDirBoosterVersion', async () => { - await new Build.default([], {} as IConfig).init() + await new Build.default([], {} as Config).init() expect(projectChecker.checkCurrentDirBoosterVersion).to.have.been.called }) it('runs the command', async () => { - await new Build.default([], {} as IConfig).run() + await new Build.default([], {} as Config).run() expect(projectChecker.checkCurrentDirIsABoosterProject).to.have.been.called expect(configService.compileProject).to.have.been.called expect(oraLogger.start).to.have.been.calledWithMatch('Checking project structure') diff --git a/packages/cli/test/commands/clean.test.ts b/packages/cli/test/commands/clean.test.ts index cf6551077..42d3f817d 100644 --- a/packages/cli/test/commands/clean.test.ts +++ b/packages/cli/test/commands/clean.test.ts @@ -4,7 +4,7 @@ import * as Clean from '../../src/commands/clean' import * as configService from '../../src/services/config-service' import * as projectChecker from '../../src/services/project-checker' import { oraLogger } from '../../src/services/logger' -import { IConfig } from '@oclif/config' +import { Config } from '@oclif/core' describe('clean', () => { describe('Clean class', () => { @@ -21,12 +21,12 @@ describe('clean', () => { }) it('init calls checkCurrentDirBoosterVersion', async () => { - await new Clean.default([], {} as IConfig).init() + await new Clean.default([], {} as Config).init() expect(projectChecker.checkCurrentDirBoosterVersion).to.have.been.called }) it('runs the command', async () => { - await new Clean.default([], {} as IConfig).run() + await new Clean.default([], {} as Config).run() expect(projectChecker.checkCurrentDirIsABoosterProject).to.have.been.called expect(configService.cleanProject).to.have.been.called expect(oraLogger.start).to.have.been.calledWithMatch('Checking project structure') diff --git a/packages/cli/test/commands/deploy.test.ts b/packages/cli/test/commands/deploy.test.ts index 226e86030..dd13b98b5 100644 --- a/packages/cli/test/commands/deploy.test.ts +++ b/packages/cli/test/commands/deploy.test.ts @@ -6,7 +6,7 @@ import { test } from '@oclif/test' import * as Deploy from '../../src/commands/deploy' import * as providerService from '../../src/services/provider-service' import { oraLogger } from '../../src/services/logger' -import { IConfig } from '@oclif/config' +import { Config } from '@oclif/core' import * as environment from '../../src/services/environment' import * as packageManagerImpl from '../../src/services/package-manager/live.impl' import * as configService from '../../src/services/config-service' @@ -90,6 +90,7 @@ describe('deploy', () => { describe('run', () => { context('when no environment provided', async () => { test + .loadConfig({ root: __dirname }) .stdout() .command(['deploy']) .it('shows no environment provided error', (ctx) => { @@ -113,12 +114,12 @@ describe('deploy', () => { }) it('init calls checkCurrentDirBoosterVersion', async () => { - await new Deploy.default([], {} as IConfig).init() + await new Deploy.default([], {} as Config).init() expect(projectChecker.checkCurrentDirBoosterVersion).to.have.been.called }) it('without flags', async () => { - await new Deploy.default([], {} as IConfig).run() + await new Deploy.default([], {} as Config).run() expect(configService.compileProjectAndLoadConfig).to.have.not.been.called expect(providerService.deployToCloudProvider).to.have.not.been.called @@ -129,7 +130,7 @@ describe('deploy', () => { let exceptionThrown = false let exceptionMessage = '' try { - await new Deploy.default(['-e'], {} as IConfig).run() + await new Deploy.default(['-e'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -144,7 +145,7 @@ describe('deploy', () => { let exceptionThrown = false let exceptionMessage = '' try { - await new Deploy.default(['--environment'], {} as IConfig).run() + await new Deploy.default(['--environment'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -157,7 +158,7 @@ describe('deploy', () => { describe('inside a booster project', () => { it('entering correct environment', async () => { - await new Deploy.default(['-e', 'fake_environment'], {} as IConfig).run() + await new Deploy.default(['-e', 'fake_environment'], {} as Config).run() expect(configService.compileProjectAndLoadConfig).to.have.been.called expect(providerService.deployToCloudProvider).to.have.been.called @@ -168,13 +169,13 @@ describe('deploy', () => { let exceptionThrown = false let exceptionMessage = '' try { - await new Deploy.default(['-e', 'fake_environment', '--nonexistingoption'], {} as IConfig).run() + await new Deploy.default(['-e', 'fake_environment', '--nonexistingoption'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message } expect(exceptionThrown).to.be.equal(true) - expect(exceptionMessage).to.contain('Unexpected argument: --nonexistingoption') + expect(exceptionMessage).to.contain('Nonexistent flag: --nonexistingoption') expect(configService.compileProjectAndLoadConfig).to.have.not.been.called expect(providerService.deployToCloudProvider).to.have.not.been.called expect(oraLogger.info).to.have.not.been.calledWithMatch('Deployment complete!') diff --git a/packages/cli/test/commands/new/command.test.ts b/packages/cli/test/commands/new/command.test.ts index fa1edf608..024806060 100644 --- a/packages/cli/test/commands/new/command.test.ts +++ b/packages/cli/test/commands/new/command.test.ts @@ -3,7 +3,7 @@ import { restore, replace, fake, stub } from 'sinon' import Command from '../../../src/commands/new/command' import Mustache = require('mustache') import * as fs from 'fs-extra' -import { IConfig } from '@oclif/config' +import { Config } from '@oclif/core' import { expect } from '../../expect' import { template } from '../../../src/services/generator' @@ -52,31 +52,31 @@ describe('new', (): void => { }) it('init calls checkCurrentDirBoosterVersion', async () => { - await new Command([], {} as IConfig).init() + await new Command([], {} as Config).init() expect(ProjectChecker.checkCurrentDirBoosterVersion).to.have.been.called }) describe('Created correctly', () => { it('with no fields', async () => { - await new Command([command], {} as IConfig).run() + await new Command([command], {} as Config).run() const renderedCommand = renderCommand(defaultCommandImports, command, []) expect(fs.outputFile).to.have.been.calledWithMatch(commandPath, renderedCommand) }) it('creates command with a string field', async () => { - await new Command([command, '--fields', 'title:string'], {} as IConfig).run() + await new Command([command, '--fields', 'title:string'], {} as Config).run() const renderedCommand = renderCommand(defaultCommandImports, command, [{ name: 'title', type: 'string' }]) expect(fs.outputFile).to.have.been.calledWithMatch(commandPath, renderedCommand) }) it('creates command with a number field', async () => { - await new Command([command, '--fields', 'quantity:number'], {} as IConfig).run() + await new Command([command, '--fields', 'quantity:number'], {} as Config).run() const renderedCommand = renderCommand(defaultCommandImports, command, [{ name: 'quantity', type: 'number' }]) expect(fs.outputFile).to.have.been.calledWithMatch(commandPath, renderedCommand) }) it('creates command with UUID field', async () => { - await new Command([command, '--fields', 'identifier:UUID'], {} as IConfig).run() + await new Command([command, '--fields', 'identifier:UUID'], {} as Config).run() const renderedCommand = renderCommand(uuidCommandImports, command, [{ name: 'identifier', type: 'UUID' }]) expect(fs.outputFile).to.have.been.calledWithMatch(commandPath, renderedCommand) }) @@ -84,7 +84,7 @@ describe('new', (): void => { it('creates command with multiple fields', async () => { await new Command( [command, '--fields', 'title:string', 'quantity:number', 'identifier:UUID'], - {} as IConfig + {} as Config ).run() const fields = [ { name: 'title', type: 'string' }, @@ -99,7 +99,7 @@ describe('new', (): void => { describe('displays an error', () => { it('with empty command name', async () => { replace(console, 'error', fake.resolves({})) - await new Command([], {} as IConfig).run() + await new Command([], {} as Config).run() expect(fs.outputFile).to.have.not.been.calledWithMatch(commandsRoot) expect(console.error).to.have.been.calledWithMatch(/You haven't provided a command name/) }) @@ -108,7 +108,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Command([command, '--fields'], {} as IConfig).run() + await new Command([command, '--fields'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -121,7 +121,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Command([command, '--fields', 'title'], {} as IConfig).run() + await new Command([command, '--fields', 'title'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -134,7 +134,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Command([command, '--fields', 'title:'], {} as IConfig).run() + await new Command([command, '--fields', 'title:'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -150,7 +150,7 @@ describe('new', (): void => { try { await new Command( [command, '--fields', 'title:string', 'title:string', 'quantity:number'], - {} as IConfig + {} as Config ).run() } catch (e) { exceptionThrown = true diff --git a/packages/cli/test/commands/new/entity.test.ts b/packages/cli/test/commands/new/entity.test.ts index 2cd59fc14..e3654bca2 100644 --- a/packages/cli/test/commands/new/entity.test.ts +++ b/packages/cli/test/commands/new/entity.test.ts @@ -3,7 +3,7 @@ import { restore, replace, fake, stub } from 'sinon' import Entity from '../../../src/commands/new/entity' import Mustache = require('mustache') import * as fs from 'fs-extra' -import { IConfig } from '@oclif/config' +import { Config } from '@oclif/core' import { expect } from '../../expect' import { template } from '../../../src/services/generator' @@ -75,25 +75,25 @@ describe('new', (): void => { }) it('init calls checkCurrentDirBoosterVersion', async () => { - await new Entity([], {} as IConfig).init() + await new Entity([], {} as Config).init() expect(ProjectChecker.checkCurrentDirBoosterVersion).to.have.been.called }) describe('Created correctly', () => { it('with no fields and no reduces', async () => { - await new Entity([entityName], {} as IConfig).run() + await new Entity([entityName], {} as Config).run() const renderedEntity = renderEntity(defaultEntityImports, entityName, [], []) expect(fs.outputFile).to.have.been.calledWithMatch(entityPath, renderedEntity) }) it('creates Entity with a string field', async () => { - await new Entity([entityName, '--fields', 'title:string'], {} as IConfig).run() + await new Entity([entityName, '--fields', 'title:string'], {} as Config).run() const renderedEntity = renderEntity(defaultEntityImports, entityName, [{ name: 'title', type: 'string' }], []) expect(fs.outputFile).to.have.been.calledWithMatch(entityPath, renderedEntity) }) it('creates Entity with a string field reducing PostCreated', async () => { - await new Entity([entityName, '--fields', 'title:string', '--reduces', 'PostCreated'], {} as IConfig).run() + await new Entity([entityName, '--fields', 'title:string', '--reduces', 'PostCreated'], {} as Config).run() const renderedEntity = renderEntity( reducingEntityImports, entityName, @@ -104,7 +104,7 @@ describe('new', (): void => { }) it('creates Entity with a number field', async () => { - await new Entity([entityName, '--fields', 'quantity:number'], {} as IConfig).run() + await new Entity([entityName, '--fields', 'quantity:number'], {} as Config).run() const renderedEntity = renderEntity( defaultEntityImports, entityName, @@ -115,7 +115,7 @@ describe('new', (): void => { }) it('creates Entity with a number field reducing PostCreated', async () => { - await new Entity([entityName, '--fields', 'quantity:number', '--reduces', 'PostCreated'], {} as IConfig).run() + await new Entity([entityName, '--fields', 'quantity:number', '--reduces', 'PostCreated'], {} as Config).run() const renderedEntity = renderEntity( reducingEntityImports, entityName, @@ -126,7 +126,7 @@ describe('new', (): void => { }) it('creates Entity with UUID field', async () => { - await new Entity([entityName, '--fields', 'identifier:UUID'], {} as IConfig).run() + await new Entity([entityName, '--fields', 'identifier:UUID'], {} as Config).run() const renderedEntity = renderEntity( defaultEntityImports, entityName, @@ -137,7 +137,7 @@ describe('new', (): void => { }) it('creates Entity with UUID field reducing PostCreated', async () => { - await new Entity([entityName, '--fields', 'identifier:UUID', '--reduces', 'PostCreated'], {} as IConfig).run() + await new Entity([entityName, '--fields', 'identifier:UUID', '--reduces', 'PostCreated'], {} as Config).run() const renderedEntity = renderEntity( reducingEntityImports, entityName, @@ -150,7 +150,7 @@ describe('new', (): void => { it('creates Entity with multiple fields', async () => { await new Entity( [entityName, '--fields', 'title:string', 'quantity:number', 'identifier:UUID'], - {} as IConfig + {} as Config ).run() const fields = [ { name: 'title', type: 'string' }, @@ -164,7 +164,7 @@ describe('new', (): void => { it('creates Entity with multiple fields reducing PostCreated', async () => { await new Entity( [entityName, '--fields', 'title:string', 'quantity:number', 'identifier:UUID', '--reduces', 'PostCreated'], - {} as IConfig + {} as Config ).run() const fields = [ { name: 'title', type: 'string' }, @@ -187,7 +187,7 @@ describe('new', (): void => { 'PostCreated', 'CommentCreated', ], - {} as IConfig + {} as Config ).run() const fields = [ { name: 'title', type: 'string' }, @@ -205,7 +205,7 @@ describe('new', (): void => { describe('displays an error', () => { it('with empty Entity name', async () => { replace(console, 'error', fake.resolves({})) - await new Entity([], {} as IConfig).run() + await new Entity([], {} as Config).run() expect(fs.outputFile).to.have.not.been.calledWithMatch(entitysRoot) expect(console.error).to.have.been.calledWithMatch(/You haven't provided an entity name/) }) @@ -214,7 +214,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Entity([entityName, '--fields'], {} as IConfig).run() + await new Entity([entityName, '--fields'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -227,7 +227,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Entity([entityName, '--fields', 'title:string', '--reduces'], {} as IConfig).run() + await new Entity([entityName, '--fields', 'title:string', '--reduces'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -236,24 +236,37 @@ describe('new', (): void => { expect(exceptionMessage).to.contain('--reduces expects a value') }) - it('with empty fields and reduces', async () => { + it('with empty fields', async () => { + let exceptionThrown = false + let exceptionMessage = '' + try { + await new Entity([entityName, '--fields', '--reduces'], {} as Config).run() + } catch (e) { + exceptionThrown = true + exceptionMessage = e.message + } + expect(exceptionThrown).to.be.equal(true) + expect(exceptionMessage).to.contain('Flag --fields expects a value') + }) + + it('with empty reduces', async () => { let exceptionThrown = false let exceptionMessage = '' try { - await new Entity([entityName, '--fields', '--reduces'], {} as IConfig).run() + await new Entity([entityName, '--fields', 'title', '--reduces'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message } expect(exceptionThrown).to.be.equal(true) - expect(exceptionMessage).to.contain('Error parsing field --reduces') + expect(exceptionMessage).to.contain('Flag --reduces expects a value') }) it('with field with no type', async () => { let exceptionThrown = false let exceptionMessage = '' try { - await new Entity([entityName, '--fields', 'title'], {} as IConfig).run() + await new Entity([entityName, '--fields', 'title'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -266,7 +279,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Entity([entityName, '--fields', 'title:'], {} as IConfig).run() + await new Entity([entityName, '--fields', 'title:'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -282,7 +295,7 @@ describe('new', (): void => { try { await new Entity( [entityName, '--fields', 'title:string', 'title:string', 'quantity:number'], - {} as IConfig + {} as Config ).run() } catch (e) { exceptionThrown = true diff --git a/packages/cli/test/commands/new/event-handler.test.ts b/packages/cli/test/commands/new/event-handler.test.ts index 6d72a8b6f..d5584049e 100644 --- a/packages/cli/test/commands/new/event-handler.test.ts +++ b/packages/cli/test/commands/new/event-handler.test.ts @@ -3,7 +3,7 @@ import { restore, replace, fake, stub } from 'sinon' import EventHandler from '../../../src/commands/new/event-handler' import Mustache = require('mustache') import * as fs from 'fs-extra' -import { IConfig } from '@oclif/config' +import { Config } from '@oclif/core' import { expect } from '../../expect' import { template } from '../../../src/services/generator' @@ -38,13 +38,13 @@ describe('new', (): void => { }) it('init calls checkCurrentDirBoosterVersion', async () => { - await new EventHandler([], {} as IConfig).init() + await new EventHandler([], {} as Config).init() expect(ProjectChecker.checkCurrentDirBoosterVersion).to.have.been.called }) describe('Created correctly', () => { it('creates Event with a event', async () => { - await new EventHandler([eventHandlerName, '--event', 'CommentPosted'], {} as IConfig).run() + await new EventHandler([eventHandlerName, '--event', 'CommentPosted'], {} as Config).run() const renderedEventHandler = Mustache.render(template('event-handler'), { imports: defaultEventHandlerImports, name: eventHandlerName, @@ -57,14 +57,14 @@ describe('new', (): void => { describe('displays an error', () => { it('with no event', async () => { replace(console, 'error', fake.resolves({})) - await new EventHandler([eventHandlerName], {} as IConfig).run() + await new EventHandler([eventHandlerName], {} as Config).run() expect(fs.outputFile).to.have.not.been.calledWithMatch(eventHandlerPath) expect(console.error).to.have.been.calledWithMatch(/You haven't provided an event/) }) it('with empty EventHandler name', async () => { replace(console, 'error', fake.resolves({})) - await new EventHandler([], {} as IConfig).run() + await new EventHandler([], {} as Config).run() expect(fs.outputFile).to.have.not.been.calledWithMatch(eventHandlersRoot) expect(console.error).to.have.been.calledWithMatch(/You haven't provided an event handler name/) }) @@ -73,7 +73,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new EventHandler([eventHandlerName, '--event'], {} as IConfig).run() + await new EventHandler([eventHandlerName, '--event'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -87,7 +87,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new EventHandler([eventHandlerName, '--event', 'CommentPosted', 'ArticlePosted'], {} as IConfig).run() + await new EventHandler([eventHandlerName, '--event', 'CommentPosted', 'ArticlePosted'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message diff --git a/packages/cli/test/commands/new/event.test.ts b/packages/cli/test/commands/new/event.test.ts index 598e4969c..13287bd1a 100644 --- a/packages/cli/test/commands/new/event.test.ts +++ b/packages/cli/test/commands/new/event.test.ts @@ -3,7 +3,7 @@ import { restore, replace, fake, stub } from 'sinon' import Event from '../../../src/commands/new/event' import Mustache = require('mustache') import * as fs from 'fs-extra' -import { IConfig } from '@oclif/config' +import { Config } from '@oclif/core' import { expect } from '../../expect' import { template } from '../../../src/services/generator' @@ -42,31 +42,31 @@ describe('new', (): void => { }) it('init calls checkCurrentDirBoosterVersion', async () => { - await new Event([], {} as IConfig).init() + await new Event([], {} as Config).init() expect(ProjectChecker.checkCurrentDirBoosterVersion).to.have.been.called }) describe('Created correctly', () => { it('with no fields', async () => { - await new Event([eventName], {} as IConfig).run() + await new Event([eventName], {} as Config).run() const renderedEvent = renderEvent(eventName, []) expect(fs.outputFile).to.have.been.calledWithMatch(eventPath, renderedEvent) }) it('creates Event with a string field', async () => { - await new Event([eventName, '--fields', 'title:string'], {} as IConfig).run() + await new Event([eventName, '--fields', 'title:string'], {} as Config).run() const renderedEvent = renderEvent(eventName, [{ name: 'title', type: 'string' }]) expect(fs.outputFile).to.have.been.calledWithMatch(eventPath, renderedEvent) }) it('creates Event with a number field', async () => { - await new Event([eventName, '--fields', 'quantity:number'], {} as IConfig).run() + await new Event([eventName, '--fields', 'quantity:number'], {} as Config).run() const renderedEvent = renderEvent(eventName, [{ name: 'quantity', type: 'number' }]) expect(fs.outputFile).to.have.been.calledWithMatch(eventPath, renderedEvent) }) it('creates Event with UUID field', async () => { - await new Event([eventName, '--fields', 'identifier:UUID'], {} as IConfig).run() + await new Event([eventName, '--fields', 'identifier:UUID'], {} as Config).run() const renderedEvent = renderEvent(eventName, [{ name: 'identifier', type: 'UUID' }]) expect(fs.outputFile).to.have.been.calledWithMatch(eventPath, renderedEvent) }) @@ -74,7 +74,7 @@ describe('new', (): void => { it('creates Event with multiple fields', async () => { await new Event( [eventName, '--fields', 'title:string', 'quantity:number', 'identifier:UUID'], - {} as IConfig + {} as Config ).run() const fields = [ { name: 'title', type: 'string' }, @@ -89,7 +89,7 @@ describe('new', (): void => { describe('displays an error', () => { it('with empty Event name', async () => { replace(console, 'error', fake.resolves({})) - await new Event([], {} as IConfig).run() + await new Event([], {} as Config).run() expect(fs.outputFile).to.have.not.been.calledWithMatch(eventsRoot) expect(console.error).to.have.been.calledWithMatch(/You haven't provided an event name/) }) @@ -98,7 +98,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Event([eventName, '--fields'], {} as IConfig).run() + await new Event([eventName, '--fields'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -111,7 +111,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Event([eventName, '--fields', 'title'], {} as IConfig).run() + await new Event([eventName, '--fields', 'title'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -124,7 +124,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Event([eventName, '--fields', 'title:'], {} as IConfig).run() + await new Event([eventName, '--fields', 'title:'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -140,7 +140,7 @@ describe('new', (): void => { try { await new Event( [eventName, '--fields', 'title:string', 'title:string', 'quantity:number'], - {} as IConfig + {} as Config ).run() } catch (e) { exceptionThrown = true diff --git a/packages/cli/test/commands/new/project.test.ts b/packages/cli/test/commands/new/project.test.ts index 40a85ab51..399c157b8 100644 --- a/packages/cli/test/commands/new/project.test.ts +++ b/packages/cli/test/commands/new/project.test.ts @@ -2,7 +2,7 @@ import { restore, replace, fake, spy } from 'sinon' import { ProjectInitializerConfig } from '../../../src/services/project-initializer' import { oraLogger } from '../../../src/services/logger' import * as fs from 'fs-extra' -import { IConfig } from '@oclif/config' +import { Config } from '@oclif/core' import { expect } from '../../expect' import * as Project from '../../../src/commands/new/project' import * as ProjectInitializer from '../../../src/services/project-initializer' @@ -74,7 +74,7 @@ describe('new', (): void => { it('without flags', async () => { replace(Project, 'parseConfig', fake.returns(defaultProjectInitializerConfig)) - await new Project.default([projectName], {} as IConfig).run() + await new Project.default([projectName], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.been.called expect(ProjectInitializer.installDependencies).to.have.been.called @@ -85,7 +85,7 @@ describe('new', (): void => { it('skip dependencies installation with --skipInstall', async () => { replace(Project, 'parseConfig', fake.returns(defaultProjectInitializerConfig)) - await new Project.default([projectName, '--skipInstall'], {} as IConfig).run() + await new Project.default([projectName, '--skipInstall'], {} as Config).run() expect(ProjectInitializer.installDependencies).to.have.not.been.called expect(ProjectInitializer.initializeGit).to.have.been.called @@ -96,7 +96,7 @@ describe('new', (): void => { it('generates project with default parameters when using --default flag', async () => { const parseConfigSpy = spy(Project, 'parseConfig') - await new Project.default([projectName, '--default'], { version: '0.5.1' } as IConfig).run() + await new Project.default([projectName, '--default'], { version: '0.5.1' } as Config).run() expect(oraLogger.info).to.have.been.calledWithMatch('Project generated!') expectFilesAndDirectoriesCreated(projectName) @@ -113,7 +113,7 @@ describe('new', (): void => { it('skips git repository initialization with --skipGit', async () => { replace(Project, 'parseConfig', fake.returns(defaultProjectInitializerConfig)) - await new Project.default([projectName, '--skipGit'], {} as IConfig).run() + await new Project.default([projectName, '--skipGit'], {} as Config).run() expect(oraLogger.info).to.have.been.calledWithMatch('Project generated!') expect(ProjectInitializer.initializeGit).to.have.not.been.called @@ -127,7 +127,7 @@ describe('new', (): void => { const config = { ...defaultProjectInitializerConfig, homepage: 'boosterframework.com' } replace(Project, 'parseConfig', fake.returns(config)) - await new Project.default([projectName,'--homepage',"'boosterframework.com'"], {} as IConfig).run() + await new Project.default([projectName,'--homepage',"'boosterframework.com'"], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.been.called expect(ProjectInitializer.installDependencies).to.have.been.called @@ -140,7 +140,7 @@ describe('new', (): void => { const config = { ...defaultProjectInitializerConfig, homepage: 'boosterframework.com' } replace(Project, 'parseConfig', fake.returns(config)) - await new Project.default([projectName,'-H',"'boosterframework.com'"], {} as IConfig).run() + await new Project.default([projectName,'-H',"'boosterframework.com'"], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.been.called expect(ProjectInitializer.installDependencies).to.have.been.called @@ -155,7 +155,7 @@ describe('new', (): void => { const config = { ...defaultProjectInitializerConfig, author: 'John Doe' } replace(Project, 'parseConfig', fake.returns(config)) - await new Project.default([projectName,'--author',"'John Doe'"], {} as IConfig).run() + await new Project.default([projectName,'--author',"'John Doe'"], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.been.called expect(ProjectInitializer.installDependencies).to.have.been.called @@ -168,7 +168,7 @@ describe('new', (): void => { const config = { ...defaultProjectInitializerConfig, author: 'John Doe' } replace(Project, 'parseConfig', fake.returns(config)) - await new Project.default([projectName,'-a',"'John Doe'"], {} as IConfig).run() + await new Project.default([projectName,'-a',"'John Doe'"], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.been.called expect(ProjectInitializer.installDependencies).to.have.been.called @@ -183,7 +183,7 @@ describe('new', (): void => { const config = { ...defaultProjectInitializerConfig, description: 'a short description' } replace(Project, 'parseConfig', fake.returns(config)) - await new Project.default([projectName,'--description',"'a short description'"], {} as IConfig).run() + await new Project.default([projectName,'--description',"'a short description'"], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.been.called expect(ProjectInitializer.installDependencies).to.have.been.called @@ -196,7 +196,7 @@ describe('new', (): void => { const config = { ...defaultProjectInitializerConfig, description: 'a short description' } replace(Project, 'parseConfig', fake.returns(config)) - await new Project.default([projectName,'-d',"'a short description'"], {} as IConfig).run() + await new Project.default([projectName,'-d',"'a short description'"], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.been.called expect(ProjectInitializer.installDependencies).to.have.been.called @@ -211,7 +211,7 @@ describe('new', (): void => { const config = { ...defaultProjectInitializerConfig, license: 'GPL' } replace(Project, 'parseConfig', fake.returns(config)) - await new Project.default([projectName,'--license','GPL'], {} as IConfig).run() + await new Project.default([projectName,'--license','GPL'], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.been.called expect(ProjectInitializer.installDependencies).to.have.been.called @@ -224,7 +224,7 @@ describe('new', (): void => { const config = { ...defaultProjectInitializerConfig, license: 'GPL' } replace(Project, 'parseConfig', fake.returns(config)) - await new Project.default([projectName,'-l','GPL'], {} as IConfig).run() + await new Project.default([projectName,'-l','GPL'], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.been.called expect(ProjectInitializer.installDependencies).to.have.been.called @@ -238,7 +238,7 @@ describe('new', (): void => { it('with --providerPackageName', async () => { replace(Project, 'parseConfig', fake.returns(defaultProjectInitializerConfig)) - await new Project.default([projectName,'--providerPackageName',defaultProvider], {} as IConfig).run() + await new Project.default([projectName,'--providerPackageName',defaultProvider], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.been.called expect(ProjectInitializer.installDependencies).to.have.been.called @@ -249,7 +249,7 @@ describe('new', (): void => { it('with -p', async () => { replace(Project, 'parseConfig', fake.returns(defaultProjectInitializerConfig)) - await new Project.default([projectName,'-p',defaultProvider], {} as IConfig).run() + await new Project.default([projectName,'-p',defaultProvider], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.been.called expect(ProjectInitializer.installDependencies).to.have.been.called @@ -263,7 +263,7 @@ describe('new', (): void => { const config = { ...defaultProjectInitializerConfig, repository: defaultRepository } replace(Project, 'parseConfig', fake.returns(config)) - await new Project.default([projectName,'--repository',defaultRepository], {} as IConfig).run() + await new Project.default([projectName,'--repository',defaultRepository], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.been.called expect(ProjectInitializer.installDependencies).to.have.been.called @@ -276,7 +276,7 @@ describe('new', (): void => { const config = { ...defaultProjectInitializerConfig, repository: defaultRepository } replace(Project, 'parseConfig', fake.returns(config)) - await new Project.default([projectName,'-r',defaultRepository], {} as IConfig).run() + await new Project.default([projectName,'-r',defaultRepository], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.been.called expect(ProjectInitializer.installDependencies).to.have.been.called @@ -291,7 +291,7 @@ describe('new', (): void => { const config = { ...defaultProjectInitializerConfig, version: '1.0.0' } replace(Project, 'parseConfig', fake.returns(config)) - await new Project.default([projectName,'--version','1.0.0'], {} as IConfig).run() + await new Project.default([projectName,'--version','1.0.0'], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.been.called expect(ProjectInitializer.installDependencies).to.have.been.called @@ -304,7 +304,7 @@ describe('new', (): void => { const config = { ...defaultProjectInitializerConfig, version: '1.0.0' } replace(Project, 'parseConfig', fake.returns(config)) - await new Project.default([projectName,'-v','1.0.0'], {} as IConfig).run() + await new Project.default([projectName,'-v','1.0.0'], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.been.called expect(ProjectInitializer.installDependencies).to.have.been.called @@ -326,7 +326,7 @@ describe('new', (): void => { '--providerPackageName',defaultProvider, '--skipInstall', '--skipGit' - ], {} as IConfig).run() + ], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.not.been.called expect(ProjectInitializer.installDependencies).to.have.not.been.called @@ -345,7 +345,7 @@ describe('new', (): void => { '-p',defaultProvider, '--skipInstall', '--skipGit' - ], {} as IConfig).run() + ], {} as Config).run() expect(ProjectInitializer.initializeGit).to.have.not.been.called expect(ProjectInitializer.installDependencies).to.have.not.been.called @@ -358,7 +358,7 @@ describe('new', (): void => { describe('displays an error', () => { it('with empty project name', async () => { replace(console,'error', fake.resolves({})) - await new Project.default([], {} as IConfig).run() + await new Project.default([], {} as Config).run() expect(fs.mkdirs).to.have.not.been.calledWithMatch(`${projectName}/src`) expect(console.error).to.have.been.calledWithMatch(/You haven't provided a project name/) expect(oraLogger.info).to.have.not.been.calledWithMatch('Project generated!') @@ -368,13 +368,13 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'--nonexistingoption'], {} as IConfig).run() + await new Project.default([projectName,'--nonexistingoption'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message } expect(exceptionThrown).to.be.equal(true) - expect(exceptionMessage).to.contain('Unexpected argument: --nonexistingoption') + expect(exceptionMessage).to.contain('Nonexistent flag: --nonexistingoption') expect(oraLogger.info).to.have.not.been.calledWithMatch('Project generated!') expect(fs.mkdirs).to.have.not.been.calledWithMatch(`${projectName}/src`) }) @@ -386,7 +386,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'--homepage'], {} as IConfig).run() + await new Project.default([projectName,'--homepage'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message @@ -401,7 +401,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'-H'], {} as IConfig).run() + await new Project.default([projectName,'-H'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message @@ -418,7 +418,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'--author'], {} as IConfig).run() + await new Project.default([projectName,'--author'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message @@ -433,7 +433,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'-a'], {} as IConfig).run() + await new Project.default([projectName,'-a'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message @@ -450,7 +450,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'--description'], {} as IConfig).run() + await new Project.default([projectName,'--description'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message @@ -465,7 +465,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'-d'], {} as IConfig).run() + await new Project.default([projectName,'-d'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message @@ -482,7 +482,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'--license'], {} as IConfig).run() + await new Project.default([projectName,'--license'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message @@ -497,7 +497,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'-l'], {} as IConfig).run() + await new Project.default([projectName,'-l'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message @@ -514,7 +514,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'--providerPackageName'], {} as IConfig).run() + await new Project.default([projectName,'--providerPackageName'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message @@ -529,7 +529,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'-p'], {} as IConfig).run() + await new Project.default([projectName,'-p'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message @@ -546,7 +546,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'--repository'], {} as IConfig).run() + await new Project.default([projectName,'--repository'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message @@ -561,7 +561,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'-r'], {} as IConfig).run() + await new Project.default([projectName,'-r'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message @@ -578,7 +578,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'--version'], {} as IConfig).run() + await new Project.default([projectName,'--version'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message @@ -593,7 +593,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'-v'], {} as IConfig).run() + await new Project.default([projectName,'-v'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message @@ -612,7 +612,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'--providerPackageName','nonexistingProvider'], {} as IConfig).run() + await new Project.default([projectName,'--providerPackageName','nonexistingProvider'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message @@ -629,7 +629,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Project.default([projectName,'--repository','invalidUrl'], {} as IConfig).run() + await new Project.default([projectName,'--repository','invalidUrl'], {} as Config).run() } catch(e) { exceptionThrown = true exceptionMessage = e.message diff --git a/packages/cli/test/commands/new/read-model.test.ts b/packages/cli/test/commands/new/read-model.test.ts index 1d3428224..eebee5298 100644 --- a/packages/cli/test/commands/new/read-model.test.ts +++ b/packages/cli/test/commands/new/read-model.test.ts @@ -3,7 +3,7 @@ import { restore, replace, fake, stub } from 'sinon' import ReadModel from '../../../src/commands/new/read-model' import Mustache = require('mustache') import * as fs from 'fs-extra' -import { IConfig } from '@oclif/config' +import { Config } from '@oclif/core' import { expect } from '../../expect' import { template } from '../../../src/services/generator' @@ -75,19 +75,19 @@ describe('new', (): void => { }) it('init calls checkCurrentDirBoosterVersion', async () => { - await new ReadModel([], {} as IConfig).init() + await new ReadModel([], {} as Config).init() expect(ProjectChecker.checkCurrentDirBoosterVersion).to.have.been.called }) describe('Created correctly', () => { it('with no fields and no projects', async () => { - await new ReadModel([readModelName], {} as IConfig).run() + await new ReadModel([readModelName], {} as Config).run() const renderedReadModel = renderReadModel(defaultReadModelImports, readModelName, [], []) expect(fs.outputFile).to.have.been.calledWithMatch(readModelPath, renderedReadModel) }) it('creates ReadModel with a string field', async () => { - await new ReadModel([readModelName, '--fields', 'title:string'], {} as IConfig).run() + await new ReadModel([readModelName, '--fields', 'title:string'], {} as Config).run() const renderedReadModel = renderReadModel( defaultReadModelImports, readModelName, @@ -98,7 +98,7 @@ describe('new', (): void => { }) it('creates ReadModel with a string field projecting Post:id', async () => { - await new ReadModel([readModelName, '--fields', 'title:string', '--projects', 'Post:id'], {} as IConfig).run() + await new ReadModel([readModelName, '--fields', 'title:string', '--projects', 'Post:id'], {} as Config).run() const renderedReadModel = renderReadModel( projectingReadModelImports, readModelName, @@ -109,7 +109,7 @@ describe('new', (): void => { }) it('creates ReadModel with a number field', async () => { - await new ReadModel([readModelName, '--fields', 'quantity:number'], {} as IConfig).run() + await new ReadModel([readModelName, '--fields', 'quantity:number'], {} as Config).run() const renderedReadModel = renderReadModel( defaultReadModelImports, readModelName, @@ -122,7 +122,7 @@ describe('new', (): void => { it('creates ReadModel with a number field projecting Post:id', async () => { await new ReadModel( [readModelName, '--fields', 'quantity:number', '--projects', 'Post:id'], - {} as IConfig + {} as Config ).run() const renderedReadModel = renderReadModel( projectingReadModelImports, @@ -134,7 +134,7 @@ describe('new', (): void => { }) it('creates ReadModel with UUID field', async () => { - await new ReadModel([readModelName, '--fields', 'identifier:UUID'], {} as IConfig).run() + await new ReadModel([readModelName, '--fields', 'identifier:UUID'], {} as Config).run() const renderedReadModel = renderReadModel( defaultReadModelImports, readModelName, @@ -147,7 +147,7 @@ describe('new', (): void => { it('creates ReadModel with UUID field projecting Post:id', async () => { await new ReadModel( [readModelName, '--fields', 'identifier:UUID', '--projects', 'Post:id'], - {} as IConfig + {} as Config ).run() const renderedReadModel = renderReadModel( projectingReadModelImports, @@ -161,7 +161,7 @@ describe('new', (): void => { it('creates ReadModel with multiple fields', async () => { await new ReadModel( [readModelName, '--fields', 'title:string', 'quantity:number', 'identifier:UUID'], - {} as IConfig + {} as Config ).run() const fields = [ { name: 'title', type: 'string' }, @@ -175,7 +175,7 @@ describe('new', (): void => { it('creates ReadModel with multiple fields projecting Post:id', async () => { await new ReadModel( [readModelName, '--fields', 'title:string', 'quantity:number', 'identifier:UUID', '--projects', 'Post:id'], - {} as IConfig + {} as Config ).run() const fields = [ { name: 'title', type: 'string' }, @@ -200,7 +200,7 @@ describe('new', (): void => { 'Post:id', 'Comment:id', ], - {} as IConfig + {} as Config ).run() const fields = [ { name: 'title', type: 'string' }, @@ -219,7 +219,7 @@ describe('new', (): void => { describe('displays an error', () => { it('with empty ReadModel name', async () => { replace(console, 'error', fake.resolves({})) - await new ReadModel([], {} as IConfig).run() + await new ReadModel([], {} as Config).run() expect(fs.outputFile).to.have.not.been.calledWithMatch(readModelsRoot) expect(console.error).to.have.been.calledWithMatch(/You haven't provided a read model name/) }) @@ -228,7 +228,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new ReadModel([readModelName, '--fields'], {} as IConfig).run() + await new ReadModel([readModelName, '--fields'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -241,7 +241,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new ReadModel([readModelName, '--fields', 'title:string', '--projects'], {} as IConfig).run() + await new ReadModel([readModelName, '--fields', 'title:string', '--projects'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -250,24 +250,38 @@ describe('new', (): void => { expect(exceptionMessage).to.contain('--projects expects a value') }) - it('with empty fields and projection', async () => { + it('with empty fields', async () => { let exceptionThrown = false let exceptionMessage = '' try { - await new ReadModel([readModelName, '--fields', '--projects'], {} as IConfig).run() + await new ReadModel([readModelName, '--fields'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message } expect(exceptionThrown).to.be.equal(true) - expect(exceptionMessage).to.contain('Error parsing field --projects') + expect(exceptionMessage).to.contain('Flag --fields expects a value') }) + it('with empty projection', async () => { + let exceptionThrown = false + let exceptionMessage = '' + try { + await new ReadModel([readModelName, '--projects'], {} as Config).run() + } catch (e) { + exceptionThrown = true + exceptionMessage = e.message + } + expect(exceptionThrown).to.be.equal(true) + expect(exceptionMessage).to.contain('Flag --projects expects a value') + }) + + it('with field with no type', async () => { let exceptionThrown = false let exceptionMessage = '' try { - await new ReadModel([readModelName, '--fields', 'title'], {} as IConfig).run() + await new ReadModel([readModelName, '--fields', 'title'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -280,7 +294,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new ReadModel([readModelName, '--fields', 'title:'], {} as IConfig).run() + await new ReadModel([readModelName, '--fields', 'title:'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -294,7 +308,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new ReadModel([readModelName, '--fields', 'title:string', '--projects', 'Post'], {} as IConfig).run() + await new ReadModel([readModelName, '--fields', 'title:string', '--projects', 'Post'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -308,7 +322,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new ReadModel([readModelName, '--fields', 'title:string', '--projects', 'Post:'], {} as IConfig).run() + await new ReadModel([readModelName, '--fields', 'title:string', '--projects', 'Post:'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -322,7 +336,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new ReadModel([readModelName, '--fields', 'title:string', '--projects', ':id'], {} as IConfig).run() + await new ReadModel([readModelName, '--fields', 'title:string', '--projects', ':id'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -338,7 +352,7 @@ describe('new', (): void => { try { await new ReadModel( [readModelName, '--fields', 'title:string', 'title:string', 'quantity:number'], - {} as IConfig + {} as Config ).run() } catch (e) { exceptionThrown = true diff --git a/packages/cli/test/commands/new/scheduled-command.test.ts b/packages/cli/test/commands/new/scheduled-command.test.ts index 2debde299..bc632fd2d 100644 --- a/packages/cli/test/commands/new/scheduled-command.test.ts +++ b/packages/cli/test/commands/new/scheduled-command.test.ts @@ -3,7 +3,7 @@ import { restore, replace, fake, stub } from 'sinon' import ScheduledCommand from '../../../src/commands/new/scheduled-command' import Mustache = require('mustache') import * as fs from 'fs-extra' -import { IConfig } from '@oclif/config' +import { Config } from '@oclif/core' import { expect } from '../../expect' import { template } from '../../../src/services/generator' @@ -34,13 +34,13 @@ describe('new', (): void => { }) it('init calls checkCurrentDirBoosterVersion', async () => { - await new ScheduledCommand([], {} as IConfig).init() + await new ScheduledCommand([], {} as Config).init() expect(ProjectChecker.checkCurrentDirBoosterVersion).to.have.been.called }) describe('Created correctly', () => { it('with scheduled command name', async () => { - await new ScheduledCommand([scheduledCommandName], {} as IConfig).run() + await new ScheduledCommand([scheduledCommandName], {} as Config).run() const renderedCommand = Mustache.render(template('scheduled-command'), { imports: defaultScheduledCommandImports, name: scheduledCommandName, @@ -52,7 +52,7 @@ describe('new', (): void => { describe('displays an error', () => { it('with empty scheduled command name', async () => { replace(console, 'error', fake.resolves({})) - await new ScheduledCommand([], {} as IConfig).run() + await new ScheduledCommand([], {} as Config).run() expect(fs.outputFile).to.have.not.been.calledWithMatch(scheduledCommandRoot) expect(console.error).to.have.been.calledWithMatch(/You haven't provided a scheduled command name/) }) @@ -61,7 +61,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new ScheduledCommand([scheduledCommandName, 'AnotherName'], {} as IConfig).run() + await new ScheduledCommand([scheduledCommandName, 'AnotherName'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message diff --git a/packages/cli/test/commands/new/type.test.ts b/packages/cli/test/commands/new/type.test.ts index e0d178878..89105a40f 100644 --- a/packages/cli/test/commands/new/type.test.ts +++ b/packages/cli/test/commands/new/type.test.ts @@ -3,7 +3,7 @@ import { restore, replace, fake, stub } from 'sinon' import Type from '../../../src/commands/new/type' import Mustache = require('mustache') import * as fs from 'fs-extra' -import { IConfig } from '@oclif/config' +import { Config } from '@oclif/core' import { expect } from '../../expect' import { template } from '../../../src/services/generator' @@ -52,31 +52,31 @@ describe('new', (): void => { }) it('init calls checkCurrentDirBoosterVersion', async () => { - await new Type([], {} as IConfig).init() + await new Type([], {} as Config).init() expect(ProjectChecker.checkCurrentDirBoosterVersion).to.have.been.called }) describe('Created correctly', () => { it('with no fields', async () => { - await new Type([typeName], {} as IConfig).run() + await new Type([typeName], {} as Config).run() const renderedType = renderType(defaultTypeImports, typeName, []) expect(fs.outputFile).to.have.been.calledWithMatch(typePath, renderedType) }) it('creates Type with a string field', async () => { - await new Type([typeName, '--fields', 'title:string'], {} as IConfig).run() + await new Type([typeName, '--fields', 'title:string'], {} as Config).run() const renderedType = renderType(defaultTypeImports, typeName, [{ name: 'title', type: 'string' }]) expect(fs.outputFile).to.have.been.calledWithMatch(typePath, renderedType) }) it('creates Type with a number field', async () => { - await new Type([typeName, '--fields', 'quantity:number'], {} as IConfig).run() + await new Type([typeName, '--fields', 'quantity:number'], {} as Config).run() const renderedType = renderType(defaultTypeImports, typeName, [{ name: 'quantity', type: 'number' }]) expect(fs.outputFile).to.have.been.calledWithMatch(typePath, renderedType) }) it('creates Type with UUID field', async () => { - await new Type([typeName, '--fields', 'identifier:UUID'], {} as IConfig).run() + await new Type([typeName, '--fields', 'identifier:UUID'], {} as Config).run() const renderedType = renderType(uuidTypeImports, typeName, [{ name: 'identifier', type: 'UUID' }]) expect(fs.outputFile).to.have.been.calledWithMatch(typePath, renderedType) }) @@ -84,7 +84,7 @@ describe('new', (): void => { it('creates Type with multiple fields', async () => { await new Type( [typeName, '--fields', 'title:string', 'quantity:number', 'identifier:UUID'], - {} as IConfig + {} as Config ).run() const fields = [ { name: 'title', type: 'string' }, @@ -99,7 +99,7 @@ describe('new', (): void => { describe('displays an error', () => { it('with empty Type name', async () => { replace(console, 'error', fake.resolves({})) - await new Type([], {} as IConfig).run() + await new Type([], {} as Config).run() expect(fs.outputFile).to.have.not.been.calledWithMatch(typesRoot) expect(console.error).to.have.been.calledWithMatch(/You haven't provided a type name/) }) @@ -108,7 +108,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Type([typeName, '--fields'], {} as IConfig).run() + await new Type([typeName, '--fields'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -121,7 +121,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Type([typeName, '--fields', 'title'], {} as IConfig).run() + await new Type([typeName, '--fields', 'title'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -134,7 +134,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Type([typeName, '--fields', 'title:'], {} as IConfig).run() + await new Type([typeName, '--fields', 'title:'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -148,7 +148,7 @@ describe('new', (): void => { let exceptionThrown = false let exceptionMessage = '' try { - await new Type([typeName, '--fields', 'title:string', 'title:string', 'quantity:number'], {} as IConfig).run() + await new Type([typeName, '--fields', 'title:string', 'title:string', 'quantity:number'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message diff --git a/packages/cli/test/commands/nuke.test.ts b/packages/cli/test/commands/nuke.test.ts index 2f8aa4c6e..8d0aa08c5 100644 --- a/packages/cli/test/commands/nuke.test.ts +++ b/packages/cli/test/commands/nuke.test.ts @@ -6,12 +6,11 @@ import { ProviderLibrary, BoosterConfig } from '@boostercloud/framework-types' import * as Nuke from '../../src/commands/nuke' import * as providerService from '../../src/services/provider-service' import { oraLogger } from '../../src/services/logger' -import { IConfig } from '@oclif/config' +import { Config } from '@oclif/core' import { test } from '@oclif/test' import * as environment from '../../src/services/environment' import * as configService from '../../src/services/config-service' import * as projectChecker from '../../src/services/project-checker' - const rewire = require('rewire') const nuke = rewire('../../src/commands/nuke') const runTasks = nuke.__get__('runTasks') @@ -118,6 +117,7 @@ describe('nuke', () => { describe('run', () => { context('when no environment provided', async () => { test + .loadConfig({ root: __dirname }) .stdout() .command(['nuke']) .it('shows no environment provided error', (ctx) => { @@ -139,12 +139,12 @@ describe('nuke', () => { }) it('init calls checkCurrentDirBoosterVersion', async () => { - await new Nuke.default([], {} as IConfig).init() + await new Nuke.default([], {} as Config).init() expect(projectChecker.checkCurrentDirBoosterVersion).to.have.been.called }) it('without flags', async () => { - await new Nuke.default([], {} as IConfig).run() + await new Nuke.default([], {} as Config).run() expect(configService.compileProjectAndLoadConfig).to.have.not.been.called expect(providerService.nukeCloudProviderResources).to.have.not.been.called @@ -155,7 +155,7 @@ describe('nuke', () => { let exceptionThrown = false let exceptionMessage = '' try { - await new Nuke.default(['-e'], {} as IConfig).run() + await new Nuke.default(['-e'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -170,7 +170,7 @@ describe('nuke', () => { let exceptionThrown = false let exceptionMessage = '' try { - await new Nuke.default(['--environment'], {} as IConfig).run() + await new Nuke.default(['--environment'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -184,7 +184,7 @@ describe('nuke', () => { describe('inside a booster project', () => { it('entering correct environment and application name', async () => { replace(Prompter.prototype, 'defaultOrPrompt', fake.resolves('new-booster-app')) - await new Nuke.default(['-e', 'fake_environment'], {} as IConfig).run() + await new Nuke.default(['-e', 'fake_environment'], {} as Config).run() expect(configService.compileProjectAndLoadConfig).to.have.been.called expect(providerService.nukeCloudProviderResources).to.have.been.called @@ -192,7 +192,7 @@ describe('nuke', () => { }) it('entering correct environment and --force flag', async () => { - await new Nuke.default(['-e', 'fake_environment', '--force'], {} as IConfig).run() + await new Nuke.default(['-e', 'fake_environment', '--force'], {} as Config).run() expect(configService.compileProjectAndLoadConfig).to.have.been.called expect(providerService.nukeCloudProviderResources).to.have.been.called @@ -200,7 +200,7 @@ describe('nuke', () => { }) it('entering correct environment and -f flag', async () => { - await new Nuke.default(['-e', 'fake_environment', '-f'], {} as IConfig).run() + await new Nuke.default(['-e', 'fake_environment', '-f'], {} as Config).run() expect(configService.compileProjectAndLoadConfig).to.have.been.called expect(providerService.nukeCloudProviderResources).to.have.been.called @@ -212,7 +212,7 @@ describe('nuke', () => { let exceptionThrown = false let exceptionMessage = '' try { - await new Nuke.default(['-e', 'fake_environment'], {} as IConfig).run() + await new Nuke.default(['-e', 'fake_environment'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -228,19 +228,19 @@ describe('nuke', () => { let exceptionThrown = false let exceptionMessage = '' try { - await new Nuke.default(['-e', 'fake_environment', '--nonexistingoption'], {} as IConfig).run() + await new Nuke.default(['-e', 'fake_environment', '--nonexistingoption'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message } expect(exceptionThrown).to.be.equal(true) - expect(exceptionMessage).to.contain('Unexpected argument: --nonexistingoption') + expect(exceptionMessage).to.contain('Nonexistent flag: --nonexistingoption') expect(providerService.nukeCloudProviderResources).to.have.not.been.called expect(oraLogger.info).to.have.not.been.calledWithMatch('Removal complete!') }) it('without defining environment and --force', async () => { - await new Nuke.default(['--force'], {} as IConfig).run() + await new Nuke.default(['--force'], {} as Config).run() expect(providerService.nukeCloudProviderResources).to.have.not.been.called expect(oraLogger.fail).to.have.been.calledWithMatch(/No environment set/) diff --git a/packages/cli/test/commands/start.test.ts b/packages/cli/test/commands/start.test.ts index c9a546be7..074af5a5f 100644 --- a/packages/cli/test/commands/start.test.ts +++ b/packages/cli/test/commands/start.test.ts @@ -1,16 +1,16 @@ import { expect } from '../expect' import { restore, fake, replace } from 'sinon' -import rewire = require('rewire') import { ProviderLibrary, BoosterConfig } from '@boostercloud/framework-types' import * as Start from '../../src/commands/start' import * as providerService from '../../src/services/provider-service' import { oraLogger } from '../../src/services/logger' -import { IConfig } from '@oclif/config' +import { Config } from '@oclif/core' import { test } from '@oclif/test' import * as environment from '../../src/services/environment' import * as configService from '../../src/services/config-service' import * as projectChecker from '../../src/services/project-checker' +import rewire = require('rewire') const start = rewire('../../src/commands/start') const runTasks = start.__get__('runTasks') @@ -44,6 +44,7 @@ describe('start', () => { describe('run', () => { context('when no environment provided', async () => { test + .loadConfig({ root: __dirname }) .stdout() .command(['start']) .it('shows no environment provided error', (ctx) => { @@ -65,12 +66,12 @@ describe('start', () => { }) it('init calls checkCurrentDirBoosterVersion', async () => { - await new Start.default([], {} as IConfig).init() + await new Start.default([], {} as Config).init() expect(projectChecker.checkCurrentDirBoosterVersion).to.have.been.called }) it('without flags', async () => { - await new Start.default([], {} as IConfig).run() + await new Start.default([], {} as Config).run() expect(configService.compileProjectAndLoadConfig).to.have.not.been.called expect(providerService.startProvider).to.have.not.been.called @@ -81,7 +82,7 @@ describe('start', () => { let exceptionThrown = false let exceptionMessage = '' try { - await new Start.default(['-e'], {} as IConfig).run() + await new Start.default(['-e'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -96,7 +97,7 @@ describe('start', () => { let exceptionThrown = false let exceptionMessage = '' try { - await new Start.default(['--environment'], {} as IConfig).run() + await new Start.default(['--environment'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -109,7 +110,7 @@ describe('start', () => { describe('inside a booster project', () => { it('entering correct environment', async () => { - await new Start.default(['-e', 'fake_environment'], {} as IConfig).run() + await new Start.default(['-e', 'fake_environment'], {} as Config).run() expect(configService.compileProjectAndLoadConfig).to.have.been.called expect(providerService.startProvider).to.have.been.called @@ -117,7 +118,7 @@ describe('start', () => { }) it('entering correct environment and --port flag', async () => { - await new Start.default(['-e', 'fake_environment', '--port', '5000'], {} as IConfig).run() + await new Start.default(['-e', 'fake_environment', '--port', '5000'], {} as Config).run() expect(configService.compileProjectAndLoadConfig).to.have.been.called expect(providerService.startProvider).to.have.been.called @@ -125,7 +126,7 @@ describe('start', () => { }) it('entering correct environment and -p flag', async () => { - await new Start.default(['-e', 'fake_environment', '-p', '5000'], {} as IConfig).run() + await new Start.default(['-e', 'fake_environment', '-p', '5000'], {} as Config).run() expect(configService.compileProjectAndLoadConfig).to.have.been.called expect(providerService.startProvider).to.have.been.called @@ -136,13 +137,13 @@ describe('start', () => { let exceptionThrown = false let exceptionMessage = '' try { - await new Start.default(['-e', 'fake_environment', '--nonexistingoption'], {} as IConfig).run() + await new Start.default(['-e', 'fake_environment', '--nonexistingoption'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message } expect(exceptionThrown).to.be.equal(true) - expect(exceptionMessage).to.contain('Unexpected argument: --nonexistingoption') + expect(exceptionMessage).to.contain('Nonexistent flag: --nonexistingoption') expect(configService.compileProjectAndLoadConfig).to.have.not.been.called expect(providerService.startProvider).to.have.not.been.called expect(oraLogger.start).to.have.not.been.calledWithMatch(/Starting debug server on port/) @@ -152,7 +153,7 @@ describe('start', () => { let exceptionThrown = false let exceptionMessage = '' try { - await new Start.default(['-e', 'fake_environment', '--port'], {} as IConfig).run() + await new Start.default(['-e', 'fake_environment', '--port'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -168,7 +169,7 @@ describe('start', () => { let exceptionThrown = false let exceptionMessage = '' try { - await new Start.default(['-e', 'fake_environment', '-p'], {} as IConfig).run() + await new Start.default(['-e', 'fake_environment', '-p'], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message @@ -181,7 +182,7 @@ describe('start', () => { }) it('without defining environment and -p', async () => { - await new Start.default(['-p', '5000'], {} as IConfig).run() + await new Start.default(['-p', '5000'], {} as Config).run() expect(configService.compileProjectAndLoadConfig).to.have.not.been.called expect(providerService.startProvider).to.have.not.been.called diff --git a/packages/cli/test/commands/stub/publish.test.ts b/packages/cli/test/commands/stub/publish.test.ts index 1152890b3..1cb913ad3 100644 --- a/packages/cli/test/commands/stub/publish.test.ts +++ b/packages/cli/test/commands/stub/publish.test.ts @@ -1,4 +1,4 @@ -import { IConfig } from '@oclif/config' +import { Config } from '@oclif/core' import * as fs from 'fs-extra' import { join } from 'path' import { restore, replace, fake, stub, SinonSpy, spy } from 'sinon' @@ -18,6 +18,7 @@ describe('stub', async () => { const directoryFileMocks: fs.Dirent[] = [ { name: 'fake-command.stub', + path: '/someDir', isFile: () => true, isDirectory: () => false, isBlockDevice: () => false, @@ -28,6 +29,7 @@ describe('stub', async () => { }, { name: 'fake-event.stub', + path: '/someDir', isFile: () => true, isDirectory: () => false, isBlockDevice: () => false, @@ -38,6 +40,7 @@ describe('stub', async () => { }, { name: 'fake-directory', + path: '/someDir', isFile: () => false, isDirectory: () => true, isBlockDevice: () => false, @@ -68,7 +71,7 @@ describe('stub', async () => { }) it('init calls checkCurrentDirBoosterVersion', async () => { - await new Publish([], {} as IConfig).init() + await new Publish([], {} as Config).init() expect(ProjectChecker.checkCurrentDirBoosterVersion).to.have.been.called }) @@ -77,7 +80,7 @@ describe('stub', async () => { stub(fs, 'existsSync').returns(false) spy(Prompter, 'confirmPrompt') - await new Publish([], {} as IConfig).run() + await new Publish([], {} as Config).run() expect(fs.existsSync).to.have.been.calledOnce expect(fs.existsSync).to.have.been.returned(false) @@ -101,7 +104,7 @@ describe('stub', async () => { stub(inquirer, 'prompt').resolves({ confirm: true }) spy(Prompter, 'confirmPrompt') - await new Publish([], {} as IConfig).run() + await new Publish([], {} as Config).run() expect(fs.existsSync).to.have.been.calledOnce expect(fs.existsSync).to.have.been.returned(true) @@ -125,7 +128,7 @@ describe('stub', async () => { stub(fs, 'existsSync').returns(true) spy(Prompter, 'confirmPrompt') - await new Publish(['--force'], {} as IConfig).run() + await new Publish(['--force'], {} as Config).run() expect(fs.existsSync).to.have.been.calledOnce expect(fs.existsSync).to.have.been.returned(true) @@ -156,7 +159,7 @@ describe('stub', async () => { let exceptionMessage = '' try { - await new Publish([], {} as IConfig).run() + await new Publish([], {} as Config).run() } catch (e) { exceptionThrown = true exceptionMessage = e.message diff --git a/packages/cli/test/common/provider.test.ts b/packages/cli/test/common/provider.test.ts index 08bd13e26..22a6f80b9 100644 --- a/packages/cli/test/common/provider.test.ts +++ b/packages/cli/test/common/provider.test.ts @@ -3,7 +3,7 @@ import { expect } from '../expect' describe('selectedProvider', (): void => { it('get selected provider: AWS', async () => { - expect(Provider.AWS).to.be.equal('@boostercloud/framework-provider-aws (AWS)') + expect(Provider.AWS).to.be.equal('@boostercloud/framework-provider-aws (AWS) - Currently deprecated') }) it('get selected provider: Azure', async () => { expect(Provider.AZURE).to.be.equal('@boostercloud/framework-provider-azure (Azure)') diff --git a/packages/cli/test/fixtures/mock_project/package.json b/packages/cli/test/fixtures/mock_project/package.json index eb099dd62..577ec71f6 100644 --- a/packages/cli/test/fixtures/mock_project/package.json +++ b/packages/cli/test/fixtures/mock_project/package.json @@ -27,7 +27,7 @@ "@types/node": "^13.5.1" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0 <19.0.0" }, "homepage": "", "license": "MIT", diff --git a/packages/cli/test/services/environment.test.ts b/packages/cli/test/services/environment.test.ts index 4935885ad..0d6bc970c 100644 --- a/packages/cli/test/services/environment.test.ts +++ b/packages/cli/test/services/environment.test.ts @@ -1,6 +1,6 @@ import { initializeEnvironment, currentEnvironment } from '../../src/services/environment' import { logger } from '../../src/services/logger' -import { restore, replace, fake, stub } from 'sinon' +import { restore, replace, fake } from 'sinon' import { expect } from '../expect' describe('environment service', (): void => { @@ -21,7 +21,6 @@ describe('environment service', (): void => { describe('currentEnvironment', (): void => { it('get current environment: testing', async () => { process.env.BOOSTER_ENV = 'testing' - stub(process.env, 'BOOSTER_ENV').value('testing') expect(currentEnvironment()).to.be.equal('testing') }) @@ -39,11 +38,9 @@ describe('environment service', (): void => { describe('process.env.BOOSTER_ENV set', (): void => { beforeEach(() => { process.env.BOOSTER_ENV = 'testing' - stub(process.env, 'BOOSTER_ENV').value('testing') }) it('set environment in param: no log message', async () => { - stub(process.env, 'BOOSTER_ENV').value('testing') initializeEnvironment(logger, 'production') expect(logger.error).to.not.have.been.calledWithMatch(logMessage) expect(process.env.BOOSTER_ENV).to.be.equal('production') diff --git a/packages/cli/test/services/stub-publisher.test.ts b/packages/cli/test/services/stub-publisher.test.ts index 0281198fa..c85ab84da 100644 --- a/packages/cli/test/services/stub-publisher.test.ts +++ b/packages/cli/test/services/stub-publisher.test.ts @@ -18,6 +18,7 @@ describe('stub publisher', () => { const directoryFileMocks: fs.Dirent[] = [ { name: 'fake-command.stub', + path: '/someDir', isFile: () => true, isDirectory: () => false, isBlockDevice: () => false, @@ -28,6 +29,7 @@ describe('stub publisher', () => { }, { name: 'fake-event.stub', + path: '/someDir', isFile: () => true, isDirectory: () => false, isBlockDevice: () => false, @@ -38,6 +40,7 @@ describe('stub publisher', () => { }, { name: 'fake-stub.ts', + path: '/someDir', isFile: () => true, isDirectory: () => false, isBlockDevice: () => false, @@ -48,6 +51,7 @@ describe('stub publisher', () => { }, { name: 'fake-directory-1', + path: '/someDir', isFile: () => false, isDirectory: () => true, isBlockDevice: () => false, @@ -58,6 +62,7 @@ describe('stub publisher', () => { }, { name: 'fake-directory-2', + path: '/someDir', isFile: () => false, isDirectory: () => true, isBlockDevice: () => false, @@ -154,6 +159,7 @@ describe('stub publisher', () => { const filteredFiles = createTemplateFileMap([ { name: 'fake-file-1.stub', + path: '/someDir', isFile: () => true, isDirectory: () => false, isBlockDevice: () => false, @@ -164,6 +170,7 @@ describe('stub publisher', () => { }, { name: 'fake-file-2.stub', + path: '/someDir', isFile: () => true, isDirectory: () => false, isBlockDevice: () => false, @@ -187,6 +194,7 @@ describe('stub publisher', () => { const filteredFiles = createTemplateFileMap([ { name: 'fake-directory', + path: '/someDir', isFile: () => false, isDirectory: () => true, isBlockDevice: () => false, @@ -204,6 +212,7 @@ describe('stub publisher', () => { const filteredFiles = createTemplateFileMap([ { name: 'fake-stub.ts', + path: '/someDir', isFile: () => true, isDirectory: () => false, isBlockDevice: () => false, diff --git a/packages/framework-common-helpers/package.json b/packages/framework-common-helpers/package.json index 0cc82969f..145e89c3a 100644 --- a/packages/framework-common-helpers/package.json +++ b/packages/framework-common-helpers/package.json @@ -32,6 +32,9 @@ "bugs": { "url": "https://github.com/boostercloud/booster/issues" }, + "engines": { + "node": ">=18.0.0 <19.0.0" + }, "dependencies": { "@boostercloud/framework-types": "workspace:^1.21.0", "child-process-promise": "^2.2.1", @@ -44,7 +47,7 @@ "@types/chai-as-promised": "7.1.4", "@types/child-process-promise": "^2.2.1", "@types/mocha": "10.0.1", - "@types/node": "16.11.7", + "@types/node": "^18.15.3", "@types/rewire": "^2.5.28", "@types/sinon": "10.0.0", "@types/sinon-chai": "3.2.5", diff --git a/packages/framework-core/package.json b/packages/framework-core/package.json index eff2fe93f..4a7ce9a1e 100644 --- a/packages/framework-core/package.json +++ b/packages/framework-core/package.json @@ -29,6 +29,9 @@ "bugs": { "url": "https://github.com/boostercloud/booster/issues" }, + "engines": { + "node": ">=18.0.0 <19.0.0" + }, "peerDependencies": { "graphql": "^16.6.0" }, @@ -56,7 +59,7 @@ "@types/inflected": "1.1.29", "@types/jsonwebtoken": "9.0.1", "@types/mocha": "10.0.1", - "@types/node": "16.11.7", + "@types/node": "^18.15.3", "@types/sinon": "10.0.0", "@types/sinon-chai": "3.2.5", "@types/validator": "13.1.3", diff --git a/packages/framework-core/tsconfig.json b/packages/framework-core/tsconfig.json index c276cbf26..36864ce0f 100644 --- a/packages/framework-core/tsconfig.json +++ b/packages/framework-core/tsconfig.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*"], "ts-node": { - "compiler": "ttypescript", "compilerOptions": { "plugins": [ { diff --git a/packages/framework-integration-tests/host.json b/packages/framework-integration-tests/host.json index 7dafa101a..4750d7633 100644 --- a/packages/framework-integration-tests/host.json +++ b/packages/framework-integration-tests/host.json @@ -2,7 +2,7 @@ "version": "2.0", "extensionBundle": { "id": "Microsoft.Azure.Functions.ExtensionBundle", - "version": "[3.*, 4.0.0)" + "version": "[4.*, 5.0.0)" }, "functionTimeout": "00:07:00" } diff --git a/packages/framework-integration-tests/integration/fixtures/cart-demo/package.json b/packages/framework-integration-tests/integration/fixtures/cart-demo/package.json index cc54f3a81..aafb8a4c4 100644 --- a/packages/framework-integration-tests/integration/fixtures/cart-demo/package.json +++ b/packages/framework-integration-tests/integration/fixtures/cart-demo/package.json @@ -23,21 +23,22 @@ "ts-node": "whatever", "@types/node": "whatever", "@boostercloud/framework-provider-aws-infrastructure": "whatever", - "ttypescript": "whatever", + "ts-patch": "whatever", "@boostercloud/metadata-booster": "whatever", "graphql": "^16.6.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0 <19.0.0" }, "homepage": "homepage_placeholder", "license": "license_placeholder", "main": "dist/index.js", "repository": "repository_placeholder", "scripts": { + "prepare": "ts-patch install -s", "lint:check": "eslint --ext '.js,.ts' **/*.ts", "lint:fix": "eslint --quiet --fix --ext '.js,.ts' **/*.ts", - "build": "ttsc -b tsconfig.json", + "build": "tsc -b tsconfig.json", "clean": "rimraf ./dist tsconfig.tsbuildinfo" }, "types": "lib/index.d.ts" diff --git a/packages/framework-integration-tests/integration/helper/app-helper.ts b/packages/framework-integration-tests/integration/helper/app-helper.ts index faa205ecc..e0d561b22 100644 --- a/packages/framework-integration-tests/integration/helper/app-helper.ts +++ b/packages/framework-integration-tests/integration/helper/app-helper.ts @@ -31,7 +31,7 @@ export async function getProviderTestHelper(): Promise { export async function setEnv(): Promise { if (!process.env.BOOSTER_APP_SUFFIX) { // If the user doesn't set an app name suffix, use the current git commit hash - // to build a unique suffix for the application name in AWS to avoid collisions + // to build a unique suffix for the application name to avoid collisions // between tests from different branches. const { stdout } = await exec('git rev-parse HEAD') process.env['BOOSTER_APP_SUFFIX'] = stdout.trim().substring(0, 7) diff --git a/packages/framework-integration-tests/integration/helper/file-helper.ts b/packages/framework-integration-tests/integration/helper/file-helper.ts index b0f031163..175e7b17b 100644 --- a/packages/framework-integration-tests/integration/helper/file-helper.ts +++ b/packages/framework-integration-tests/integration/helper/file-helper.ts @@ -1,5 +1,6 @@ import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, unlinkSync, writeFileSync } from 'fs' import * as path from 'path' +import { sleep } from './sleep' export const loadFixture = (fixturePath: string, replacements?: Array>): string => { const template = readFileContent(`integration/fixtures/${fixturePath}`) @@ -31,8 +32,28 @@ export const createFolder = (folder: string): void => { } } -export const removeFolders = (paths: Array): void => { - paths.map((path: string) => rmSync(path, { recursive: true, force: true })) +export const removeFolders = async (paths: Array): Promise => { + for (const path of paths) { + let retries = 5 + while (retries > 0) { + try { + rmSync(path, { recursive: true, force: true }) + break // Break out of the while loop if the deletion succeeds + } catch (error) { + // Although we're using parameters recursive and force, sometimes the deletion fails with ENOTEMPTY + // because the OS haven't had the time to fully release the files. We retry a few times before giving up. + if (error.code === 'ENOTEMPTY' && retries > 0) { + retries-- + console.warn(`Retrying deletion of ${path}, ${retries} retries remaining...`) + await sleep(1000) // Wait for 1 second before retrying + } else { + // After the retries are exhausted, we silently desist. It's not worth failing integration tests because of this + console.warn(`Failed to delete ${path}, skipping...`) + break + } + } + } + } } export const fileExists = existsSync diff --git a/packages/framework-integration-tests/integration/provider-specific/local/setup.ts b/packages/framework-integration-tests/integration/provider-specific/local/setup.ts index f098a670d..1ac439903 100644 --- a/packages/framework-integration-tests/integration/provider-specific/local/setup.ts +++ b/packages/framework-integration-tests/integration/provider-specific/local/setup.ts @@ -31,6 +31,6 @@ before(async () => { after(async () => { console.log('stopping local server...') serverProcess.kill('SIGINT') - console.log('removing sandbox project') - removeFolders([sandboxPath]) + console.log('removing sandbox project...') + await removeFolders([sandboxPath]) }) diff --git a/packages/framework-integration-tests/integration/provider-specific/local/stop/setup.ts b/packages/framework-integration-tests/integration/provider-specific/local/stop/setup.ts index cf962989e..5f9a7c297 100644 --- a/packages/framework-integration-tests/integration/provider-specific/local/stop/setup.ts +++ b/packages/framework-integration-tests/integration/provider-specific/local/stop/setup.ts @@ -7,5 +7,5 @@ before(async () => { console.log(`stopping local server with pid ${pid}...`) process.kill(pid) console.log('removing sandbox project...') - removeFolders([sandboxPath]) + await removeFolders([sandboxPath]) }) diff --git a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.build.integration.ts b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.build.integration.ts index 4c230a272..5ef1e36a6 100644 --- a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.build.integration.ts +++ b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.build.integration.ts @@ -14,8 +14,8 @@ describe('Build', () => { buildSandboxDir = createSandboxProject(sandboxPathFor('build')) }) - after(() => { - removeFolders([buildSandboxDir]) + after(async () => { + await removeFolders([buildSandboxDir]) }) const cliPath = path.join('..', '..', 'cli', 'bin', 'run') @@ -52,8 +52,8 @@ describe('Compile fallback', () => { fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2)) }) - after(() => { - removeFolders([compileSandboxDir]) + after(async () => { + await removeFolders([compileSandboxDir]) }) const cliPath = path.join('..', '..', 'cli', 'bin', 'run') diff --git a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.clean.integration.ts b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.clean.integration.ts index 6e8512de6..82d1c22b6 100644 --- a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.clean.integration.ts +++ b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.clean.integration.ts @@ -13,8 +13,8 @@ describe('Clean', () => { cleanSandboxDir = createSandboxProject(sandboxPathFor('clean')) }) - after(() => { - removeFolders([cleanSandboxDir]) + after(async () => { + await removeFolders([cleanSandboxDir]) }) const cliPath = path.join('..', '..', 'cli', 'bin', 'run') diff --git a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.command.integration.ts b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.command.integration.ts index 7542be10e..8838a62da 100644 --- a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.command.integration.ts +++ b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.command.integration.ts @@ -15,8 +15,8 @@ describe('Command', () => { commandSandboxDir = createSandboxProject(sandboxPathFor('command')) }) - after(() => { - removeFolders([commandSandboxDir]) + after(async () => { + await removeFolders([commandSandboxDir]) }) const cliPath = path.join('..', '..', 'cli', 'bin', 'run') diff --git a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.entity.integration.ts b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.entity.integration.ts index 837f9a0a6..90f67d7cc 100644 --- a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.entity.integration.ts +++ b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.entity.integration.ts @@ -16,8 +16,8 @@ describe('Entity', () => { entitySandboxDir = createSandboxProject(sandboxPathFor('entity')) }) - after(() => { - removeFolders([entitySandboxDir]) + after(async () => { + await removeFolders([entitySandboxDir]) }) const cliPath = path.join('..', '..', 'cli', 'bin', 'run') diff --git a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.event-handler.integration.ts b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.event-handler.integration.ts index c94961f44..2108e3063 100644 --- a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.event-handler.integration.ts +++ b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.event-handler.integration.ts @@ -13,8 +13,8 @@ describe('Event handler', () => { eventHandlerSandboxDir = createSandboxProject(sandboxPathFor('event-handler')) }) - after(() => { - removeFolders([eventHandlerSandboxDir]) + after(async () => { + await removeFolders([eventHandlerSandboxDir]) }) const cliPath = path.join('..', '..', 'cli', 'bin', 'run') diff --git a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.event.integration.ts b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.event.integration.ts index 5eac89256..a2ef1adf6 100644 --- a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.event.integration.ts +++ b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.event.integration.ts @@ -22,8 +22,8 @@ describe('Event', () => { eventSandboxDir = createSandboxProject(sandboxPathFor('event')) }) - after(() => { - removeFolders([eventSandboxDir]) + after(async () => { + await removeFolders([eventSandboxDir]) }) const cliPath = path.join('..', '..', 'cli', 'bin', 'run') diff --git a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.project.integration.ts b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.project.integration.ts index d6075954f..45c4b2ef8 100644 --- a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.project.integration.ts +++ b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.project.integration.ts @@ -15,7 +15,6 @@ import { expect } from '../../helper/expect' // The Booster CLI version used should match the integration tests' version const BOOSTER_VERSION = require('../../../package.json').version - const TEST_TIMEOUT = 80000 const DESCRIPTION = 'cart-demo' const VERSION = '1.0.0' @@ -36,8 +35,8 @@ describe('Project', () => { createFolder(SANDBOX_INTEGRATION_DIR) }) - after(() => { - removeFolders([SANDBOX_INTEGRATION_DIR]) + after(async () => { + await removeFolders([SANDBOX_INTEGRATION_DIR]) }) const cliPath = path.join('..', 'node_modules', '.bin', 'boost') diff --git a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.readmodel.integration.ts b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.readmodel.integration.ts index 3303b167e..cbb85190e 100644 --- a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.readmodel.integration.ts +++ b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.readmodel.integration.ts @@ -23,8 +23,8 @@ describe('Read model', () => { readModelSandboxDir = createSandboxProject(sandboxPathFor('read-model')) }) - after(() => { - removeFolders([readModelSandboxDir]) + after(async () => { + await removeFolders([readModelSandboxDir]) }) const cliPath = path.join('..', '..', 'cli', 'bin', 'run') diff --git a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.scheduled-command.integration.ts b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.scheduled-command.integration.ts index fecf7f643..c9e7d2c5d 100644 --- a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.scheduled-command.integration.ts +++ b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.scheduled-command.integration.ts @@ -13,8 +13,8 @@ describe('Scheduled Command', () => { scheduledCommandSandboxDir = createSandboxProject(sandboxPathFor('scheduled-command')) }) - after(() => { - removeFolders([scheduledCommandSandboxDir]) + after(async () => { + await removeFolders([scheduledCommandSandboxDir]) }) const cliPath = path.join('..', '..', 'cli', 'bin', 'run') diff --git a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.type.integration.ts b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.type.integration.ts index e7ff5888d..844041791 100644 --- a/packages/framework-integration-tests/integration/provider-unaware/cli/cli.type.integration.ts +++ b/packages/framework-integration-tests/integration/provider-unaware/cli/cli.type.integration.ts @@ -13,8 +13,8 @@ describe('Type', () => { typeSandboxDir = createSandboxProject(sandboxPathFor('type')) }) - after(() => { - removeFolders([typeSandboxDir]) + after(async () => { + await removeFolders([typeSandboxDir]) }) const cliPath = path.join('..', '..', 'cli', 'bin', 'run') diff --git a/packages/framework-integration-tests/integration/provider-unaware/cli/setup.ts b/packages/framework-integration-tests/integration/provider-unaware/cli/setup.ts index 9dc06f930..1a6c80ced 100644 --- a/packages/framework-integration-tests/integration/provider-unaware/cli/setup.ts +++ b/packages/framework-integration-tests/integration/provider-unaware/cli/setup.ts @@ -1,3 +1,5 @@ +import { setEnv } from '../../helper/app-helper' + before(async () => { - // Nothing so far + await setEnv() }) diff --git a/packages/framework-integration-tests/integration/provider-unaware/functionality/scheduled-commands.integration.ts b/packages/framework-integration-tests/integration/provider-unaware/functionality/scheduled-commands.integration.ts index a138e2d2c..e3f74d8ea 100644 --- a/packages/framework-integration-tests/integration/provider-unaware/functionality/scheduled-commands.integration.ts +++ b/packages/framework-integration-tests/integration/provider-unaware/functionality/scheduled-commands.integration.ts @@ -24,7 +24,7 @@ describe('Scheduled commands', () => { }, (result) => !!result?.data?.CartReadModel, 10000, - 90000 // CheckCartCount is run every minute, we need to give this test enough time to make sure AWS does the first call + 90000 // CheckCartCount is run every minute, we need to give this test enough time to make sure that the cloud provider does the first call ) const cartReadModel = cartData?.data?.CartReadModel diff --git a/packages/framework-integration-tests/package.json b/packages/framework-integration-tests/package.json index fdfb7ca23..12d8406ef 100644 --- a/packages/framework-integration-tests/package.json +++ b/packages/framework-integration-tests/package.json @@ -38,7 +38,7 @@ "@types/jsonwebtoken": "9.0.1", "@types/mocha": "10.0.1", "@types/nedb": "^1.8.12", - "@types/node": "16.11.7", + "@types/node": "^18.15.3", "@types/sinon": "10.0.0", "@types/sinon-chai": "3.2.5", "@typescript-eslint/eslint-plugin": "^5.0.0", @@ -72,44 +72,45 @@ "serverless-artillery": "0.5.2", "subscriptions-transport-ws": "0.11.0", "ts-node": "^10.9.1", - "ttypescript": "1.5.15", + "ts-patch": "2.0.2", "typescript": "4.7.4", "sinon": "9.2.3", "eslint-plugin-unicorn": "~44.0.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0 <19.0.0" }, "license": "Apache-2.0", "main": "dist/index.js", "repository": "boostercloud/booster", "scripts": { + "prepare": "ts-patch install -s", "test": "", "watch:local": "nodemon --watch ../framework-provider-local/dist --watch ../framework-provider-local-infrastructure --watch dist --exec \"./node_modules/.bin/boost start -e local\"", "lint:check": "eslint --ext '.js,.ts' **/*.ts", "lint:fix": "eslint --quiet --fix --ext '.js,.ts' **/*.ts", - "build": "ttsc -b tsconfig.json", + "build": "tsc -b tsconfig.json", "clean": "rimraf ./dist tsconfig.tsbuildinfo *-integration-sandbox", "postinstall": "rimraf ../../node_modules/serverless/node_modules/archiver && echo 'Deleted buggy \"archiver\" module from \"serveless\" dependencies to use the newer hoisted one'", - "integration": "npm run integration/cli && npm run integration/local && npm run integration/aws && npm run integration/azure", - "integration/cli": "mocha --exit --config \"integration/provider-unaware/cli/.mocharc.yml\" \"integration/provider-unaware/cli/**/*.integration.ts\"", - "integration/aws": "npm run integration/aws-deploy && npm run integration/aws-func && npm run integration/aws-end-to-end && npm run integration/aws-load && npm run integration/aws-nuke", - "integration/aws-deploy": "AWS_SDK_LOAD_CONFIG=true BOOSTER_ENV=production mocha --forbid-only --exit --config \"integration/provider-specific/aws/deployment/.mocharc.yml\" \"integration/provider-specific/aws/deployment/**/*.integration.ts\"", - "integration/aws-func": "TESTED_PROVIDER=AWS AWS_SDK_LOAD_CONFIG=true BOOSTER_ENV=production mocha --forbid-only --exit --config \"integration/provider-unaware/functionality/.mocharc.yml\" \"integration/provider-unaware/functionality/**/*.integration.ts\"", - "integration/aws-end-to-end": "TESTED_PROVIDER=AWS AWS_SDK_LOAD_CONFIG=true BOOSTER_ENV=production mocha --forbid-only --exit --config \"integration/provider-unaware/end-to-end/.mocharc.yml\" \"integration/provider-unaware/end-to-end/**/*.integration.ts\"", - "integration/aws-load": "echo 'Skipping integration tests.' # TESTED_PROVIDER=AWS AWS_SDK_LOAD_CONFIG=true BOOSTER_ENV=production mocha --forbid-only --exit --config \"integration/provider-unaware/load/.mocharc.yml\" \"integration/provider-unaware/load/**/*.load.ts\"", - "integration/aws-nuke": "AWS_SDK_LOAD_CONFIG=true BOOSTER_ENV=production mocha --forbid-only --exit --config \"integration/provider-specific/aws/nuke/.mocharc.yml\" \"integration/provider-specific/aws/nuke/**/*.integration.ts\"", - "integration/local": "BOOSTER_ENV=local mocha --forbid-only --exit --config \"integration/provider-specific/local/.mocharc.yml\" \"integration/provider-specific/local/**/*.integration.ts\"", - "integration/local-ongoing": "npm run integration/local-start && npm run integration/local-stop", - "integration/local-start": "BOOSTER_ENV=local mocha --forbid-only --exit --config \"integration/provider-specific/local/start/.mocharc.yml\" \"integration/provider-specific/local/start/*.integration.ts\"", - "integration/local-func": "TESTED_PROVIDER=LOCAL BOOSTER_ENV=local mocha --forbid-only --exit --config \"integration/provider-unaware/functionality/.mocharc.yml\" \"integration/provider-unaware/functionality/**/*.integration.ts\"", - "integration/local-end-to-end": "TESTED_PROVIDER=LOCAL BOOSTER_ENV=local mocha --forbid-only --exit --config \"integration/provider-unaware/end-to-end/.mocharc.yml\" \"integration/provider-unaware/end-to-end/**/*.integration.ts\"", - "integration/local-stop": "BOOSTER_ENV=local mocha --forbid-only --exit --config \"integration/provider-specific/local/stop/.mocharc.yml\" \"integration/provider-specific/local/stop/*.integration.ts\"", - "integration/azure": "npm run integration/azure-deploy && npm run integration/azure-end-to-end && npm run integration/azure-func && npm run integration/azure-nuke", - "integration/azure-deploy": "TESTED_PROVIDER=AZURE BOOSTER_ENV=azure mocha --forbid-only --exit --config \"integration/provider-specific/azure/deployment/.mocharc.yml\" \"integration/provider-specific/azure/deployment/**/*.integration.ts\"", - "integration/azure-nuke": "TESTED_PROVIDER=AZURE BOOSTER_ENV=azure mocha --forbid-only --exit --config \"integration/provider-specific/azure/nuke/.mocharc.yml\" \"integration/provider-specific/azure/nuke/**/*.integration.ts\"", - "integration/azure-end-to-end": "TESTED_PROVIDER=AZURE BOOSTER_ENV=azure mocha --forbid-only --exit --config \"integration/provider-unaware/end-to-end/.mocharc.yml\" \"integration/provider-unaware/end-to-end/**/*.integration.ts\"", - "integration/azure-func": "TESTED_PROVIDER=AZURE BOOSTER_ENV=azure mocha --forbid-only --exit --config \"integration/provider-unaware/end-to-end/.mocharc.yml\" \"integration/provider-unaware/functionality/**/*.integration.ts\"" + "integration": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" npm run integration/cli && npm run integration/local && npm run integration/aws && npm run integration/azure", + "integration/cli": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" BOOSTER_ENV=test mocha --forbid-only --exit --config \"integration/provider-unaware/cli/.mocharc.yml\" \"integration/provider-unaware/cli/**/*.integration.ts\"", + "integration/aws": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" npm run integration/aws-deploy && npm run integration/aws-func && npm run integration/aws-end-to-end && npm run integration/aws-load && npm run integration/aws-nuke", + "integration/aws-deploy": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" AWS_SDK_LOAD_CONFIG=true BOOSTER_ENV=production mocha --forbid-only --exit --config \"integration/provider-specific/aws/deployment/.mocharc.yml\" \"integration/provider-specific/aws/deployment/**/*.integration.ts\"", + "integration/aws-func": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" TESTED_PROVIDER=AWS AWS_SDK_LOAD_CONFIG=true BOOSTER_ENV=production mocha --forbid-only --exit --config \"integration/provider-unaware/functionality/.mocharc.yml\" \"integration/provider-unaware/functionality/**/*.integration.ts\"", + "integration/aws-end-to-end": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" TESTED_PROVIDER=AWS AWS_SDK_LOAD_CONFIG=true BOOSTER_ENV=production mocha --forbid-only --exit --config \"integration/provider-unaware/end-to-end/.mocharc.yml\" \"integration/provider-unaware/end-to-end/**/*.integration.ts\"", + "integration/aws-load": "echo 'Skipping integration tests.' # TS_NODE_PROJECT=\"./tsconfig.integration.json\" TESTED_PROVIDER=AWS AWS_SDK_LOAD_CONFIG=true BOOSTER_ENV=production mocha --forbid-only --exit --config \"integration/provider-unaware/load/.mocharc.yml\" \"integration/provider-unaware/load/**/*.load.ts\"", + "integration/aws-nuke": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" AWS_SDK_LOAD_CONFIG=true BOOSTER_ENV=production mocha --forbid-only --exit --config \"integration/provider-specific/aws/nuke/.mocharc.yml\" \"integration/provider-specific/aws/nuke/**/*.integration.ts\"", + "integration/local": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" BOOSTER_ENV=local mocha --forbid-only --exit --config \"integration/provider-specific/local/.mocharc.yml\" \"integration/provider-specific/local/**/*.integration.ts\"", + "integration/local-ongoing": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" npm run integration/local-start && npm run integration/local-stop", + "integration/local-start": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" BOOSTER_ENV=local mocha --forbid-only --exit --config \"integration/provider-specific/local/start/.mocharc.yml\" \"integration/provider-specific/local/start/*.integration.ts\"", + "integration/local-func": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" TESTED_PROVIDER=LOCAL BOOSTER_ENV=local mocha --forbid-only --exit --config \"integration/provider-unaware/functionality/.mocharc.yml\" \"integration/provider-unaware/functionality/**/*.integration.ts\"", + "integration/local-end-to-end": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" TESTED_PROVIDER=LOCAL BOOSTER_ENV=local mocha --forbid-only --exit --config \"integration/provider-unaware/end-to-end/.mocharc.yml\" \"integration/provider-unaware/end-to-end/**/*.integration.ts\"", + "integration/local-stop": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" BOOSTER_ENV=local mocha --forbid-only --exit --config \"integration/provider-specific/local/stop/.mocharc.yml\" \"integration/provider-specific/local/stop/*.integration.ts\"", + "integration/azure": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" npm run integration/azure-deploy && npm run integration/azure-end-to-end && npm run integration/azure-func && npm run integration/azure-nuke", + "integration/azure-deploy": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" TESTED_PROVIDER=AZURE BOOSTER_ENV=azure mocha --forbid-only --exit --config \"integration/provider-specific/azure/deployment/.mocharc.yml\" \"integration/provider-specific/azure/deployment/**/*.integration.ts\"", + "integration/azure-nuke": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" TESTED_PROVIDER=AZURE BOOSTER_ENV=azure mocha --forbid-only --exit --config \"integration/provider-specific/azure/nuke/.mocharc.yml\" \"integration/provider-specific/azure/nuke/**/*.integration.ts\"", + "integration/azure-end-to-end": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" TESTED_PROVIDER=AZURE BOOSTER_ENV=azure mocha --forbid-only --exit --config \"integration/provider-unaware/end-to-end/.mocharc.yml\" \"integration/provider-unaware/end-to-end/**/*.integration.ts\"", + "integration/azure-func": "TS_NODE_PROJECT=\"./tsconfig.integration.json\" TESTED_PROVIDER=AZURE BOOSTER_ENV=azure mocha --forbid-only --exit --config \"integration/provider-unaware/end-to-end/.mocharc.yml\" \"integration/provider-unaware/functionality/**/*.integration.ts\"" }, "types": "dist/index.d.ts" } diff --git a/packages/framework-integration-tests/tsconfig.eslint.json b/packages/framework-integration-tests/tsconfig.eslint.json index 57a5fd5d4..04954cfbc 100644 --- a/packages/framework-integration-tests/tsconfig.eslint.json +++ b/packages/framework-integration-tests/tsconfig.eslint.json @@ -2,7 +2,6 @@ "extends": "./tsconfig.json", "include": [ "src/**/*", - "integration/**/*", - "test/**/*" + "integration/**/*" ] } \ No newline at end of file diff --git a/packages/framework-integration-tests/tsconfig.integration.json b/packages/framework-integration-tests/tsconfig.integration.json new file mode 100644 index 000000000..d6febc5c0 --- /dev/null +++ b/packages/framework-integration-tests/tsconfig.integration.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "include": [ + "integration/**/*" + ], + "exclude": [ + "integration/fixtures/**/*" + ] +} \ No newline at end of file diff --git a/packages/framework-integration-tests/tsconfig.json b/packages/framework-integration-tests/tsconfig.json index 5fc49b853..c96b2c87b 100644 --- a/packages/framework-integration-tests/tsconfig.json +++ b/packages/framework-integration-tests/tsconfig.json @@ -6,7 +6,7 @@ "outDir": "dist", "rootDir": "src", "strict": true, - "target": "es2019", + "target": "ES2019", "noImplicitReturns": true, "noImplicitThis": true, "noUnusedLocals": true, diff --git a/packages/framework-provider-aws-infrastructure/package.json b/packages/framework-provider-aws-infrastructure/package.json index c5f0e36b9..f81cafe36 100644 --- a/packages/framework-provider-aws-infrastructure/package.json +++ b/packages/framework-provider-aws-infrastructure/package.json @@ -1,5 +1,6 @@ { "name": "@boostercloud/framework-provider-aws-infrastructure", + "deprecated": "Due to significant changes in recent versions of the AWS CDK, specifically the transition from CDKToolkit to a cli tool as noted [here](https://github.com/aws/aws-cdk-rfcs/issues/300), upgrading our current implementation would require a substantial rewrite. Given the open-source nature of our project without direct revenue streams, the ensuing maintenance costs are unfeasible. However, we are open to upgrading the AWS provider or creating an alternative implementation using other technologies like Terraform's CDKTF, with community contributions or sponsorships. If you're interested in supporting us, we welcome you to reach out via the official channels listed on the [Booster's website](https://boosterframework.com).", "version": "1.21.0", "description": "Handle the Booster deployment process to AWS", "keywords": [ @@ -19,6 +20,9 @@ "type": "git", "url": "git+https://github.com/boostercloud/booster.git" }, + "engines": { + "node": ">=18.0.0 <19.0.0" + }, "dependencies": { "@aws-cdk/aws-apigateway": "^1.170.0", "@aws-cdk/aws-logs": "^1.170.0", @@ -72,7 +76,7 @@ "@types/chai-as-promised": "7.1.4", "@types/faker": "5.1.5", "@types/mocha": "10.0.1", - "@types/node": "16.11.7", + "@types/node": "^18.15.3", "@types/rewire": "^2.5.28", "@types/sinon": "10.0.0", "@types/sinon-chai": "3.2.5", diff --git a/packages/framework-provider-aws-infrastructure/src/infrastructure/stacks/scheduled-commands-stack.ts b/packages/framework-provider-aws-infrastructure/src/infrastructure/stacks/scheduled-commands-stack.ts index 5d62b1652..d188fe792 100644 --- a/packages/framework-provider-aws-infrastructure/src/infrastructure/stacks/scheduled-commands-stack.ts +++ b/packages/framework-provider-aws-infrastructure/src/infrastructure/stacks/scheduled-commands-stack.ts @@ -53,6 +53,6 @@ export class ScheduledCommandStack { const { minute = '*', hour = '*', day = '*', month = '*', weekDay = '?', year = '*' } = scheduledCommandMetadata const expression = `${minute} ${hour} ${day} ${month} ${weekDay} ${year}` const neverRunByDefault = '0 5 31 2 ? *' - return Schedule.expression(`cron(${expression !== '* * * ? * *' ? expression : neverRunByDefault})`) + return Schedule.expression(`cron(${expression !== '* * * * ? *' ? expression : neverRunByDefault})`) } } diff --git a/packages/framework-provider-aws/package.json b/packages/framework-provider-aws/package.json index 0fcd4e28d..13cdafbda 100644 --- a/packages/framework-provider-aws/package.json +++ b/packages/framework-provider-aws/package.json @@ -1,5 +1,6 @@ { "name": "@boostercloud/framework-provider-aws", + "deprecated": "Due to significant changes in recent versions of the AWS CDK, specifically the transition from CDKToolkit to a cli tool as noted [here](https://github.com/aws/aws-cdk-rfcs/issues/300), upgrading our current implementation would require a substantial rewrite. Given the open-source nature of our project without direct revenue streams, the ensuing maintenance costs are unfeasible. However, we are open to upgrading the AWS provider or creating an alternative implementation using other technologies like Terraform's CDKTF, with community contributions or sponsorships. If you're interested in supporting us, we welcome you to reach out via the official channels listed on the [Booster's website](https://boosterframework.com).", "version": "1.21.0", "description": "Handle Booster's integration with AWS", "keywords": [ @@ -19,6 +20,9 @@ "type": "git", "url": "git+https://github.com/boostercloud/booster.git" }, + "engines": { + "node": ">=18.0.0 <19.0.0" + }, "dependencies": { "@boostercloud/framework-common-helpers": "workspace:^1.21.0", "@boostercloud/framework-types": "workspace:^1.21.0", @@ -46,7 +50,7 @@ "@types/chai-as-promised": "7.1.4", "@types/faker": "5.1.5", "@types/mocha": "10.0.1", - "@types/node": "16.11.7", + "@types/node": "^18.15.3", "@types/rewire": "^2.5.28", "@types/sinon": "10.0.0", "@types/sinon-chai": "3.2.5", diff --git a/packages/framework-provider-aws/test/library/read-models-searcher-adapter.test.ts b/packages/framework-provider-aws/test/library/read-models-searcher-adapter.test.ts index ca666ae45..afc810765 100644 --- a/packages/framework-provider-aws/test/library/read-models-searcher-adapter.test.ts +++ b/packages/framework-provider-aws/test/library/read-models-searcher-adapter.test.ts @@ -190,7 +190,7 @@ describe('Read models searcher adapter', () => { const expectedInput = { ...expectedParams, FilterExpression: - '(attribute_exists(#days) and attribute_not_exists(#mainItem) and attribute_exists(#mainItem.#sku) and attribute_exists(#mainItem.#sku.#price))', + '(attribute_exists(#days) and attribute_not_exists(#mainItem) and attribute_exists(#mainItem.#sku) and attribute_exists(#mainItem.#price))', ExpressionAttributeNames: { '#days': 'days', '#mainItem': 'mainItem', @@ -203,7 +203,7 @@ describe('Read models searcher adapter', () => { { days: { isDefined: true } }, { mainItem: { isDefined: false } }, { mainItem: { sku: { isDefined: true } } }, - { mainItem: { sku: { price: { isDefined: true } } } }, + { mainItem: { price: { isDefined: true } } }, ], } diff --git a/packages/framework-provider-azure-infrastructure/package.json b/packages/framework-provider-azure-infrastructure/package.json index f3cfe2bf6..3f2a56af4 100644 --- a/packages/framework-provider-azure-infrastructure/package.json +++ b/packages/framework-provider-azure-infrastructure/package.json @@ -19,9 +19,12 @@ "type": "git", "url": "git+https://github.com/boostercloud/booster.git" }, + "engines": { + "node": ">=18.0.0 <19.0.0" + }, "dependencies": { "@azure/arm-appservice": "^13.0.0", - "@azure/cosmos": "^3.17.0", + "@azure/cosmos": "^4.0.0", "@boostercloud/framework-common-helpers": "workspace:^1.21.0", "@boostercloud/framework-core": "workspace:^1.21.0", "@boostercloud/framework-provider-azure": "workspace:^1.21.0", @@ -71,7 +74,7 @@ "@types/fs-extra": "^9.0.13", "@types/mocha": "10.0.1", "@types/mustache": "4.1.0", - "@types/node": "16.11.7", + "@types/node": "^18.15.3", "@types/sinon": "10.0.0", "@types/sinon-chai": "3.2.5", "@types/uuid": "8.3.0", diff --git a/packages/framework-provider-azure-infrastructure/src/infrastructure/functions/event-handler-function.ts b/packages/framework-provider-azure-infrastructure/src/infrastructure/functions/event-handler-function.ts index 7c1403b78..4aec2d322 100644 --- a/packages/framework-provider-azure-infrastructure/src/infrastructure/functions/event-handler-function.ts +++ b/packages/framework-provider-azure-infrastructure/src/infrastructure/functions/event-handler-function.ts @@ -13,11 +13,11 @@ export class EventHandlerFunction { type: 'cosmosDBTrigger', name: 'rawEvent', direction: 'in', - leaseCollectionName: 'leases', - connectionStringSetting: 'COSMOSDB_CONNECTION_STRING', + leaseContainerName: 'leases', + connection: 'COSMOSDB_CONNECTION_STRING', databaseName: this.config.resourceNames.applicationStack, - collectionName: this.config.resourceNames.eventsStore, - createLeaseCollectionIfNotExists: 'true', + containerName: this.config.resourceNames.eventsStore, + createLeaseContainerIfNotExists: 'true', }, ], scriptFile: this.config.functionRelativePath, diff --git a/packages/framework-provider-azure-infrastructure/src/infrastructure/functions/subscriptions-notifier-function.ts b/packages/framework-provider-azure-infrastructure/src/infrastructure/functions/subscriptions-notifier-function.ts index df2981f35..de283376a 100644 --- a/packages/framework-provider-azure-infrastructure/src/infrastructure/functions/subscriptions-notifier-function.ts +++ b/packages/framework-provider-azure-infrastructure/src/infrastructure/functions/subscriptions-notifier-function.ts @@ -14,11 +14,11 @@ export class SubscriptionsNotifierFunction { type: 'cosmosDBTrigger', name: 'rawEvent', direction: 'in', - leaseCollectionName: `leases-${readModel}`, - connectionStringSetting: 'COSMOSDB_CONNECTION_STRING', + leaseContainerName: `leases-${readModel}`, + connection: 'COSMOSDB_CONNECTION_STRING', databaseName: this.config.resourceNames.applicationStack, - collectionName: this.config.resourceNames.forReadModel(readModel), - createLeaseCollectionIfNotExists: 'true', + containerName: this.config.resourceNames.forReadModel(readModel), + createLeaseContainerIfNotExists: 'true', }, { type: 'webPubSubConnection', diff --git a/packages/framework-provider-azure-infrastructure/src/infrastructure/helper/function-zip.ts b/packages/framework-provider-azure-infrastructure/src/infrastructure/helper/function-zip.ts index 4b502fe6d..43982c817 100644 --- a/packages/framework-provider-azure-infrastructure/src/infrastructure/helper/function-zip.ts +++ b/packages/framework-provider-azure-infrastructure/src/infrastructure/helper/function-zip.ts @@ -200,7 +200,7 @@ export class FunctionZip { version: '2.0', extensionBundle: { id: 'Microsoft.Azure.Functions.ExtensionBundle', - version: '[3.*, 4.0.0)', + version: '[4.*, 5.0.0)', }, } archive.append(JSON.stringify(hostConfig, null, 2), { diff --git a/packages/framework-provider-azure-infrastructure/src/infrastructure/synth/terraform-function-app.ts b/packages/framework-provider-azure-infrastructure/src/infrastructure/synth/terraform-function-app.ts index 07cb152ce..1e7c88ec0 100644 --- a/packages/framework-provider-azure-infrastructure/src/infrastructure/synth/terraform-function-app.ts +++ b/packages/framework-provider-azure-infrastructure/src/infrastructure/synth/terraform-function-app.ts @@ -44,10 +44,10 @@ export class TerraformFunctionApp { provider: providerResource, siteConfig: { applicationStack: { - nodeVersion: '~14', + nodeVersion: '~18', }, }, - functionsExtensionVersion: '~3', // keep it on version 3. Version 4 needs a migration process + functionsExtensionVersion: '~4', zipDeployFile: zipFile, }) } diff --git a/packages/framework-provider-azure-infrastructure/src/infrastructure/types/functionDefinition.ts b/packages/framework-provider-azure-infrastructure/src/infrastructure/types/functionDefinition.ts index d1db654b8..a558e9580 100644 --- a/packages/framework-provider-azure-infrastructure/src/infrastructure/types/functionDefinition.ts +++ b/packages/framework-provider-azure-infrastructure/src/infrastructure/types/functionDefinition.ts @@ -14,11 +14,11 @@ export type GraphQLBinding = Binding & { } export type EventHandlerBinding = Binding & { - leaseCollectionName: string - connectionStringSetting: string + leaseContainerName: string + connection: string databaseName: string - collectionName: string - createLeaseCollectionIfNotExists: string + containerName: string + createLeaseContainerIfNotExists: string [key: string]: any } diff --git a/packages/framework-provider-azure-infrastructure/test/infrastructure/functions/event-handler-functions.test.ts b/packages/framework-provider-azure-infrastructure/test/infrastructure/functions/event-handler-functions.test.ts index b3d4a3ed7..ab868a983 100644 --- a/packages/framework-provider-azure-infrastructure/test/infrastructure/functions/event-handler-functions.test.ts +++ b/packages/framework-provider-azure-infrastructure/test/infrastructure/functions/event-handler-functions.test.ts @@ -8,18 +8,18 @@ describe('Creating event-handler-functions', () => { config.resourceNames.applicationStack = 'applicationStack' config.resourceNames.eventsStore = 'eventsStore' - it('create the expected EventHandlerFunctionDefiniton', () => { + it('create the expected EventHandlerFunctionDefinition', () => { const definition = new EventHandlerFunction(config).getFunctionDefinition() expect(definition).not.to.be.null expect(definition.name).to.be.equal('eventHandler') expect(definition.config.bindings[0].type).to.be.equal('cosmosDBTrigger') expect(definition.config.bindings[0].name).to.be.equal('rawEvent') expect(definition.config.bindings[0].direction).to.be.equal('in') - expect(definition.config.bindings[0].leaseCollectionName).to.be.equal('leases') - expect(definition.config.bindings[0].connectionStringSetting).to.be.equal('COSMOSDB_CONNECTION_STRING') + expect(definition.config.bindings[0].leaseContainerName).to.be.equal('leases') + expect(definition.config.bindings[0].connection).to.be.equal('COSMOSDB_CONNECTION_STRING') expect(definition.config.bindings[0].databaseName).to.be.equal('new-booster-app-app') - expect(definition.config.bindings[0].collectionName).to.be.equal('new-booster-app-app-events-store') - expect(definition.config.bindings[0].createLeaseCollectionIfNotExists).to.be.equal('true') + expect(definition.config.bindings[0].containerName).to.be.equal('new-booster-app-app-events-store') + expect(definition.config.bindings[0].createLeaseContainerIfNotExists).to.be.equal('true') expect(definition.config.scriptFile).to.be.equal('../dist/index.js') expect(definition.config.entryPoint).to.be.equal('boosterEventDispatcher') }) diff --git a/packages/framework-provider-azure/package.json b/packages/framework-provider-azure/package.json index 8653ad0c7..d88eb4609 100644 --- a/packages/framework-provider-azure/package.json +++ b/packages/framework-provider-azure/package.json @@ -19,8 +19,11 @@ "type": "git", "url": "git+https://github.com/boostercloud/booster.git" }, + "engines": { + "node": ">=18.0.0 <19.0.0" + }, "dependencies": { - "@azure/cosmos": "^3.17.0", + "@azure/cosmos": "^4.0.0", "@azure/functions": "^1.2.2", "@azure/identity": "~2.1.0", "@boostercloud/framework-common-helpers": "workspace:^1.21.0", @@ -35,7 +38,7 @@ "@types/chai-as-promised": "7.1.4", "@types/faker": "5.1.5", "@types/mocha": "10.0.1", - "@types/node": "16.11.7", + "@types/node": "^18.15.3", "@types/sinon": "10.0.0", "@types/sinon-chai": "3.2.5", "@typescript-eslint/eslint-plugin": "^5.0.0", diff --git a/packages/framework-provider-azure/src/library/read-model-adapter.ts b/packages/framework-provider-azure/src/library/read-model-adapter.ts index 4ab0f08c4..97f9d8bdc 100644 --- a/packages/framework-provider-azure/src/library/read-model-adapter.ts +++ b/packages/framework-provider-azure/src/library/read-model-adapter.ts @@ -21,7 +21,7 @@ export async function fetchReadModel( const { resource } = await db .database(config.resourceNames.applicationStack) .container(config.resourceNames.forReadModel(readModelName)) - .item(readModelID as string, readModelID) + .item(readModelID as string, readModelID as string) .read() logger.debug( @@ -141,7 +141,7 @@ export async function deleteReadModel( await db .database(config.resourceNames.applicationStack) .container(config.resourceNames.forReadModel(readModelName)) - .item(readModel.id as string, readModel.id) + .item(readModel.id as string, readModel.id as string) .delete() logger.debug(`[ReadModelAdapter#deleteReadModel] Read model deleted. ID = ${readModel.id}`) } diff --git a/packages/framework-provider-azure/test/library/partition-keys.test.ts b/packages/framework-provider-azure/test/library/partition-keys.test.ts index a63edbfd6..f4d8363a3 100644 --- a/packages/framework-provider-azure/test/library/partition-keys.test.ts +++ b/packages/framework-provider-azure/test/library/partition-keys.test.ts @@ -1,7 +1,7 @@ import { partitionKeyForEvent, partitionKeyForSnapshot } from '../../src/library/partition-keys' import { expect } from '../expect' -describe('AWS keys helpers', () => { +describe('Azure keys helpers', () => { describe('partitionKeyForEvent', () => { it('should return the correct partition key for an event', () => { expect(partitionKeyForEvent('User', '123')).to.be.equal('User-123-event') diff --git a/packages/framework-provider-local-infrastructure/package.json b/packages/framework-provider-local-infrastructure/package.json index 440cec986..156f392f7 100644 --- a/packages/framework-provider-local-infrastructure/package.json +++ b/packages/framework-provider-local-infrastructure/package.json @@ -19,6 +19,9 @@ "type": "git", "url": "git+https://github.com/boostercloud/booster.git" }, + "engines": { + "node": ">=18.0.0 <19.0.0" + }, "dependencies": { "@boostercloud/framework-common-helpers": "workspace:^1.21.0", "@boostercloud/framework-provider-local": "workspace:^1.21.0", @@ -50,7 +53,7 @@ "@types/express": "^4.17.13", "@types/faker": "5.1.5", "@types/mocha": "10.0.1", - "@types/node": "16.11.7", + "@types/node": "^18.15.3", "@types/node-schedule": "^1.3.2", "@types/sinon": "10.0.0", "@types/sinon-chai": "3.2.5", diff --git a/packages/framework-provider-local/package.json b/packages/framework-provider-local/package.json index 5f97b42b8..052def48e 100644 --- a/packages/framework-provider-local/package.json +++ b/packages/framework-provider-local/package.json @@ -3,7 +3,7 @@ "version": "1.21.0", "description": "Debug your Booster projects locally", "keywords": [ - "framework-provider-aws" + "framework-provider-local" ], "author": "Boosterin Labs SLU", "homepage": "https://boosterframework.com", @@ -19,6 +19,9 @@ "type": "git", "url": "git+https://github.com/boostercloud/booster.git" }, + "engines": { + "node": ">=18.0.0 <19.0.0" + }, "dependencies": { "@boostercloud/framework-common-helpers": "workspace:^1.21.0", "@boostercloud/framework-types": "workspace:^1.21.0", @@ -48,7 +51,7 @@ "@types/express": "^4.17.13", "@types/faker": "5.1.5", "@types/mocha": "10.0.1", - "@types/node": "16.11.7", + "@types/node": "^18.15.3", "@types/sinon": "10.0.0", "@types/sinon-chai": "3.2.5", "@types/sinon-express-mock": "^1.3.9", diff --git a/packages/framework-types/package.json b/packages/framework-types/package.json index b68e7147d..b221ea001 100644 --- a/packages/framework-types/package.json +++ b/packages/framework-types/package.json @@ -32,6 +32,9 @@ "bugs": { "url": "https://github.com/boostercloud/booster/issues" }, + "engines": { + "node": ">=18.0.0 <19.0.0" + }, "peerDependencies": { "graphql": "^16.6.0" }, @@ -47,13 +50,12 @@ "@types/chai": "4.2.18", "@types/chai-as-promised": "7.1.4", "@types/mocha": "10.0.1", - "@types/node": "16.11.7", + "@types/node": "^18.15.3", "@types/sinon": "10.0.0", "@types/sinon-chai": "3.2.5", "@types/uuid": "8.3.0", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", - "@types/graphql": "^14.5.0", "eslint": "^8.23.1", "eslint-config-prettier": "8.3.0", "eslint-plugin-import": "^2.26.0", diff --git a/packages/metadata-booster/README.md b/packages/metadata-booster/README.md index 30688d996..f699a69f9 100644 --- a/packages/metadata-booster/README.md +++ b/packages/metadata-booster/README.md @@ -1,7 +1,9 @@ # Metadata Booster + This is a transformer (also known as plugin) for Typescript to generate detailed metadata for all your classes. ## Why? + There are many applications that need to know the schema of your classes to work properly, like ORMs (to know the names of the database tables and columns), GraphQL APIs (to generate the GraphQL schema), etc. Currently, Typescript emits some metadata when you add decorators to your classes and enable the following compiler options: `"experimentalDecorators": true` and `"emitDecoratorMetadata": true`. @@ -9,6 +11,7 @@ Currently, Typescript emits some metadata when you add decorators to your classe However, that metadata is very limited, as it doesn't include property names and information about the type parameters. For example, if we had the following code: + ```typescript @AnyDecorator //We need to decorate the class to emit metadata class User { @@ -36,7 +39,9 @@ class Car { } } ``` + And now we call `Reflect.getMetadata('design:paramtypes')` on each class, we would get the following: + ```typescript Reflect.getMetadata('design:paramtypes', User) > [ [Function: String], [Function: Set] ] @@ -44,12 +49,15 @@ Reflect.getMetadata('design:paramtypes', User) Reflect.getMetadata('design:paramtypes', Car) > [ [Function: Number], [Function: Map] ] ``` + Not very helpful: we are lacking a lot of information about property names, type parameters and methods. ## Welcome to full detailed metadata + With this transformer, you will get much more detailed metadata for all your classes, without the need of using any decorator. Following with the previous example, you can get this detailed metadata using the key `'booster:typeinfo'`: + ```typescript Reflect.getMetadata('booster:typeinfo', User) > { @@ -129,49 +137,62 @@ Reflect.getMetadata('booster:typeinfo', Car) ] } ``` + As you can see, you can now have runtime access to the information about all the properties, type parameters, methods, return types, etc. of your classes. ## How to use it -"@boostercloud/metadata-booster" is a transformer so, until the Typescript team decides to accept plugins (you can track the status in [this issue](https://github.com/microsoft/TypeScript/issues/14419)), you would want to use the [Typescript](https://github.com/cevek/ttypescript) wrapper "TTypescript" to be able to use any transformer. That being said, it works really well. + +"@boostercloud/metadata-booster" is a transformer so, until the Typescript team decides to accept plugins (you can track the status in [this issue](https://github.com/microsoft/TypeScript/issues/14419)), you would want to use [TS Patch](https://github.com/nonara/ts-patch). Here are the steps: -1. Add the "@boostercloud/metadata-booster" transformer and "ttypescript" to your `"devDependencies"` -```shell -npm install --save-dev "@boostercloud/metadata-booster" -npm install --save-dev "ttypescript" -``` + +1. Add the "@boostercloud/metadata-booster" transformer and "ts-patch" to your `"devDependencies"` + + ```shell + npm install --save-dev "@boostercloud/metadata-booster" + npm install --save-dev "ts-patch" + ``` + 2. Add the official module "reflect-metadata" to your `"dependencies"` (you need this to access the metadata) -```shell -npm install --save-prod "reflect-metadata" -``` + + ```shell + npm install --save-prod "reflect-metadata" + ``` + 3. Go to your `tsconfig.json` file and - a) Ensure you have the option `"experimentalDecorators": true`. The reason is that the metadata is automatically added as a decorator to the class. In any case, you don't need to write any decorator. - b) Add "@boostercloud/metadata-booster" as a transformer plugin inside the `"compilerOptions"` section -```shell -{ - "compilerOptions": { - (...) - "experimentalDecorators": true - "plugins": [ - { "transform": "@boostercloud/metadata-booster"} - ] - }, -} -``` -4. _[Optional]_ From now on, to compile your code you need to use the command `ttsc` (the TTypescript wrapper), instead of `tsc`. I normally have a "build" script in my "package.json" file that calls `"tsc -b tsconfig.json"`, so I compile my code by running `npm run build`. I would recommend you to do that and change "tsc" by "ttsc". Like this: -```json - ... other "package.json" options fields ... - "scripts": { - "build": "ttsc -b tsconfig.json", - "test": "..." - } -``` + + ```shell + { + "compilerOptions": { + (...) + "experimentalDecorators": true + "plugins": [ + { "transform": "@boostercloud/metadata-booster"} + ] + }, + } + ``` + +4. Create a "prepare" script to patch your typescript installation automatically after installing your dependencies. You can also add a convenient "build" script in your "package.json" file to compile your code by running `npm run build` instead of calling the compiler directly: + + ```json + ... other "package.json" options fields ... + "scripts": { + "prepare": "ts-patch install -s", + "build": "tsc -b tsconfig.json", + "test": "..." + } + ``` Now you can compile your project by running `npm run build` and have access to a full detailed metadata for all your Typescript classes. ## Compatibility + This transformer is compatible with Typescript version 4.x.x ## Missing features + - [ ] Gather interfaces metadata - [ ] Gather method parameters metadata diff --git a/packages/metadata-booster/package.json b/packages/metadata-booster/package.json index ce6c50d60..693651a4e 100644 --- a/packages/metadata-booster/package.json +++ b/packages/metadata-booster/package.json @@ -22,6 +22,9 @@ "files": [ "dist" ], + "engines": { + "node": ">=18.0.0 <19.0.0" + }, "dependencies": { "reflect-metadata": "0.1.13", "ts-morph": "15.1.0", @@ -35,10 +38,10 @@ "eslint-config-prettier": "8.3.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-prettier": "3.4.0", + "@types/node": "^18.15.3", "@boostercloud/eslint-config": "workspace:^1.21.0", - "@types/node": "16.11.7", "ts-node": "^10.9.1", - "ttypescript": "1.5.15", + "ts-patch": "2.0.2", "typescript": "4.7.4", "prettier": "2.3.0", "sinon": "9.2.3", @@ -46,12 +49,13 @@ "eslint-plugin-unicorn": "~44.0.2" }, "scripts": { + "prepare": "ts-patch install -s", "lint:check": "eslint --ext '.js,.ts' **/*.ts", "lint:fix": "eslint --quiet --fix --ext '.js,.ts' **/*.ts", "build": "tsc -b tsconfig.json", "clean": "rimraf ./dist tsconfig.tsbuildinfo", "prepack": "tsc -b tsconfig.json", - "test": "ttsc -p tsconfig.test.json" + "test": "tsc -p tsconfig.test.json" }, "pnpm": { "overrides": { diff --git a/rush.json b/rush.json index 7125e6c4e..4f12d3658 100644 --- a/rush.json +++ b/rush.json @@ -121,7 +121,7 @@ * LTS versions: https://nodejs.org/en/download/releases/ */ // "nodeSupportedVersionRange": ">=12.13.0 <13.0.0 || >=14.15.0 <15.0.0 || >=16.13.0 <17.0.0", - "nodeSupportedVersionRange": ">=16.14.0 <17.0.0", + "nodeSupportedVersionRange": ">=18.0.0 <19.0.0", /** * Odd-numbered major versions of Node.js are experimental. Even-numbered releases diff --git a/scripts/check-all-the-things.ps1 b/scripts/check-all-the-things.ps1 index 7200588da..06c22261d 100644 --- a/scripts/check-all-the-things.ps1 +++ b/scripts/check-all-the-things.ps1 @@ -2,8 +2,9 @@ # but in order to maintain backwards compatibility # with Powershell <7.0 (what most Windows users have preinstalled) # we write it in the old-school style -rush purge -if ($?) { rush install } -if ($?) { rush build } +rush clean +if ($?) { rush purge } +if ($?) { rush update } +if ($?) { rush rebuild } if ($?) { rush lint:fix } -if ($?) { rush test } \ No newline at end of file +if ($?) { rush test } diff --git a/scripts/check-all-the-things.sh b/scripts/check-all-the-things.sh index 0535ff350..ebbd66e50 100755 --- a/scripts/check-all-the-things.sh +++ b/scripts/check-all-the-things.sh @@ -1,7 +1,8 @@ #!/usr/bin/env sh -rush purge \ -&& rush install \ -&& rush build \ +rush clean \ +&& rush purge \ +&& rush update \ +&& rush rebuild \ && rush lint:fix \ -&& rush test \ No newline at end of file +&& rush test diff --git a/tools/eslint-config/package.json b/tools/eslint-config/package.json index 5323fb58a..fd65a5e27 100644 --- a/tools/eslint-config/package.json +++ b/tools/eslint-config/package.json @@ -33,5 +33,8 @@ "typescript": { "optional": true } + }, + "engines": { + "node": ">=18.0.0 <19.0.0" } } diff --git a/upgrade-v2.md b/upgrade-v2.md new file mode 100644 index 000000000..d918e8f80 --- /dev/null +++ b/upgrade-v2.md @@ -0,0 +1,7 @@ +# Upgrade from Booster v1.x.x to Booster v2.x.x + +Booster v2 introduces the following breaking changes: + +1. **Node 18 support**: Booster v2 has been upgraded to work with Node 18. If you're using an older version of Node, you'll need to upgrade it. +2. **Azure runtime upgraded to v4**: The Azure Functions Runtime has been upgraded from v3 to v4. If you're using Booster v1.x.x with Azure, you may need to perform a migration. Check out [Azure's migration guide](https://learn.microsoft.com/en-us/azure/azure-functions/migrate-version-3-version-4?tabs=net6-isolated%2Cazure-cli%2Cwindows&pivots=programming-language-typescript) for more details. +3. **The AWS provider has been deprecated**: Due to significant changes in recent versions of the AWS CDK, specifically the transition from CDKToolkit to a cli tool as noted [here](https://github.com/aws/aws-cdk-rfcs/issues/300), upgrading our current implementation would require a substantial rewrite. Given the open-source nature of our project without direct revenue streams, the ensuing maintenance costs are unfeasible. However, we are open to upgrading the AWS provider or creating an alternative implementation using other technologies like Terraform's CDKTF, with community contributions or sponsorships. If you're interested in supporting us, we welcome you to reach out via the official channels listed on the [Booster's website](https://boosterframework.com). diff --git a/website/docs/01_introduction.md b/website/docs/01_introduction.md index 90dd3ea31..875d5d6c1 100644 --- a/website/docs/01_introduction.md +++ b/website/docs/01_introduction.md @@ -34,7 +34,7 @@ Booster enhances developers' productivity by focusing only on business logic. Wr - **Focus on business value**: The only code that makes sense is the code that makes your application different from any other. - **Convention over configuration**: All the supporting code and configuration that is similar in all applications should be out of programmers’ sight. - **Truly Serverless**: Why go Serverless to avoid managing infrastructure when you can implicitly infer your Serverless architecture from your code and not even deal with that? -- **Effective Multicloud**: Booster design makes it possible to run the same application in AWS or Azure with no code changes in your application. +- **Effective Multicloud**: Booster design makes it possible to run the same application in any of the supported cloud providers with no code changes in your application. - **Scale smoothly**: The code you write to handle your first 100 users will still work to handle your first million. You won't need to rewrite your application when it succeeds. - **Event-source and CQRS**: Our world is event-driven, businesses are event-driven, and modern software maps better to reality when it’s event-driven. - **Principle of Abstraction**: Building an application is hard enough to have to deal with recurring low-level details like SQL, API design, or authentication mechanisms, so we tend to build more semantic abstractions on top of them. diff --git a/website/docs/02_getting-started/coding.mdx b/website/docs/02_getting-started/coding.mdx index 1ccbc79ba..18a8a0c9e 100644 --- a/website/docs/02_getting-started/coding.mdx +++ b/website/docs/02_getting-started/coding.mdx @@ -22,8 +22,8 @@ the instructions. After some prompted questions, the CLI will ask you to select ```shell ? What's the package name of your provider infrastructure library? (Use arrow keys) -❯ @boostercloud/framework-provider-aws (AWS) @boostercloud/framework-provider-azure (Azure) +❯ @boostercloud/framework-provider-aws (AWS) - Deprecated Other ``` diff --git a/website/docs/06_graphql.md b/website/docs/06_graphql.md index d50d576be..87611db41 100644 --- a/website/docs/06_graphql.md +++ b/website/docs/06_graphql.md @@ -625,7 +625,6 @@ query { - Subscriptions don't work for the events API yet - You can only query events, but not write them through this API. Use a command for that. -- Currently, only available on the AWS provider. ## Filter & Pagination diff --git a/website/docs/10_going-deeper/data-migrations.md b/website/docs/10_going-deeper/data-migrations.md index 5dea8335d..8abb6e176 100644 --- a/website/docs/10_going-deeper/data-migrations.md +++ b/website/docs/10_going-deeper/data-migrations.md @@ -160,7 +160,7 @@ export class CartIdDataMigrateV2 { "typescript": "4.5.4", "ts-node": "9.1.1", "@types/node": "15.0.2", - "ttypescript": "1.5.15", + "ts-patch": "2.0.2", "@boostercloud/metadata-booster": "0.30.2" }, ``` diff --git a/website/docs/10_going-deeper/testing.md b/website/docs/10_going-deeper/testing.md index d029cad66..a3e3f005b 100644 --- a/website/docs/10_going-deeper/testing.md +++ b/website/docs/10_going-deeper/testing.md @@ -7,6 +7,7 @@ Booster applications are fully tested by default. This means that you can be sur To properly test a Booster application, you should create a `test` folder at the same level as the `src` one. Apart from that, tests' names should have the `.test.ts` format. When a Booster application is generated, you will have a script in a `package.json` like this: + ```typescript "scripts": { "test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"" diff --git a/website/docs/12_contributing.md b/website/docs/12_contributing.md index 16260ed43..2a428f3c0 100644 --- a/website/docs/12_contributing.md +++ b/website/docs/12_contributing.md @@ -26,7 +26,7 @@ Booster is divided in many different packages. The criteria to split the code in - They must be run separately, for instance, the CLI is run locally, while the support code for the project is run on the cloud. - They contain code that is used by at least two of the other packages. -- They're a vendor-specific specialization of some abstract part of the framework (for instance, all the code that is required by AWS is in separate packages). +- They're a vendor-specific specialization of some abstract part of the framework (for instance, all the code that is required by Azure is in separate packages). The packages are managed using [rush](https://rushjs.io/) and [npm](https://npmjs.com), if you run `rush build`, it will build all the packages. @@ -35,8 +35,8 @@ The packages are published to `npmjs` under the prefix `@boostercloud/`, their p - `cli` - You guessed it! This package is the `boost` command-line tool, it interacts only with the core package in order to load the project configuration. The specific provider packages to interact with the cloud providers are loaded dynamically from the project config. - `framework-core` - This one contains all the framework runtime vendor-independent logic. Stuff like the generation of the config or the commands and events handling happens here. The specific provider packages to interact with the cloud providers are loaded dynamically from the project config. - `framework-integration-tests` - Implements integration tests for all supported vendors. Tests are run on real infrastructure using the same mechanisms than a production application. This package `src` folder includes a synthetic Booster application that can be deployed to a real provider for testing purposes. -- `framework-provider-aws` - Implements all the required adapters to make the booster core run on top of AWS technologies like Lambda and DynamoDB using the AWS SDK under the hoods. -- `framework-provider-aws-infrastructure` - Implements all the required adapters to allow Booster applications to be deployed to AWS using the AWS CDK under the hoods. +- `framework-provider-aws` (Currently Deprecated) - Implements all the required adapters to make the booster core run on top of AWS technologies like Lambda and DynamoDB using the AWS SDK under the hoods. +- `framework-provider-aws-infrastructure` (Currently Deprecated) - Implements all the required adapters to allow Booster applications to be deployed to AWS using the AWS CDK under the hoods. - `framework-provider-local` - Implements all the required adapters to run the Booster application on a local express server to be able to debug your code before deploying it to a real cloud provider. - `framework-provider-local-infrastructure` - Implements all the required code to run the local development server. - `framework-types` - This package defines types that the rest of the project will use. This is useful for avoiding cyclic dependencies. Note that this package should not contain stuff that are not types, or very simple methods related directly to them, i.e. a getter or setter. This package defines the main booster concepts like: @@ -225,7 +225,7 @@ The Booster Framework project is organized following the ["rush monorepo"](https - The "package.json" files that are on each package root should contain the dependencies used by that specific package. Be sure to correctly differentiate which dependency is only for development and which one is for production. -Finally, **always use exact numbers for dependency versions**. This means that if you want to add the dependency "aws-sdk" in version 1.2.3, you should add `"aws-sdk": "1.2.3"` to the corresponding "package.json" file, and never `"aws-sdk": "^1.2.3"` or `"aws-sdk": "~1.2.3"`. This restriction comes from hard problems we've had in the past. +Finally, **always use exact numbers for dependency versions**. This means that if you want to add the dependency "graphql" in version 1.2.3, you should add `"graphql": "1.2.3"` to the corresponding "package.json" file, and never `"graphql": "^1.2.3"` or `"graphql": "~1.2.3"`. This restriction comes from hard problems we've had in the past. ### Running unit tests @@ -249,15 +249,36 @@ Integration tests are run automatically in Github Actions when a PR is locked, b These are the available scripts to run integration tests: -- `rushx integration -v`: Run all the integration test suites in the right order. -- `rushx integration/aws-deploy -v`: This test just checks that the sample project in `packages/framework-integration-tests/src` can be successfully deployed to AWS. The deployment process takes several minutes and this project is used by all the other AWS integration tests, so it's a requirement to run this test before. -- `rushx integration/aws-func -v`: AWS functional integration tests. They stress the deployed app write API and checks that the results are the expected ones both in the databases and the read APIs. -- `rushx integration/end-to-end -v`: Runs complete and realistic use cases on several cloud providers. This tests are intended to verify that a single project can be deployed to different cloud providers. Currently, only AWS is implemented though. -- `rushx integration/aws-nuke -v`: This test checks that the application deployed to AWS can be properly nuked. This test should be the last one after other test suites related to AWS have finished. -- `rushx integration/local -v`: Checks that the test application can be launched locally and that the APIs and the databases behave as expected. -- `rushx integration/cli -v`: Checks cli commands and check that they produce the expected results. - -AWS integration tests are run in real AWS resources, so you'll need to have your AWS credentials properly set in your development machine. By default, the sample project will be deployed to your default account. Basically, if you can deploy a Booster project to AWS, you should be good to go ([See more details about setting up an AWS account in the docs](https://github.com/boostercloud/booster/tree/main/docs#set-up-an-aws-account)). Notice that while all resources used by Booster are included in the AWS free tier, running these tests in your own AWS account could incur in some expenses. +1. **General Integration Tests:** + - `rushx integration -v`: Run all integration test scripts. + +2. **CLI Integration Tests:** + - `rushx integration/cli -v`: Tests CLI commands and verifies that they produce the expected results. + +3. **Local Integration Tests:** + - `rushx integration/local -v`: Runs all integration scripts in the local development server. + - `rushx integration/local-ongoing -v`: Runs the start and stop integration tests. + - `rushx integration/local-start -v`: Checks the start functionality of the local environment. + - `rushx integration/local-func -v`: Functional tests for the local environment. + - `rushx integration/local-end-to-end -v`: Runs end-to-end tests in the local environment. + - `rushx integration/local-stop -v`: Checks the stop functionality of the local environment. + +4. **AWS Integration Tests:** + - `rushx integration/aws -v`: Runs all integration test scripts for provider AWS. + - `rushx integration/aws-deploy -v`: Tests the deployment of a sample project to AWS. + - `rushx integration/aws-func -v`: Runs functional tests on AWS, stressing the deployed app's write API and verifying the results in databases and read APIs. + - `rushx integration/aws-end-to-end -v`: Performs end-to-end tests on AWS. + - `rushx integration/aws-load -v`: (Currently skipped) Intended for load tests on AWS. + - `rushx integration/aws-nuke -v`: Verifies that the deployed application on AWS can be properly nuked. + +5. **Azure Integration Tests:** + - `rushx integration/azure -v`: Runs all integration test scripts for provider Azure. + - `rushx integration/azure-deploy -v`: Tests the deployment of a project to Azure. + - `rushx integration/azure-func -v`: Runs functional tests on Azure. + - `rushx integration/azure-end-to-end -v`: Performs end-to-end tests on Azure. + - `rushx integration/azure-nuke -v`: Verifies that the deployed application on Azure can be properly nuked. + +Azure and AWS integration tests run in real environments, so you'll need to have your credentials properly set in your development machine in order to run them. They will deploy a sample project to your default account, run the tests and nuke the application when the process finishes. Notice that running integration tests in your cloud account could incur in some expenses. ### Github flow diff --git a/website/package.json b/website/package.json index da0510d7d..47d20bd3d 100644 --- a/website/package.json +++ b/website/package.json @@ -52,6 +52,6 @@ ] }, "engines": { - "node": ">=16.14" + "node": ">=18.0.0 <19.0.0" } }