@yuuvis/client-cli 19.2.0 → 19.3.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 +3 -1
- package/package.json +1 -1
- package/schematics/commands/angular-json.d.ts +122 -0
- package/schematics/commands/angular-json.js +228 -0
- package/schematics/commands/angular-json.js.map +1 -0
- package/schematics/commands/app-config-ts.d.ts +11 -0
- package/schematics/commands/app-config-ts.js +44 -0
- package/schematics/commands/app-config-ts.js.map +1 -0
- package/schematics/commands/app-routes-ts.d.ts +12 -0
- package/schematics/commands/app-routes-ts.js +72 -0
- package/schematics/commands/app-routes-ts.js.map +1 -0
- package/schematics/commands/library-component.d.ts +25 -0
- package/schematics/commands/library-component.js +71 -0
- package/schematics/commands/library-component.js.map +1 -0
- package/schematics/commands/ng-package-json.d.ts +67 -0
- package/schematics/commands/ng-package-json.js +102 -0
- package/schematics/commands/ng-package-json.js.map +1 -0
- package/schematics/commands/package-json.d.ts +102 -0
- package/schematics/commands/package-json.js +158 -0
- package/schematics/commands/package-json.js.map +1 -0
- package/schematics/commands/public-api-ts.d.ts +68 -0
- package/schematics/commands/public-api-ts.js +102 -0
- package/schematics/commands/public-api-ts.js.map +1 -0
- package/schematics/commands/tsconfig-json.d.ts +71 -0
- package/schematics/commands/tsconfig-json.js +118 -0
- package/schematics/commands/tsconfig-json.js.map +1 -0
- package/schematics/commands/typescript-file.d.ts +64 -0
- package/schematics/commands/typescript-file.js +127 -0
- package/schematics/commands/typescript-file.js.map +1 -0
- package/schematics/factories/add-app/index.js +6 -5
- package/schematics/factories/add-app/index.js.map +1 -1
- package/schematics/factories/generate-app/index.js +107 -63
- package/schematics/factories/generate-app/index.js.map +1 -1
- package/schematics/factories/new/index.js +66 -27
- package/schematics/factories/new/index.js.map +1 -1
- package/schematics/files/_root/README.md +8 -0
- package/schematics/files/_scripts/update-shell.js +18 -0
- package/schematics/files/_src/styles.scss +4 -3
- package/schematics/files/_src_app/app.routes.ts.template +1 -1
- package/schematics/patches/impl/0001.patch.js +4 -15
- package/schematics/patches/impl/0001.patch.js.map +1 -1
- package/schematics/project-util.d.ts +1 -1
- package/schematics/project-util.js +1 -0
- package/schematics/project-util.js.map +1 -1
- package/schematics/rules/app-config.d.ts +2 -0
- package/schematics/{tasks/copy-ui-files.js → rules/app-config.js} +13 -14
- package/schematics/rules/app-config.js.map +1 -0
- package/schematics/{tasks/update-app-routes.d.ts → rules/app-routes.d.ts} +1 -1
- package/schematics/{tasks/copy-extensions-files.js → rules/app-routes.js} +13 -14
- package/schematics/rules/app-routes.js.map +1 -0
- package/schematics/{tasks → rules}/clean-up-ng-app.js.map +1 -1
- package/schematics/{tasks/copy-extensions-files.d.ts → rules/copy-resources.d.ts} +2 -0
- package/schematics/{tasks/copy-files.js → rules/copy-resources.js} +31 -3
- package/schematics/rules/copy-resources.js.map +1 -0
- package/schematics/rules/create-update-manifest.d.ts +3 -0
- package/schematics/{tasks → rules}/create-update-manifest.js +2 -2
- package/schematics/rules/create-update-manifest.js.map +1 -0
- package/schematics/{tasks → rules}/generate-library.js.map +1 -1
- package/schematics/{tasks → rules}/ng-new.js.map +1 -1
- package/schematics/{tasks → rules}/npm-install.js.map +1 -1
- package/schematics/schematics-util.d.ts +1 -2
- package/schematics/schematics-util.js +0 -13
- package/schematics/schematics-util.js.map +1 -1
- package/schematics/types/ng-package-json.d.ts +93 -0
- package/schematics/types/ng-package-json.js +3 -0
- package/schematics/types/ng-package-json.js.map +1 -0
- package/schematics/{types.d.ts → types/package-json.d.ts} +3 -0
- package/schematics/{types.js → types/package-json.js} +1 -1
- package/schematics/types/package-json.js.map +1 -0
- package/schematics/types/tsconfig-json.d.ts +69 -0
- package/schematics/types/tsconfig-json.js +3 -0
- package/schematics/types/tsconfig-json.js.map +1 -0
- package/schematics/tasks/copy-extensions-files.js.map +0 -1
- package/schematics/tasks/copy-files.d.ts +0 -2
- package/schematics/tasks/copy-files.js.map +0 -1
- package/schematics/tasks/copy-ui-files.d.ts +0 -2
- package/schematics/tasks/copy-ui-files.js.map +0 -1
- package/schematics/tasks/create-update-manifest.d.ts +0 -4
- package/schematics/tasks/create-update-manifest.js.map +0 -1
- package/schematics/tasks/update-angular-json.d.ts +0 -4
- package/schematics/tasks/update-angular-json.js +0 -105
- package/schematics/tasks/update-angular-json.js.map +0 -1
- package/schematics/tasks/update-app-config.d.ts +0 -2
- package/schematics/tasks/update-app-config.js +0 -69
- package/schematics/tasks/update-app-config.js.map +0 -1
- package/schematics/tasks/update-app-ng-package-json.d.ts +0 -2
- package/schematics/tasks/update-app-ng-package-json.js +0 -71
- package/schematics/tasks/update-app-ng-package-json.js.map +0 -1
- package/schematics/tasks/update-app-routes.js +0 -91
- package/schematics/tasks/update-app-routes.js.map +0 -1
- package/schematics/tasks/update-library-component.d.ts +0 -2
- package/schematics/tasks/update-library-component.js +0 -108
- package/schematics/tasks/update-library-component.js.map +0 -1
- package/schematics/tasks/update-library-public-api.d.ts +0 -2
- package/schematics/tasks/update-library-public-api.js +0 -38
- package/schematics/tasks/update-library-public-api.js.map +0 -1
- package/schematics/tasks/update-library-tsconfig.d.ts +0 -2
- package/schematics/tasks/update-library-tsconfig.js +0 -51
- package/schematics/tasks/update-library-tsconfig.js.map +0 -1
- package/schematics/tasks/update-package-json.d.ts +0 -2
- package/schematics/tasks/update-package-json.js +0 -32
- package/schematics/tasks/update-package-json.js.map +0 -1
- package/schematics/types.js.map +0 -1
- /package/schematics/{tasks → rules}/clean-up-ng-app.d.ts +0 -0
- /package/schematics/{tasks → rules}/clean-up-ng-app.js +0 -0
- /package/schematics/{tasks → rules}/generate-library.d.ts +0 -0
- /package/schematics/{tasks → rules}/generate-library.js +0 -0
- /package/schematics/{tasks → rules}/ng-new.d.ts +0 -0
- /package/schematics/{tasks → rules}/ng-new.js +0 -0
- /package/schematics/{tasks → rules}/npm-install.d.ts +0 -0
- /package/schematics/{tasks → rules}/npm-install.js +0 -0
package/README.md
CHANGED
|
@@ -62,7 +62,9 @@ yuv g a <name> [options]
|
|
|
62
62
|
`<name>`: The name of the app.
|
|
63
63
|
|
|
64
64
|
#### Options
|
|
65
|
+
- `--app-header`: Use the shell's app header layout.
|
|
65
66
|
- `--app-id`: The ID of the app.
|
|
67
|
+
- `--hide-from-nav`: Do not show the app icon i the navigation bar.
|
|
66
68
|
- `--prefix`: A prefix to apply to generated selectors.
|
|
67
69
|
- `--route`: The route under which the app is registered in the client.
|
|
68
70
|
- `--skip-extension`: Do not create extension for the app.
|
|
@@ -99,7 +101,7 @@ Lists all available patches.
|
|
|
99
101
|
yuv patch list
|
|
100
102
|
|
|
101
103
|
# short form
|
|
102
|
-
yuv p l
|
|
104
|
+
yuv p l
|
|
103
105
|
```
|
|
104
106
|
|
|
105
107
|
### patch apply
|
package/package.json
CHANGED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { Tree } from "@angular-devkit/schematics";
|
|
2
|
+
export type ComponentStyle = 'css' | 'scss' | 'sass' | 'less' | 'styl' | 'stylus';
|
|
3
|
+
/**
|
|
4
|
+
* Interface for commands that can be executed on an angular.json object.
|
|
5
|
+
*/
|
|
6
|
+
export interface AngularJsonCommand {
|
|
7
|
+
/**
|
|
8
|
+
* Executes the command on the provided angular.json object.
|
|
9
|
+
* @param angularJson The angular.json object to modify.
|
|
10
|
+
*/
|
|
11
|
+
execute(angularJson: any): void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Composite command that executes multiple AngularJsonCommand instances.
|
|
15
|
+
*/
|
|
16
|
+
export declare class CompositeAngularJsonCommand implements AngularJsonCommand {
|
|
17
|
+
private readonly commands;
|
|
18
|
+
constructor(commands: AngularJsonCommand[]);
|
|
19
|
+
/**
|
|
20
|
+
* Executes all commands in the composite command.
|
|
21
|
+
* @param angularJson The angular.json object to modify.
|
|
22
|
+
*/
|
|
23
|
+
execute(angularJson: any): void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Adds build options assets for a specific project in angular.json.
|
|
27
|
+
*/
|
|
28
|
+
export declare class AddBuildOptionsAssetsToProjectCommand implements AngularJsonCommand {
|
|
29
|
+
private readonly projectName;
|
|
30
|
+
private readonly assets;
|
|
31
|
+
constructor(projectName: string, assets: (string | object)[]);
|
|
32
|
+
execute(angularJson: any): void;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Adds build options scripts for a specific project in angular.json.
|
|
36
|
+
*/
|
|
37
|
+
export declare class AddBuildOptionsScriptsToProjectCommand implements AngularJsonCommand {
|
|
38
|
+
private readonly projectName;
|
|
39
|
+
private readonly scripts;
|
|
40
|
+
constructor(projectName: string, scripts: string[]);
|
|
41
|
+
execute(angularJson: any): void;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Adds allowedCommonJsDependencies for a specific project in angular.json.
|
|
45
|
+
*/
|
|
46
|
+
export declare class AdddAllowedCommonJsDependenciesToProjectCommand implements AngularJsonCommand {
|
|
47
|
+
private readonly projectName;
|
|
48
|
+
private readonly dependencies;
|
|
49
|
+
constructor(projectName: string, dependencies: string[]);
|
|
50
|
+
execute(angularJson: any): void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Updates the initial budget for a specific project in angular.json.
|
|
54
|
+
*/
|
|
55
|
+
export declare class UpdateInitialBudgetForProjectCommand implements AngularJsonCommand {
|
|
56
|
+
private readonly projectName;
|
|
57
|
+
private readonly budget;
|
|
58
|
+
constructor(projectName: string, budget: {
|
|
59
|
+
maximumWarning?: string;
|
|
60
|
+
maximumError?: string;
|
|
61
|
+
});
|
|
62
|
+
execute(angularJson: any): void;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Updates the file replacements for the development configuration of a specific project in angular.json.
|
|
66
|
+
*/
|
|
67
|
+
export declare class UpdateDevFileReplacementsForProjectCommand implements AngularJsonCommand {
|
|
68
|
+
private readonly projectName;
|
|
69
|
+
private readonly fileReplacements;
|
|
70
|
+
constructor(projectName: string, fileReplacements: {
|
|
71
|
+
replace: string;
|
|
72
|
+
with: string;
|
|
73
|
+
}[]);
|
|
74
|
+
execute(angularJson: any): void;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Sets the style for Angular component schematic in a specific project in angular.json.
|
|
78
|
+
*/
|
|
79
|
+
export declare class SetStyleForProjectCommand implements AngularJsonCommand {
|
|
80
|
+
private readonly projectName;
|
|
81
|
+
private readonly style;
|
|
82
|
+
constructor(projectName: string, style: ComponentStyle);
|
|
83
|
+
execute(angularJson: any): void;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Class for editing the angular.json file.
|
|
87
|
+
*/
|
|
88
|
+
export declare class AngularJsonEditor {
|
|
89
|
+
private readonly tree;
|
|
90
|
+
private readonly path;
|
|
91
|
+
private constructor();
|
|
92
|
+
/**
|
|
93
|
+
* Creates a new AngularJsonEditor instance.
|
|
94
|
+
* @param tree The Angular DevKit Tree to operate on.
|
|
95
|
+
* @param path The path to the angular.json file. Defaults to 'angular.json'.
|
|
96
|
+
* @returns A Promise that resolves to a new AngularJsonEditor instance.
|
|
97
|
+
*/
|
|
98
|
+
static create(tree: Tree, path?: string): Promise<AngularJsonEditor>;
|
|
99
|
+
/**
|
|
100
|
+
* Executes the given command on the angular.json file.
|
|
101
|
+
* @param command The command to execute on the angular.json file.
|
|
102
|
+
*/
|
|
103
|
+
run(command: AngularJsonCommand): void;
|
|
104
|
+
/**
|
|
105
|
+
* Gets the content of the angular.json file.
|
|
106
|
+
* @returns The content of the angular.json file as an object.
|
|
107
|
+
*/
|
|
108
|
+
getContent(): any;
|
|
109
|
+
/**
|
|
110
|
+
* Loads the angular.json file from the specified path.
|
|
111
|
+
* If the file does not exist or cannot be read, it throws a SchematicsException.
|
|
112
|
+
* @returns The angular.json object loaded from the file.
|
|
113
|
+
* @throws {SchematicsException} If the angular.json file does not exist or cannot be read.
|
|
114
|
+
*/
|
|
115
|
+
private load;
|
|
116
|
+
/**
|
|
117
|
+
* Saves the angular.json file to the specified path.
|
|
118
|
+
* @param angularJson The angular.json object to save.
|
|
119
|
+
* This method overwrites the existing angular.json file with the provided object.
|
|
120
|
+
*/
|
|
121
|
+
private save;
|
|
122
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AngularJsonEditor = exports.SetStyleForProjectCommand = exports.UpdateDevFileReplacementsForProjectCommand = exports.UpdateInitialBudgetForProjectCommand = exports.AdddAllowedCommonJsDependenciesToProjectCommand = exports.AddBuildOptionsScriptsToProjectCommand = exports.AddBuildOptionsAssetsToProjectCommand = exports.CompositeAngularJsonCommand = void 0;
|
|
13
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
14
|
+
const project_util_1 = require("../project-util");
|
|
15
|
+
/**
|
|
16
|
+
* Composite command that executes multiple AngularJsonCommand instances.
|
|
17
|
+
*/
|
|
18
|
+
class CompositeAngularJsonCommand {
|
|
19
|
+
constructor(commands) {
|
|
20
|
+
this.commands = commands;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Executes all commands in the composite command.
|
|
24
|
+
* @param angularJson The angular.json object to modify.
|
|
25
|
+
*/
|
|
26
|
+
execute(angularJson) {
|
|
27
|
+
this.commands.forEach(command => command.execute(angularJson));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.CompositeAngularJsonCommand = CompositeAngularJsonCommand;
|
|
31
|
+
/**
|
|
32
|
+
* Adds build options assets for a specific project in angular.json.
|
|
33
|
+
*/
|
|
34
|
+
class AddBuildOptionsAssetsToProjectCommand {
|
|
35
|
+
constructor(projectName, assets) {
|
|
36
|
+
this.projectName = projectName;
|
|
37
|
+
this.assets = assets;
|
|
38
|
+
}
|
|
39
|
+
execute(angularJson) {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
const project = getProject(angularJson, this.projectName);
|
|
42
|
+
const buildOptions = (_b = (_a = project.architect) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.options;
|
|
43
|
+
if (!buildOptions.assets) {
|
|
44
|
+
buildOptions.assets = [];
|
|
45
|
+
}
|
|
46
|
+
buildOptions.assets.push(...this.assets);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.AddBuildOptionsAssetsToProjectCommand = AddBuildOptionsAssetsToProjectCommand;
|
|
50
|
+
/**
|
|
51
|
+
* Adds build options scripts for a specific project in angular.json.
|
|
52
|
+
*/
|
|
53
|
+
class AddBuildOptionsScriptsToProjectCommand {
|
|
54
|
+
constructor(projectName, scripts) {
|
|
55
|
+
this.projectName = projectName;
|
|
56
|
+
this.scripts = scripts;
|
|
57
|
+
}
|
|
58
|
+
execute(angularJson) {
|
|
59
|
+
var _a, _b;
|
|
60
|
+
const project = getProject(angularJson, this.projectName);
|
|
61
|
+
const buildOptions = (_b = (_a = project.architect) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.options;
|
|
62
|
+
if (!buildOptions.scripts) {
|
|
63
|
+
buildOptions.scripts = [];
|
|
64
|
+
}
|
|
65
|
+
buildOptions.scripts.push(...this.scripts);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.AddBuildOptionsScriptsToProjectCommand = AddBuildOptionsScriptsToProjectCommand;
|
|
69
|
+
/**
|
|
70
|
+
* Adds allowedCommonJsDependencies for a specific project in angular.json.
|
|
71
|
+
*/
|
|
72
|
+
class AdddAllowedCommonJsDependenciesToProjectCommand {
|
|
73
|
+
constructor(projectName, dependencies) {
|
|
74
|
+
this.projectName = projectName;
|
|
75
|
+
this.dependencies = dependencies;
|
|
76
|
+
}
|
|
77
|
+
execute(angularJson) {
|
|
78
|
+
var _a, _b;
|
|
79
|
+
const project = getProject(angularJson, this.projectName);
|
|
80
|
+
const buildOptions = (_b = (_a = project.architect) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.options;
|
|
81
|
+
if (!buildOptions.allowedCommonJsDependencies) {
|
|
82
|
+
buildOptions.allowedCommonJsDependencies = [];
|
|
83
|
+
}
|
|
84
|
+
buildOptions.allowedCommonJsDependencies.push(...this.dependencies);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.AdddAllowedCommonJsDependenciesToProjectCommand = AdddAllowedCommonJsDependenciesToProjectCommand;
|
|
88
|
+
/**
|
|
89
|
+
* Updates the initial budget for a specific project in angular.json.
|
|
90
|
+
*/
|
|
91
|
+
class UpdateInitialBudgetForProjectCommand {
|
|
92
|
+
constructor(projectName, budget) {
|
|
93
|
+
this.projectName = projectName;
|
|
94
|
+
this.budget = budget;
|
|
95
|
+
}
|
|
96
|
+
execute(angularJson) {
|
|
97
|
+
var _a, _b;
|
|
98
|
+
const project = getProject(angularJson, this.projectName);
|
|
99
|
+
const budgets = (_b = (_a = project.architect) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.configurations.production.budgets;
|
|
100
|
+
const initialBudget = budgets.find((b) => b.type === 'initial');
|
|
101
|
+
if (initialBudget) {
|
|
102
|
+
['maximumWarning', 'maximumError'].forEach(key => {
|
|
103
|
+
if (this.budget[key] !== undefined) {
|
|
104
|
+
initialBudget[key] = this.budget[key];
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
exports.UpdateInitialBudgetForProjectCommand = UpdateInitialBudgetForProjectCommand;
|
|
111
|
+
;
|
|
112
|
+
/**
|
|
113
|
+
* Updates the file replacements for the development configuration of a specific project in angular.json.
|
|
114
|
+
*/
|
|
115
|
+
class UpdateDevFileReplacementsForProjectCommand {
|
|
116
|
+
constructor(projectName, fileReplacements) {
|
|
117
|
+
this.projectName = projectName;
|
|
118
|
+
this.fileReplacements = fileReplacements;
|
|
119
|
+
}
|
|
120
|
+
execute(angularJson) {
|
|
121
|
+
var _a, _b, _c;
|
|
122
|
+
const project = getProject(angularJson, this.projectName);
|
|
123
|
+
const devConfig = (_c = (_b = (_a = project.architect) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.configurations) === null || _c === void 0 ? void 0 : _c.development;
|
|
124
|
+
if (!devConfig) {
|
|
125
|
+
throw new schematics_1.SchematicsException(`Development configuration not found for project "${this.projectName}" in angular.json.`);
|
|
126
|
+
}
|
|
127
|
+
if (!devConfig.fileReplacements) {
|
|
128
|
+
devConfig.fileReplacements = [];
|
|
129
|
+
}
|
|
130
|
+
devConfig.fileReplacements.push(...this.fileReplacements);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
exports.UpdateDevFileReplacementsForProjectCommand = UpdateDevFileReplacementsForProjectCommand;
|
|
134
|
+
/**
|
|
135
|
+
* Sets the style for Angular component schematic in a specific project in angular.json.
|
|
136
|
+
*/
|
|
137
|
+
class SetStyleForProjectCommand {
|
|
138
|
+
constructor(projectName, style) {
|
|
139
|
+
this.projectName = projectName;
|
|
140
|
+
this.style = style;
|
|
141
|
+
}
|
|
142
|
+
execute(angularJson) {
|
|
143
|
+
var _a;
|
|
144
|
+
const componentSchematicsKey = '@schematics/angular:component';
|
|
145
|
+
const project = getProject(angularJson, this.projectName);
|
|
146
|
+
const schematics = project.schematics || {};
|
|
147
|
+
schematics[componentSchematicsKey] = Object.assign(Object.assign({}, ((_a = schematics[componentSchematicsKey]) !== null && _a !== void 0 ? _a : {})), { style: this.style });
|
|
148
|
+
project.schematics = schematics;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
exports.SetStyleForProjectCommand = SetStyleForProjectCommand;
|
|
152
|
+
/**
|
|
153
|
+
* Class for editing the angular.json file.
|
|
154
|
+
*/
|
|
155
|
+
class AngularJsonEditor {
|
|
156
|
+
constructor(tree, path) {
|
|
157
|
+
this.tree = tree;
|
|
158
|
+
this.path = path;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Creates a new AngularJsonEditor instance.
|
|
162
|
+
* @param tree The Angular DevKit Tree to operate on.
|
|
163
|
+
* @param path The path to the angular.json file. Defaults to 'angular.json'.
|
|
164
|
+
* @returns A Promise that resolves to a new AngularJsonEditor instance.
|
|
165
|
+
*/
|
|
166
|
+
static create(tree, path) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
const angularJsonPath = path !== null && path !== void 0 ? path : yield (0, project_util_1.getAngularJsonPath)(tree);
|
|
169
|
+
return new AngularJsonEditor(tree, angularJsonPath);
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Executes the given command on the angular.json file.
|
|
174
|
+
* @param command The command to execute on the angular.json file.
|
|
175
|
+
*/
|
|
176
|
+
run(command) {
|
|
177
|
+
const angularJson = this.load();
|
|
178
|
+
command.execute(angularJson);
|
|
179
|
+
this.save(angularJson);
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Gets the content of the angular.json file.
|
|
183
|
+
* @returns The content of the angular.json file as an object.
|
|
184
|
+
*/
|
|
185
|
+
getContent() {
|
|
186
|
+
return this.load();
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Loads the angular.json file from the specified path.
|
|
190
|
+
* If the file does not exist or cannot be read, it throws a SchematicsException.
|
|
191
|
+
* @returns The angular.json object loaded from the file.
|
|
192
|
+
* @throws {SchematicsException} If the angular.json file does not exist or cannot be read.
|
|
193
|
+
*/
|
|
194
|
+
load() {
|
|
195
|
+
if (!this.tree.exists(this.path)) {
|
|
196
|
+
throw new schematics_1.SchematicsException(`angular.json not found at ${this.path}`);
|
|
197
|
+
}
|
|
198
|
+
const content = this.tree.read(this.path);
|
|
199
|
+
if (!content) {
|
|
200
|
+
throw new schematics_1.SchematicsException(`Failed to read angular.json at ${this.path}`);
|
|
201
|
+
}
|
|
202
|
+
return JSON.parse(content.toString());
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Saves the angular.json file to the specified path.
|
|
206
|
+
* @param angularJson The angular.json object to save.
|
|
207
|
+
* This method overwrites the existing angular.json file with the provided object.
|
|
208
|
+
*/
|
|
209
|
+
save(angularJson) {
|
|
210
|
+
this.tree.overwrite(this.path, JSON.stringify(angularJson, null, 2));
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
exports.AngularJsonEditor = AngularJsonEditor;
|
|
214
|
+
/**
|
|
215
|
+
* Retrieves a project from the angular.json file by its name.
|
|
216
|
+
* @param angularJson The angular.json object to search in.
|
|
217
|
+
* @param projectName The name of the project to retrieve.
|
|
218
|
+
* @returns The project object if found.
|
|
219
|
+
* @throws {SchematicsException} If the project is not found.
|
|
220
|
+
*/
|
|
221
|
+
function getProject(angularJson, projectName) {
|
|
222
|
+
const project = angularJson.projects[projectName];
|
|
223
|
+
if (!project) {
|
|
224
|
+
throw new schematics_1.SchematicsException(`Project "${projectName}" not found in angular.json.`);
|
|
225
|
+
}
|
|
226
|
+
return project;
|
|
227
|
+
}
|
|
228
|
+
//# sourceMappingURL=angular-json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-json.js","sourceRoot":"","sources":["../../../src/schematics/commands/angular-json.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2DAAuE;AACvE,kDAAqD;AAerD;;GAEG;AACH,MAAa,2BAA2B;IACtC,YAA6B,QAA8B;QAA9B,aAAQ,GAAR,QAAQ,CAA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AAI,CAAC,CAAC;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,gCAAmB,CAAC,kCAAkC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAC/E,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACxC,CAAC;IAED;;;;OAIG;IACK,IAAI,CAAC,WAAgB;QAC3B,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACvE,CAAC;CACF;AA1DD,8CA0DC;AAED;;;;;;KAMK;AACH,SAAS,UAAU,CAAC,WAAgB,EAAE,WAAmB;IACvD,MAAM,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAClD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,gCAAmB,CAAC,YAAY,WAAW,8BAA8B,CAAC,CAAC;IACvF,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
import { TypeScriptFileCommand } from "./typescript-file";
|
|
3
|
+
import { UpdateRecorder } from "@angular-devkit/schematics";
|
|
4
|
+
export interface AppConfigTsCommand extends TypeScriptFileCommand {
|
|
5
|
+
}
|
|
6
|
+
export declare class AddShellExtensionsImportCommand implements AppConfigTsCommand {
|
|
7
|
+
private readonly appId;
|
|
8
|
+
private readonly extensionsFileName;
|
|
9
|
+
constructor(appId: string, extensionsFileName: string);
|
|
10
|
+
execute(sourceFile: ts.SourceFile, recorder: UpdateRecorder, filePath: string): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AddShellExtensionsImportCommand = void 0;
|
|
7
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
8
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
9
|
+
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
|
|
10
|
+
const change_1 = require("@schematics/angular/utility/change");
|
|
11
|
+
class AddShellExtensionsImportCommand {
|
|
12
|
+
constructor(appId, extensionsFileName) {
|
|
13
|
+
this.appId = appId;
|
|
14
|
+
this.extensionsFileName = extensionsFileName;
|
|
15
|
+
}
|
|
16
|
+
execute(sourceFile, recorder, filePath) {
|
|
17
|
+
const callExpressions = (0, ast_utils_1.findNodes)(sourceFile, typescript_1.default.SyntaxKind.CallExpression);
|
|
18
|
+
const importShellCall = callExpressions.find((node) => node.expression.getText() === 'importShellExtensions');
|
|
19
|
+
if (!importShellCall) {
|
|
20
|
+
throw new schematics_1.SchematicsException(`Could not find importShellExtensions([...]) in ${filePath}.`);
|
|
21
|
+
}
|
|
22
|
+
const argumentArray = importShellCall.arguments[0];
|
|
23
|
+
if (!typescript_1.default.isArrayLiteralExpression(argumentArray)) {
|
|
24
|
+
throw new schematics_1.SchematicsException(`importShellExtensions([...]) does not contain a valid array in ${filePath}.`);
|
|
25
|
+
}
|
|
26
|
+
// check if the entry already exists
|
|
27
|
+
if (argumentArray.elements.some(el => typescript_1.default.isObjectLiteralExpression(el) &&
|
|
28
|
+
el.properties.some(p => typescript_1.default.isPropertyAssignment(p) &&
|
|
29
|
+
p.name.getText() === 'id' &&
|
|
30
|
+
p.initializer.getText().replace(/['"]/g, '') === this.appId) &&
|
|
31
|
+
el.properties.some(p => typescript_1.default.isPropertyAssignment(p) &&
|
|
32
|
+
p.name.getText() === 'extension' &&
|
|
33
|
+
p.initializer.getText() === this.extensionsFileName))) {
|
|
34
|
+
return; // Entry already exists, nothing to do.
|
|
35
|
+
}
|
|
36
|
+
const insertPosition = argumentArray.elements.end;
|
|
37
|
+
const prefix = argumentArray.elements.length > 0 ? ',\n' : '\n';
|
|
38
|
+
const newObject = `{ id: '${this.appId}.extension', extension: ${this.extensionsFileName} }`;
|
|
39
|
+
const insertChange = new change_1.InsertChange(filePath, insertPosition, `${prefix}${newObject}`);
|
|
40
|
+
(0, change_1.applyToUpdateRecorder)(recorder, [insertChange]);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.AddShellExtensionsImportCommand = AddShellExtensionsImportCommand;
|
|
44
|
+
//# sourceMappingURL=app-config-ts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-config-ts.js","sourceRoot":"","sources":["../../../src/schematics/commands/app-config-ts.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAE5B,2DAAiF;AACjF,qEAAkE;AAClE,+DAAyF;AAIzF,MAAa,+BAA+B;IAC1C,YAA6B,KAAa,EAAmB,kBAA0B;QAA1D,UAAK,GAAL,KAAK,CAAQ;QAAmB,uBAAkB,GAAlB,kBAAkB,CAAQ;IAAG,CAAC;IAE3F,OAAO,CAAC,UAAyB,EAAE,QAAwB,EAAE,QAAe;QAC1E,MAAM,eAAe,GAAG,IAAA,qBAAS,EAAC,UAAqB,EAAE,oBAAE,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;QACvF,MAAM,eAAe,GAAG,eAAe,CAAC,IAAI,CAC1C,CAAC,IAAI,EAAE,EAAE,CAAE,IAA0B,CAAC,UAAU,CAAC,OAAO,EAAE,KAAK,uBAAuB,CACvF,CAAC;QAEF,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,MAAM,IAAI,gCAAmB,CAAC,kDAAkD,QAAQ,GAAG,CAAC,CAAC;QAC/F,CAAC;QAED,MAAM,aAAa,GAAI,eAAqC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC1E,IAAI,CAAC,oBAAE,CAAC,wBAAwB,CAAC,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AY,CAAC,CAAC,CAAC;IAClD,CAAC;CACF;AAzCD,0EAyCC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SchematicContext, UpdateRecorder } from "@angular-devkit/schematics";
|
|
2
|
+
import { TypeScriptFileCommand } from "./typescript-file";
|
|
3
|
+
import { AppManifest } from "../app-manifest";
|
|
4
|
+
import ts from "typescript";
|
|
5
|
+
export interface AppRoutesTsCommand extends TypeScriptFileCommand {
|
|
6
|
+
}
|
|
7
|
+
export declare class AddAppConfigurationCommand implements AppRoutesTsCommand {
|
|
8
|
+
private readonly appName;
|
|
9
|
+
private readonly appManifest;
|
|
10
|
+
constructor(appName: string, appManifest: AppManifest);
|
|
11
|
+
execute(sourceFile: ts.SourceFile, recorder: UpdateRecorder, filePath: string, context: SchematicContext): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AddAppConfigurationCommand = void 0;
|
|
7
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
8
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
9
|
+
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
|
|
10
|
+
const change_1 = require("@schematics/angular/utility/change");
|
|
11
|
+
class AddAppConfigurationCommand {
|
|
12
|
+
constructor(appName, appManifest) {
|
|
13
|
+
this.appName = appName;
|
|
14
|
+
this.appManifest = appManifest;
|
|
15
|
+
}
|
|
16
|
+
execute(sourceFile, recorder, filePath, context) {
|
|
17
|
+
var _a, _b;
|
|
18
|
+
if (!this.appManifest.ui) {
|
|
19
|
+
throw new schematics_1.SchematicsException(`App manifest has no ui defined.`);
|
|
20
|
+
}
|
|
21
|
+
const svgIcon = this.appManifest.ui.svgIcon ? `
|
|
22
|
+
svgIcon: '${this.appManifest.ui.svgIcon}',` : '';
|
|
23
|
+
const appConfig = `
|
|
24
|
+
{
|
|
25
|
+
id: '${this.appManifest.id}',
|
|
26
|
+
title: '${this.appManifest.title}',
|
|
27
|
+
path: '${this.appManifest.ui.path}',${svgIcon}
|
|
28
|
+
iconName: '${this.appManifest.ui.iconName}',
|
|
29
|
+
canMatch: [canMatchFeature],
|
|
30
|
+
options: {
|
|
31
|
+
appHeader: ${((_a = this.appManifest.ui.options) === null || _a === void 0 ? void 0 : _a.appHeader) || false},
|
|
32
|
+
hideFromNav: ${((_b = this.appManifest.ui.options) === null || _b === void 0 ? void 0 : _b.hideFromNav) || false}
|
|
33
|
+
},
|
|
34
|
+
loadChildren: () => import('${this.appName}').then((m) => m.${this.appManifest.ui.routes})
|
|
35
|
+
}`;
|
|
36
|
+
// find node apps: App []
|
|
37
|
+
const variableStatements = (0, ast_utils_1.findNodes)(sourceFile, typescript_1.default.SyntaxKind.VariableStatement);
|
|
38
|
+
const appsVariable = variableStatements.find((v) => v.declarationList.declarations.some((d) => d.name.text === "apps"));
|
|
39
|
+
if (!appsVariable) {
|
|
40
|
+
throw new schematics_1.SchematicsException(`Cannot find 'apps' declaration in ${filePath}`);
|
|
41
|
+
}
|
|
42
|
+
// find position for insert
|
|
43
|
+
const appsArrayNode = appsVariable.declarationList.declarations[0].initializer;
|
|
44
|
+
if (!appsArrayNode || !typescript_1.default.isArrayLiteralExpression(appsArrayNode)) {
|
|
45
|
+
throw new schematics_1.SchematicsException(`'apps' is not an array in ${filePath}`);
|
|
46
|
+
}
|
|
47
|
+
if (hasAppWithProperty(appsArrayNode, 'id', this.appManifest.id)) {
|
|
48
|
+
throw new schematics_1.SchematicsException(`App with id '${this.appManifest.id}' is already registered in ${filePath}`);
|
|
49
|
+
}
|
|
50
|
+
const routeAlreadyRegistered = hasAppWithProperty(appsArrayNode, 'path', this.appManifest.ui.path);
|
|
51
|
+
const insertPosition = appsArrayNode.elements.end;
|
|
52
|
+
const change = new change_1.InsertChange(filePath, insertPosition, `${appsArrayNode.elements.length > 0 ? "," : ""} ${appConfig}`);
|
|
53
|
+
(0, change_1.applyToUpdateRecorder)(recorder, [change]);
|
|
54
|
+
if (routeAlreadyRegistered) {
|
|
55
|
+
context.logger.warn(`Duplicate app path '${this.appManifest.ui.path}' in ${filePath}. Only one app per path is accessible via the router. Please use unique paths.`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.AddAppConfigurationCommand = AddAppConfigurationCommand;
|
|
60
|
+
function hasAppWithProperty(arrayNode, propertyName, propertyValue) {
|
|
61
|
+
return arrayNode.elements.some((element) => {
|
|
62
|
+
if (!typescript_1.default.isObjectLiteralExpression(element)) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
return element.properties.some((property) => typescript_1.default.isPropertyAssignment(property) &&
|
|
66
|
+
typescript_1.default.isIdentifier(property.name) &&
|
|
67
|
+
property.name.text === propertyName &&
|
|
68
|
+
typescript_1.default.isStringLiteral(property.initializer) &&
|
|
69
|
+
property.initializer.text === propertyValue);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=app-routes-ts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-routes-ts.js","sourceRoot":"","sources":["../../../src/schematics/commands/app-routes-ts.ts"],"names":[],"mappings":";;;;;;AAAA,2DAAmG;AAGnG,4DAA4B;AAC5B,qEAAkE;AAClE,+DAAyF;AAIzF,MAAa,0BAA0B;IACrC,YAA6B,OAAe,EAAmB,WAAwB;QAA1D,YAAO,GAAP,OAAO,CAAQ;QAAmB,gBAAW,GAAX,WAAW,CAAa;IAAG,CAAC;IAE3F,OAAO,CAAC,UAAyB,EAAE,QAAwB,EAAE,QAAgB,EAAE,OAAyB;;QACtG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,CAAC;YACzB,MAAM,IAAI,gCAAmB,CAAC,iCAAiC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E,CAAC;YAC3C,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAC1C,oBAAE,CAAC,oBAAoB,CAAC,QAAQ,CAAC;YACjC,oBAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC9B,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,YAAY;YACnC,oBAAE,CAAC,eAAe,CAAC,QAAQ,CAAC,WAAW,CAAC;YACxC,QAAQ,CAAC,WAAW,CAAC,IAAI,KAAK,aAAa,CAC5C,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as ts from 'typescript';
|
|
2
|
+
import { UpdateRecorder } from "@angular-devkit/schematics";
|
|
3
|
+
import { TypeScriptFileCommand } from "./typescript-file";
|
|
4
|
+
/**
|
|
5
|
+
* Interface for commands that can be executed on a library component.
|
|
6
|
+
* This interface defines a method to execute a command that modifies the library component file.
|
|
7
|
+
*/
|
|
8
|
+
export interface LibraryComponentCommand extends TypeScriptFileCommand {
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Adds an import statement to the imports array of a component decorator.
|
|
12
|
+
*/
|
|
13
|
+
export declare class AddImportToComponentDecoratorCommand implements LibraryComponentCommand {
|
|
14
|
+
private readonly className;
|
|
15
|
+
constructor(className: string);
|
|
16
|
+
execute(sourceFile: ts.SourceFile, recorder: UpdateRecorder, filePath: string): void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Adds an inline template to a component decorator.
|
|
20
|
+
*/
|
|
21
|
+
export declare class AddInlineTemplateToComponentDecoratorCommand implements LibraryComponentCommand {
|
|
22
|
+
private readonly template;
|
|
23
|
+
constructor(template: string);
|
|
24
|
+
execute(sourceFile: ts.SourceFile, recorder: UpdateRecorder, filePath: string): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddInlineTemplateToComponentDecoratorCommand = exports.AddImportToComponentDecoratorCommand = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const schematics_util_1 = require("../schematics-util");
|
|
6
|
+
/**
|
|
7
|
+
* Adds an import statement to the imports array of a component decorator.
|
|
8
|
+
*/
|
|
9
|
+
class AddImportToComponentDecoratorCommand {
|
|
10
|
+
constructor(className) {
|
|
11
|
+
this.className = className;
|
|
12
|
+
}
|
|
13
|
+
execute(sourceFile, recorder, filePath) {
|
|
14
|
+
const componentDecorator = findComponentDecorator(sourceFile, filePath);
|
|
15
|
+
const importsProperty = (0, schematics_util_1.findDecoratorProperty)(componentDecorator, 'imports');
|
|
16
|
+
if (importsProperty) {
|
|
17
|
+
// 'imports' property exists: add TranslateModule to the array
|
|
18
|
+
const arrayLiteral = importsProperty.initializer;
|
|
19
|
+
if (!arrayLiteral.elements.some((el) => el.getText() === this.className)) {
|
|
20
|
+
const pos = arrayLiteral.elements.end; // add to the end of the array
|
|
21
|
+
recorder.insertRight(pos, arrayLiteral.elements.length ? `, ${this.className}` : this.className);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
// 'imports' property doesn't exist: create it
|
|
26
|
+
const decoratorArgs = componentDecorator.expression.arguments[0];
|
|
27
|
+
const pos = decoratorArgs.properties.end;
|
|
28
|
+
recorder.insertRight(pos, decoratorArgs.properties.length ? `, imports: [${this.className}]` : `imports: [${this.className}]`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.AddImportToComponentDecoratorCommand = AddImportToComponentDecoratorCommand;
|
|
33
|
+
/**
|
|
34
|
+
* Adds an inline template to a component decorator.
|
|
35
|
+
*/
|
|
36
|
+
class AddInlineTemplateToComponentDecoratorCommand {
|
|
37
|
+
constructor(template) {
|
|
38
|
+
this.template = template;
|
|
39
|
+
}
|
|
40
|
+
execute(sourceFile, recorder, filePath) {
|
|
41
|
+
const componentDecorator = findComponentDecorator(sourceFile, filePath);
|
|
42
|
+
const templateProperty = (0, schematics_util_1.findDecoratorProperty)(componentDecorator, 'template');
|
|
43
|
+
if (templateProperty) {
|
|
44
|
+
// 'template' property exists: replace its content
|
|
45
|
+
recorder.remove(templateProperty.initializer.pos, templateProperty.initializer.end - templateProperty.initializer.pos);
|
|
46
|
+
recorder.insertRight(templateProperty.initializer.pos, this.template);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
// 'template' property doesn't exist: create it
|
|
50
|
+
const decoratorArgs = componentDecorator.expression.arguments[0];
|
|
51
|
+
const pos = decoratorArgs.properties.end;
|
|
52
|
+
recorder.insertRight(pos, decoratorArgs.properties.length ? `, template: ${this.template}` : `template: ${this.template}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.AddInlineTemplateToComponentDecoratorCommand = AddInlineTemplateToComponentDecoratorCommand;
|
|
57
|
+
/**
|
|
58
|
+
* Finds the component decorator in a source file.
|
|
59
|
+
* @param sourceFile The TypeScript source file to search in.
|
|
60
|
+
* @param filePath The path of the file being processed, used for error messages.
|
|
61
|
+
* @returns The found component decorator as a CallExpression.
|
|
62
|
+
* @throws {SchematicsException} If no component decorator is found.
|
|
63
|
+
*/
|
|
64
|
+
function findComponentDecorator(sourceFile, filePath) {
|
|
65
|
+
const componentDecorator = (0, schematics_util_1.findComponentClassDecorator)(sourceFile);
|
|
66
|
+
if (!componentDecorator) {
|
|
67
|
+
throw new schematics_1.SchematicsException(`No @Component decorator found in ${filePath}. Unable to update.`);
|
|
68
|
+
}
|
|
69
|
+
return componentDecorator;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=library-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-component.js","sourceRoot":"","sources":["../../../src/schematics/commands/library-component.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