2023-06-14 21:42:07 +03:00
|
|
|
{
|
|
|
|
"name": "payments-next",
|
|
|
|
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
|
|
|
"sourceRoot": "apps/payments/next",
|
|
|
|
"projectType": "application",
|
|
|
|
"targets": {
|
|
|
|
"build": {
|
|
|
|
"executor": "@nx/next:build",
|
|
|
|
"outputs": ["{options.outputPath}"],
|
|
|
|
"defaultConfiguration": "production",
|
|
|
|
"options": {
|
|
|
|
"outputPath": "dist/apps/payments/next",
|
|
|
|
"postcssConfig": "apps/payments/next/postcss.config.js"
|
|
|
|
},
|
2024-08-09 19:28:49 +03:00
|
|
|
"dependsOn": ["l10n-bundle", "glean-generate"]
|
2023-06-14 21:42:07 +03:00
|
|
|
},
|
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
|
|
|
"dev": {
|
2023-06-14 21:42:07 +03:00
|
|
|
"options": {
|
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
|
|
|
"port": 3035
|
2023-06-14 21:42:07 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"export": {
|
|
|
|
"executor": "@nx/next:export",
|
|
|
|
"options": {
|
|
|
|
"buildTarget": "payments-next:build:production"
|
|
|
|
}
|
|
|
|
},
|
2023-08-04 01:38:16 +03:00
|
|
|
"test-unit": {
|
2023-06-14 21:42:07 +03:00
|
|
|
"executor": "@nx/jest:jest",
|
|
|
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
|
|
|
"options": {
|
2024-02-12 16:38:32 +03:00
|
|
|
"jestConfig": "apps/payments/next/jest.config.ts"
|
2023-06-14 21:42:07 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"lint": {
|
|
|
|
"executor": "@nx/linter:eslint",
|
|
|
|
"outputs": ["{options.outputFile}"],
|
|
|
|
"options": {
|
|
|
|
"lintFilePatterns": ["apps/payments/next/**/*.{ts,tsx,js,jsx}"]
|
2024-08-09 19:28:49 +03:00
|
|
|
},
|
|
|
|
"dependsOn": ["glean-lint"]
|
2023-06-14 21:42:07 +03:00
|
|
|
},
|
|
|
|
"start": {
|
2024-07-26 19:58:05 +03:00
|
|
|
"command": "pm2 start apps/payments/next/pm2.config.js && yarn check:url localhost:3035/__heartbeat__"
|
2023-06-14 21:42:07 +03:00
|
|
|
},
|
|
|
|
"stop": {
|
|
|
|
"command": "pm2 stop apps/payments/next/pm2.config.js"
|
|
|
|
},
|
|
|
|
"restart": {
|
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
|
|
|
"command": "pm2 restart apps/payments/next/pm2.config.js",
|
|
|
|
"dependsOn": [""]
|
2023-06-14 21:42:07 +03:00
|
|
|
},
|
|
|
|
"delete": {
|
|
|
|
"command": "pm2 delete apps/payments/next/pm2.config.js"
|
2023-07-28 20:01:17 +03:00
|
|
|
},
|
2024-03-06 22:51:14 +03:00
|
|
|
"l10n-merge": {
|
2024-03-22 00:00:19 +03:00
|
|
|
"dependsOn": ["l10n-convert"],
|
2024-03-06 22:51:14 +03:00
|
|
|
"command": "yarn grunt --gruntfile='apps/payments/next/Gruntfile.js' merge-ftl"
|
|
|
|
},
|
2024-03-14 17:41:02 +03:00
|
|
|
"l10n-prime": {
|
|
|
|
"command": "./_scripts/l10n/prime.sh apps/payments/next"
|
|
|
|
},
|
|
|
|
"l10n-bundle": {
|
2024-03-21 00:15:51 +03:00
|
|
|
"dependsOn": ["l10n-merge"],
|
2024-03-14 17:41:02 +03:00
|
|
|
"command": "./_scripts/l10n/bundle.sh apps/payments/next branding,react,payments"
|
|
|
|
},
|
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
|
|
|
"watchers": {
|
|
|
|
"command": "yarn grunt --gruntfile='apps/payments/next/Gruntfile.js' watchers"
|
2024-03-21 00:15:51 +03:00
|
|
|
},
|
2024-03-22 00:00:19 +03:00
|
|
|
"l10n-convert": {
|
|
|
|
"dependsOn": ["l10n-prime"],
|
|
|
|
"command": "node -r esbuild-register apps/payments/next/app/_lib/scripts/convert.ts"
|
|
|
|
},
|
2024-08-09 19:28:49 +03:00
|
|
|
"glean-generate": {
|
|
|
|
"dependsOn": ["glean-lint"],
|
2024-09-10 22:26:29 +03:00
|
|
|
"command": "yarn glean translate libs/shared/metrics/glean/src/registry/subplat-backend-metrics.yaml -f typescript_server -o libs/payments/metrics/src/lib/glean/__generated__"
|
2024-08-09 19:28:49 +03:00
|
|
|
},
|
|
|
|
"glean-lint": {
|
|
|
|
"command": "yarn glean glinter libs/shared/metrics/glean/src/registry/subplat-backend-metrics.yaml"
|
|
|
|
},
|
2023-07-28 20:01:17 +03:00
|
|
|
"storybook": {
|
|
|
|
"executor": "@nx/storybook:storybook",
|
|
|
|
"options": {
|
|
|
|
"port": 4400,
|
|
|
|
"configDir": "apps/payments/next/.storybook"
|
|
|
|
},
|
|
|
|
"configurations": {
|
|
|
|
"ci": {
|
|
|
|
"quiet": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"build-storybook": {
|
|
|
|
"executor": "@nx/storybook:build",
|
|
|
|
"outputs": ["{options.outputDir}"],
|
|
|
|
"options": {
|
|
|
|
"outputDir": "dist/storybook/payments-next",
|
|
|
|
"configDir": "apps/payments/next/.storybook"
|
|
|
|
},
|
|
|
|
"configurations": {
|
|
|
|
"ci": {
|
|
|
|
"quiet": true
|
|
|
|
}
|
|
|
|
}
|
2023-06-14 21:42:07 +03:00
|
|
|
}
|
|
|
|
},
|
2024-05-30 19:40:52 +03:00
|
|
|
"tags": ["app", "payments", "type:sp3"]
|
2023-06-14 21:42:07 +03:00
|
|
|
}
|