@nx/angular 20.0.0-beta.5 → 20.0.0-beta.7
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/executors.d.ts +1 -6
- package/executors.js +2 -3
- package/migrations.json +0 -981
- package/package.json +8 -8
- package/src/builders/utilities/webpack.js +3 -3
- package/src/generators/application/application.js +3 -1
- package/src/generators/application/lib/normalize-options.js +3 -4
- package/src/generators/application/schema.d.ts +2 -4
- package/src/generators/application/schema.json +7 -12
- package/src/generators/component/lib/normalize-options.js +1 -2
- package/src/generators/component/schema.d.ts +2 -5
- package/src/generators/component/schema.json +7 -13
- package/src/generators/directive/lib/normalize-options.js +1 -2
- package/src/generators/directive/schema.d.ts +2 -3
- package/src/generators/directive/schema.json +8 -14
- package/src/generators/federate-module/lib/add-remote.js +0 -2
- package/src/generators/federate-module/schema.d.ts +0 -2
- package/src/generators/federate-module/schema.json +0 -5
- package/src/generators/host/host.js +6 -5
- package/src/generators/host/schema.d.ts +2 -4
- package/src/generators/host/schema.json +10 -13
- package/src/generators/init/init.js +3 -1
- package/src/generators/library/lib/add-standalone-component.js +3 -2
- package/src/generators/library/lib/normalize-options.js +1 -1
- package/src/generators/library/lib/normalized-schema.d.ts +2 -2
- package/src/generators/library/library.js +2 -0
- package/src/generators/library/schema.d.ts +2 -4
- package/src/generators/library/schema.json +7 -13
- package/src/generators/move/schema.d.ts +0 -3
- package/src/generators/move/schema.json +0 -5
- package/src/generators/pipe/lib/normalize-options.js +1 -2
- package/src/generators/pipe/schema.d.ts +2 -3
- package/src/generators/pipe/schema.json +7 -22
- package/src/generators/remote/remote.js +6 -5
- package/src/generators/remote/schema.d.ts +2 -4
- package/src/generators/remote/schema.json +10 -13
- package/src/generators/scam/lib/normalize-options.js +1 -2
- package/src/generators/scam/scam.js +0 -2
- package/src/generators/scam/schema.d.ts +3 -3
- package/src/generators/scam/schema.json +8 -23
- package/src/generators/scam-directive/lib/normalize-options.js +1 -2
- package/src/generators/scam-directive/scam-directive.js +0 -2
- package/src/generators/scam-directive/schema.d.ts +3 -3
- package/src/generators/scam-directive/schema.json +8 -3
- package/src/generators/scam-pipe/lib/normalize-options.js +1 -2
- package/src/generators/scam-pipe/scam-pipe.js +0 -2
- package/src/generators/scam-pipe/schema.d.ts +3 -3
- package/src/generators/scam-pipe/schema.json +8 -23
- package/src/generators/utils/testing.js +14 -17
- package/src/utils/mf/with-module-federation-ssr.js +1 -1
- package/src/utils/mf/with-module-federation.js +1 -1
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
@@ -7,34 +7,19 @@
|
|
7
7
|
"additionalProperties": false,
|
8
8
|
"description": "Creates an Angular pipe.",
|
9
9
|
"properties": {
|
10
|
-
"
|
10
|
+
"path": {
|
11
11
|
"type": "string",
|
12
|
-
"description": "The
|
12
|
+
"description": "The path at which to create the pipe file, relative to the workspace root.",
|
13
13
|
"$default": {
|
14
14
|
"$source": "argv",
|
15
15
|
"index": 0
|
16
16
|
},
|
17
|
-
"x-prompt": "What
|
18
|
-
},
|
19
|
-
"directory": {
|
20
|
-
"type": "string",
|
21
|
-
"description": "The directory at which to create the pipe file. When `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. Otherwise, it will be relative to the workspace root.",
|
22
|
-
"aliases": ["dir", "path"],
|
23
|
-
"x-priority": "important"
|
24
|
-
},
|
25
|
-
"nameAndDirectoryFormat": {
|
26
|
-
"description": "Whether to generate the pipe in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
|
27
|
-
"type": "string",
|
28
|
-
"enum": ["as-provided", "derived"]
|
17
|
+
"x-prompt": "What is the path of the new pipe?"
|
29
18
|
},
|
30
|
-
"
|
19
|
+
"name": {
|
31
20
|
"type": "string",
|
32
|
-
"description": "The name of the
|
33
|
-
"
|
34
|
-
"$source": "projectName"
|
35
|
-
},
|
36
|
-
"x-dropdown": "projects",
|
37
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
|
21
|
+
"description": "The name of the pipe.",
|
22
|
+
"x-prompt": "What name would you like to use for the pipe?"
|
38
23
|
},
|
39
24
|
"skipTests": {
|
40
25
|
"type": "boolean",
|
@@ -67,5 +52,5 @@
|
|
67
52
|
"description": "Skip formatting of files."
|
68
53
|
}
|
69
54
|
},
|
70
|
-
"required": ["
|
55
|
+
"required": ["path"]
|
71
56
|
}
|
@@ -3,26 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.remote = remote;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
6
|
+
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
7
|
+
const versions_1 = require("@nx/js/src/utils/versions");
|
6
8
|
const test_runners_1 = require("../../utils/test-runners");
|
7
9
|
const application_1 = require("../application/application");
|
8
10
|
const setup_mf_1 = require("../setup-mf/setup-mf");
|
9
|
-
const lib_1 = require("./lib");
|
10
|
-
const versions_1 = require("@nx/js/src/utils/versions");
|
11
11
|
const add_mf_env_to_inputs_1 = require("../utils/add-mf-env-to-inputs");
|
12
|
+
const lib_1 = require("./lib");
|
12
13
|
async function remote(tree, schema) {
|
14
|
+
(0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'angular', 'remote');
|
13
15
|
const { typescriptConfiguration = true, ...options } = schema;
|
14
16
|
options.standalone = options.standalone ?? true;
|
15
17
|
const projects = (0, devkit_1.getProjects)(tree);
|
16
18
|
if (options.host && !projects.has(options.host)) {
|
17
19
|
throw new Error(`The name of the application to be used as the host app does not exist. (${options.host})`);
|
18
20
|
}
|
19
|
-
|
21
|
+
await (0, project_name_and_root_utils_1.ensureProjectName)(tree, options, 'application');
|
22
|
+
const { projectName: remoteProjectName } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(tree, {
|
20
23
|
name: options.name,
|
21
24
|
projectType: 'application',
|
22
25
|
directory: options.directory,
|
23
|
-
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
24
26
|
});
|
25
|
-
options.projectNameAndRootFormat = projectNameAndRootFormat;
|
26
27
|
const port = options.port ?? (0, lib_1.findNextAvailablePort)(tree);
|
27
28
|
const appInstallTask = await (0, application_1.applicationGenerator)(tree, {
|
28
29
|
...options,
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
2
1
|
import type { Linter, LinterType } from '@nx/eslint';
|
3
2
|
import type { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners';
|
4
3
|
import type { Styles } from '../utils/types';
|
5
4
|
|
6
5
|
export interface Schema {
|
7
|
-
|
6
|
+
directory: string;
|
7
|
+
name?: string;
|
8
8
|
host?: string;
|
9
9
|
port?: number;
|
10
10
|
setParserOptionsProject?: boolean;
|
@@ -13,8 +13,6 @@ export interface Schema {
|
|
13
13
|
prefix?: string;
|
14
14
|
style?: Styles;
|
15
15
|
skipTests?: boolean;
|
16
|
-
directory?: string;
|
17
|
-
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
18
16
|
tags?: string;
|
19
17
|
linter?: Linter | LinterType;
|
20
18
|
unitTestRunner?: UnitTestRunner;
|
@@ -12,14 +12,20 @@
|
|
12
12
|
}
|
13
13
|
],
|
14
14
|
"properties": {
|
15
|
-
"
|
15
|
+
"directory": {
|
16
|
+
"description": "The directory of the new application.",
|
16
17
|
"type": "string",
|
17
|
-
"description": "The name to give to the remote Angular app.",
|
18
18
|
"$default": {
|
19
19
|
"$source": "argv",
|
20
20
|
"index": 0
|
21
21
|
},
|
22
|
-
"
|
22
|
+
"x-prompt": "Which directory do you want to create the application in?"
|
23
|
+
},
|
24
|
+
"name": {
|
25
|
+
"type": "string",
|
26
|
+
"description": "The name to give to the remote Angular app.",
|
27
|
+
"pattern": "^[a-zA-Z][^:]*$",
|
28
|
+
"x-priority": "important"
|
23
29
|
},
|
24
30
|
"host": {
|
25
31
|
"type": "string",
|
@@ -31,15 +37,6 @@
|
|
31
37
|
"type": "number",
|
32
38
|
"description": "The port on which this app should be served."
|
33
39
|
},
|
34
|
-
"directory": {
|
35
|
-
"description": "The directory of the new application.",
|
36
|
-
"type": "string"
|
37
|
-
},
|
38
|
-
"projectNameAndRootFormat": {
|
39
|
-
"description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
40
|
-
"type": "string",
|
41
|
-
"enum": ["as-provided", "derived"]
|
42
|
-
},
|
43
40
|
"style": {
|
44
41
|
"description": "The file extension to be used for style files.",
|
45
42
|
"type": "string",
|
@@ -174,5 +171,5 @@
|
|
174
171
|
}
|
175
172
|
},
|
176
173
|
"additionalProperties": false,
|
177
|
-
"required": ["
|
174
|
+
"required": ["directory"]
|
178
175
|
}
|
@@ -7,8 +7,7 @@ async function normalizeOptions(tree, options) {
|
|
7
7
|
options.type ??= 'component';
|
8
8
|
const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
|
9
9
|
name: options.name,
|
10
|
-
|
11
|
-
nameAndDirectoryFormat: options.nameAndDirectoryFormat,
|
10
|
+
path: options.path,
|
12
11
|
suffix: options.type ?? 'component',
|
13
12
|
});
|
14
13
|
const { className } = (0, devkit_1.names)(name);
|
@@ -13,8 +13,6 @@ async function scamGenerator(tree, rawOptions) {
|
|
13
13
|
export: false,
|
14
14
|
standalone: false,
|
15
15
|
skipFormat: true,
|
16
|
-
// options are already normalize, use them as is
|
17
|
-
nameAndDirectoryFormat: 'as-provided',
|
18
16
|
});
|
19
17
|
(0, lib_1.convertComponentToScam)(tree, options);
|
20
18
|
(0, export_scam_1.exportScam)(tree, options);
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import { NameAndDirectoryFormat } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
|
2
2
|
|
3
3
|
export interface Schema {
|
4
|
-
|
5
|
-
|
6
|
-
nameAndDirectoryFormat?: NameAndDirectoryFormat;
|
4
|
+
path: string;
|
5
|
+
name?: string;
|
7
6
|
displayBlock?: boolean;
|
8
7
|
inlineStyle?: boolean;
|
9
8
|
inlineTemplate?: boolean;
|
@@ -21,6 +20,7 @@ export interface Schema {
|
|
21
20
|
}
|
22
21
|
|
23
22
|
export interface NormalizedSchema extends Schema {
|
23
|
+
name: string;
|
24
24
|
directory: string;
|
25
25
|
projectName: string;
|
26
26
|
fileName: string;
|
@@ -6,41 +6,26 @@
|
|
6
6
|
"type": "object",
|
7
7
|
"examples": [
|
8
8
|
{
|
9
|
-
"command": "nx g @nx/angular:scam my-
|
9
|
+
"command": "nx g @nx/angular:scam my-lib/src/lib/my-sample/my-sample",
|
10
10
|
"description": "Generate a `MySampleComponent` component in the `my-lib` library."
|
11
11
|
}
|
12
12
|
],
|
13
13
|
"description": "Creates a new Angular SCAM.",
|
14
14
|
"additionalProperties": false,
|
15
15
|
"properties": {
|
16
|
-
"
|
16
|
+
"path": {
|
17
17
|
"type": "string",
|
18
|
-
"description": "The
|
18
|
+
"description": "The path at which to create the SCAM file, relative to the workspace root.",
|
19
19
|
"$default": {
|
20
20
|
"$source": "argv",
|
21
21
|
"index": 0
|
22
22
|
},
|
23
|
-
"x-prompt": "What
|
23
|
+
"x-prompt": "What is the path of the new SCAM?"
|
24
24
|
},
|
25
|
-
"
|
26
|
-
"type": "string",
|
27
|
-
"description": "The directory at which to create the SCAM files. When `--nameAndDirectoryFormat=as-provided`, it will be relative to the current working directory. Otherwise, it will be relative to the workspace root.",
|
28
|
-
"aliases": ["dir", "path"],
|
29
|
-
"x-priority": "important"
|
30
|
-
},
|
31
|
-
"nameAndDirectoryFormat": {
|
32
|
-
"description": "Whether to generate the SCAM in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
|
33
|
-
"type": "string",
|
34
|
-
"enum": ["as-provided", "derived"]
|
35
|
-
},
|
36
|
-
"project": {
|
25
|
+
"name": {
|
37
26
|
"type": "string",
|
38
|
-
"description": "The name of the
|
39
|
-
"
|
40
|
-
"$source": "projectName"
|
41
|
-
},
|
42
|
-
"x-dropdown": "projects",
|
43
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
|
27
|
+
"description": "The name of the component.",
|
28
|
+
"x-prompt": "What name would you like to use for the component?"
|
44
29
|
},
|
45
30
|
"displayBlock": {
|
46
31
|
"description": "Specifies if the style will contain `:host { display: block; }`.",
|
@@ -132,5 +117,5 @@
|
|
132
117
|
"x-priority": "internal"
|
133
118
|
}
|
134
119
|
},
|
135
|
-
"required": ["
|
120
|
+
"required": ["path"]
|
136
121
|
}
|
@@ -6,8 +6,7 @@ const devkit_1 = require("@nx/devkit");
|
|
6
6
|
async function normalizeOptions(tree, options) {
|
7
7
|
const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
|
8
8
|
name: options.name,
|
9
|
-
|
10
|
-
nameAndDirectoryFormat: options.nameAndDirectoryFormat,
|
9
|
+
path: options.path,
|
11
10
|
suffix: 'directive',
|
12
11
|
});
|
13
12
|
const { className } = (0, devkit_1.names)(name);
|
@@ -13,8 +13,6 @@ async function scamDirectiveGenerator(tree, rawOptions) {
|
|
13
13
|
export: false,
|
14
14
|
standalone: false,
|
15
15
|
skipFormat: true,
|
16
|
-
// options are already normalize, use them as is
|
17
|
-
nameAndDirectoryFormat: 'as-provided',
|
18
16
|
});
|
19
17
|
(0, lib_1.convertDirectiveToScam)(tree, options);
|
20
18
|
(0, export_scam_1.exportScam)(tree, options);
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import { NameAndDirectoryFormat } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
|
2
2
|
|
3
3
|
export interface Schema {
|
4
|
-
|
5
|
-
|
6
|
-
nameAndDirectoryFormat?: NameAndDirectoryFormat;
|
4
|
+
path: string;
|
5
|
+
name?: string;
|
7
6
|
skipTests?: boolean;
|
8
7
|
inlineScam?: boolean;
|
9
8
|
prefix?: string;
|
@@ -13,6 +12,7 @@ export interface Schema {
|
|
13
12
|
}
|
14
13
|
|
15
14
|
export interface NormalizedSchema extends Schema {
|
15
|
+
name: string;
|
16
16
|
directory: string;
|
17
17
|
export: boolean;
|
18
18
|
fileName: string;
|
@@ -13,13 +13,18 @@
|
|
13
13
|
"description": "Creates a new, generic Angular directive definition in the given or default project.",
|
14
14
|
"additionalProperties": false,
|
15
15
|
"properties": {
|
16
|
-
"
|
16
|
+
"path": {
|
17
17
|
"type": "string",
|
18
|
-
"description": "The
|
18
|
+
"description": "The path at which to create the SCAM Directive files, relative to the workspace root.",
|
19
19
|
"$default": {
|
20
20
|
"$source": "argv",
|
21
21
|
"index": 0
|
22
22
|
},
|
23
|
+
"x-prompt": "What is the path of the new directive?"
|
24
|
+
},
|
25
|
+
"name": {
|
26
|
+
"type": "string",
|
27
|
+
"description": "The name of the directive.",
|
23
28
|
"x-prompt": "What name would you like to use for the directive?",
|
24
29
|
"x-priority": "important"
|
25
30
|
},
|
@@ -92,5 +97,5 @@
|
|
92
97
|
"x-priority": "internal"
|
93
98
|
}
|
94
99
|
},
|
95
|
-
"required": ["
|
100
|
+
"required": ["path"]
|
96
101
|
}
|
@@ -6,8 +6,7 @@ const devkit_1 = require("@nx/devkit");
|
|
6
6
|
async function normalizeOptions(tree, options) {
|
7
7
|
const { artifactName: name, directory, fileName, filePath, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(tree, {
|
8
8
|
name: options.name,
|
9
|
-
|
10
|
-
nameAndDirectoryFormat: options.nameAndDirectoryFormat,
|
9
|
+
path: options.path,
|
11
10
|
suffix: 'pipe',
|
12
11
|
});
|
13
12
|
const { className } = (0, devkit_1.names)(name);
|
@@ -13,8 +13,6 @@ async function scamPipeGenerator(tree, rawOptions) {
|
|
13
13
|
export: false,
|
14
14
|
standalone: false,
|
15
15
|
skipFormat: true,
|
16
|
-
// options are already normalize, use them as is
|
17
|
-
nameAndDirectoryFormat: 'as-provided',
|
18
16
|
});
|
19
17
|
(0, lib_1.convertPipeToScam)(tree, options);
|
20
18
|
(0, export_scam_1.exportScam)(tree, options);
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import { NameAndDirectoryFormat } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
|
2
2
|
|
3
3
|
export interface Schema {
|
4
|
-
|
5
|
-
|
6
|
-
nameAndDirectoryFormat?: NameAndDirectoryFormat;
|
4
|
+
path: string;
|
5
|
+
name?: string;
|
7
6
|
skipTests?: boolean;
|
8
7
|
inlineScam?: boolean;
|
9
8
|
export?: boolean;
|
@@ -11,6 +10,7 @@ export interface Schema {
|
|
11
10
|
}
|
12
11
|
|
13
12
|
export interface NormalizedSchema extends Schema {
|
13
|
+
name: string;
|
14
14
|
directory: string;
|
15
15
|
export: boolean;
|
16
16
|
fileName: string;
|
@@ -6,43 +6,28 @@
|
|
6
6
|
"type": "object",
|
7
7
|
"examples": [
|
8
8
|
{
|
9
|
-
"command": "nx g @nx/angular:scam-pipe
|
9
|
+
"command": "nx g @nx/angular:scam-pipe mylib/src/lib/my-transformation/my-transformation",
|
10
10
|
"description": "Generates a `MyTransformationPipe` in a `my-transformation` folder in the `my-lib` project"
|
11
11
|
}
|
12
12
|
],
|
13
13
|
"description": "Creates a new, generic Angular pipe definition in the given or default project.",
|
14
14
|
"additionalProperties": false,
|
15
15
|
"properties": {
|
16
|
-
"
|
16
|
+
"path": {
|
17
17
|
"type": "string",
|
18
|
-
"description": "The
|
18
|
+
"description": "The path at which to create the pipe file, relative to the workspace root.",
|
19
19
|
"$default": {
|
20
20
|
"$source": "argv",
|
21
21
|
"index": 0
|
22
22
|
},
|
23
|
-
"x-prompt": "What
|
24
|
-
"x-priority": "important"
|
23
|
+
"x-prompt": "What is the path of the new pipe?"
|
25
24
|
},
|
26
|
-
"
|
25
|
+
"name": {
|
27
26
|
"type": "string",
|
28
|
-
"description": "The
|
29
|
-
"
|
27
|
+
"description": "The name of the pipe.",
|
28
|
+
"x-prompt": "What name would you like to use for the pipe?",
|
30
29
|
"x-priority": "important"
|
31
30
|
},
|
32
|
-
"nameAndDirectoryFormat": {
|
33
|
-
"description": "Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (`as-provided`) or generate it using the project and directory relative to the workspace root (`derived`).",
|
34
|
-
"type": "string",
|
35
|
-
"enum": ["as-provided", "derived"]
|
36
|
-
},
|
37
|
-
"project": {
|
38
|
-
"type": "string",
|
39
|
-
"description": "The name of the project.",
|
40
|
-
"$default": {
|
41
|
-
"$source": "projectName"
|
42
|
-
},
|
43
|
-
"x-dropdown": "projects",
|
44
|
-
"x-deprecated": "Provide the `directory` option instead and use the `as-provided` format. The project will be determined from the directory provided. It will be removed in Nx v20."
|
45
|
-
},
|
46
31
|
"skipTests": {
|
47
32
|
"type": "boolean",
|
48
33
|
"description": "Do not create `spec.ts` test files for the new pipe.",
|
@@ -73,5 +58,5 @@
|
|
73
58
|
"x-priority": "internal"
|
74
59
|
}
|
75
60
|
},
|
76
|
-
"required": ["
|
61
|
+
"required": ["path"]
|
77
62
|
}
|
@@ -17,22 +17,20 @@ const remote_1 = require("../remote/remote");
|
|
17
17
|
async function generateTestApplication(tree, options) {
|
18
18
|
tree.write('.gitignore', '');
|
19
19
|
await (0, application_1.applicationGenerator)(tree, {
|
20
|
-
projectNameAndRootFormat: 'as-provided',
|
21
20
|
...options,
|
22
21
|
});
|
23
22
|
}
|
24
23
|
async function generateTestHostApplication(tree, options) {
|
25
24
|
tree.write('.gitignore', '');
|
26
|
-
await (0, host_1.host)(tree, {
|
25
|
+
await (0, host_1.host)(tree, { ...options });
|
27
26
|
}
|
28
27
|
async function generateTestRemoteApplication(tree, options) {
|
29
28
|
tree.write('.gitignore', '');
|
30
|
-
await (0, remote_1.remote)(tree, {
|
29
|
+
await (0, remote_1.remote)(tree, { ...options });
|
31
30
|
}
|
32
31
|
async function generateTestLibrary(tree, options) {
|
33
32
|
tree.write('.gitignore', '');
|
34
33
|
await (0, library_1.libraryGenerator)(tree, {
|
35
|
-
projectNameAndRootFormat: 'as-provided',
|
36
34
|
...options,
|
37
35
|
});
|
38
36
|
}
|
@@ -40,19 +38,18 @@ async function createStorybookTestWorkspaceForLib(libName) {
|
|
40
38
|
let tree = (0, testing_1.createTreeWithEmptyWorkspace)({ layout: 'apps-libs' });
|
41
39
|
tree.write('.gitignore', '');
|
42
40
|
await (0, library_1.libraryGenerator)(tree, {
|
43
|
-
|
41
|
+
directory: libName,
|
44
42
|
buildable: false,
|
45
43
|
linter: eslint_1.Linter.EsLint,
|
46
44
|
publishable: false,
|
47
45
|
simpleName: false,
|
48
46
|
skipFormat: true,
|
49
47
|
unitTestRunner: test_runners_1.UnitTestRunner.Jest,
|
50
|
-
projectNameAndRootFormat: 'as-provided',
|
51
48
|
standalone: false,
|
52
49
|
});
|
53
50
|
await (0, component_1.componentGenerator)(tree, {
|
54
51
|
name: 'test-button',
|
55
|
-
|
52
|
+
path: `${libName}/src/lib/test-button/test-button`,
|
56
53
|
standalone: false,
|
57
54
|
skipFormat: true,
|
58
55
|
});
|
@@ -82,7 +79,7 @@ export class TestButtonComponent {
|
|
82
79
|
});
|
83
80
|
await (0, component_1.componentGenerator)(tree, {
|
84
81
|
name: 'barrel-button',
|
85
|
-
|
82
|
+
path: `${libName}/src/lib/barrel/barrel-button/barrel-button`,
|
86
83
|
module: 'barrel',
|
87
84
|
standalone: false,
|
88
85
|
skipFormat: true,
|
@@ -104,14 +101,14 @@ export class BarrelModule {}`);
|
|
104
101
|
});
|
105
102
|
await (0, component_1.componentGenerator)(tree, {
|
106
103
|
name: 'variable-declare-button',
|
107
|
-
|
104
|
+
path: `${libName}/src/lib/variable-declare/variable-declare-button/variable-declare-button`,
|
108
105
|
module: 'variable-declare',
|
109
106
|
standalone: false,
|
110
107
|
skipFormat: true,
|
111
108
|
});
|
112
109
|
await (0, component_1.componentGenerator)(tree, {
|
113
110
|
name: 'variable-declare-view',
|
114
|
-
|
111
|
+
path: `${libName}/src/lib/variable-declare/variable-declare-view/variable-declare-view`,
|
115
112
|
module: 'variable-declare',
|
116
113
|
standalone: false,
|
117
114
|
skipFormat: true,
|
@@ -139,21 +136,21 @@ export class VariableDeclareModule {}`);
|
|
139
136
|
});
|
140
137
|
await (0, component_1.componentGenerator)(tree, {
|
141
138
|
name: 'variable-spread-declare-button',
|
142
|
-
|
139
|
+
path: `${libName}/src/lib/variable-spread-declare/variable-spread-declare-button/variable-spread-declare-button`,
|
143
140
|
module: 'variable-spread-declare',
|
144
141
|
standalone: false,
|
145
142
|
skipFormat: true,
|
146
143
|
});
|
147
144
|
await (0, component_1.componentGenerator)(tree, {
|
148
145
|
name: 'variable-spread-declare-view',
|
149
|
-
|
146
|
+
path: `${libName}/src/lib/variable-spread-declare/variable-spread-declare-view/variable-spread-declare-view`,
|
150
147
|
module: 'variable-spread-declare',
|
151
148
|
standalone: false,
|
152
149
|
skipFormat: true,
|
153
150
|
});
|
154
151
|
await (0, component_1.componentGenerator)(tree, {
|
155
152
|
name: 'variable-spread-declare-anotherview',
|
156
|
-
|
153
|
+
path: `${libName}/src/lib/variable-spread-declare/variable-spread-declare-anotherview/variable-spread-declare-anotherview`,
|
157
154
|
module: 'variable-spread-declare',
|
158
155
|
standalone: false,
|
159
156
|
skipFormat: true,
|
@@ -181,14 +178,14 @@ export class VariableSpreadDeclareModule {}`);
|
|
181
178
|
});
|
182
179
|
await (0, component_1.componentGenerator)(tree, {
|
183
180
|
name: 'cmp1',
|
184
|
-
|
181
|
+
path: `${libName}/src/lib/static-member-declarations/cmp1/cmp1`,
|
185
182
|
module: 'static-member-declarations',
|
186
183
|
standalone: false,
|
187
184
|
skipFormat: true,
|
188
185
|
});
|
189
186
|
await (0, component_1.componentGenerator)(tree, {
|
190
187
|
name: 'cmp2',
|
191
|
-
|
188
|
+
path: `${libName}/src/lib/static-member-declarations/cmp2/cmp2`,
|
192
189
|
module: 'static-member-declarations',
|
193
190
|
standalone: false,
|
194
191
|
skipFormat: true,
|
@@ -215,13 +212,13 @@ export class StaticMemberDeclarationsModule {
|
|
215
212
|
await (0, component_1.componentGenerator)(tree, {
|
216
213
|
name: 'nested-button',
|
217
214
|
module: 'nested',
|
218
|
-
|
215
|
+
path: `${libName}/src/lib/nested/nested-button/nested-button`,
|
219
216
|
standalone: false,
|
220
217
|
skipFormat: true,
|
221
218
|
});
|
222
219
|
await (0, component_1.componentGenerator)(tree, {
|
223
220
|
name: 'test-other',
|
224
|
-
|
221
|
+
path: `${libName}/src/lib/test-other/test-other`,
|
225
222
|
standalone: false,
|
226
223
|
skipFormat: true,
|
227
224
|
});
|
@@ -31,7 +31,7 @@ async function withModuleFederationForSSR(options, configOverride) {
|
|
31
31
|
plugins: [
|
32
32
|
...(config.plugins ?? []),
|
33
33
|
new (require('@module-federation/enhanced').ModuleFederationPlugin)({
|
34
|
-
name: options.name,
|
34
|
+
name: options.name.replace(/-/g, '_'),
|
35
35
|
filename: 'remoteEntry.js',
|
36
36
|
exposes: options.exposes,
|
37
37
|
remotes: mappedRemotes,
|
@@ -34,7 +34,7 @@ async function withModuleFederation(options, configOverride) {
|
|
34
34
|
plugins: [
|
35
35
|
...(config.plugins ?? []),
|
36
36
|
new webpack_1.ModuleFederationPlugin({
|
37
|
-
name: options.name,
|
37
|
+
name: options.name.replace(/-/g, '_'),
|
38
38
|
filename: 'remoteEntry.mjs',
|
39
39
|
exposes: options.exposes,
|
40
40
|
remotes: mappedRemotes,
|
package/src/utils/versions.d.ts
CHANGED
@@ -13,7 +13,7 @@ export declare const expressVersion = "~4.18.2";
|
|
13
13
|
export declare const typesExpressVersion = "4.17.14";
|
14
14
|
export declare const browserSyncVersion = "^3.0.0";
|
15
15
|
export declare const moduleFederationNodeVersion = "~2.5.0";
|
16
|
-
export declare const moduleFederationEnhancedVersion = "
|
16
|
+
export declare const moduleFederationEnhancedVersion = "0.6.6";
|
17
17
|
export declare const angularEslintVersion = "^18.3.0";
|
18
18
|
export declare const typescriptEslintVersion = "^7.16.0";
|
19
19
|
export declare const tailwindVersion = "^3.0.2";
|
package/src/utils/versions.js
CHANGED
@@ -16,7 +16,7 @@ exports.expressVersion = '~4.18.2';
|
|
16
16
|
exports.typesExpressVersion = '4.17.14';
|
17
17
|
exports.browserSyncVersion = '^3.0.0';
|
18
18
|
exports.moduleFederationNodeVersion = '~2.5.0';
|
19
|
-
exports.moduleFederationEnhancedVersion = '
|
19
|
+
exports.moduleFederationEnhancedVersion = '0.6.6';
|
20
20
|
exports.angularEslintVersion = '^18.3.0';
|
21
21
|
exports.typescriptEslintVersion = '^7.16.0';
|
22
22
|
exports.tailwindVersion = '^3.0.2';
|