@nx/angular 0.0.0-pr-22179-271588f → 0.0.0-pr-26482-ebe2dba
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/executors.d.ts +1 -1
- package/executors.json +9 -9
- package/migrations.json +209 -0
- package/package.json +18 -17
- package/plugins/component-testing.d.ts +2 -2
- package/plugins/component-testing.js +1 -1
- package/src/builders/dev-server/dev-server.impl.js +1 -1
- package/src/builders/dev-server/lib/validate-options.js +1 -1
- package/src/builders/dev-server/schema.json +3 -3
- package/src/builders/module-federation-dev-ssr/module-federation-dev-ssr.impl.js +9 -6
- package/src/builders/module-federation-dev-ssr/schema.json +1 -1
- package/src/builders/utilities/module-federation.d.ts +7 -2
- package/src/builders/utilities/module-federation.js +20 -4
- package/src/builders/webpack-browser/schema.d.ts +2 -2
- package/src/builders/webpack-browser/schema.json +10 -10
- package/src/builders/webpack-browser/webpack-browser.impl.js +2 -8
- package/src/builders/webpack-server/schema.json +13 -13
- package/src/builders/webpack-server/webpack-server.impl.js +3 -5
- package/src/executors/application/application.impl.d.ts +2 -1
- package/src/executors/application/application.impl.js +2 -2
- package/src/executors/application/schema.json +11 -6
- package/src/executors/application/utils/validate-options.js +5 -0
- package/src/executors/browser-esbuild/browser-esbuild.impl.d.ts +2 -7
- package/src/executors/browser-esbuild/browser-esbuild.impl.js +2 -2
- package/src/executors/browser-esbuild/schema.json +8 -8
- package/src/executors/extract-i18n/extract-i18n.impl.js +2 -2
- package/src/executors/module-federation-dev-server/lib/build-static-remotes.js +11 -3
- package/src/executors/module-federation-dev-server/lib/normalize-options.js +1 -0
- package/src/executors/module-federation-dev-server/lib/start-dev-remotes.d.ts +1 -5
- package/src/executors/module-federation-dev-server/lib/start-dev-remotes.js +16 -15
- package/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.js +2 -1
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +16 -8
- package/src/executors/module-federation-dev-server/schema.d.ts +4 -1
- package/src/executors/module-federation-dev-server/schema.json +22 -5
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-packagr.js +6 -6
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/compile-ngc.transform.js +3 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/entry-point/write-package.transform.js +2 -1
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ng-package/options.di.js +3 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ngc/compile-source-files.d.ts +1 -2
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/ngc/compile-source-files.js +5 -4
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/pre-v17/styles/stylesheet-processor.js +12 -12
- package/src/executors/ng-packagr-lite/ng-packagr-adjustments/v17+/ng-package/entry-point/write-package.transform.js +2 -1
- package/src/executors/ng-packagr-lite/ng-packagr-lite.impl.js +1 -1
- package/src/executors/ng-packagr-lite/schema.json +1 -1
- package/src/executors/package/ng-packagr-adjustments/ng-package/entry-point/compile-ngc.transform.js +5 -4
- package/src/executors/package/ng-packagr-adjustments/ng-package/options.di.js +3 -2
- package/src/executors/package/ng-packagr-adjustments/ng-packagr.js +4 -4
- package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.d.ts +1 -2
- package/src/executors/package/ng-packagr-adjustments/ngc/compile-source-files.js +5 -4
- package/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.js +12 -12
- package/src/executors/package/package.impl.js +1 -1
- package/src/executors/package/schema.json +1 -1
- package/src/executors/utilities/esbuild-extensions.d.ts +2 -4
- package/src/executors/utilities/module-loader.d.ts +1 -2
- package/src/executors/utilities/ng-packagr/stylesheet-processor.d.ts +22 -0
- package/src/executors/utilities/ng-packagr/stylesheet-processor.di.d.ts +1 -1
- package/src/executors/utilities/ng-packagr/stylesheet-processor.di.js +7 -1
- package/src/executors/utilities/ng-packagr/stylesheet-processor.js +100 -7
- package/src/executors/utilities/typescript.d.ts +1 -2
- package/src/executors/utilities/typescript.js +4 -3
- package/src/generators/add-linting/add-linting.d.ts +1 -1
- package/src/generators/add-linting/add-linting.js +7 -11
- package/src/generators/add-linting/lib/add-angular-eslint-dependencies.d.ts +2 -2
- package/src/generators/add-linting/lib/add-angular-eslint-dependencies.js +15 -6
- package/src/generators/add-linting/lib/buildable-project.d.ts +2 -0
- package/src/generators/add-linting/lib/buildable-project.js +9 -0
- package/src/generators/add-linting/lib/create-eslint-configuration.d.ts +2 -2
- package/src/generators/add-linting/schema.json +1 -1
- package/src/generators/application/application.js +4 -1
- package/src/generators/application/files/base-pre18/src/favicon.ico +0 -0
- package/src/generators/application/files/ng-module/src/main.ts__tpl__ +3 -1
- package/src/generators/application/files/standalone-components/src/app/app.config.ts__tpl__ +2 -2
- package/src/generators/application/lib/add-e2e.js +9 -6
- package/src/generators/application/lib/add-linting.js +2 -1
- package/src/generators/application/lib/create-files.js +7 -0
- package/src/generators/application/lib/create-project.js +12 -5
- package/src/generators/application/lib/normalize-options.js +15 -1
- package/src/generators/application/lib/normalized-schema.d.ts +3 -0
- package/src/generators/application/schema.json +2 -2
- package/src/generators/component/schema.d.ts +3 -3
- package/src/generators/component/schema.json +2 -2
- package/src/generators/component-test/component-test.js +1 -1
- package/src/generators/convert-to-application-executor/convert-to-application-executor.js +6 -4
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +3 -3
- package/src/generators/directive/schema.d.ts +3 -3
- package/src/generators/directive/schema.json +2 -2
- package/src/generators/federate-module/lib/add-remote.js +2 -1
- package/src/generators/host/host.js +14 -2
- package/src/generators/host/lib/update-ssr-setup.js +9 -7
- package/src/generators/host/schema.json +2 -2
- package/src/generators/library/files/base/package.json__tpl__ +0 -3
- package/src/generators/library/library.js +17 -8
- package/src/generators/ng-add/migrators/builders/angular-devkit-karma.migrator.js +3 -2
- package/src/generators/ng-add/migrators/migrator.d.ts +1 -1
- package/src/generators/ng-add/migrators/migrator.js +7 -7
- package/src/generators/ng-add/migrators/projects/app.migrator.js +2 -2
- package/src/generators/ng-add/migrators/projects/e2e.migrator.js +1 -1
- package/src/generators/ng-add/utilities/validation-logging.js +2 -1
- package/src/generators/ngrx-root-store/ngrx-root-store.js +2 -1
- package/src/generators/pipe/schema.d.ts +3 -3
- package/src/generators/pipe/schema.json +2 -2
- package/src/generators/remote/lib/update-ssr-setup.d.ts +2 -1
- package/src/generators/remote/lib/update-ssr-setup.js +10 -8
- package/src/generators/remote/remote.js +8 -4
- package/src/generators/remote/schema.json +2 -2
- package/src/generators/scam/schema.d.ts +3 -3
- package/src/generators/scam/schema.json +2 -2
- package/src/generators/scam-directive/schema.d.ts +3 -3
- package/src/generators/scam-directive/schema.json +2 -2
- package/src/generators/scam-pipe/schema.d.ts +3 -3
- package/src/generators/scam-pipe/schema.json +2 -2
- package/src/generators/setup-mf/files/ts-webpack/module-federation.config.ts__tmpl__ +1 -1
- package/src/generators/setup-mf/files/webpack/module-federation.config.js__tmpl__ +1 -1
- package/src/generators/setup-mf/lib/add-remote-to-host.d.ts +7 -2
- package/src/generators/setup-mf/lib/add-remote-to-host.js +15 -19
- package/src/generators/setup-mf/lib/fix-bootstrap.d.ts +1 -1
- package/src/generators/setup-mf/lib/fix-bootstrap.js +12 -5
- package/src/generators/setup-mf/lib/generate-config.js +1 -0
- package/src/generators/setup-mf/lib/setup-host-if-dynamic.js +5 -1
- package/src/generators/setup-mf/lib/update-host-app-routes.js +1 -4
- package/src/generators/setup-mf/setup-mf.js +21 -4
- package/src/generators/setup-ssr/files/server/application-builder/__serverFileName__ +4 -3
- package/src/generators/setup-ssr/files/server/server-builder/v17+/__serverFileName__ +4 -3
- package/src/generators/setup-ssr/lib/add-dependencies.js +2 -1
- package/src/generators/setup-ssr/lib/generate-files.js +1 -7
- package/src/generators/setup-ssr/lib/index.d.ts +0 -1
- package/src/generators/setup-ssr/lib/index.js +0 -1
- package/src/generators/setup-ssr/lib/validate-options.js +0 -13
- package/src/generators/setup-ssr/schema.d.ts +1 -0
- package/src/generators/setup-ssr/schema.json +10 -3
- package/src/generators/setup-ssr/setup-ssr.js +3 -4
- package/src/generators/stories/stories.js +3 -2
- package/src/generators/storybook-configuration/lib/generate-stories.js +1 -1
- package/src/generators/storybook-configuration/schema.json +3 -3
- package/src/generators/utils/add-jest.js +1 -2
- package/src/generators/utils/add-mf-env-to-inputs.js +4 -1
- package/src/generators/utils/ensure-angular-dependencies.d.ts +1 -1
- package/src/generators/utils/ensure-angular-dependencies.js +44 -27
- package/src/generators/utils/storybook-ast/tree-utilities.js +2 -1
- package/src/generators/utils/testing.js +0 -17
- package/src/generators/utils/version-utils.d.ts +1 -2
- package/src/generators/utils/version-utils.js +5 -16
- package/src/migrations/update-15-2-0/remove-browserlist-config.d.ts +1 -0
- package/src/migrations/update-15-2-0/remove-browserlist-config.js +2 -1
- package/src/migrations/update-15-2-0/remove-platform-server-exports.js +2 -1
- package/src/migrations/update-15-2-0/update-karma-main-file.js +2 -1
- package/src/migrations/update-16-1-0/remove-render-module-platform-server-exports.js +2 -1
- package/src/migrations/update-16-1-0/update-server-executor-config.js +2 -2
- package/src/migrations/update-18-1-1/fix-target-defaults-inputs.d.ts +2 -0
- package/src/migrations/update-18-1-1/fix-target-defaults-inputs.js +53 -0
- package/src/migrations/update-18-2-0/update-angular-cli.d.ts +3 -0
- package/src/migrations/update-18-2-0/update-angular-cli.js +23 -0
- package/src/migrations/update-19-1-0/update-angular-cli.d.ts +3 -0
- package/src/migrations/update-19-1-0/update-angular-cli.js +23 -0
- package/src/migrations/update-19-2-1/add-typescript-eslint-utils.d.ts +3 -0
- package/src/migrations/update-19-2-1/add-typescript-eslint-utils.js +19 -0
- package/src/utils/backward-compatible-versions.d.ts +10 -5
- package/src/utils/backward-compatible-versions.js +18 -19
- package/src/utils/file-change-recorder.js +2 -1
- package/src/utils/{public-api.d.ts → index.d.ts} +5 -0
- package/src/utils/{public-api.js → index.js} +5 -0
- package/src/utils/mf/utils.js +1 -0
- package/src/utils/mf/with-module-federation-ssr.js +3 -0
- package/src/utils/mf/with-module-federation.js +6 -2
- package/src/utils/version-utils.d.ts +2 -2
- package/src/utils/version-utils.js +2 -1
- package/src/utils/versions.d.ts +6 -5
- package/src/utils/versions.js +7 -6
- package/index.js +0 -8
- package/mf/index.js +0 -7
- package/mf/mf.js +0 -53
- package/src/builders/webpack-server/validate-options.d.ts +0 -2
- package/src/builders/webpack-server/validate-options.js +0 -33
- package/src/executors/utilities/ng-compiler-cli.d.ts +0 -1
- package/src/executors/utilities/ng-compiler-cli.js +0 -8
- package/src/generators/setup-ssr/files/ngmodule/pre-v15-2/src/main.ts__tpl__ +0 -14
- package/src/generators/setup-ssr/lib/update-app-module.d.ts +0 -3
- package/src/generators/setup-ssr/lib/update-app-module.js +0 -27
- package/src/runtime/nx/data-persistence.js +0 -350
- package/testing/index.js +0 -6
- package/testing/src/testing-utils.js +0 -40
- /package/src/generators/application/files/{base/src → base-18+/public}/favicon.ico +0 -0
- /package/src/generators/application/files/{base → base-pre18}/src/assets/.gitkeep__tpl__ +0 -0
- /package/src/generators/setup-ssr/files/ngmodule/{base/src → src}/__main__ +0 -0
- /package/src/generators/setup-ssr/files/ngmodule/{base/src → src}/app/__rootModuleFileName__ +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"outputCapture": "direct-nodejs",
|
|
4
4
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
5
5
|
"title": "Schema for Webpack Browser",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Builds an Angular application using [webpack](https://webpack.js.org/).",
|
|
7
7
|
"examplesFile": "../../../docs/webpack-browser-examples.md",
|
|
8
8
|
"type": "object",
|
|
9
9
|
"presets": [
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"additionalProperties": false
|
|
154
154
|
},
|
|
155
155
|
"optimization": {
|
|
156
|
-
"description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.
|
|
156
|
+
"description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.dev/reference/configs/workspace-config#optimization-configuration.",
|
|
157
157
|
"x-user-analytics": 16,
|
|
158
158
|
"default": true,
|
|
159
159
|
"oneOf": [
|
|
@@ -242,7 +242,7 @@
|
|
|
242
242
|
"default": true
|
|
243
243
|
},
|
|
244
244
|
"sourceMap": {
|
|
245
|
-
"description": "Output source maps for scripts and styles. For more information, see https://angular.
|
|
245
|
+
"description": "Output source maps for scripts and styles. For more information, see https://angular.dev/reference/configs/workspace-config#source-map-configuration.",
|
|
246
246
|
"default": false,
|
|
247
247
|
"oneOf": [
|
|
248
248
|
{
|
|
@@ -292,8 +292,7 @@
|
|
|
292
292
|
},
|
|
293
293
|
"deployUrl": {
|
|
294
294
|
"type": "string",
|
|
295
|
-
"description": "
|
|
296
|
-
"x-deprecated": "Use `baseHref` option, `APP_BASE_HREF` DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url."
|
|
295
|
+
"description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations."
|
|
297
296
|
},
|
|
298
297
|
"verbose": {
|
|
299
298
|
"type": "boolean",
|
|
@@ -499,11 +498,12 @@
|
|
|
499
498
|
},
|
|
500
499
|
"output": {
|
|
501
500
|
"type": "string",
|
|
501
|
+
"default": "",
|
|
502
502
|
"description": "Absolute path within the output."
|
|
503
503
|
}
|
|
504
504
|
},
|
|
505
505
|
"additionalProperties": false,
|
|
506
|
-
"required": ["glob", "input"
|
|
506
|
+
"required": ["glob", "input"]
|
|
507
507
|
},
|
|
508
508
|
{
|
|
509
509
|
"type": "string"
|
|
@@ -517,11 +517,11 @@
|
|
|
517
517
|
"properties": {
|
|
518
518
|
"src": {
|
|
519
519
|
"type": "string",
|
|
520
|
-
"pattern": "\\.(([cm]?
|
|
520
|
+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
|
|
521
521
|
},
|
|
522
522
|
"replaceWith": {
|
|
523
523
|
"type": "string",
|
|
524
|
-
"pattern": "\\.(([cm]?
|
|
524
|
+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
|
|
525
525
|
}
|
|
526
526
|
},
|
|
527
527
|
"additionalProperties": false,
|
|
@@ -532,11 +532,11 @@
|
|
|
532
532
|
"properties": {
|
|
533
533
|
"replace": {
|
|
534
534
|
"type": "string",
|
|
535
|
-
"pattern": "\\.(([cm]?
|
|
535
|
+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
|
|
536
536
|
},
|
|
537
537
|
"with": {
|
|
538
538
|
"type": "string",
|
|
539
|
-
"pattern": "\\.(([cm]?
|
|
539
|
+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
|
|
540
540
|
}
|
|
541
541
|
},
|
|
542
542
|
"additionalProperties": false,
|
|
@@ -4,7 +4,6 @@ exports.executeWebpackBrowserBuilder = void 0;
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const webpack_nx_build_coordination_plugin_1 = require("@nx/webpack/src/plugins/webpack-nx-build-coordination-plugin");
|
|
6
6
|
const fs_1 = require("fs");
|
|
7
|
-
const configuration_1 = require("nx/src/config/configuration");
|
|
8
7
|
const operators_1 = require("nx/src/project-graph/operators");
|
|
9
8
|
const utils_1 = require("nx/src/tasks-runner/utils");
|
|
10
9
|
const path_1 = require("path");
|
|
@@ -13,12 +12,7 @@ const operators_2 = require("rxjs/operators");
|
|
|
13
12
|
const buildable_libs_1 = require("../utilities/buildable-libs");
|
|
14
13
|
const webpack_1 = require("../utilities/webpack");
|
|
15
14
|
function shouldSkipInitialTargetRun(projectGraph, project, target) {
|
|
16
|
-
const
|
|
17
|
-
const defaultDependencyConfigs = Object.entries(nxJson.targetDefaults ?? {}).reduce((acc, [targetName, dependencyConfig]) => {
|
|
18
|
-
acc[targetName] = dependencyConfig.dependsOn;
|
|
19
|
-
return acc;
|
|
20
|
-
}, {});
|
|
21
|
-
const projectDependencyConfigs = (0, utils_1.getDependencyConfigs)({ project, target }, defaultDependencyConfigs, projectGraph);
|
|
15
|
+
const projectDependencyConfigs = (0, utils_1.getDependencyConfigs)({ project, target }, {}, projectGraph);
|
|
22
16
|
// if the task runner already ran the target, skip the initial run
|
|
23
17
|
return projectDependencyConfigs.some((d) => d.target === target && d.projects === 'dependencies');
|
|
24
18
|
}
|
|
@@ -46,7 +40,7 @@ function executeWebpackBrowserBuilder(options, context) {
|
|
|
46
40
|
dependencies = foundDependencies;
|
|
47
41
|
delegateBuilderOptions.tsConfig = (0, devkit_1.normalizePath)((0, path_1.relative)(context.workspaceRoot, tsConfigPath));
|
|
48
42
|
}
|
|
49
|
-
return (0, rxjs_1.from)(
|
|
43
|
+
return (0, rxjs_1.from)(import('@angular-devkit/build-angular')).pipe((0, operators_2.switchMap)(({ executeBrowserBuilder }) => executeBrowserBuilder(delegateBuilderOptions, context, {
|
|
50
44
|
webpackConfiguration: (baseWebpackConfig) => {
|
|
51
45
|
if (!buildLibsFromSource && delegateBuilderOptions.watch) {
|
|
52
46
|
const workspaceDependencies = dependencies
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"outputCapture": "direct-nodejs",
|
|
4
4
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
5
5
|
"title": "Schema for Webpack Server",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Builds a server Angular application using [webpack](https://webpack.js.org/). This executor is a drop-in replacement for the `@angular-devkit/build-angular:server` builder provided by the Angular CLI. It is usually used in tandem with the `@nx/angular:webpack-browser` executor when your Angular application uses a custom webpack configuration.",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
9
|
"assets": {
|
|
10
10
|
"type": "array",
|
|
11
|
-
"description": "List of static application assets.
|
|
11
|
+
"description": "List of static application assets.",
|
|
12
12
|
"default": [],
|
|
13
13
|
"items": {
|
|
14
14
|
"$ref": "#/definitions/assetPattern"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"additionalProperties": false
|
|
46
46
|
},
|
|
47
47
|
"optimization": {
|
|
48
|
-
"description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking and dead-code elimination. For more information, see https://angular.
|
|
48
|
+
"description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking and dead-code elimination. For more information, see https://angular.dev/reference/configs/workspace-config#optimization-configuration.",
|
|
49
49
|
"default": true,
|
|
50
50
|
"x-user-analytics": "ep.ng_optimization",
|
|
51
51
|
"oneOf": [
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"description": "The path where style resources will be placed, relative to outputPath."
|
|
88
88
|
},
|
|
89
89
|
"sourceMap": {
|
|
90
|
-
"description": "Output source maps for scripts and styles. For more information, see https://angular.
|
|
90
|
+
"description": "Output source maps for scripts and styles. For more information, see https://angular.dev/reference/configs/workspace-config#source-map-configuration.",
|
|
91
91
|
"default": false,
|
|
92
92
|
"oneOf": [
|
|
93
93
|
{
|
|
@@ -123,12 +123,11 @@
|
|
|
123
123
|
},
|
|
124
124
|
"deployUrl": {
|
|
125
125
|
"type": "string",
|
|
126
|
-
"description": "
|
|
127
|
-
"x-deprecated": "Use \"baseHref\" browser builder option, \"APP_BASE_HREF\" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url."
|
|
126
|
+
"description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations."
|
|
128
127
|
},
|
|
129
128
|
"vendorChunk": {
|
|
130
129
|
"type": "boolean",
|
|
131
|
-
"description": "Generate a separate bundle containing only vendor libraries. This option should only be used for development to reduce the incremental compilation time.
|
|
130
|
+
"description": "Generate a separate bundle containing only vendor libraries. This option should only be used for development to reduce the incremental compilation time.",
|
|
132
131
|
"default": false
|
|
133
132
|
},
|
|
134
133
|
"verbose": {
|
|
@@ -193,7 +192,7 @@
|
|
|
193
192
|
},
|
|
194
193
|
"buildOptimizer": {
|
|
195
194
|
"type": "boolean",
|
|
196
|
-
"description": "Enables advanced build optimizations.
|
|
195
|
+
"description": "Enables advanced build optimizations.",
|
|
197
196
|
"default": true
|
|
198
197
|
},
|
|
199
198
|
"namedChunks": {
|
|
@@ -272,11 +271,12 @@
|
|
|
272
271
|
},
|
|
273
272
|
"output": {
|
|
274
273
|
"type": "string",
|
|
274
|
+
"default": "",
|
|
275
275
|
"description": "Absolute path within the output."
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
278
|
"additionalProperties": false,
|
|
279
|
-
"required": ["glob", "input"
|
|
279
|
+
"required": ["glob", "input"]
|
|
280
280
|
},
|
|
281
281
|
{
|
|
282
282
|
"type": "string"
|
|
@@ -290,11 +290,11 @@
|
|
|
290
290
|
"properties": {
|
|
291
291
|
"src": {
|
|
292
292
|
"type": "string",
|
|
293
|
-
"pattern": "\\.(([cm]?
|
|
293
|
+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
|
|
294
294
|
},
|
|
295
295
|
"replaceWith": {
|
|
296
296
|
"type": "string",
|
|
297
|
-
"pattern": "\\.(([cm]?
|
|
297
|
+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
|
|
298
298
|
}
|
|
299
299
|
},
|
|
300
300
|
"additionalProperties": false,
|
|
@@ -305,11 +305,11 @@
|
|
|
305
305
|
"properties": {
|
|
306
306
|
"replace": {
|
|
307
307
|
"type": "string",
|
|
308
|
-
"pattern": "\\.(([cm]?
|
|
308
|
+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
|
|
309
309
|
},
|
|
310
310
|
"with": {
|
|
311
311
|
"type": "string",
|
|
312
|
-
"pattern": "\\.(([cm]?
|
|
312
|
+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
|
|
313
313
|
}
|
|
314
314
|
},
|
|
315
315
|
"additionalProperties": false,
|
|
@@ -8,7 +8,6 @@ const rxjs_1 = require("rxjs");
|
|
|
8
8
|
const operators_1 = require("rxjs/operators");
|
|
9
9
|
const buildable_libs_1 = require("../utilities/buildable-libs");
|
|
10
10
|
const webpack_1 = require("../utilities/webpack");
|
|
11
|
-
const validate_options_1 = require("./validate-options");
|
|
12
11
|
function buildServerApp(options, context) {
|
|
13
12
|
const { buildLibsFromSource, customWebpackConfig, ...delegateOptions } = options;
|
|
14
13
|
// If there is a path to custom webpack config
|
|
@@ -22,12 +21,12 @@ function buildServerApp(options, context) {
|
|
|
22
21
|
throw new Error(`Custom Webpack Config File Not Found!\nTo use a custom webpack config, please ensure the path to the custom webpack file is correct: \n${pathToWebpackConfig}`);
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
|
-
return (0, rxjs_1.from)(
|
|
24
|
+
return (0, rxjs_1.from)(import('@angular-devkit/build-angular')).pipe((0, operators_1.switchMap)(({ executeServerBuilder }) => executeServerBuilder(delegateOptions, context)));
|
|
26
25
|
}
|
|
27
26
|
function buildServerAppWithCustomWebpackConfiguration(options, context, pathToWebpackConfig) {
|
|
28
|
-
return (0, rxjs_1.from)(
|
|
27
|
+
return (0, rxjs_1.from)(import('@angular-devkit/build-angular')).pipe((0, operators_1.switchMap)(({ executeServerBuilder }) => executeServerBuilder(options, context, {
|
|
29
28
|
webpackConfiguration: async (baseWebpackConfig) => {
|
|
30
|
-
// Angular
|
|
29
|
+
// Angular auto includes code from @angular/platform-server
|
|
31
30
|
// This includes the code outside the shared scope created by ModuleFederation
|
|
32
31
|
// This code will be included in the generated code from our generators,
|
|
33
32
|
// maintaining it within the shared scope.
|
|
@@ -47,7 +46,6 @@ function buildServerAppWithCustomWebpackConfiguration(options, context, pathToWe
|
|
|
47
46
|
})));
|
|
48
47
|
}
|
|
49
48
|
function executeWebpackServerBuilder(options, context) {
|
|
50
|
-
(0, validate_options_1.validateOptions)(options);
|
|
51
49
|
options.buildLibsFromSource ??= true;
|
|
52
50
|
process.env.NX_BUILD_LIBS_FROM_SOURCE = `${options.buildLibsFromSource}`;
|
|
53
51
|
process.env.NX_BUILD_TARGET = (0, devkit_1.targetToTargetString)({ ...context.target });
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { ExecutorContext } from '@nx/devkit';
|
|
2
2
|
import type { ApplicationExecutorOptions } from './schema';
|
|
3
|
-
|
|
3
|
+
import type { buildApplication as buildApplicationFn } from '@angular-devkit/build-angular';
|
|
4
|
+
export default function applicationExecutor(options: ApplicationExecutorOptions, context: ExecutorContext): ReturnType<typeof buildApplicationFn>;
|
|
@@ -19,11 +19,11 @@ async function* applicationExecutor(options, context) {
|
|
|
19
19
|
const indexHtmlTransformer = indexHtmlTransformerPath
|
|
20
20
|
? await (0, esbuild_extensions_1.loadIndexHtmlTransformer)(indexHtmlTransformerPath, options.tsConfig)
|
|
21
21
|
: undefined;
|
|
22
|
-
const { buildApplication } = await
|
|
22
|
+
const { buildApplication } = await import('@angular-devkit/build-angular');
|
|
23
23
|
const builderContext = await (0, ngcli_adapter_1.createBuilderContext)({
|
|
24
24
|
builderName: 'application',
|
|
25
25
|
description: 'Build an application.',
|
|
26
|
-
optionSchema:
|
|
26
|
+
optionSchema: require('./schema.json'),
|
|
27
27
|
}, context);
|
|
28
28
|
const { version: angularVersion } = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
|
|
29
29
|
if ((0, semver_1.gte)(angularVersion, '17.1.0')) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
3
|
"title": "Schema for Nx Application Executor",
|
|
4
|
-
"description": "Builds an application
|
|
4
|
+
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/) with integrated SSR and prerendering capabilities. _Note: this is only supported in Angular versions >= 17.0.0_.",
|
|
5
5
|
"examplesFile": "../../../docs/application-executor-examples.md",
|
|
6
6
|
"outputCapture": "direct-nodejs",
|
|
7
7
|
"type": "object",
|
|
@@ -35,6 +35,10 @@
|
|
|
35
35
|
"type": "string",
|
|
36
36
|
"description": "The full path for the TypeScript configuration file, relative to the current workspace."
|
|
37
37
|
},
|
|
38
|
+
"deployUrl": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations. _Note: this is only supported in Angular versions >= 17.3.0_."
|
|
41
|
+
},
|
|
38
42
|
"scripts": {
|
|
39
43
|
"description": "Global scripts to be included in the build.",
|
|
40
44
|
"type": "array",
|
|
@@ -141,7 +145,7 @@
|
|
|
141
145
|
"description": "Automatically clear the terminal screen during rebuilds. _Note: this is only supported in Angular versions >= 17.2.0_."
|
|
142
146
|
},
|
|
143
147
|
"optimization": {
|
|
144
|
-
"description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.
|
|
148
|
+
"description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.dev/reference/configs/workspace-config#optimization-configuration.",
|
|
145
149
|
"default": true,
|
|
146
150
|
"x-user-analytics": "ep.ng_optimization",
|
|
147
151
|
"oneOf": [
|
|
@@ -277,7 +281,7 @@
|
|
|
277
281
|
"default": true
|
|
278
282
|
},
|
|
279
283
|
"sourceMap": {
|
|
280
|
-
"description": "Output source maps for scripts and styles. For more information, see https://angular.
|
|
284
|
+
"description": "Output source maps for scripts and styles. For more information, see https://angular.dev/reference/configs/workspace-config#source-map-configuration.",
|
|
281
285
|
"default": false,
|
|
282
286
|
"oneOf": [
|
|
283
287
|
{
|
|
@@ -596,11 +600,12 @@
|
|
|
596
600
|
},
|
|
597
601
|
"output": {
|
|
598
602
|
"type": "string",
|
|
603
|
+
"default": "",
|
|
599
604
|
"description": "Absolute path within the output."
|
|
600
605
|
}
|
|
601
606
|
},
|
|
602
607
|
"additionalProperties": false,
|
|
603
|
-
"required": ["glob", "input"
|
|
608
|
+
"required": ["glob", "input"]
|
|
604
609
|
},
|
|
605
610
|
{
|
|
606
611
|
"type": "string"
|
|
@@ -612,11 +617,11 @@
|
|
|
612
617
|
"properties": {
|
|
613
618
|
"replace": {
|
|
614
619
|
"type": "string",
|
|
615
|
-
"pattern": "\\.(([cm]?
|
|
620
|
+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
|
|
616
621
|
},
|
|
617
622
|
"with": {
|
|
618
623
|
"type": "string",
|
|
619
|
-
"pattern": "\\.(([cm]?
|
|
624
|
+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
|
|
620
625
|
}
|
|
621
626
|
},
|
|
622
627
|
"additionalProperties": false,
|
|
@@ -43,5 +43,10 @@ function validateOptions(options) {
|
|
|
43
43
|
throw new Error(`The "clearScreen" option requires Angular version 17.2.0 or greater. You are currently using version ${angularVersion}.`);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
+
if ((0, semver_1.lt)(angularVersion, '17.3.0')) {
|
|
47
|
+
if (options.deployUrl) {
|
|
48
|
+
throw new Error(`The "deployUrl" option requires Angular version 17.3.0 or greater. You are currently using version ${angularVersion}.`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
46
51
|
}
|
|
47
52
|
exports.validateOptions = validateOptions;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
+
import type { buildEsbuildBrowser as buildEsbuildBrowserFn } from '@angular-devkit/build-angular/src/builders/browser-esbuild';
|
|
1
2
|
import { type ExecutorContext } from '@nx/devkit';
|
|
2
3
|
import type { EsBuildSchema } from './schema';
|
|
3
|
-
export default function esbuildExecutor(options: EsBuildSchema, context: ExecutorContext):
|
|
4
|
-
outputFiles?: import("@angular-devkit/build-angular/src/tools/esbuild/bundler-context").BuildOutputFile[];
|
|
5
|
-
assetFiles?: {
|
|
6
|
-
source: string;
|
|
7
|
-
destination: string;
|
|
8
|
-
}[];
|
|
9
|
-
}, any, undefined>;
|
|
4
|
+
export default function esbuildExecutor(options: EsBuildSchema, context: ExecutorContext): ReturnType<typeof buildEsbuildBrowserFn>;
|
|
@@ -22,11 +22,11 @@ async function* esbuildExecutor(options, context) {
|
|
|
22
22
|
delegateExecutorOptions.tsConfig = tsConfigPath;
|
|
23
23
|
}
|
|
24
24
|
const plugins = await (0, esbuild_extensions_1.loadPlugins)(pluginPaths, options.tsConfig);
|
|
25
|
-
const { buildEsbuildBrowser } =
|
|
25
|
+
const { buildEsbuildBrowser } = require('@angular-devkit/build-angular/src/builders/browser-esbuild');
|
|
26
26
|
const builderContext = await (0, ngcli_adapter_1.createBuilderContext)({
|
|
27
27
|
builderName: 'browser-esbuild',
|
|
28
28
|
description: 'Build a browser application',
|
|
29
|
-
optionSchema:
|
|
29
|
+
optionSchema: require('@angular-devkit/build-angular/src/builders/browser-esbuild/schema.json'),
|
|
30
30
|
}, context);
|
|
31
31
|
return yield* buildEsbuildBrowser(delegateExecutorOptions, builderContext,
|
|
32
32
|
/* infrastructureSettings */ undefined, plugins);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
3
|
"title": "Schema for Nx ESBuild Executor",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "Builds an Angular application using [esbuild](https://esbuild.github.io/).",
|
|
5
5
|
"examplesFile": "../../../docs/browser-esbuild-examples.md",
|
|
6
6
|
"outputCapture": "direct-nodejs",
|
|
7
7
|
"type": "object",
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"default": []
|
|
142
142
|
},
|
|
143
143
|
"optimization": {
|
|
144
|
-
"description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.
|
|
144
|
+
"description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.dev/reference/configs/workspace-config#optimization-configuration.",
|
|
145
145
|
"default": true,
|
|
146
146
|
"x-user-analytics": "ep.ng_optimization",
|
|
147
147
|
"oneOf": [
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
"default": true
|
|
230
230
|
},
|
|
231
231
|
"sourceMap": {
|
|
232
|
-
"description": "Output source maps for scripts and styles. For more information, see https://angular.
|
|
232
|
+
"description": "Output source maps for scripts and styles. For more information, see https://angular.dev/reference/configs/workspace-config#source-map-configuration.",
|
|
233
233
|
"default": false,
|
|
234
234
|
"oneOf": [
|
|
235
235
|
{
|
|
@@ -279,8 +279,7 @@
|
|
|
279
279
|
},
|
|
280
280
|
"deployUrl": {
|
|
281
281
|
"type": "string",
|
|
282
|
-
"description": "
|
|
283
|
-
"x-deprecated": "Use \"baseHref\" option, \"APP_BASE_HREF\" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url."
|
|
282
|
+
"description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations."
|
|
284
283
|
},
|
|
285
284
|
"verbose": {
|
|
286
285
|
"type": "boolean",
|
|
@@ -503,11 +502,12 @@
|
|
|
503
502
|
},
|
|
504
503
|
"output": {
|
|
505
504
|
"type": "string",
|
|
505
|
+
"default": "",
|
|
506
506
|
"description": "Absolute path within the output."
|
|
507
507
|
}
|
|
508
508
|
},
|
|
509
509
|
"additionalProperties": false,
|
|
510
|
-
"required": ["glob", "input"
|
|
510
|
+
"required": ["glob", "input"]
|
|
511
511
|
},
|
|
512
512
|
{
|
|
513
513
|
"type": "string"
|
|
@@ -519,11 +519,11 @@
|
|
|
519
519
|
"properties": {
|
|
520
520
|
"replace": {
|
|
521
521
|
"type": "string",
|
|
522
|
-
"pattern": "\\.(([cm]?
|
|
522
|
+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
|
|
523
523
|
},
|
|
524
524
|
"with": {
|
|
525
525
|
"type": "string",
|
|
526
|
-
"pattern": "\\.(([cm]?
|
|
526
|
+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
|
|
527
527
|
}
|
|
528
528
|
},
|
|
529
529
|
"additionalProperties": false,
|
|
@@ -18,7 +18,7 @@ async function* extractI18nExecutor(options, context) {
|
|
|
18
18
|
const builderContext = await (0, ngcli_adapter_1.createBuilderContext)({
|
|
19
19
|
builderName: 'extrct-i18n',
|
|
20
20
|
description: 'Extracts i18n messages from source code.',
|
|
21
|
-
optionSchema:
|
|
21
|
+
optionSchema: require('./schema.json'),
|
|
22
22
|
}, context);
|
|
23
23
|
/**
|
|
24
24
|
* The Angular CLI extract-i18n builder make some decisions based on the build
|
|
@@ -27,7 +27,7 @@ async function* extractI18nExecutor(options, context) {
|
|
|
27
27
|
* handle `@nx/angular:*` executors.
|
|
28
28
|
*/
|
|
29
29
|
(0, patch_builder_context_1.patchBuilderContext)(builderContext, isUsingEsbuildBuilder, parsedBuildTarget);
|
|
30
|
-
const { executeExtractI18nBuilder } = await
|
|
30
|
+
const { executeExtractI18nBuilder } = await import('@angular-devkit/build-angular');
|
|
31
31
|
const delegateBuilderOptions = getDelegateBuilderOptions(options);
|
|
32
32
|
return await executeExtractI18nBuilder(delegateBuilderOptions, builderContext);
|
|
33
33
|
}
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildStaticRemotes = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
5
|
+
const cache_directory_1 = require("nx/src/utils/cache-directory");
|
|
6
|
+
const node_child_process_1 = require("node:child_process");
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
|
+
const node_fs_1 = require("node:fs");
|
|
6
9
|
async function buildStaticRemotes(staticRemotesConfig, nxBin, context, options) {
|
|
7
10
|
if (!staticRemotesConfig.remotes.length) {
|
|
8
11
|
return;
|
|
@@ -14,7 +17,7 @@ async function buildStaticRemotes(staticRemotesConfig, nxBin, context, options)
|
|
|
14
17
|
process.env.NX_MF_DEV_SERVER_STATIC_REMOTES = JSON.stringify(mappedLocationOfRemotes);
|
|
15
18
|
await new Promise((res) => {
|
|
16
19
|
devkit_1.logger.info(`NX Building ${staticRemotesConfig.remotes.length} static remotes...`);
|
|
17
|
-
const staticProcess = (0,
|
|
20
|
+
const staticProcess = (0, node_child_process_1.fork)(nxBin, [
|
|
18
21
|
'run-many',
|
|
19
22
|
`--target=build`,
|
|
20
23
|
`--projects=${staticRemotesConfig.remotes.join(',')}`,
|
|
@@ -26,9 +29,13 @@ async function buildStaticRemotes(staticRemotesConfig, nxBin, context, options)
|
|
|
26
29
|
cwd: context.root,
|
|
27
30
|
stdio: ['ignore', 'pipe', 'pipe', 'ipc'],
|
|
28
31
|
});
|
|
32
|
+
// File to debug build failures e.g. 2024-01-01T00_00_0_0Z-build.log'
|
|
33
|
+
const remoteBuildLogFile = (0, node_path_1.join)(cache_directory_1.workspaceDataDirectory, `${new Date().toISOString().replace(/[:\.]/g, '_')}-build.log`);
|
|
34
|
+
const stdoutStream = (0, node_fs_1.createWriteStream)(remoteBuildLogFile);
|
|
29
35
|
staticProcess.stdout.on('data', (data) => {
|
|
30
36
|
const ANSII_CODE_REGEX = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
|
|
31
37
|
const stdoutString = data.toString().replace(ANSII_CODE_REGEX, '');
|
|
38
|
+
stdoutStream.write(stdoutString);
|
|
32
39
|
if (stdoutString.includes('Successfully ran target build')) {
|
|
33
40
|
staticProcess.stdout.removeAllListeners('data');
|
|
34
41
|
devkit_1.logger.info(`NX Built ${staticRemotesConfig.remotes.length} static remotes`);
|
|
@@ -37,8 +44,9 @@ async function buildStaticRemotes(staticRemotesConfig, nxBin, context, options)
|
|
|
37
44
|
});
|
|
38
45
|
staticProcess.stderr.on('data', (data) => devkit_1.logger.info(data.toString()));
|
|
39
46
|
staticProcess.on('exit', (code) => {
|
|
47
|
+
stdoutStream.end();
|
|
40
48
|
if (code !== 0) {
|
|
41
|
-
throw new Error(`
|
|
49
|
+
throw new Error(`Remote failed to start. A complete log can be found in: ${remoteBuildLogFile}`);
|
|
42
50
|
}
|
|
43
51
|
});
|
|
44
52
|
process.on('SIGTERM', () => staticProcess.kill('SIGTERM'));
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { type Schema } from '../schema';
|
|
2
2
|
import { type ExecutorContext, type ProjectConfiguration } from '@nx/devkit';
|
|
3
|
-
export declare function
|
|
4
|
-
remotePorts: any[];
|
|
5
|
-
staticRemotes: string[];
|
|
6
|
-
devRemotes: string[];
|
|
7
|
-
}, workspaceProjects: Record<string, ProjectConfiguration>, options: Schema, context: ExecutorContext): Promise<AsyncIterable<{
|
|
3
|
+
export declare function startRemotes(remotes: string[], workspaceProjects: Record<string, ProjectConfiguration>, options: Schema, context: ExecutorContext, target?: 'serve' | 'serve-static'): Promise<AsyncIterable<{
|
|
8
4
|
success: boolean;
|
|
9
5
|
}>[]>;
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.startRemotes = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
async function
|
|
6
|
-
const
|
|
7
|
-
for (const app of remotes
|
|
8
|
-
if (!workspaceProjects[app].targets?.[
|
|
9
|
-
throw new Error(`Could not find "
|
|
5
|
+
async function startRemotes(remotes, workspaceProjects, options, context, target = 'serve') {
|
|
6
|
+
const remoteIters = [];
|
|
7
|
+
for (const app of remotes) {
|
|
8
|
+
if (!workspaceProjects[app].targets?.[target]) {
|
|
9
|
+
throw new Error(`Could not find "${target}" target in "${app}" project.`);
|
|
10
10
|
}
|
|
11
|
-
else if (!workspaceProjects[app].targets?.[
|
|
12
|
-
throw new Error(`Could not find executor for "
|
|
11
|
+
else if (!workspaceProjects[app].targets?.[target].executor) {
|
|
12
|
+
throw new Error(`Could not find executor for "${target}" target in "${app}" project.`);
|
|
13
13
|
}
|
|
14
|
-
const [collection, executor] = workspaceProjects[app].targets[
|
|
14
|
+
const [collection, executor] = workspaceProjects[app].targets[target].executor.split(':');
|
|
15
15
|
const isUsingModuleFederationDevServerExecutor = executor.includes('module-federation-dev-server');
|
|
16
|
-
|
|
16
|
+
const configurationOverride = options.devRemotes.find((r) => typeof r !== 'string' && r.remoteName === app)?.configuration;
|
|
17
|
+
remoteIters.push(await (0, devkit_1.runExecutor)({
|
|
17
18
|
project: app,
|
|
18
|
-
target
|
|
19
|
-
configuration: context.configurationName,
|
|
19
|
+
target,
|
|
20
|
+
configuration: configurationOverride ?? context.configurationName,
|
|
20
21
|
}, {
|
|
21
|
-
verbose: options.verbose ?? false,
|
|
22
|
+
...(target === 'serve' ? { verbose: options.verbose ?? false } : {}),
|
|
22
23
|
...(isUsingModuleFederationDevServerExecutor
|
|
23
24
|
? { isInitialHost: false }
|
|
24
25
|
: {}),
|
|
25
26
|
}, context));
|
|
26
27
|
}
|
|
27
|
-
return
|
|
28
|
+
return remoteIters;
|
|
28
29
|
}
|
|
29
|
-
exports.
|
|
30
|
+
exports.startRemotes = startRemotes;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.startStaticRemotesFileServer = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const file_server_impl_1 = require("@nx/web/src/executors/file-server/file-server.impl");
|
|
6
|
+
const file_server_impl_1 = tslib_1.__importDefault(require("@nx/web/src/executors/file-server/file-server.impl"));
|
|
6
7
|
const path_1 = require("path");
|
|
7
8
|
const fs_1 = require("fs");
|
|
8
9
|
function startStaticRemotesFileServer(staticRemotesConfig, context, options) {
|