diff --git a/packages/internal/docs/docs/api-reference/backend/commands.mdx b/packages/internal/docs/docs/api-reference/backend/commands.mdx index 923a0388b..cfce6e531 100644 --- a/packages/internal/docs/docs/api-reference/backend/commands.mdx +++ b/packages/internal/docs/docs/api-reference/backend/commands.mdx @@ -8,59 +8,59 @@ import RunOnCICautionPartial from '../../shared/partials/_run-on-ci-caution.mdx' This page contains a list of CLI commands that you can use within the `backend` package context. -### `nx run backend:compose-build-image` +### `pnpm nx run backend:compose-build-image` -Builds a backend Docker image by running `nx run core:docker-login` and `docker-compose build backend`. +Builds a backend Docker image by running `pnpm nx run core:docker-login` and `docker-compose build backend`. --- -### `nx run backend:test` +### `pnpm nx run backend:test` Runs tests (`scripts/run_tests.sh` script) inside Docker container using `docker-compose`. --- -### `nx run backend:build` +### `pnpm nx run backend:build` Runs `scripts/build.sh` script. -Depends on: [`nx run backend:test`](#nx-run-backendtest) +Depends on: [`pnpm nx run backend:test`](#pnpm-nx-run-backendtest) --- -### `nx run backend:deploy:api` +### `pnpm nx run backend:deploy:api` -Runs `nx cdk:deploy:api` along with `nx run tools:upload-service-version api "url=https://${SB_DOMAIN_API}"` +Runs `pnpm nx cdk:deploy:api` along with `pnpm nx run tools:upload-service-version api "url=https://${SB_DOMAIN_API}"` --- -### `nx run backend:deploy:migrations` +### `pnpm nx run backend:deploy:migrations` Runs following commands: ```bash -nx cdk:deploy:migrations -nx run trigger-migrations-job -nx run tools:upload-service-version migrations +pnpm nx cdk:deploy:migrations +pnpm nx run trigger-migrations-job +pnpm nx run tools:upload-service-version migrations ``` --- ### `make test` -Alias command for [`nx test`](#nx-run-backendtest). +Alias command for [`pnpm nx test`](#pnpm-nx-run-backendtest). --- ### `make build` -Alias command for [`nx build`](#nx-run-backendbuild). +Alias command for [`pnpm nx build`](#pnpm-nx-run-backendbuild). --- diff --git a/packages/internal/docs/docs/api-reference/tools/commands.mdx b/packages/internal/docs/docs/api-reference/tools/commands.mdx index 3b14de739..bbd116557 100644 --- a/packages/internal/docs/docs/api-reference/tools/commands.mdx +++ b/packages/internal/docs/docs/api-reference/tools/commands.mdx @@ -9,14 +9,14 @@ This page contains a list of CLI commands that you can use within the `tools` pa ## Generators -### `nx g @sb/tools:webapp-lib` +### `pnpm nx g @sb/tools:webapp-lib` Generates a project structure for a new webapp library that you can import from other webapp libraries or webapp package. ```shell title="Example usage" -nx g @sb/tools:webapp-lib --directory webapp-libs mylib +pnpm nx g @sb/tools:webapp-lib --directory webapp-libs mylib ``` To learn more about creating a new webapp library check out the @@ -24,7 +24,7 @@ To learn more about creating a new webapp library check out the ## Other commands -### `nx run tools:upload-version SERVICES` +### `pnpm nx run tools:upload-version SERVICES` @@ -36,12 +36,12 @@ Arguments: - `SERVICES`: comma separated list of services that are deployed during environment update ```bash title="Example usage" -nx run tools:upload-version migrations,api,workers,webapp +pnpm nx run tools:upload-version migrations,api,workers,webapp ``` --- -### `nx run tools:upload-service-version SERVICE [ADDITIONAL_DATA]` +### `pnpm nx run tools:upload-service-version SERVICE [ADDITIONAL_DATA]` @@ -55,5 +55,5 @@ Arguments: Used for example to pass the `url` data of the deployed service ```bash title="Example usage" -nx run tools:upload-service-version workers +pnpm nx run tools:upload-service-version workers ``` diff --git a/packages/internal/docs/docs/api-reference/webapp-api-client/commands.mdx b/packages/internal/docs/docs/api-reference/webapp-api-client/commands.mdx index e51e0af0e..ff9900f00 100644 --- a/packages/internal/docs/docs/api-reference/webapp-api-client/commands.mdx +++ b/packages/internal/docs/docs/api-reference/webapp-api-client/commands.mdx @@ -5,10 +5,10 @@ description: Commands within `webapp-api-cient` package context This page contains a list of CLI commands that you can use within the `webapp-api-client` package context. -### `nx run webapp-api-client:graphql:generate-types` +### `pnpm nx run webapp-api-client:graphql:generate-types` Generate TypeScript types from GraphQL schema --- -### `nx run webapp-api-client:graphql:generate-types:watch` +### `pnpm nx run webapp-api-client:graphql:generate-types:watch` diff --git a/packages/internal/docs/docs/api-reference/webapp-emails/commands.mdx b/packages/internal/docs/docs/api-reference/webapp-emails/commands.mdx index 0fae0c165..5459470ba 100644 --- a/packages/internal/docs/docs/api-reference/webapp-emails/commands.mdx +++ b/packages/internal/docs/docs/api-reference/webapp-emails/commands.mdx @@ -7,7 +7,7 @@ This page contains a list of CLI commands that you can use within the `webapp-em ### `pnpm run build` -Alias for [`nx run webapp-emails:build-vite`](#nx-webapp-emailsbuild-vite) +Alias for [`pnpm nx run webapp-emails:build-vite`](#pnpm-nx-webapp-emailsbuild-vite) --- @@ -35,12 +35,12 @@ Runs `jest` with `--watch` flag. Useful for development purpose. --- -### `nx webapp-emails:build-vite` +### `pnpm nx webapp-emails:build-vite` Runs [`vite build`](https://vitejs.dev/guide/cli.html#build) with the correct configuration and builds web application. --- -### `nx run webapp-emails:build-for-env` +### `pnpm nx run webapp-emails:build-for-env` -It is used in CI pipeline and runs `nx webapp-emails:build-vite` inside `webapp` environment context using `chamber`. \ No newline at end of file +It is used in CI pipeline and runs `pnpm nx webapp-emails:build-vite` inside `webapp` environment context using `chamber`. \ No newline at end of file diff --git a/packages/internal/docs/docs/api-reference/webapp/commands.mdx b/packages/internal/docs/docs/api-reference/webapp/commands.mdx index ccdbcac5f..01568cf4a 100644 --- a/packages/internal/docs/docs/api-reference/webapp/commands.mdx +++ b/packages/internal/docs/docs/api-reference/webapp/commands.mdx @@ -9,14 +9,14 @@ This page contains a list of CLI commands that you can use within the `webapp` p Start webapp development server -Alias for [`nx start:app`](#nx-startapp). It starts [Vite](https://vitejs.dev/) web -application development server along with `nx webapp:graphql:generate-types:watch`. +Alias for [`pnpm nx start:app`](#pnpm-nx-startapp). It starts [Vite](https://vitejs.dev/) web +application development server along with `pnpm nx webapp:graphql:generate-types:watch`. --- ### `pnpm run build` -Alias for [`nx run webapp:build-vite`](#nx-run-webappbuild-vite) +Alias for [`pnpm nx run webapp:build-vite`](#pnpm-nx-run-webappbuild-vite) --- @@ -58,50 +58,50 @@ Find more about plop generator in the [devtools section](../../working-with-sb/d Run and build storybooks -It runs `start-storybook` script along with [`nx run webapp-emails:vite-build`](../webapp-emails/commands#build-emails) +It runs `start-storybook` script along with [`pnpm nx run webapp-emails:vite-build`](../webapp-emails/commands#build-emails) which will prebuild email templates. Storybook server will start on port `5002`. --- -### `nx start:app` +### `pnpm nx start:app` It will start [Vite](https://vitejs.dev/) web application development server along with -[`nx webapp:graphql:generate-types:watch`](#nx-run-webappgraphqlgenerate-typeswatch). +[`pnpm nx webapp:graphql:generate-types:watch`](#pnpm-nx-run-webappgraphqlgenerate-typeswatch). --- -### `nx run webapp:graphql:download-schema` +### `pnpm nx run webapp:graphql:download-schema` It downloads and saves GraphQL schemas from back-end API and Contentful API. This should be run after every API schema change and before generating TypeScript types by calling -[`nx run webapp:graphql:generate-types`](#nx-run-webappgraphqlgenerate-types). +[`pnpm nx run webapp:graphql:generate-types`](#pnpm-nx-run-webappgraphqlgenerate-types). You can find more about updating GraphQL schema [here](../../working-with-sb/graphql/web-app/update-schema) --- -### `nx run webapp:graphql:generate-types` +### `pnpm nx run webapp:graphql:generate-types` -### `nx run webapp:graphql:generate-types:watch` +### `pnpm nx run webapp:graphql:generate-types:watch` -Alias commands for [`nx run webapp-api-client:graphql:generate-types`](../webapp-api-client/commands#nx-run-webapp-api-clientgraphqlgenerate-types) and -[`nx run webapp-api-client:graphql:generate-types:watch`](../webapp-api-client/commands#nx-run-webapp-api-clientgraphqlgenerate-typeswatch) +Alias commands for [`pnpm nx run webapp-api-client:graphql:generate-types`](../webapp-api-client/commands#pnpm-nx-run-webapp-api-clientgraphqlgenerate-types) and +[`pnpm nx run webapp-api-client:graphql:generate-types:watch`](../webapp-api-client/commands#pnpm-nx-run-webapp-api-clientgraphqlgenerate-typeswatch) --- -### `nx run webapp:build-vite` +### `pnpm nx run webapp:build-vite` -Regenerate types by calling [`nx run webapp:graphql:generate-types`](#nx-run-webappgraphqlgenerate-types) and +Regenerate types by calling [`pnpm nx run webapp:graphql:generate-types`](#pnpm-nx-run-webappgraphqlgenerate-types) and builds the web application using [`vite build`](https://vitejs.dev/guide/cli.html#build) with the correct configuration. --- -### `nx run webapp:build-with-env` +### `pnpm nx run webapp:build-with-env` -It is used in CI pipeline and runs `nx webapp:build-vite` inside `webapp` environment context using `chamber`. +It is used in CI pipeline and runs `pnpm nx webapp:build-vite` inside `webapp` environment context using `chamber`. To find more about using `chamber` in the project check [How to configure environment variables on AWS?](../../aws/deploy-to-aws/create-runtime-env-vars) guide. @@ -109,13 +109,13 @@ To find more about using `chamber` in the project check [How to configure enviro ### `make test` -Alias command for [`nx test`](#pnpm-run-test). +Alias command for [`pnpm nx test`](#pnpm-run-test). --- ### `make build` -Alias command for [`nx build`](#nx-run-webappbuild-vite). +Alias command for [`pnpm nx build`](#pnpm-nx-run-webappbuild-vite). --- @@ -133,7 +133,7 @@ This command should be called only after `make set-env ENV_STAGE=` c --- -### `nx run extract-intl` +### `pnpm nx run extract-intl` It extracts all [`formatjs`](https://formatjs.io/) messages from the `webapp` and `webapp-libs` packages using [`formatjs extract`](https://formatjs.io/docs/getting-started/message-extraction/#extraction) command to diff --git a/packages/internal/docs/docs/working-with-sb/dev-tools/version-matrix.mdx b/packages/internal/docs/docs/working-with-sb/dev-tools/version-matrix.mdx index 4403e6d95..d5b29d4dd 100644 --- a/packages/internal/docs/docs/working-with-sb/dev-tools/version-matrix.mdx +++ b/packages/internal/docs/docs/working-with-sb/dev-tools/version-matrix.mdx @@ -28,13 +28,13 @@ You can configure version matrix via AWS SSM Parameter Store. You can find the d Deployment of the version matrix service contains two steps. First, you need to run build command: ```shell -nx run status-dashboard:build +pnpm nx run status-dashboard:build ``` After successful build you can run AWS deployment script: ```shell -nx run status-dashboard:deploy +pnpm nx run status-dashboard:deploy ``` :::caution @@ -47,11 +47,11 @@ This command should be called only after `make set-env ENV_STAGE=` c ## Updating version on CI pipeline Application environment version and individual services versions are updated automatically on the CI/CD pipeline using -`nx run tools:upload-version` and `nx run tools:upload-service-version` commands. +`pnpm nx run tools:upload-version` and `pnpm nx run tools:upload-service-version` commands. :::info -Find more about `nx run tools:upload-version` and `nx run tools:upload-service-version` commands in the +Find more about `pnpm nx run tools:upload-version` and `pnpm nx run tools:upload-service-version` commands in the [`tools` package API Reference](../../api-reference/tools/commands). ::: diff --git a/packages/internal/docs/docs/working-with-sb/graphql/web-app/update-schema.mdx b/packages/internal/docs/docs/working-with-sb/graphql/web-app/update-schema.mdx index 2642aeedd..f89cd1d6b 100644 --- a/packages/internal/docs/docs/working-with-sb/graphql/web-app/update-schema.mdx +++ b/packages/internal/docs/docs/working-with-sb/graphql/web-app/update-schema.mdx @@ -27,7 +27,7 @@ To update types in the webapp application code, two steps need to be taken: To download the GraphQL schemas, run the command: ```bash - nx run webapp:graphql:download-schema + pnpm nx run webapp:graphql:download-schema ``` This command will introspect and save both schemas (main back-end API and Contentful API) to files located at @@ -42,7 +42,7 @@ To update types in the webapp application code, two steps need to be taken: To generate the types based on the downloaded GraphQL schemas, run the following command: ```bash - nx run webapp:graphql:generate-types + pnpm nx run webapp:graphql:generate-types ``` This command uses the [`graphql-codegen`](https://the-guild.dev/graphql/codegen) tool and a special configuration defined in `packages/webapp-libs/webapp-api-client/graphql/codegen.ts`. diff --git a/packages/internal/docs/docs/working-with-sb/payments/one-time-payment-form.mdx b/packages/internal/docs/docs/working-with-sb/payments/one-time-payment-form.mdx index b1dedc421..39033d2bb 100644 --- a/packages/internal/docs/docs/working-with-sb/payments/one-time-payment-form.mdx +++ b/packages/internal/docs/docs/working-with-sb/payments/one-time-payment-form.mdx @@ -102,7 +102,7 @@ If you want to learn more about creating mutations check out You can either restart the dev server or run the following command to re-generate GraphQL types: ```shell -nx run webapp:graphql:generate-types +pnpm nx run webapp:graphql:generate-types ``` ### Create payment intent in web app diff --git a/packages/internal/docs/docs/working-with-sb/project-structure/create-web-lib.mdx b/packages/internal/docs/docs/working-with-sb/project-structure/create-web-lib.mdx index 4157b7ecd..6cdf59d13 100644 --- a/packages/internal/docs/docs/working-with-sb/project-structure/create-web-lib.mdx +++ b/packages/internal/docs/docs/working-with-sb/project-structure/create-web-lib.mdx @@ -17,7 +17,7 @@ A new webapp library needs a few different files, so SaaS Boilerplate comes with Run the following command to generate basic scaffold: ```shell -nx g @sb/tools:webapp-lib --directory webapp-libs mylib +pnpm nx g @sb/tools:webapp-lib --directory webapp-libs mylib ``` - `mylib` should be the name of your library