@nx/angular 19.1.0-canary.20240523-261b0ff → 19.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/executors.json +1 -1
- package/migrations.json +82 -0
- package/package.json +12 -12
- package/src/builders/dev-server/dev-server.impl.js +1 -1
- package/src/builders/dev-server/schema.json +1 -1
- package/src/builders/module-federation-dev-ssr/module-federation-dev-ssr.impl.js +4 -1
- package/src/builders/utilities/module-federation.d.ts +2 -1
- package/src/builders/utilities/module-federation.js +17 -3
- package/src/builders/webpack-browser/schema.json +4 -3
- package/src/builders/webpack-browser/webpack-browser.impl.js +1 -1
- package/src/builders/webpack-server/schema.json +7 -6
- 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 +4 -3
- 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 +4 -3
- package/src/executors/extract-i18n/extract-i18n.impl.js +2 -2
- 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 +8 -4
- package/src/executors/module-federation-dev-server/schema.json +1 -1
- 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 +2 -1
- 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 +11 -11
- 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/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 +2 -1
- 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 +11 -11
- 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.js +22 -8
- package/src/executors/utilities/typescript.d.ts +1 -2
- package/src/executors/utilities/typescript.js +4 -3
- 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/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-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/component-test/component-test.js +1 -1
- package/src/generators/cypress-component-configuration/cypress-component-configuration.js +3 -3
- package/src/generators/federate-module/lib/add-remote.js +2 -1
- package/src/generators/host/host.js +3 -2
- package/src/generators/library/library.js +4 -3
- 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/setup-mf/lib/add-remote-to-host.js +13 -4
- 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/setup-host-if-dynamic.js +5 -1
- package/src/generators/setup-mf/setup-mf.js +1 -1
- 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.json +4 -3
- package/src/generators/setup-ssr/setup-ssr.js +0 -3
- package/src/generators/stories/stories.js +3 -2
- package/src/generators/storybook-configuration/lib/generate-stories.js +1 -1
- package/src/generators/utils/storybook-ast/tree-utilities.js +2 -1
- package/src/generators/utils/version-utils.js +4 -3
- package/src/migrations/update-15-2-0/remove-browserlist-config.js +1 -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-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/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/mf/with-module-federation.js +3 -2
- package/src/utils/version-utils.d.ts +2 -2
- package/src/utils/version-utils.js +2 -1
- package/src/utils/versions.d.ts +4 -4
- package/src/utils/versions.js +4 -4
- 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
@@ -2,57 +2,56 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.backwardCompatibleVersions = void 0;
|
4
4
|
exports.backwardCompatibleVersions = {
|
5
|
-
|
6
|
-
angularVersion: '~
|
7
|
-
angularDevkitVersion: '~
|
8
|
-
ngPackagrVersion: '~
|
9
|
-
ngrxVersion: '~
|
5
|
+
angularV16: {
|
6
|
+
angularVersion: '~16.2.0',
|
7
|
+
angularDevkitVersion: '~16.2.0',
|
8
|
+
ngPackagrVersion: '~16.2.0',
|
9
|
+
ngrxVersion: '~16.0.0',
|
10
10
|
rxjsVersion: '~7.8.0',
|
11
|
-
zoneJsVersion: '~0.
|
11
|
+
zoneJsVersion: '~0.13.0',
|
12
12
|
angularJsVersion: '1.7.9',
|
13
13
|
tsLibVersion: '^2.3.0',
|
14
|
-
ngUniversalVersion: '~
|
14
|
+
ngUniversalVersion: '~16.2.0',
|
15
15
|
corsVersion: '~2.8.5',
|
16
16
|
typesCorsVersion: '~2.8.5',
|
17
17
|
expressVersion: '~4.18.2',
|
18
18
|
typesExpressVersion: '4.17.14',
|
19
19
|
browserSyncVersion: '^3.0.0',
|
20
20
|
moduleFederationNodeVersion: '~1.0.5',
|
21
|
-
angularEslintVersion: '~
|
21
|
+
angularEslintVersion: '~16.0.0',
|
22
22
|
tailwindVersion: '^3.0.2',
|
23
23
|
postcssVersion: '^8.4.5',
|
24
24
|
postcssUrlVersion: '~10.1.3',
|
25
25
|
autoprefixerVersion: '^10.4.0',
|
26
26
|
tsNodeVersion: '10.9.1',
|
27
|
-
jestPresetAngularVersion: '~13.
|
27
|
+
jestPresetAngularVersion: '~13.1.0',
|
28
28
|
typesNodeVersion: '16.11.7',
|
29
29
|
jasmineMarblesVersion: '^0.9.2',
|
30
30
|
jsoncEslintParserVersion: '^2.1.0',
|
31
31
|
},
|
32
|
-
|
33
|
-
angularVersion: '~
|
34
|
-
angularDevkitVersion: '~
|
35
|
-
ngPackagrVersion: '~
|
36
|
-
ngrxVersion: '~
|
32
|
+
angularV17: {
|
33
|
+
angularVersion: '~17.3.0',
|
34
|
+
angularDevkitVersion: '~17.3.0',
|
35
|
+
ngPackagrVersion: '~17.3.0',
|
36
|
+
ngrxVersion: '~17.0.0',
|
37
37
|
rxjsVersion: '~7.8.0',
|
38
|
-
zoneJsVersion: '~0.
|
38
|
+
zoneJsVersion: '~0.14.3',
|
39
39
|
angularJsVersion: '1.7.9',
|
40
40
|
tsLibVersion: '^2.3.0',
|
41
|
-
ngUniversalVersion: '~16.2.0',
|
42
41
|
corsVersion: '~2.8.5',
|
43
42
|
typesCorsVersion: '~2.8.5',
|
44
43
|
expressVersion: '~4.18.2',
|
45
44
|
typesExpressVersion: '4.17.14',
|
46
45
|
browserSyncVersion: '^3.0.0',
|
47
46
|
moduleFederationNodeVersion: '~1.0.5',
|
48
|
-
angularEslintVersion: '~
|
47
|
+
angularEslintVersion: '~17.3.0',
|
49
48
|
tailwindVersion: '^3.0.2',
|
50
49
|
postcssVersion: '^8.4.5',
|
51
50
|
postcssUrlVersion: '~10.1.3',
|
52
51
|
autoprefixerVersion: '^10.4.0',
|
53
52
|
tsNodeVersion: '10.9.1',
|
54
|
-
jestPresetAngularVersion: '~
|
55
|
-
typesNodeVersion: '16.
|
53
|
+
jestPresetAngularVersion: '~14.0.3',
|
54
|
+
typesNodeVersion: '18.16.9',
|
56
55
|
jasmineMarblesVersion: '^0.9.2',
|
57
56
|
jsoncEslintParserVersion: '^2.1.0',
|
58
57
|
},
|
@@ -1,7 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.FileChangeRecorder = void 0;
|
4
|
-
const
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const magic_string_1 = tslib_1.__importDefault(require("magic-string"));
|
5
6
|
class FileChangeRecorder {
|
6
7
|
get content() {
|
7
8
|
return this.mutableContent.toString();
|
@@ -1,8 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.withModuleFederation = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
4
5
|
const utils_1 = require("./utils");
|
5
|
-
const
|
6
|
+
const ModuleFederationPlugin_1 = tslib_1.__importDefault(require("webpack/lib/container/ModuleFederationPlugin"));
|
6
7
|
async function withModuleFederation(options) {
|
7
8
|
if (global.NX_GRAPH_CREATION) {
|
8
9
|
return (config) => config;
|
@@ -32,7 +33,7 @@ async function withModuleFederation(options) {
|
|
32
33
|
},
|
33
34
|
plugins: [
|
34
35
|
...(config.plugins ?? []),
|
35
|
-
new
|
36
|
+
new ModuleFederationPlugin_1.default({
|
36
37
|
name: options.name,
|
37
38
|
filename: 'remoteEntry.mjs',
|
38
39
|
exposes: options.exposes,
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import type {
|
2
|
-
export declare function getPkgVersionForAngularMajorVersion(pkgVersionName:
|
1
|
+
import type { PackageCompatVersions, PackageLatestVersions, PackageVersionNames } from './backward-compatible-versions';
|
2
|
+
export declare function getPkgVersionForAngularMajorVersion(pkgVersionName: PackageVersionNames, angularMajorVersion: number): string;
|
3
3
|
export declare function getPkgVersionsForAngularMajorVersion(angularMajorVersion: number): PackageLatestVersions | PackageCompatVersions;
|
@@ -1,9 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.getPkgVersionsForAngularMajorVersion = exports.getPkgVersionForAngularMajorVersion = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
4
5
|
const semver_1 = require("semver");
|
5
6
|
const backward_compatible_versions_1 = require("./backward-compatible-versions");
|
6
|
-
const versions = require("./versions");
|
7
|
+
const versions = tslib_1.__importStar(require("./versions"));
|
7
8
|
const versions_1 = require("./versions");
|
8
9
|
function getPkgVersionForAngularMajorVersion(pkgVersionName, angularMajorVersion) {
|
9
10
|
return angularMajorVersion < (0, semver_1.major)((0, semver_1.coerce)(versions_1.angularVersion))
|
package/src/utils/versions.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
export declare const nxVersion: any;
|
2
|
-
export declare const angularVersion = "~
|
3
|
-
export declare const angularDevkitVersion = "~
|
4
|
-
export declare const ngPackagrVersion = "~
|
2
|
+
export declare const angularVersion = "~18.0.0";
|
3
|
+
export declare const angularDevkitVersion = "~18.0.0";
|
4
|
+
export declare const ngPackagrVersion = "~18.0.0";
|
5
5
|
export declare const ngrxVersion = "~17.0.0";
|
6
6
|
export declare const rxjsVersion = "~7.8.0";
|
7
7
|
export declare const zoneJsVersion = "~0.14.3";
|
@@ -19,7 +19,7 @@ export declare const postcssVersion = "^8.4.5";
|
|
19
19
|
export declare const postcssUrlVersion = "~10.1.3";
|
20
20
|
export declare const autoprefixerVersion = "^10.4.0";
|
21
21
|
export declare const tsNodeVersion = "10.9.1";
|
22
|
-
export declare const jestPresetAngularVersion = "~14.0
|
22
|
+
export declare const jestPresetAngularVersion = "~14.1.0";
|
23
23
|
export declare const typesNodeVersion = "18.16.9";
|
24
24
|
export declare const jasmineMarblesVersion = "^0.9.2";
|
25
25
|
export declare const jsoncEslintParserVersion = "^2.1.0";
|
package/src/utils/versions.js
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.jsoncEslintParserVersion = exports.jasmineMarblesVersion = exports.typesNodeVersion = exports.jestPresetAngularVersion = exports.tsNodeVersion = exports.autoprefixerVersion = exports.postcssUrlVersion = exports.postcssVersion = exports.tailwindVersion = exports.angularEslintVersion = exports.moduleFederationNodeVersion = exports.browserSyncVersion = exports.typesExpressVersion = exports.expressVersion = exports.typesCorsVersion = exports.corsVersion = exports.tsLibVersion = exports.angularJsVersion = exports.zoneJsVersion = exports.rxjsVersion = exports.ngrxVersion = exports.ngPackagrVersion = exports.angularDevkitVersion = exports.angularVersion = exports.nxVersion = void 0;
|
4
4
|
exports.nxVersion = require('../../package.json').version;
|
5
|
-
exports.angularVersion = '~
|
6
|
-
exports.angularDevkitVersion = '~
|
7
|
-
exports.ngPackagrVersion = '~
|
5
|
+
exports.angularVersion = '~18.0.0';
|
6
|
+
exports.angularDevkitVersion = '~18.0.0';
|
7
|
+
exports.ngPackagrVersion = '~18.0.0';
|
8
8
|
exports.ngrxVersion = '~17.0.0';
|
9
9
|
exports.rxjsVersion = '~7.8.0';
|
10
10
|
exports.zoneJsVersion = '~0.14.3';
|
@@ -22,7 +22,7 @@ exports.postcssVersion = '^8.4.5';
|
|
22
22
|
exports.postcssUrlVersion = '~10.1.3';
|
23
23
|
exports.autoprefixerVersion = '^10.4.0';
|
24
24
|
exports.tsNodeVersion = '10.9.1';
|
25
|
-
exports.jestPresetAngularVersion = '~14.0
|
25
|
+
exports.jestPresetAngularVersion = '~14.1.0';
|
26
26
|
exports.typesNodeVersion = '18.16.9';
|
27
27
|
exports.jasmineMarblesVersion = '^0.9.2';
|
28
28
|
exports.jsoncEslintParserVersion = '^2.1.0';
|
package/index.js
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.pessimisticUpdate = exports.optimisticUpdate = exports.navigation = exports.fetch = void 0;
|
4
|
-
var data_persistence_1 = require("./src/runtime/nx/data-persistence");
|
5
|
-
Object.defineProperty(exports, "fetch", { enumerable: true, get: function () { return data_persistence_1.fetch; } });
|
6
|
-
Object.defineProperty(exports, "navigation", { enumerable: true, get: function () { return data_persistence_1.navigation; } });
|
7
|
-
Object.defineProperty(exports, "optimisticUpdate", { enumerable: true, get: function () { return data_persistence_1.optimisticUpdate; } });
|
8
|
-
Object.defineProperty(exports, "pessimisticUpdate", { enumerable: true, get: function () { return data_persistence_1.pessimisticUpdate; } });
|
package/mf/index.js
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.loadRemoteModule = exports.setRemoteDefinitions = exports.setRemoteUrlResolver = void 0;
|
4
|
-
var mf_1 = require("./mf");
|
5
|
-
Object.defineProperty(exports, "setRemoteUrlResolver", { enumerable: true, get: function () { return mf_1.setRemoteUrlResolver; } });
|
6
|
-
Object.defineProperty(exports, "setRemoteDefinitions", { enumerable: true, get: function () { return mf_1.setRemoteDefinitions; } });
|
7
|
-
Object.defineProperty(exports, "loadRemoteModule", { enumerable: true, get: function () { return mf_1.loadRemoteModule; } });
|
package/mf/mf.js
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.loadRemoteModule = exports.setRemoteDefinitions = exports.setRemoteUrlResolver = void 0;
|
4
|
-
let resolveRemoteUrl;
|
5
|
-
function setRemoteUrlResolver(_resolveRemoteUrl) {
|
6
|
-
resolveRemoteUrl = _resolveRemoteUrl;
|
7
|
-
}
|
8
|
-
exports.setRemoteUrlResolver = setRemoteUrlResolver;
|
9
|
-
let remoteUrlDefinitions;
|
10
|
-
function setRemoteDefinitions(definitions) {
|
11
|
-
remoteUrlDefinitions = definitions;
|
12
|
-
}
|
13
|
-
exports.setRemoteDefinitions = setRemoteDefinitions;
|
14
|
-
let remoteModuleMap = new Map();
|
15
|
-
let remoteContainerMap = new Map();
|
16
|
-
async function loadRemoteModule(remoteName, moduleName) {
|
17
|
-
const remoteModuleKey = `${remoteName}:${moduleName}`;
|
18
|
-
if (remoteModuleMap.has(remoteModuleKey)) {
|
19
|
-
return remoteModuleMap.get(remoteModuleKey);
|
20
|
-
}
|
21
|
-
const container = remoteContainerMap.has(remoteName)
|
22
|
-
? remoteContainerMap.get(remoteName)
|
23
|
-
: await loadRemoteContainer(remoteName);
|
24
|
-
const factory = await container.get(moduleName);
|
25
|
-
const Module = factory();
|
26
|
-
remoteModuleMap.set(remoteModuleKey, Module);
|
27
|
-
return Module;
|
28
|
-
}
|
29
|
-
exports.loadRemoteModule = loadRemoteModule;
|
30
|
-
function loadModule(url) {
|
31
|
-
return Promise.resolve(`${url}`).then(s => require(s));
|
32
|
-
}
|
33
|
-
let initialSharingScopeCreated = false;
|
34
|
-
async function loadRemoteContainer(remoteName) {
|
35
|
-
if (!resolveRemoteUrl && !remoteUrlDefinitions) {
|
36
|
-
throw new Error('Call setRemoteDefinitions or setRemoteUrlResolver to allow Dynamic Federation to find the remote apps correctly.');
|
37
|
-
}
|
38
|
-
if (!initialSharingScopeCreated) {
|
39
|
-
initialSharingScopeCreated = true;
|
40
|
-
await __webpack_init_sharing__('default');
|
41
|
-
}
|
42
|
-
const remoteUrl = remoteUrlDefinitions
|
43
|
-
? remoteUrlDefinitions[remoteName]
|
44
|
-
: await resolveRemoteUrl(remoteName);
|
45
|
-
let containerUrl = remoteUrl;
|
46
|
-
if (!remoteUrl.endsWith('.mjs') && !remoteUrl.endsWith('.js')) {
|
47
|
-
containerUrl = `${remoteUrl}${remoteUrl.endsWith('/') ? '' : '/'}remoteEntry.mjs`;
|
48
|
-
}
|
49
|
-
const container = await loadModule(containerUrl);
|
50
|
-
await container.init(__webpack_share_scopes__.default);
|
51
|
-
remoteContainerMap.set(remoteName, container);
|
52
|
-
return container;
|
53
|
-
}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.validateOptions = void 0;
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
5
|
-
const semver_1 = require("semver");
|
6
|
-
const angular_version_utils_1 = require("../../executors/utilities/angular-version-utils");
|
7
|
-
function validateOptions(options) {
|
8
|
-
const angularVersionInfo = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
|
9
|
-
validateAssets(options, angularVersionInfo);
|
10
|
-
validateBuildOptimizer(options, angularVersionInfo);
|
11
|
-
validateVendorChunk(options, angularVersionInfo);
|
12
|
-
}
|
13
|
-
exports.validateOptions = validateOptions;
|
14
|
-
function validateAssets(options, { version }) {
|
15
|
-
if ((0, semver_1.lt)(version, '15.1.0') &&
|
16
|
-
Array.isArray(options.assets) &&
|
17
|
-
options.assets.length > 0) {
|
18
|
-
throw new Error((0, devkit_1.stripIndents) `The "assets" option is supported from Angular >= 15.1.0. You are currently using "${version}".
|
19
|
-
You can resolve this error by removing the "assets" option or by migrating to Angular 15.1.0.`);
|
20
|
-
}
|
21
|
-
}
|
22
|
-
function validateBuildOptimizer(options, { major, version }) {
|
23
|
-
if (major < 16 && options.buildOptimizer) {
|
24
|
-
throw new Error((0, devkit_1.stripIndents) `The "buildOptimizer" option is supported from Angular >= 16.0.0. You are currently using "${version}".
|
25
|
-
You can resolve this error by removing the "buildOptimizer" option.`);
|
26
|
-
}
|
27
|
-
}
|
28
|
-
function validateVendorChunk(options, { version }) {
|
29
|
-
if ((0, semver_1.lt)(version, '15.1.0') && options.vendorChunk) {
|
30
|
-
throw new Error((0, devkit_1.stripIndents) `The "vendorChunk" option is supported from Angular >= 15.1.0. You are currently using "${version}".
|
31
|
-
You can resolve this error by removing the "vendorChunk" option or by migrating to Angular 15.1.0.`);
|
32
|
-
}
|
33
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function ngCompilerCli(): Promise<typeof import('@angular/compiler-cli')>;
|
@@ -1,8 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.ngCompilerCli = void 0;
|
4
|
-
const module_loader_1 = require("./module-loader");
|
5
|
-
function ngCompilerCli() {
|
6
|
-
return (0, module_loader_1.loadEsmModule)('@angular/compiler-cli');
|
7
|
-
}
|
8
|
-
exports.ngCompilerCli = ngCompilerCli;
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
2
|
-
import { AppModule } from './app/app.module';
|
3
|
-
|
4
|
-
function bootstrap() {
|
5
|
-
platformBrowserDynamic()
|
6
|
-
.bootstrapModule(AppModule)
|
7
|
-
.catch((err) => console.error(err));
|
8
|
-
}
|
9
|
-
|
10
|
-
if (document.readyState !== 'loading') {
|
11
|
-
bootstrap();
|
12
|
-
} else {
|
13
|
-
document.addEventListener('DOMContentLoaded', bootstrap);
|
14
|
-
}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.updateAppModule = void 0;
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
5
|
-
const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
|
6
|
-
const version_utils_1 = require("../../utils/version-utils");
|
7
|
-
function updateAppModule(tree, schema) {
|
8
|
-
const angularMajorVersion = (0, version_utils_1.getInstalledAngularMajorVersion)(tree);
|
9
|
-
if (angularMajorVersion >= 16) {
|
10
|
-
return;
|
11
|
-
}
|
12
|
-
(0, ensure_typescript_1.ensureTypescript)();
|
13
|
-
const { tsquery } = require('@phenomnomnominal/tsquery');
|
14
|
-
// read the content of app module
|
15
|
-
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, schema.project);
|
16
|
-
const pathToAppModule = (0, devkit_1.joinPathFragments)(projectConfig.sourceRoot, 'app/app.module.ts');
|
17
|
-
const fileContents = tree.read(pathToAppModule, 'utf-8');
|
18
|
-
const ast = tsquery.ast(fileContents);
|
19
|
-
const browserModuleImportNodes = tsquery(ast, 'PropertyAssignment:has(Identifier[name=imports]) > ArrayLiteralExpression Identifier[name=BrowserModule]', { visitAllChildren: true });
|
20
|
-
if (browserModuleImportNodes.length === 0) {
|
21
|
-
throw new Error(`Could not find BrowserModule declaration in ${pathToAppModule}. Please ensure this is correct.`);
|
22
|
-
}
|
23
|
-
const browserModuleNode = browserModuleImportNodes[0];
|
24
|
-
const newFileContents = `${fileContents.slice(0, browserModuleNode.getEnd())}.withServerTransition({ appId: '${schema.appId}' })${fileContents.slice(browserModuleNode.getEnd(), fileContents.length)}`;
|
25
|
-
tree.write(pathToAppModule, newFileContents);
|
26
|
-
}
|
27
|
-
exports.updateAppModule = updateAppModule;
|