@ng-doc/add 22.0.0-beta.2 → 22.1.0
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/README.md +19 -29
- package/package.json +23 -21
- package/schematics/collection.json +14 -14
- package/schematics/ng-add/constants/modules.d.ts +22 -0
- package/schematics/ng-add/constants/modules.js +25 -11
- package/schematics/ng-add/constants/modules.js.map +1 -1
- package/schematics/ng-add/constants/styles.d.ts +4 -0
- package/schematics/ng-add/constants/styles.js +8 -1
- package/schematics/ng-add/constants/styles.js.map +1 -1
- package/schematics/ng-add/index.d.ts +6 -2
- package/schematics/ng-add/index.js +49 -14
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/schema.d.ts +8 -0
- package/schematics/ng-add/schema.json +19 -14
- package/schematics/ng-add/steps/add-assets.d.ts +2 -3
- package/schematics/ng-add/steps/add-assets.js +11 -5
- package/schematics/ng-add/steps/add-assets.js.map +1 -1
- package/schematics/ng-add/steps/add-git-ignore.d.ts +1 -3
- package/schematics/ng-add/steps/add-git-ignore.js +9 -4
- package/schematics/ng-add/steps/add-git-ignore.js.map +1 -1
- package/schematics/ng-add/steps/add-js-dependencies.js +2 -1
- package/schematics/ng-add/steps/add-js-dependencies.js.map +1 -1
- package/schematics/ng-add/steps/add-layout.d.ts +2 -2
- package/schematics/ng-add/steps/add-layout.js +9 -3
- package/schematics/ng-add/steps/add-layout.js.map +1 -1
- package/schematics/ng-add/steps/add-ng-doc-app-config.d.ts +5 -1
- package/schematics/ng-add/steps/add-ng-doc-app-config.js +201 -55
- package/schematics/ng-add/steps/add-ng-doc-app-config.js.map +1 -1
- package/schematics/ng-add/steps/add-styles.js +2 -1
- package/schematics/ng-add/steps/add-styles.js.map +1 -1
- package/schematics/ng-add/steps/add-tsconfig-paths.js +2 -1
- package/schematics/ng-add/steps/add-tsconfig-paths.js.map +1 -1
- package/schematics/ng-add/steps/post-install.d.ts +5 -2
- package/schematics/ng-add/steps/post-install.js +10 -3
- package/schematics/ng-add/steps/post-install.js.map +1 -1
- package/schematics/ng-add/steps/raise-initial-budget.d.ts +23 -0
- package/schematics/ng-add/steps/raise-initial-budget.js +72 -0
- package/schematics/ng-add/steps/raise-initial-budget.js.map +1 -0
- package/schematics/ng-add/steps/replace-builders.d.ts +2 -2
- package/schematics/ng-add/steps/replace-builders.js +12 -4
- package/schematics/ng-add/steps/replace-builders.js.map +1 -1
- package/schematics/ng-add/steps/update-app-ts-config.js +2 -1
- package/schematics/ng-add/steps/update-app-ts-config.js.map +1 -1
- package/schematics/ng-add/utils/add-array-entry.d.ts +56 -0
- package/schematics/ng-add/utils/add-array-entry.js +325 -0
- package/schematics/ng-add/utils/add-array-entry.js.map +1 -0
- package/schematics/ng-add/utils/add-unique-import.d.ts +7 -3
- package/schematics/ng-add/utils/add-unique-import.js +21 -16
- package/schematics/ng-add/utils/add-unique-import.js.map +1 -1
- package/schematics/ng-add/utils/get-app-component.d.ts +4 -3
- package/schematics/ng-add/utils/get-app-component.js +7 -5
- package/schematics/ng-add/utils/get-app-component.js.map +1 -1
- package/schematics/ng-add/utils/get-app-template-path.d.ts +4 -8
- package/schematics/ng-add/utils/get-app-template-path.js +4 -4
- package/schematics/ng-add/utils/get-app-template-path.js.map +1 -1
- package/schematics/ng-add/utils/get-build-options-target.d.ts +18 -0
- package/schematics/ng-add/utils/get-build-options-target.js +62 -0
- package/schematics/ng-add/utils/get-build-options-target.js.map +1 -0
- package/schematics/ng-add/utils/get-main-path.d.ts +12 -2
- package/schematics/ng-add/utils/get-main-path.js +35 -3
- package/schematics/ng-add/utils/get-main-path.js.map +1 -1
- package/schematics/ng-add/utils/get-root-module.d.ts +14 -0
- package/schematics/ng-add/utils/get-root-module.js +31 -0
- package/schematics/ng-add/utils/get-root-module.js.map +1 -0
- package/schematics/ng-add/utils/select-engine.d.ts +58 -0
- package/schematics/ng-add/utils/select-engine.js +139 -0
- package/schematics/ng-add/utils/select-engine.js.map +1 -0
|
@@ -6,9 +6,10 @@ const path = require("path");
|
|
|
6
6
|
const get_app_component_1 = require("./get-app-component");
|
|
7
7
|
const get_initializer_1 = require("./get-initializer");
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @param
|
|
9
|
+
* Returns the path of the root component's template (`templateUrl`, or `app.component.html` next
|
|
10
|
+
* to the component when it has none).
|
|
11
|
+
* @param tree - The workspace tree.
|
|
12
|
+
* @param mainPath - Path of the application's main file.
|
|
12
13
|
*/
|
|
13
14
|
function getAppTemplatePath(tree, mainPath) {
|
|
14
15
|
const appComponent = (0, get_app_component_1.getAppComponent)(tree, mainPath);
|
|
@@ -18,7 +19,6 @@ function getAppTemplatePath(tree, mainPath) {
|
|
|
18
19
|
const templateInitializer = (0, get_initializer_1.getInitializer)(appComponent, 'Component', 'templateUrl');
|
|
19
20
|
const appComponentDir = appComponent.getSourceFile().getDirectoryPath();
|
|
20
21
|
const templateUrlPath = path.join(appComponentDir, templateInitializer?.getText().replace(/['"]/g, '') ?? 'app.component.html');
|
|
21
|
-
(0, ng_morph_1.saveActiveProject)();
|
|
22
22
|
return templateUrlPath;
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=get-app-template-path.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-app-template-path.js","sourceRoot":"","sources":["../../../../../../libs/add/schematics/ng-add/utils/get-app-template-path.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"get-app-template-path.js","sourceRoot":"","sources":["../../../../../../libs/add/schematics/ng-add/utils/get-app-template-path.ts"],"names":[],"mappings":";;AAaA,gDAqBC;AAjCD,uCAA8D;AAC9D,6BAA6B;AAE7B,2DAAsD;AACtD,uDAAmD;AAEnD;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,IAAU,EAAE,QAAgB;IAC7D,MAAM,YAAY,GAAiC,IAAA,mCAAe,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAEnF,IAAI,CAAC,eAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAE,CAAC;QAC3C,OAAO;IACT,CAAC;IAED,MAAM,mBAAmB,GAA2B,IAAA,gCAAc,EAChE,YAAY,EACZ,WAAW,EACX,aAAa,CACd,CAAC;IAEF,MAAM,eAAe,GAAW,YAAY,CAAC,aAAa,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAEhF,MAAM,eAAe,GAAW,IAAI,CAAC,IAAI,CACvC,eAAe,EACf,mBAAmB,EAAE,OAAO,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,oBAAoB,CAC5E,CAAC;IAEF,OAAO,eAAe,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ProjectDefinition } from '@angular-devkit/core/src/workspace';
|
|
2
|
+
/** The builder of the Vite engine's production build. */
|
|
3
|
+
export declare const VITE_APPLICATION_BUILDER = "@ng-doc/builder:vite-application";
|
|
4
|
+
/**
|
|
5
|
+
* The target the Vite setup keeps the Angular build options in, for the Angular builders that
|
|
6
|
+
* read them (`unit-test`, `extract-i18n`). `@ng-doc/builder:vite-setup` creates it.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ANGULAR_BUILD_TARGET = "build-angular";
|
|
9
|
+
/** The target `migrate-to-vite` keeps the legacy build target in. */
|
|
10
|
+
export declare const LEGACY_BUILD_TARGET = "build-legacy";
|
|
11
|
+
/**
|
|
12
|
+
* The target that holds the application's Angular build options: `build`, or, once `build` runs
|
|
13
|
+
* the Vite engine (whose options are a Vite configuration file), `build-angular` of `ng add` or
|
|
14
|
+
* `build-legacy` of `migrate-to-vite`. A `build` builder that runs Angular's builder from another
|
|
15
|
+
* target of the project, as native federation runs its `esbuild` target, has them on that target.
|
|
16
|
+
* @param project - The application project.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getBuildOptionsTarget(project: ProjectDefinition): string;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LEGACY_BUILD_TARGET = exports.ANGULAR_BUILD_TARGET = exports.VITE_APPLICATION_BUILDER = void 0;
|
|
4
|
+
exports.getBuildOptionsTarget = getBuildOptionsTarget;
|
|
5
|
+
/** The builder of the Vite engine's production build. */
|
|
6
|
+
exports.VITE_APPLICATION_BUILDER = '@ng-doc/builder:vite-application';
|
|
7
|
+
/**
|
|
8
|
+
* The target the Vite setup keeps the Angular build options in, for the Angular builders that
|
|
9
|
+
* read them (`unit-test`, `extract-i18n`). `@ng-doc/builder:vite-setup` creates it.
|
|
10
|
+
*/
|
|
11
|
+
exports.ANGULAR_BUILD_TARGET = 'build-angular';
|
|
12
|
+
/** The target `migrate-to-vite` keeps the legacy build target in. */
|
|
13
|
+
exports.LEGACY_BUILD_TARGET = 'build-legacy';
|
|
14
|
+
/** Options through which a builder runs another target, as `project:target[:configuration]`. */
|
|
15
|
+
const DELEGATING_OPTIONS = ['target', 'buildTarget', 'browserTarget'];
|
|
16
|
+
/** Angular's builders that take the application's build options. */
|
|
17
|
+
const ANGULAR_BUILD_BUILDERS = [
|
|
18
|
+
'@angular/build:application',
|
|
19
|
+
'@angular-devkit/build-angular:application',
|
|
20
|
+
'@angular-devkit/build-angular:browser',
|
|
21
|
+
'@angular-devkit/build-angular:browser-esbuild',
|
|
22
|
+
];
|
|
23
|
+
/**
|
|
24
|
+
* The target that holds the application's Angular build options: `build`, or, once `build` runs
|
|
25
|
+
* the Vite engine (whose options are a Vite configuration file), `build-angular` of `ng add` or
|
|
26
|
+
* `build-legacy` of `migrate-to-vite`. A `build` builder that runs Angular's builder from another
|
|
27
|
+
* target of the project, as native federation runs its `esbuild` target, has them on that target.
|
|
28
|
+
* @param project - The application project.
|
|
29
|
+
*/
|
|
30
|
+
function getBuildOptionsTarget(project) {
|
|
31
|
+
const build = project.targets.get('build');
|
|
32
|
+
if (build?.builder !== exports.VITE_APPLICATION_BUILDER) {
|
|
33
|
+
return delegatedBuildTarget(project) ?? 'build';
|
|
34
|
+
}
|
|
35
|
+
return ([exports.ANGULAR_BUILD_TARGET, exports.LEGACY_BUILD_TARGET].find((name) => project.targets.has(name)) ??
|
|
36
|
+
'build');
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The target of the project that `build` runs Angular's builder through, if it runs one. Native
|
|
40
|
+
* federation names it in the configurations of `build`
|
|
41
|
+
* (`"production": {"target": "app:esbuild:production"}`).
|
|
42
|
+
* @param project - The application project.
|
|
43
|
+
*/
|
|
44
|
+
function delegatedBuildTarget(project) {
|
|
45
|
+
const build = project.targets.get('build');
|
|
46
|
+
const configurations = build?.configurations ?? {};
|
|
47
|
+
const defaultConfiguration = build?.defaultConfiguration;
|
|
48
|
+
const candidates = [
|
|
49
|
+
build?.options,
|
|
50
|
+
defaultConfiguration ? configurations[defaultConfiguration] : undefined,
|
|
51
|
+
...Object.values(configurations),
|
|
52
|
+
].flatMap((options) => DELEGATING_OPTIONS.map((option) => options?.[option]));
|
|
53
|
+
for (const value of candidates) {
|
|
54
|
+
const name = typeof value === 'string' ? value.split(':')[1] : undefined;
|
|
55
|
+
const builder = name ? project.targets.get(name)?.builder : undefined;
|
|
56
|
+
if (name && name !== 'build' && builder && ANGULAR_BUILD_BUILDERS.includes(builder)) {
|
|
57
|
+
return name;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=get-build-options-target.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-build-options-target.js","sourceRoot":"","sources":["../../../../../../libs/add/schematics/ng-add/utils/get-build-options-target.ts"],"names":[],"mappings":";;;AAgCA,sDAWC;AAzCD,yDAAyD;AAC5C,QAAA,wBAAwB,GAAG,kCAAkC,CAAC;AAE3E;;;GAGG;AACU,QAAA,oBAAoB,GAAG,eAAe,CAAC;AAEpD,qEAAqE;AACxD,QAAA,mBAAmB,GAAG,cAA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AAC;IAEtF,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,GAAuB,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7F,MAAM,OAAO,GAAuB,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;QAE1F,IAAI,IAAI,IAAI,IAAI,KAAK,OAAO,IAAI,OAAO,IAAI,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YACpF,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { ProjectDefinition } from '@angular-devkit/core/src/workspace';
|
|
2
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
* @param project
|
|
4
|
+
* Returns the browser entry of the application (`browser`, or `main` of older builders).
|
|
5
|
+
* @param project - The application project.
|
|
5
6
|
*/
|
|
6
7
|
export declare function getMainPath(project: ProjectDefinition): string;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the file that starts the application: the browser entry, or, when the entry starts
|
|
10
|
+
* nothing itself, the module it imports dynamically that does. The entry of a native federation
|
|
11
|
+
* application loads the federation manifest first, then imports `./bootstrap`, which calls
|
|
12
|
+
* `bootstrapApplication`.
|
|
13
|
+
* @param tree - The workspace tree.
|
|
14
|
+
* @param project - The application project.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getBootstrapPath(tree: Tree, project: ProjectDefinition): string;
|
|
@@ -1,13 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getMainPath = getMainPath;
|
|
4
|
+
exports.getBootstrapPath = getBootstrapPath;
|
|
4
5
|
const schematics_1 = require("@angular/cdk/schematics");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
const get_build_options_target_1 = require("./get-build-options-target");
|
|
5
8
|
/**
|
|
6
|
-
*
|
|
7
|
-
* @param project
|
|
9
|
+
* Returns the browser entry of the application (`browser`, or `main` of older builders).
|
|
10
|
+
* @param project - The application project.
|
|
8
11
|
*/
|
|
9
12
|
function getMainPath(project) {
|
|
10
|
-
const buildOptions = (0, schematics_1.getProjectTargetOptions)(project,
|
|
13
|
+
const buildOptions = (0, schematics_1.getProjectTargetOptions)(project, (0, get_build_options_target_1.getBuildOptionsTarget)(project));
|
|
11
14
|
return (buildOptions['main'] ?? buildOptions['browser']);
|
|
12
15
|
}
|
|
16
|
+
/** A call that starts the application. */
|
|
17
|
+
const BOOTSTRAP_CALL = /\bbootstrapApplication\s*\(|\.bootstrapModule\s*\(/;
|
|
18
|
+
/** A dynamic import of a relative module. */
|
|
19
|
+
const RELATIVE_DYNAMIC_IMPORT = /\bimport\(\s*['"](\.{1,2}\/[^'"]+)['"]\s*\)/g;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the file that starts the application: the browser entry, or, when the entry starts
|
|
22
|
+
* nothing itself, the module it imports dynamically that does. The entry of a native federation
|
|
23
|
+
* application loads the federation manifest first, then imports `./bootstrap`, which calls
|
|
24
|
+
* `bootstrapApplication`.
|
|
25
|
+
* @param tree - The workspace tree.
|
|
26
|
+
* @param project - The application project.
|
|
27
|
+
*/
|
|
28
|
+
function getBootstrapPath(tree, project) {
|
|
29
|
+
const mainPath = getMainPath(project);
|
|
30
|
+
const main = mainPath ? tree.read(mainPath)?.toString('utf-8') : undefined;
|
|
31
|
+
if (main === undefined || BOOTSTRAP_CALL.test(main)) {
|
|
32
|
+
return mainPath;
|
|
33
|
+
}
|
|
34
|
+
for (const [, specifier] of main.matchAll(RELATIVE_DYNAMIC_IMPORT)) {
|
|
35
|
+
const base = path_1.posix.join(path_1.posix.dirname(mainPath), specifier);
|
|
36
|
+
const found = [base, `${base}.ts`, `${base}/index.ts`].find((path) => /\.ts$/.test(path) &&
|
|
37
|
+
tree.exists(path) &&
|
|
38
|
+
BOOTSTRAP_CALL.test(tree.read(path)?.toString('utf-8') ?? ''));
|
|
39
|
+
if (found) {
|
|
40
|
+
return found;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return mainPath;
|
|
44
|
+
}
|
|
13
45
|
//# sourceMappingURL=get-main-path.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-main-path.js","sourceRoot":"","sources":["../../../../../../libs/add/schematics/ng-add/utils/get-main-path.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"get-main-path.js","sourceRoot":"","sources":["../../../../../../libs/add/schematics/ng-add/utils/get-main-path.ts"],"names":[],"mappings":";;AAYA,kCAOC;AAgBD,4CAuBC;AA1DD,wDAAkE;AAIlE,+BAA6B;AAE7B,yEAAmE;AAEnE;;;GAGG;AACH,SAAgB,WAAW,CAAC,OAA0B;IACpD,MAAM,YAAY,GAA0C,IAAA,oCAAuB,EACjF,OAAO,EACP,IAAA,gDAAqB,EAAC,OAAO,CAAC,CAC/B,CAAC;IAEF,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC,SAAS,CAAC,CAAW,CAAC;AACrE,CAAC;AAED,0CAA0C;AAC1C,MAAM,cAAc,GAAG,oDAAoD,CAAC;AAE5E,6CAA6C;AAC7C,MAAM,uBAAuB,GAAG,8CAA8C,CAAC;AAE/E;;;;;;;GAOG;AACH,SAAgB,gBAAgB,CAAC,IAAU,EAAE,OAA0B;IACrE,MAAM,QAAQ,GAAW,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,IAAI,GAAuB,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAE/F,IAAI,IAAI,KAAK,SAAS,IAAI,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACpD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,KAAK,MAAM,CAAC,EAAE,SAAS,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,CAAC;QACnE,MAAM,IAAI,GAAW,YAAK,CAAC,IAAI,CAAC,YAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,CAAC;QACpE,MAAM,KAAK,GAAuB,CAAC,IAAI,EAAE,GAAG,IAAI,KAAK,EAAE,GAAG,IAAI,WAAW,CAAC,CAAC,IAAI,CAC7E,CAAC,IAAY,EAAE,EAAE,CACf,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;YAClB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YACjB,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAChE,CAAC;QAEF,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CallExpression, ClassDeclaration } from 'ng-morph';
|
|
2
|
+
/**
|
|
3
|
+
* Finds the `bootstrapModule(...)` call of an NgModule application.
|
|
4
|
+
*
|
|
5
|
+
* The platform is not checked: Angular 22 applications call `platformBrowser().bootstrapModule`,
|
|
6
|
+
* older ones `platformBrowserDynamic().bootstrapModule`, and both must be found.
|
|
7
|
+
* @param mainPath - Path of the application's main file.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getBootstrapModuleFn(mainPath: string): CallExpression | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the class of the module passed to `bootstrapModule`.
|
|
12
|
+
* @param mainPath - Path of the application's main file.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getRootModule(mainPath: string): ClassDeclaration | undefined;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBootstrapModuleFn = getBootstrapModuleFn;
|
|
4
|
+
exports.getRootModule = getRootModule;
|
|
5
|
+
const ng_morph_1 = require("ng-morph");
|
|
6
|
+
/**
|
|
7
|
+
* Finds the `bootstrapModule(...)` call of an NgModule application.
|
|
8
|
+
*
|
|
9
|
+
* The platform is not checked: Angular 22 applications call `platformBrowser().bootstrapModule`,
|
|
10
|
+
* older ones `platformBrowserDynamic().bootstrapModule`, and both must be found.
|
|
11
|
+
* @param mainPath - Path of the application's main file.
|
|
12
|
+
*/
|
|
13
|
+
function getBootstrapModuleFn(mainPath) {
|
|
14
|
+
const [sourceFile] = (0, ng_morph_1.getSourceFiles)(mainPath);
|
|
15
|
+
return sourceFile
|
|
16
|
+
?.getDescendantsOfKind(ng_morph_1.SyntaxKind.CallExpression)
|
|
17
|
+
.find((call) => {
|
|
18
|
+
const expression = call.getExpression();
|
|
19
|
+
return (ng_morph_1.Node.isPropertyAccessExpression(expression) && expression.getName() === 'bootstrapModule');
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns the class of the module passed to `bootstrapModule`.
|
|
24
|
+
* @param mainPath - Path of the application's main file.
|
|
25
|
+
*/
|
|
26
|
+
function getRootModule(mainPath) {
|
|
27
|
+
const [module] = getBootstrapModuleFn(mainPath)?.getArguments() ?? [];
|
|
28
|
+
const [definition] = ng_morph_1.Node.isIdentifier(module) ? module.getDefinitionNodes() : [];
|
|
29
|
+
return ng_morph_1.Node.isClassDeclaration(definition) ? definition : undefined;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=get-root-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-root-module.js","sourceRoot":"","sources":["../../../../../../libs/add/schematics/ng-add/utils/get-root-module.ts"],"names":[],"mappings":";;AAgBA,oDAYC;AAMD,sCAKC;AAvCD,uCAOkB;AAElB;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,QAAgB;IACnD,MAAM,CAAC,UAAU,CAAC,GAAiB,IAAA,yBAAc,EAAC,QAAQ,CAAC,CAAC;IAE5D,OAAO,UAAU;QACf,EAAE,oBAAoB,CAAC,qBAAU,CAAC,cAAc,CAAC;SAChD,IAAI,CAAC,CAAC,IAAoB,EAAE,EAAE;QAC7B,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAExC,OAAO,CACL,eAAI,CAAC,0BAA0B,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,OAAO,EAAE,KAAK,iBAAiB,CAC1F,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;;GAGG;AACH,SAAgB,aAAa,CAAC,QAAgB;IAC5C,MAAM,CAAC,MAAM,CAAC,GAAG,oBAAoB,CAAC,QAAQ,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;IACtE,MAAM,CAAC,UAAU,CAAC,GAAG,eAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAElF,OAAO,eAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;AACtE,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { logging } from '@angular-devkit/core';
|
|
2
|
+
import { ProjectDefinition } from '@angular-devkit/core/src/workspace';
|
|
3
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
4
|
+
import { NgDocEngine } from '../schema';
|
|
5
|
+
/** The command that moves a project from the legacy builders to the Vite engine. */
|
|
6
|
+
export declare const MIGRATE_TO_VITE = "ng g @ng-doc/builder:migrate-to-vite";
|
|
7
|
+
/** The recipe for a project whose builder NgDoc must not replace. */
|
|
8
|
+
export declare const KEEP_ANOTHER_BUILDER_URL = "https://ng-doc.com/docs/build-and-deploy/dev-server-and-builds#keep-another-builder";
|
|
9
|
+
/** The engine `ng add` sets up, and whether the project already had it. */
|
|
10
|
+
export interface EngineChoice {
|
|
11
|
+
engine: NgDocEngine;
|
|
12
|
+
/** The project already builds with NgDoc: its builders are kept as they are. */
|
|
13
|
+
existing: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the legacy setup sets its builders on `build` and `serve`. An existing project whose
|
|
16
|
+
* NgDoc builder is on another target keeps `build` and `serve` as they are.
|
|
17
|
+
*/
|
|
18
|
+
replaceBuilders: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The builder of `build` or `serve` that NgDoc doesn't replace (native federation, a custom
|
|
21
|
+
* builder). No NgDoc builder is set up then: the project generates its documentation with the
|
|
22
|
+
* `ng-doc` command next to that builder.
|
|
23
|
+
*/
|
|
24
|
+
keptBuilder?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The application builders whose options the Vite setup reads: Angular's, and Nx's executor that
|
|
28
|
+
* runs Angular's with the same options (the Vite setup reports the few options Nx adds).
|
|
29
|
+
*/
|
|
30
|
+
export declare const ANGULAR_APPLICATION_BUILDERS: string[];
|
|
31
|
+
/**
|
|
32
|
+
* Whether a builder is neither Angular's (or an Nx executor that runs it) nor NgDoc's: NgDoc doesn't
|
|
33
|
+
* know what it does, so it doesn't replace it. Native federation, for example, runs Angular's
|
|
34
|
+
* builder from another target and adds an import map to its output.
|
|
35
|
+
* @param builder - The builder of a target.
|
|
36
|
+
*/
|
|
37
|
+
export declare function isForeignBuilder(builder: string): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the application bootstraps an NgModule (`bootstrapModule`) instead of a standalone
|
|
40
|
+
* component.
|
|
41
|
+
* @param tree - The workspace tree.
|
|
42
|
+
* @param project - The application project.
|
|
43
|
+
*/
|
|
44
|
+
export declare function isNgModuleApp(tree: Tree, project: ProjectDefinition): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Chooses the engine to set up. A project that already builds with NgDoc keeps its engine: `ng add`
|
|
47
|
+
* never switches it (the legacy builders move to the Vite engine with `migrate-to-vite`). A new
|
|
48
|
+
* standalone application on Angular's application builder (or Nx's executor that runs it) gets the
|
|
49
|
+
* Vite engine unless `--engine legacy` is passed; an NgModule application, or one whose `build`
|
|
50
|
+
* target uses another builder, gets the legacy builders; `--engine vite` is refused for an NgModule
|
|
51
|
+
* application. Without `--engine`, a
|
|
52
|
+
* `build` or `serve` builder that is neither Angular's nor NgDoc's is kept (`keptBuilder`).
|
|
53
|
+
* @param tree - The workspace tree.
|
|
54
|
+
* @param project - The application project.
|
|
55
|
+
* @param requested - The `--engine` option, if any.
|
|
56
|
+
* @param logger - Where the choice is explained.
|
|
57
|
+
*/
|
|
58
|
+
export declare function selectEngine(tree: Tree, project: ProjectDefinition, requested: NgDocEngine | undefined, logger: logging.LoggerApi): EngineChoice;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ANGULAR_APPLICATION_BUILDERS = exports.KEEP_ANOTHER_BUILDER_URL = exports.MIGRATE_TO_VITE = void 0;
|
|
4
|
+
exports.isForeignBuilder = isForeignBuilder;
|
|
5
|
+
exports.isNgModuleApp = isNgModuleApp;
|
|
6
|
+
exports.selectEngine = selectEngine;
|
|
7
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
8
|
+
const ng_morph_1 = require("ng-morph");
|
|
9
|
+
const get_build_options_target_1 = require("./get-build-options-target");
|
|
10
|
+
const get_main_path_1 = require("./get-main-path");
|
|
11
|
+
const get_root_module_1 = require("./get-root-module");
|
|
12
|
+
/** The command that moves a project from the legacy builders to the Vite engine. */
|
|
13
|
+
exports.MIGRATE_TO_VITE = 'ng g @ng-doc/builder:migrate-to-vite';
|
|
14
|
+
/** The recipe for a project whose builder NgDoc must not replace. */
|
|
15
|
+
exports.KEEP_ANOTHER_BUILDER_URL = 'https://ng-doc.com/docs/build-and-deploy/dev-server-and-builds#keep-another-builder';
|
|
16
|
+
/**
|
|
17
|
+
* The application builders whose options the Vite setup reads: Angular's, and Nx's executor that
|
|
18
|
+
* runs Angular's with the same options (the Vite setup reports the few options Nx adds).
|
|
19
|
+
*/
|
|
20
|
+
exports.ANGULAR_APPLICATION_BUILDERS = [
|
|
21
|
+
'@angular/build:application',
|
|
22
|
+
'@angular-devkit/build-angular:application',
|
|
23
|
+
'@nx/angular:application',
|
|
24
|
+
];
|
|
25
|
+
const NG_DOC_BUILDER_PREFIX = '@ng-doc/builder:';
|
|
26
|
+
/** Angular's builders, which the legacy builders replace. */
|
|
27
|
+
const ANGULAR_BUILDER_PREFIXES = ['@angular/build:', '@angular-devkit/build-angular:'];
|
|
28
|
+
/**
|
|
29
|
+
* Nx's executors that run Angular's builders with the same options, so they are not foreign: the
|
|
30
|
+
* Vite setup reads the options of `application`, and the legacy builders replace them as they
|
|
31
|
+
* replace Angular's.
|
|
32
|
+
*/
|
|
33
|
+
const NX_ANGULAR_BUILDERS = [
|
|
34
|
+
'@nx/angular:application',
|
|
35
|
+
'@nx/angular:browser-esbuild',
|
|
36
|
+
'@nx/angular:dev-server',
|
|
37
|
+
];
|
|
38
|
+
/**
|
|
39
|
+
* Whether a builder is neither Angular's (or an Nx executor that runs it) nor NgDoc's: NgDoc doesn't
|
|
40
|
+
* know what it does, so it doesn't replace it. Native federation, for example, runs Angular's
|
|
41
|
+
* builder from another target and adds an import map to its output.
|
|
42
|
+
* @param builder - The builder of a target.
|
|
43
|
+
*/
|
|
44
|
+
function isForeignBuilder(builder) {
|
|
45
|
+
return (![...ANGULAR_BUILDER_PREFIXES, NG_DOC_BUILDER_PREFIX].some((prefix) => builder.startsWith(prefix)) && !NX_ANGULAR_BUILDERS.includes(builder));
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Whether the application bootstraps an NgModule (`bootstrapModule`) instead of a standalone
|
|
49
|
+
* component.
|
|
50
|
+
* @param tree - The workspace tree.
|
|
51
|
+
* @param project - The application project.
|
|
52
|
+
*/
|
|
53
|
+
function isNgModuleApp(tree, project) {
|
|
54
|
+
// Without a build target there is no entry to look at; the setup reports the missing target.
|
|
55
|
+
const mainPath = project.targets.has('build')
|
|
56
|
+
? (0, get_main_path_1.getBootstrapPath)(tree, project)
|
|
57
|
+
: undefined;
|
|
58
|
+
if (!mainPath || !tree.exists(mainPath)) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
try {
|
|
62
|
+
(0, ng_morph_1.setActiveProject)((0, ng_morph_1.createProject)(tree, '/', [mainPath]));
|
|
63
|
+
return !!(0, get_root_module_1.getBootstrapModuleFn)(mainPath);
|
|
64
|
+
}
|
|
65
|
+
finally {
|
|
66
|
+
(0, ng_morph_1.resetActiveProject)();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Chooses the engine to set up. A project that already builds with NgDoc keeps its engine: `ng add`
|
|
71
|
+
* never switches it (the legacy builders move to the Vite engine with `migrate-to-vite`). A new
|
|
72
|
+
* standalone application on Angular's application builder (or Nx's executor that runs it) gets the
|
|
73
|
+
* Vite engine unless `--engine legacy` is passed; an NgModule application, or one whose `build`
|
|
74
|
+
* target uses another builder, gets the legacy builders; `--engine vite` is refused for an NgModule
|
|
75
|
+
* application. Without `--engine`, a
|
|
76
|
+
* `build` or `serve` builder that is neither Angular's nor NgDoc's is kept (`keptBuilder`).
|
|
77
|
+
* @param tree - The workspace tree.
|
|
78
|
+
* @param project - The application project.
|
|
79
|
+
* @param requested - The `--engine` option, if any.
|
|
80
|
+
* @param logger - Where the choice is explained.
|
|
81
|
+
*/
|
|
82
|
+
function selectEngine(tree, project, requested, logger) {
|
|
83
|
+
const build = project.targets.get('build')?.builder;
|
|
84
|
+
const serve = project.targets.get('serve')?.builder;
|
|
85
|
+
if (build === get_build_options_target_1.VITE_APPLICATION_BUILDER) {
|
|
86
|
+
if (requested === 'legacy') {
|
|
87
|
+
logger.warn(`⚠️ The project already builds with the Vite engine (${get_build_options_target_1.VITE_APPLICATION_BUILDER}); "--engine legacy" was ignored and the builders were kept.`);
|
|
88
|
+
}
|
|
89
|
+
return { engine: 'vite', existing: true, replaceBuilders: false };
|
|
90
|
+
}
|
|
91
|
+
// Any NgDoc builder, not only on `build` and `serve`, means the project already uses NgDoc.
|
|
92
|
+
const ngDocTarget = [...project.targets.entries()]
|
|
93
|
+
.map(([name, target]) => [name, target.builder ?? ''])
|
|
94
|
+
.find(([, builder]) => builder.startsWith(NG_DOC_BUILDER_PREFIX));
|
|
95
|
+
if (ngDocTarget) {
|
|
96
|
+
const message = `The project already uses the NgDoc builders ("${ngDocTarget[0]}" runs ${ngDocTarget[1]}); they were kept. To move it to the Vite engine, run "${exports.MIGRATE_TO_VITE}".`;
|
|
97
|
+
if (requested === 'vite') {
|
|
98
|
+
logger.warn(`⚠️ "--engine vite" was ignored. ${message}`);
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
logger.info(`ℹ️ ${message}`);
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
engine: 'legacy',
|
|
105
|
+
existing: true,
|
|
106
|
+
replaceBuilders: !!build?.startsWith(NG_DOC_BUILDER_PREFIX) || !!serve?.startsWith(NG_DOC_BUILDER_PREFIX),
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
// A builder NgDoc doesn't know is kept, unless `--engine` asks for NgDoc's builders. The
|
|
110
|
+
// documentation is then generated with the `ng-doc` command next to it.
|
|
111
|
+
const foreign = requested
|
|
112
|
+
? undefined
|
|
113
|
+
: [
|
|
114
|
+
['build', build],
|
|
115
|
+
['serve', serve],
|
|
116
|
+
].find((entry) => !!entry[1] && isForeignBuilder(entry[1]));
|
|
117
|
+
if (foreign) {
|
|
118
|
+
logger.info(`ℹ️ The "${foreign[0]}" target uses "${foreign[1]}", which NgDoc doesn't replace, so the "build" and "serve" builders were kept and no NgDoc builder was set up. Generate the documentation with the "ng-doc" command next to your builder: ${exports.KEEP_ANOTHER_BUILDER_URL}`);
|
|
119
|
+
return { engine: 'legacy', existing: false, replaceBuilders: false, keptBuilder: foreign[1] };
|
|
120
|
+
}
|
|
121
|
+
if (isNgModuleApp(tree, project)) {
|
|
122
|
+
if (requested === 'vite') {
|
|
123
|
+
throw new schematics_1.SchematicsException(`[NGDOC_ADD_ENGINE] "ng add" sets up the Vite engine for standalone applications (bootstrapApplication), and this application bootstraps an NgModule. Run "ng add @ng-doc/add --engine legacy", then "${exports.MIGRATE_TO_VITE}" if you want the Vite engine.`);
|
|
124
|
+
}
|
|
125
|
+
if (requested === undefined) {
|
|
126
|
+
logger.info(`ℹ️ The application bootstraps an NgModule, so NgDoc uses the legacy builders. "${exports.MIGRATE_TO_VITE}" moves it to the Vite engine later.`);
|
|
127
|
+
}
|
|
128
|
+
return { engine: 'legacy', existing: false, replaceBuilders: true };
|
|
129
|
+
}
|
|
130
|
+
// The Vite setup reads the options of Angular's application builder. Without `--engine`, another
|
|
131
|
+
// builder (a browser builder, Nx's `browser-esbuild`) gets the legacy builders, as before; an
|
|
132
|
+
// explicit `--engine vite` goes on to the Vite setup, which refuses it and says why.
|
|
133
|
+
if (requested === undefined && !exports.ANGULAR_APPLICATION_BUILDERS.includes(build ?? '')) {
|
|
134
|
+
logger.info(`ℹ️ The "build" target uses ${build ? `"${build}"` : 'no builder'}, not Angular's application builder, so NgDoc uses the legacy builders.`);
|
|
135
|
+
return { engine: 'legacy', existing: false, replaceBuilders: true };
|
|
136
|
+
}
|
|
137
|
+
return { engine: requested ?? 'vite', existing: false, replaceBuilders: true };
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=select-engine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-engine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