2023-04-27 19:56:10 +03:00
|
|
|
{
|
|
|
|
"$schema": "./node_modules/nx/schemas/nx-schema.json",
|
|
|
|
"targetDefaults": {
|
|
|
|
"build": {
|
2024-06-14 16:58:01 +03:00
|
|
|
"dependsOn": ["prebuild", "^build"],
|
|
|
|
"inputs": ["production", "^production"],
|
2023-08-29 21:19:54 +03:00
|
|
|
"outputs": [
|
|
|
|
"{projectRoot}/*.tsbuildinfo",
|
|
|
|
"{projectRoot}/*/.tmp",
|
|
|
|
"{projectRoot}/**/*.d.ts",
|
|
|
|
"{projectRoot}/app/i18n",
|
|
|
|
"{projectRoot}/build",
|
|
|
|
"{projectRoot}/dist",
|
|
|
|
"{projectRoot}/lib/senders/emails/css",
|
|
|
|
"{projectRoot}/locale",
|
|
|
|
"{projectRoot}/public",
|
|
|
|
"{projectRoot}/src/styles/*.css",
|
|
|
|
"{projectRoot}/test/**/*.ftl",
|
|
|
|
"{projectRoot}/test/**/client.json"
|
2024-02-12 16:38:32 +03:00
|
|
|
],
|
|
|
|
"cache": true
|
2023-08-29 21:19:54 +03:00
|
|
|
},
|
|
|
|
"build-storybook": {
|
2024-06-14 16:58:01 +03:00
|
|
|
"dependsOn": ["build"],
|
|
|
|
"inputs": ["production", "^production"],
|
|
|
|
"outputs": ["{projectRoot}/storybook-static"],
|
2024-02-12 16:38:32 +03:00
|
|
|
"cache": true
|
2023-08-29 21:19:54 +03:00
|
|
|
},
|
|
|
|
"compile": {
|
2024-06-14 16:58:01 +03:00
|
|
|
"dependsOn": ["^compile"],
|
|
|
|
"inputs": ["typescript", "^typescript"],
|
|
|
|
"outputs": ["{projectRoot}/build", "{projectRoot}/dist"],
|
2024-02-12 16:38:32 +03:00
|
|
|
"cache": true
|
2023-08-29 21:19:54 +03:00
|
|
|
},
|
|
|
|
"gql-copy": {
|
|
|
|
"dependsOn": [
|
|
|
|
{
|
2024-06-14 16:58:01 +03:00
|
|
|
"projects": ["fxa-settings", "fxa-admin-panel"],
|
2023-08-29 21:19:54 +03:00
|
|
|
"target": "gql-extract"
|
|
|
|
}
|
|
|
|
],
|
2024-06-14 16:58:01 +03:00
|
|
|
"inputs": ["typescript", "^typescript"],
|
|
|
|
"outputs": ["{projectRoot}/src/config/gql/allowlist"],
|
2024-02-12 16:38:32 +03:00
|
|
|
"cache": true
|
2023-08-29 21:19:54 +03:00
|
|
|
},
|
|
|
|
"gql-extract": {
|
|
|
|
"dependsOn": [],
|
2024-06-14 16:58:01 +03:00
|
|
|
"inputs": ["typescript"],
|
|
|
|
"outputs": ["{workspaceRoot}/configs/gql/allowlist"],
|
2024-02-12 16:38:32 +03:00
|
|
|
"cache": true
|
2023-04-27 19:56:10 +03:00
|
|
|
},
|
|
|
|
"lint": {
|
2024-06-14 16:58:01 +03:00
|
|
|
"inputs": ["lint", "{workspaceRoot}/.eslintrc.json"],
|
|
|
|
"outputs": ["{projectRoot}/.eslintcache"],
|
2024-02-12 16:38:32 +03:00
|
|
|
"cache": true
|
2023-08-29 21:19:54 +03:00
|
|
|
},
|
|
|
|
"prebuild": {
|
2024-06-14 16:58:01 +03:00
|
|
|
"dependsOn": ["gql-copy"],
|
2023-08-29 21:19:54 +03:00
|
|
|
"inputs": [],
|
|
|
|
"outputs": [
|
|
|
|
"{projectRoot}/public/locales",
|
|
|
|
"{projectRoot}/public/legal-docs",
|
|
|
|
"{projectRoot}/server/config/local.json",
|
|
|
|
"{projectRoot}/var",
|
|
|
|
"{projectRoot}/vendor/ejs.js",
|
2023-08-31 22:24:21 +03:00
|
|
|
"{workspaceRoot}/external/l10n/**/*.@(ftl|po|js|json|sh|py|json)",
|
|
|
|
"{workspaceRoot}/external/legal-docs/**/*.@(md|json)"
|
2024-02-12 16:38:32 +03:00
|
|
|
],
|
|
|
|
"cache": true
|
2023-08-29 21:19:54 +03:00
|
|
|
},
|
|
|
|
"restart": {
|
2024-06-14 16:58:01 +03:00
|
|
|
"dependsOn": ["build", "^restart"],
|
|
|
|
"inputs": ["production", "^production"],
|
2023-08-29 21:19:54 +03:00
|
|
|
"outputs": []
|
|
|
|
},
|
|
|
|
"start": {
|
2024-06-14 16:58:01 +03:00
|
|
|
"dependsOn": ["build", "gen-keys", "^start"],
|
|
|
|
"inputs": ["production", "^production"],
|
2023-08-29 21:19:54 +03:00
|
|
|
"outputs": []
|
|
|
|
},
|
|
|
|
"storybook": {
|
2024-06-14 16:58:01 +03:00
|
|
|
"dependsOn": ["build"],
|
|
|
|
"inputs": ["production", "^production"],
|
|
|
|
"outputs": ["{projectRoot}/storybook-static"]
|
2023-08-29 21:19:54 +03:00
|
|
|
},
|
|
|
|
"test": {
|
2024-06-14 16:58:01 +03:00
|
|
|
"inputs": ["production", "^production"],
|
|
|
|
"dependsOn": ["test-unit", "test-integration", "test-e2e"],
|
2023-08-29 21:19:54 +03:00
|
|
|
"outputs": [
|
|
|
|
"{projectRoot}/coverage",
|
|
|
|
"{projectRoot}/.nyc_output",
|
|
|
|
"{projectRoot}/test-results.xml"
|
2024-02-12 16:38:32 +03:00
|
|
|
],
|
|
|
|
"cache": true
|
2023-08-29 21:19:54 +03:00
|
|
|
},
|
|
|
|
"test-e2e": {
|
2024-06-14 16:58:01 +03:00
|
|
|
"dependsOn": ["build"],
|
|
|
|
"inputs": ["production", "^production"],
|
2023-08-29 21:19:54 +03:00
|
|
|
"outputs": [
|
|
|
|
"{projectRoot}/coverage",
|
|
|
|
"{projectRoot}/.nyc_output",
|
|
|
|
"{projectRoot}/test-results.xml"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"test-integration": {
|
2024-06-14 16:58:01 +03:00
|
|
|
"dependsOn": ["build", "gen-keys"],
|
|
|
|
"inputs": ["test", "^test"],
|
2023-08-29 21:19:54 +03:00
|
|
|
"outputs": [
|
|
|
|
"{projectRoot}/coverage",
|
|
|
|
"{projectRoot}/.nyc_output",
|
|
|
|
"{projectRoot}/test-results.xml",
|
|
|
|
"{projectRoot}/test/scripts/test_output"
|
2024-02-12 16:38:32 +03:00
|
|
|
],
|
|
|
|
"cache": true
|
2023-04-27 19:56:10 +03:00
|
|
|
},
|
2023-08-04 01:38:16 +03:00
|
|
|
"test-unit": {
|
2024-06-14 16:58:01 +03:00
|
|
|
"dependsOn": ["build", "gen-keys"],
|
|
|
|
"inputs": ["test", "^test"],
|
2023-08-29 21:19:54 +03:00
|
|
|
"outputs": [
|
|
|
|
"{projectRoot}/coverage",
|
|
|
|
"{projectRoot}/.nyc_output",
|
|
|
|
"{projectRoot}/test-results.xml"
|
2024-02-12 16:38:32 +03:00
|
|
|
],
|
|
|
|
"cache": true
|
|
|
|
},
|
|
|
|
"@nx/jest:jest": {
|
|
|
|
"cache": true,
|
2024-06-14 16:58:01 +03:00
|
|
|
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
|
2024-02-12 16:38:32 +03:00
|
|
|
"options": {
|
|
|
|
"passWithNoTests": true
|
|
|
|
},
|
|
|
|
"configurations": {
|
|
|
|
"ci": {
|
|
|
|
"ci": true,
|
|
|
|
"codeCoverage": true
|
|
|
|
}
|
|
|
|
}
|
2024-04-06 00:47:28 +03:00
|
|
|
},
|
|
|
|
"@nx/js:tsc": {
|
|
|
|
"cache": true,
|
2024-06-14 16:58:01 +03:00
|
|
|
"dependsOn": ["^build"],
|
|
|
|
"inputs": ["production", "^production"]
|
|
|
|
},
|
|
|
|
"@nx/js:swc": {
|
|
|
|
"cache": true,
|
|
|
|
"dependsOn": ["^build"],
|
|
|
|
"inputs": ["production", "^production"]
|
|
|
|
},
|
|
|
|
"@nx/esbuild:esbuild": {
|
|
|
|
"cache": true,
|
|
|
|
"dependsOn": ["^build"],
|
|
|
|
"inputs": ["production", "^production"]
|
2023-04-27 19:56:10 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"namedInputs": {
|
2024-06-14 16:58:01 +03:00
|
|
|
"default": ["{projectRoot}/**/*.*", "sharedGlobals"],
|
|
|
|
"lint": ["{projectRoot}/**/*.@(js|jsx|ts|tsx)"],
|
2023-04-27 19:56:10 +03:00
|
|
|
"production": [
|
|
|
|
"default",
|
2023-08-31 22:24:21 +03:00
|
|
|
"{workspaceRoot}/external/l10n/**/*.@(ftl|po)",
|
2023-08-29 21:19:54 +03:00
|
|
|
"{workspaceRoot}/external/legal-docs/**/*.md",
|
2023-04-27 19:56:10 +03:00
|
|
|
"!{projectRoot}/.eslintrc.json",
|
2023-08-29 21:19:54 +03:00
|
|
|
"!{projectRoot}/.storybook/**/*",
|
|
|
|
"!{projectRoot}/**/test/**/*",
|
|
|
|
"!{projectRoot}/**/tests/**/*",
|
|
|
|
"!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx)",
|
|
|
|
"!{projectRoot}/**/*.(spec|test).@(js|jsx|ts|tsx)",
|
|
|
|
"!{projectRoot}/jest.config.@(js|ts)",
|
|
|
|
"!{projectRoot}/tsconfig.+(spec|storybook).json"
|
2023-04-27 19:56:10 +03:00
|
|
|
],
|
2023-08-22 23:40:25 +03:00
|
|
|
"sharedGlobals": [
|
|
|
|
{
|
|
|
|
"runtime": "node -v"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"runtime": "tsc -v"
|
|
|
|
}
|
|
|
|
],
|
2024-06-14 16:58:01 +03:00
|
|
|
"test": ["default", "{workspaceRoot}/jest.preset.js"],
|
2023-08-29 21:19:54 +03:00
|
|
|
"typescript": [
|
|
|
|
"{projectRoot}/**/*.@(ts|tsx)",
|
|
|
|
"{projectRoot}/package.json",
|
|
|
|
"{projectRoot}/tsconfig.*",
|
|
|
|
"sharedGlobals"
|
|
|
|
]
|
2023-04-27 19:56:10 +03:00
|
|
|
},
|
|
|
|
"cli": {
|
|
|
|
"packageManager": "yarn"
|
|
|
|
},
|
|
|
|
"workspaceLayout": {
|
|
|
|
"appsDir": "apps",
|
|
|
|
"libsDir": "libs"
|
2023-06-14 21:42:07 +03:00
|
|
|
},
|
|
|
|
"generators": {
|
|
|
|
"@nx/react": {
|
|
|
|
"application": {
|
|
|
|
"babel": true
|
2023-08-17 18:49:05 +03:00
|
|
|
},
|
|
|
|
"library": {
|
|
|
|
"unitTestRunner": "jest"
|
2023-06-14 21:42:07 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"@nx/next": {
|
|
|
|
"application": {
|
|
|
|
"style": "none",
|
|
|
|
"linter": "eslint"
|
|
|
|
}
|
|
|
|
}
|
2024-02-12 16:38:32 +03:00
|
|
|
},
|
2024-04-24 00:39:29 +03:00
|
|
|
"neverConnectToCloud": true,
|
|
|
|
"plugins": [
|
|
|
|
{
|
|
|
|
"plugin": "@nx/eslint/plugin",
|
|
|
|
"options": {
|
|
|
|
"targetName": "lint"
|
|
|
|
}
|
feat(next): update payments-next build and restart
Because:
- Starting and restarting payments-next takes a long time due to always
building the app first, which isn't necessary during development.
- When changes are made to NestApp or its dependencies, these are not
hot reloaded by Next.js, requiring a full Next.js restart.
This commit:
- Adopt Nx plugin for Next.js which more closely aligns with Next.js
standard dev commands.
- Retained Nx Next.js executors for build, since it more closely fits
into the current FxA build and deploy CI logic.
- Added a watcher to NestApp which calls a NestApp restart api, only
available in development, to restart the NestApp on any changes.
- Adds a function to get the NestApp, instead of a const, thus ensuring,
in dev mode, the latest NestApp is always returned.
Closes #FXA-9706
2024-06-07 22:39:06 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"plugin": "@nx/next/plugin",
|
|
|
|
"options": {
|
|
|
|
"startTargetName": "next:start",
|
|
|
|
"buildTargetName": "build",
|
|
|
|
"devTargetName": "dev",
|
|
|
|
"serveStaticTargetName": "serve-static"
|
|
|
|
}
|
2024-04-24 00:39:29 +03:00
|
|
|
}
|
|
|
|
]
|
2023-04-27 19:56:10 +03:00
|
|
|
}
|