@o3r/schematics 9.1.0-alpha.22 → 9.1.0-alpha.23
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +5 -5
- package/src/utility/index.d.ts +1 -0
- package/src/utility/index.d.ts.map +1 -1
- package/src/utility/index.js +1 -0
- package/src/utility/index.js.map +1 -1
- package/src/utility/logo.d.ts +5 -0
- package/src/utility/logo.d.ts.map +1 -0
- package/src/utility/logo.js +51 -0
- package/src/utility/logo.js.map +1 -0
- package/index.d.ts +0 -7
- package/index.d.ts.map +0 -1
- package/index.js +0 -10
- package/index.js.map +0 -1
- package/interfaces/angular-workspace.d.ts +0 -62
- package/interfaces/angular-workspace.d.ts.map +0 -1
- package/interfaces/angular-workspace.js +0 -3
- package/interfaces/angular-workspace.js.map +0 -1
- package/interfaces/index.d.ts +0 -3
- package/interfaces/index.d.ts.map +0 -1
- package/interfaces/index.js +0 -6
- package/interfaces/index.js.map +0 -1
- package/interfaces/schematic-option.d.ts +0 -5
- package/interfaces/schematic-option.d.ts.map +0 -1
- package/interfaces/schematic-option.js +0 -3
- package/interfaces/schematic-option.js.map +0 -1
- package/modules/index.d.ts +0 -3
- package/modules/index.d.ts.map +0 -1
- package/modules/index.js +0 -6
- package/modules/index.js.map +0 -1
- package/modules/modules.constants.d.ts +0 -34
- package/modules/modules.constants.d.ts.map +0 -1
- package/modules/modules.constants.js +0 -12
- package/modules/modules.constants.js.map +0 -1
- package/modules/modules.helpers.d.ts +0 -60
- package/modules/modules.helpers.d.ts.map +0 -1
- package/modules/modules.helpers.js +0 -165
- package/modules/modules.helpers.js.map +0 -1
- package/public_api.d.ts +0 -2
- package/public_api.d.ts.map +0 -1
- package/public_api.js +0 -5
- package/public_api.js.map +0 -1
- package/rule-factories/add-imports/index.d.ts +0 -12
- package/rule-factories/add-imports/index.d.ts.map +0 -1
- package/rule-factories/add-imports/index.js +0 -26
- package/rule-factories/add-imports/index.js.map +0 -1
- package/rule-factories/check-packages-peers/index.d.ts +0 -8
- package/rule-factories/check-packages-peers/index.d.ts.map +0 -1
- package/rule-factories/check-packages-peers/index.js +0 -106
- package/rule-factories/check-packages-peers/index.js.map +0 -1
- package/rule-factories/eslint-fix/index.d.ts +0 -28
- package/rule-factories/eslint-fix/index.d.ts.map +0 -1
- package/rule-factories/eslint-fix/index.js +0 -71
- package/rule-factories/eslint-fix/index.js.map +0 -1
- package/rule-factories/index.d.ts +0 -9
- package/rule-factories/index.d.ts.map +0 -1
- package/rule-factories/index.js +0 -12
- package/rule-factories/index.js.map +0 -1
- package/rule-factories/interfaces.d.ts +0 -6
- package/rule-factories/interfaces.d.ts.map +0 -1
- package/rule-factories/interfaces.js +0 -3
- package/rule-factories/interfaces.js.map +0 -1
- package/rule-factories/ng-add/index.d.ts +0 -38
- package/rule-factories/ng-add/index.d.ts.map +0 -1
- package/rule-factories/ng-add/index.js +0 -174
- package/rule-factories/ng-add/index.js.map +0 -1
- package/rule-factories/remove-packages/index.d.ts +0 -9
- package/rule-factories/remove-packages/index.d.ts.map +0 -1
- package/rule-factories/remove-packages/index.js +0 -29
- package/rule-factories/remove-packages/index.js.map +0 -1
- package/rule-factories/update-imports/index.d.ts +0 -5
- package/rule-factories/update-imports/index.d.ts.map +0 -1
- package/rule-factories/update-imports/index.js +0 -8
- package/rule-factories/update-imports/index.js.map +0 -1
- package/rule-factories/update-imports/list-of-vars.d.ts +0 -15
- package/rule-factories/update-imports/list-of-vars.d.ts.map +0 -1
- package/rule-factories/update-imports/list-of-vars.js +0 -44
- package/rule-factories/update-imports/list-of-vars.js.map +0 -1
- package/rule-factories/update-imports/update-imports-with-scope.d.ts +0 -12
- package/rule-factories/update-imports/update-imports-with-scope.d.ts.map +0 -1
- package/rule-factories/update-imports/update-imports-with-scope.js +0 -34
- package/rule-factories/update-imports/update-imports-with-scope.js.map +0 -1
- package/rule-factories/update-imports/update-ts-imports.d.ts +0 -11
- package/rule-factories/update-imports/update-ts-imports.d.ts.map +0 -1
- package/rule-factories/update-imports/update-ts-imports.js +0 -32
- package/rule-factories/update-imports/update-ts-imports.js.map +0 -1
- package/rule-factories/update-imports/v7-to-v8-map-object.d.ts +0 -8
- package/rule-factories/update-imports/v7-to-v8-map-object.d.ts.map +0 -1
- package/rule-factories/update-imports/v7-to-v8-map-object.js +0 -2049
- package/rule-factories/update-imports/v7-to-v8-map-object.js.map +0 -1
- package/rule-factories/vscode-extensions/index.d.ts +0 -8
- package/rule-factories/vscode-extensions/index.d.ts.map +0 -1
- package/rule-factories/vscode-extensions/index.js +0 -26
- package/rule-factories/vscode-extensions/index.js.map +0 -1
- package/rules/index.d.ts +0 -2
- package/rules/index.d.ts.map +0 -1
- package/rules/index.js +0 -5
- package/rules/index.js.map +0 -1
- package/rules/install.d.ts +0 -9
- package/rules/install.d.ts.map +0 -1
- package/rules/install.js +0 -21
- package/rules/install.js.map +0 -1
- package/schematics/ng-add/index.js.map +0 -1
- package/schematics/ng-add/schema.js.map +0 -1
- package/tasks/eslint/index.d.ts +0 -10
- package/tasks/eslint/index.d.ts.map +0 -1
- package/tasks/eslint/index.js +0 -29
- package/tasks/eslint/index.js.map +0 -1
- package/tasks/index.d.ts +0 -5
- package/tasks/index.d.ts.map +0 -1
- package/tasks/index.js +0 -8
- package/tasks/index.js.map +0 -1
- package/tasks/link/index.d.ts +0 -10
- package/tasks/link/index.d.ts.map +0 -1
- package/tasks/link/index.js +0 -26
- package/tasks/link/index.js.map +0 -1
- package/tasks/ng-add/index.d.ts +0 -30
- package/tasks/ng-add/index.d.ts.map +0 -1
- package/tasks/ng-add/index.js +0 -30
- package/tasks/ng-add/index.js.map +0 -1
- package/tasks/package-manager/add-dev-dependency.d.ts +0 -24
- package/tasks/package-manager/add-dev-dependency.d.ts.map +0 -1
- package/tasks/package-manager/add-dev-dependency.js +0 -34
- package/tasks/package-manager/add-dev-dependency.js.map +0 -1
- package/tasks/package-manager/index.d.ts +0 -4
- package/tasks/package-manager/index.d.ts.map +0 -1
- package/tasks/package-manager/index.js +0 -7
- package/tasks/package-manager/index.js.map +0 -1
- package/tasks/package-manager/interfaces.d.ts +0 -14
- package/tasks/package-manager/interfaces.d.ts.map +0 -1
- package/tasks/package-manager/interfaces.js +0 -3
- package/tasks/package-manager/interfaces.js.map +0 -1
- package/tasks/package-manager/npm-install.d.ts +0 -24
- package/tasks/package-manager/npm-install.d.ts.map +0 -1
- package/tasks/package-manager/npm-install.js +0 -35
- package/tasks/package-manager/npm-install.js.map +0 -1
- package/utility/ast.d.ts +0 -142
- package/utility/ast.d.ts.map +0 -1
- package/utility/ast.js +0 -325
- package/utility/ast.js.map +0 -1
- package/utility/collection.d.ts +0 -10
- package/utility/collection.d.ts.map +0 -1
- package/utility/collection.js +0 -20
- package/utility/collection.js.map +0 -1
- package/utility/component.d.ts +0 -46
- package/utility/component.d.ts.map +0 -1
- package/utility/component.js +0 -104
- package/utility/component.js.map +0 -1
- package/utility/dependencies.d.ts +0 -18
- package/utility/dependencies.d.ts.map +0 -1
- package/utility/dependencies.js +0 -31
- package/utility/dependencies.js.map +0 -1
- package/utility/file-info.d.ts +0 -23
- package/utility/file-info.d.ts.map +0 -1
- package/utility/file-info.js +0 -36
- package/utility/file-info.js.map +0 -1
- package/utility/generation.d.ts +0 -22
- package/utility/generation.d.ts.map +0 -1
- package/utility/generation.js +0 -67
- package/utility/generation.js.map +0 -1
- package/utility/gitignore.d.ts +0 -12
- package/utility/gitignore.d.ts.map +0 -1
- package/utility/gitignore.js +0 -28
- package/utility/gitignore.js.map +0 -1
- package/utility/index.d.ts +0 -18
- package/utility/index.d.ts.map +0 -1
- package/utility/index.js +0 -21
- package/utility/index.js.map +0 -1
- package/utility/loaders.d.ts +0 -122
- package/utility/loaders.d.ts.map +0 -1
- package/utility/loaders.js +0 -222
- package/utility/loaders.js.map +0 -1
- package/utility/matching-peers.d.ts +0 -24
- package/utility/matching-peers.d.ts.map +0 -1
- package/utility/matching-peers.js +0 -41
- package/utility/matching-peers.js.map +0 -1
- package/utility/modules.d.ts +0 -73
- package/utility/modules.d.ts.map +0 -1
- package/utility/modules.js +0 -201
- package/utility/modules.js.map +0 -1
- package/utility/monorepo.d.ts +0 -17
- package/utility/monorepo.d.ts.map +0 -1
- package/utility/monorepo.js +0 -30
- package/utility/monorepo.js.map +0 -1
- package/utility/package-manager-runner.d.ts +0 -43
- package/utility/package-manager-runner.d.ts.map +0 -1
- package/utility/package-manager-runner.js +0 -61
- package/utility/package-manager-runner.js.map +0 -1
- package/utility/package-version.d.ts +0 -17
- package/utility/package-version.d.ts.map +0 -1
- package/utility/package-version.js +0 -34
- package/utility/package-version.js.map +0 -1
- package/utility/routes.d.ts +0 -40
- package/utility/routes.d.ts.map +0 -1
- package/utility/routes.js +0 -103
- package/utility/routes.js.map +0 -1
- package/utility/sub-entry.d.ts +0 -18
- package/utility/sub-entry.d.ts.map +0 -1
- package/utility/sub-entry.js +0 -51
- package/utility/sub-entry.js.map +0 -1
- package/utility/template-property.helper.d.ts +0 -101
- package/utility/template-property.helper.d.ts.map +0 -1
- package/utility/template-property.helper.js +0 -175
- package/utility/template-property.helper.js.map +0 -1
- package/utility/update-imports.d.ts +0 -25
- package/utility/update-imports.d.ts.map +0 -1
- package/utility/update-imports.js +0 -86
- package/utility/update-imports.js.map +0 -1
package/utility/component.js
DELETED
@@ -1,104 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.addImportsIntoComponentDecoratorTransformerFactory = exports.getO3rComponentInfoOrThrowIfNotFound = exports.isO3rClassComponent = exports.isNgClassComponent = exports.isO3rClassDecorator = exports.isNgClassDecorator = void 0;
|
4
|
-
const ts = require("typescript");
|
5
|
-
const ast_1 = require("./ast");
|
6
|
-
/**
|
7
|
-
* Returns true if `node` is the decorator of an Angular component
|
8
|
-
*
|
9
|
-
* @param node
|
10
|
-
*/
|
11
|
-
const isNgClassDecorator = (node) => (0, ast_1.isDecoratorWithArg)(node)
|
12
|
-
&& node.expression.expression.escapedText.toString() === 'Component';
|
13
|
-
exports.isNgClassDecorator = isNgClassDecorator;
|
14
|
-
/**
|
15
|
-
* Returns true if `node` is the decorator of an Otter component
|
16
|
-
*
|
17
|
-
* @param node
|
18
|
-
*/
|
19
|
-
const isO3rClassDecorator = (node) => (0, ast_1.isDecoratorWithArg)(node)
|
20
|
-
&& node.expression.expression.escapedText.toString() === 'O3rComponent';
|
21
|
-
exports.isO3rClassDecorator = isO3rClassDecorator;
|
22
|
-
/**
|
23
|
-
* Returns true if `classDeclaration` is an Otter component
|
24
|
-
*
|
25
|
-
* @param classDeclaration
|
26
|
-
*/
|
27
|
-
const isNgClassComponent = (classDeclaration) => (ts.getDecorators(classDeclaration) || []).some(exports.isNgClassDecorator);
|
28
|
-
exports.isNgClassComponent = isNgClassComponent;
|
29
|
-
/**
|
30
|
-
* Returns true if `classDeclaration` is an Otter component
|
31
|
-
*
|
32
|
-
* @param classDeclaration
|
33
|
-
*/
|
34
|
-
const isO3rClassComponent = (classDeclaration) => (0, exports.isNgClassComponent)(classDeclaration)
|
35
|
-
&& (ts.getDecorators(classDeclaration) || []).some(exports.isO3rClassDecorator);
|
36
|
-
exports.isO3rClassComponent = isO3rClassComponent;
|
37
|
-
/**
|
38
|
-
* Returns Otter component information
|
39
|
-
*
|
40
|
-
* @param tree
|
41
|
-
* @param componentPath
|
42
|
-
*/
|
43
|
-
const getO3rComponentInfoOrThrowIfNotFound = (tree, componentPath) => {
|
44
|
-
const sourceFile = ts.createSourceFile(componentPath, tree.readText(componentPath), ts.ScriptTarget.ES2020, true);
|
45
|
-
const ngComponentDeclaration = sourceFile.statements.find((s) => ts.isClassDeclaration(s) && (0, exports.isNgClassComponent)(s));
|
46
|
-
if (!ngComponentDeclaration) {
|
47
|
-
throw new Error(`No Angular component found in ${componentPath}.`);
|
48
|
-
}
|
49
|
-
if (!(0, exports.isO3rClassComponent)(ngComponentDeclaration)) {
|
50
|
-
throw new Error(`
|
51
|
-
No Otter component found in ${componentPath}.
|
52
|
-
You can convert your Angular component into an Otter component by running the following command:
|
53
|
-
ng g @o3r/core:convert-component --path="${componentPath}".
|
54
|
-
`);
|
55
|
-
}
|
56
|
-
const name = ngComponentDeclaration.name?.escapedText.toString().replace(/Component$/, '');
|
57
|
-
if (!name) {
|
58
|
-
throw new Error(`The class' name is not specified. Please provide one for the Otter component defined in ${componentPath}.`);
|
59
|
-
}
|
60
|
-
const selectorExpression = (0, ast_1.getPropertyFromDecoratorFirstArgument)(ts.getDecorators(ngComponentDeclaration)?.find(exports.isNgClassDecorator), 'selector');
|
61
|
-
const selector = selectorExpression && ts.isStringLiteral(selectorExpression)
|
62
|
-
? selectorExpression.text
|
63
|
-
: selectorExpression?.getText();
|
64
|
-
if (!selector) {
|
65
|
-
throw new Error(`The component's selector is not specified. Please provide one for the Otter component defined in ${componentPath}.`);
|
66
|
-
}
|
67
|
-
const standaloneExpression = (0, ast_1.getPropertyFromDecoratorFirstArgument)(ts.getDecorators(ngComponentDeclaration)?.find(exports.isNgClassDecorator), 'standalone');
|
68
|
-
const standalone = standaloneExpression?.kind === ts.SyntaxKind.TrueKeyword;
|
69
|
-
const templateUrlExpression = (0, ast_1.getPropertyFromDecoratorFirstArgument)(ts.getDecorators(ngComponentDeclaration)?.find(exports.isNgClassDecorator), 'templateUrl');
|
70
|
-
const templateRelativePath = templateUrlExpression && ts.isStringLiteral(templateUrlExpression)
|
71
|
-
? templateUrlExpression.text
|
72
|
-
: templateUrlExpression?.getText();
|
73
|
-
return {
|
74
|
-
name,
|
75
|
-
selector,
|
76
|
-
standalone,
|
77
|
-
templateRelativePath
|
78
|
-
};
|
79
|
-
};
|
80
|
-
exports.getO3rComponentInfoOrThrowIfNotFound = getO3rComponentInfoOrThrowIfNotFound;
|
81
|
-
/**
|
82
|
-
* Transformer factory to add imports into the angular component decorator
|
83
|
-
*
|
84
|
-
* @param imports
|
85
|
-
*/
|
86
|
-
const addImportsIntoComponentDecoratorTransformerFactory = (imports) => (ctx) => (rootNode) => {
|
87
|
-
const { factory } = ctx;
|
88
|
-
const visit = (node) => {
|
89
|
-
if ((0, exports.isNgClassDecorator)(node)) {
|
90
|
-
const importInitializer = (0, ast_1.getPropertyFromDecoratorFirstArgument)(node, 'imports');
|
91
|
-
const importsList = importInitializer && ts.isArrayLiteralExpression(importInitializer) ? [...importInitializer.elements] : [];
|
92
|
-
return factory.updateDecorator(node, factory.updateCallExpression(node.expression, node.expression.expression, node.expression.typeArguments, [
|
93
|
-
factory.createObjectLiteralExpression([
|
94
|
-
...node.expression.arguments[0].properties.filter((prop) => prop.name?.getText() !== 'imports'),
|
95
|
-
factory.createPropertyAssignment('imports', factory.createArrayLiteralExpression(importsList.concat(imports.map((importName) => factory.createIdentifier(importName))), true))
|
96
|
-
], true)
|
97
|
-
]));
|
98
|
-
}
|
99
|
-
return ts.visitEachChild(node, visit, ctx);
|
100
|
-
};
|
101
|
-
return ts.visitNode(rootNode, visit);
|
102
|
-
};
|
103
|
-
exports.addImportsIntoComponentDecoratorTransformerFactory = addImportsIntoComponentDecoratorTransformerFactory;
|
104
|
-
//# sourceMappingURL=component.js.map
|
package/utility/component.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/utility/component.ts"],"names":[],"mappings":";;;AACA,iCAAiC;AACjC,+BAAoG;AAEpG;;;;GAIG;AACI,MAAM,kBAAkB,GAAG,CAAC,IAAa,EAA4B,EAAE,CAC5E,IAAA,wBAAkB,EAAC,IAAI,CAAC;OACrB,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,WAAW,CAAC;AAF1D,QAAA,kBAAkB,sBAEwC;AAEvE;;;;GAIG;AACI,MAAM,mBAAmB,GAAG,CAAC,IAAa,EAA4B,EAAE,CAC7E,IAAA,wBAAkB,EAAC,IAAI,CAAC;OACrB,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,cAAc,CAAC;AAF7D,QAAA,mBAAmB,uBAE0C;AAE1E;;;;GAI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AAS,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;AACvC,CAAC,CAAC;AA9BW,QAAA,kDAAkD,sDA8B7D"}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { NodeDependency, NodeDependencyType } from '@schematics/angular/utility/dependencies';
|
2
|
-
/**
|
3
|
-
* Method to extract the provided package version range from a package.json file
|
4
|
-
*
|
5
|
-
* @param packageNames list of package we want to retrieve the version
|
6
|
-
* @param packageJsonPath Path to the package.json to refer to
|
7
|
-
* @returns The version range value retrieved from the provided package.json file
|
8
|
-
*/
|
9
|
-
export declare function getExternalDependenciesVersionRange<T extends string>(packageNames: T[], packageJsonPath: string): Record<T, string>;
|
10
|
-
/**
|
11
|
-
* Method used to build the list of node dependencies to be installed
|
12
|
-
*
|
13
|
-
* @param dependenciesVersions map of dependency and its associated required version
|
14
|
-
* @param type node type of the dependency
|
15
|
-
* @returns the list of node dependencies to be installed
|
16
|
-
*/
|
17
|
-
export declare function getNodeDependencyList<T extends string>(dependenciesVersions: Record<T, string>, type: NodeDependencyType): NodeDependency[];
|
18
|
-
//# sourceMappingURL=dependencies.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../src/utility/dependencies.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,cAAc,EAAE,kBAAkB,EAAC,MAAM,0CAA0C,CAAC;AAE5F;;;;;;GAMG;AACH,wBAAgB,mCAAmC,CAAC,CAAC,SAAS,MAAM,EAAE,YAAY,EAAE,CAAC,EAAE,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAMnI;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,MAAM,EAAE,oBAAoB,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,kBAAkB,GAAG,cAAc,EAAE,CAE3I"}
|
package/utility/dependencies.js
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getNodeDependencyList = exports.getExternalDependenciesVersionRange = void 0;
|
4
|
-
const fs = require("node:fs");
|
5
|
-
/**
|
6
|
-
* Method to extract the provided package version range from a package.json file
|
7
|
-
*
|
8
|
-
* @param packageNames list of package we want to retrieve the version
|
9
|
-
* @param packageJsonPath Path to the package.json to refer to
|
10
|
-
* @returns The version range value retrieved from the provided package.json file
|
11
|
-
*/
|
12
|
-
function getExternalDependenciesVersionRange(packageNames, packageJsonPath) {
|
13
|
-
const packageJsonContent = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf-8' }));
|
14
|
-
return packageNames.reduce((acc, packageName) => {
|
15
|
-
acc[packageName] = packageJsonContent.peerDependencies?.[packageName] || packageJsonContent.generatorDependencies?.[packageName];
|
16
|
-
return acc;
|
17
|
-
}, {});
|
18
|
-
}
|
19
|
-
exports.getExternalDependenciesVersionRange = getExternalDependenciesVersionRange;
|
20
|
-
/**
|
21
|
-
* Method used to build the list of node dependencies to be installed
|
22
|
-
*
|
23
|
-
* @param dependenciesVersions map of dependency and its associated required version
|
24
|
-
* @param type node type of the dependency
|
25
|
-
* @returns the list of node dependencies to be installed
|
26
|
-
*/
|
27
|
-
function getNodeDependencyList(dependenciesVersions, type) {
|
28
|
-
return Object.entries(dependenciesVersions).map(([name, version]) => ({ name, version, type, overwrite: true }));
|
29
|
-
}
|
30
|
-
exports.getNodeDependencyList = getNodeDependencyList;
|
31
|
-
//# sourceMappingURL=dependencies.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../../src/utility/dependencies.ts"],"names":[],"mappings":";;;AAAA,8BAA8B;AAG9B;;;;;;GAMG;AACH,SAAgB,mCAAmC,CAAmB,YAAiB,EAAE,eAAuB;IAC9G,MAAM,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,EAAC,QAAQ,EAAE,OAAO,EAAC,CAAC,CAAC,CAAC;IAC7F,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,GAA+B,EAAE,WAAW,EAAE,EAAE;QAC1E,GAAG,CAAC,WAAW,CAAC,GAAG,kBAAkB,CAAC,gBAAgB,EAAE,CAAC,WAAW,CAAC,IAAI,kBAAkB,CAAC,qBAAqB,EAAE,CAAC,WAAW,CAAC,CAAC;QACjI,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAsB,CAAC;AAC9B,CAAC;AAND,kFAMC;AAED;;;;;;GAMG;AACH,SAAgB,qBAAqB,CAAmB,oBAAuC,EAAE,IAAwB;IACvH,OAAO,MAAM,CAAC,OAAO,CAAS,oBAAoB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;AACzH,CAAC;AAFD,sDAEC"}
|
package/utility/file-info.d.ts
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
import { SchematicContext, Tree } from '@angular-devkit/schematics';
|
2
|
-
import * as ts from '@schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript';
|
3
|
-
/**
|
4
|
-
* File information in schematics context
|
5
|
-
*/
|
6
|
-
export interface FileInfo {
|
7
|
-
/** Relative path to app module file */
|
8
|
-
moduleFilePath: string | undefined;
|
9
|
-
/** App module file as ts nodes structure */
|
10
|
-
sourceFile: ts.SourceFile | undefined;
|
11
|
-
/** NgModule metadata as ts nodes structure */
|
12
|
-
ngModulesMetadata: ts.Node[] | undefined;
|
13
|
-
/** File content as string */
|
14
|
-
appModuleFile: string | undefined;
|
15
|
-
}
|
16
|
-
/**
|
17
|
-
* Get file information in schematics context
|
18
|
-
*
|
19
|
-
* @param tree
|
20
|
-
* @param context
|
21
|
-
*/
|
22
|
-
export declare function getFileInfo(tree: Tree, context: SchematicContext): FileInfo;
|
23
|
-
//# sourceMappingURL=file-info.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"file-info.d.ts","sourceRoot":"","sources":["../../src/utility/file-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAE,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAElE,OAAO,KAAK,EAAE,MAAM,gFAAgF,CAAC;AAGrG;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,uCAAuC;IACvC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IAEnC,4CAA4C;IAC5C,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,SAAS,CAAC;IAEtC,8CAA8C;IAC9C,iBAAiB,EAAE,EAAE,CAAC,IAAI,EAAE,GAAG,SAAS,CAAC;IAEzC,6BAA6B;IAC7B,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,YA8BhE"}
|
package/utility/file-info.js
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getFileInfo = void 0;
|
4
|
-
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
|
5
|
-
const ts = require("@schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript");
|
6
|
-
const modules_1 = require("./modules");
|
7
|
-
/**
|
8
|
-
* Get file information in schematics context
|
9
|
-
*
|
10
|
-
* @param tree
|
11
|
-
* @param context
|
12
|
-
*/
|
13
|
-
function getFileInfo(tree, context) {
|
14
|
-
const fileInfo = {
|
15
|
-
moduleFilePath: undefined,
|
16
|
-
sourceFile: undefined,
|
17
|
-
ngModulesMetadata: undefined,
|
18
|
-
appModuleFile: undefined
|
19
|
-
};
|
20
|
-
const moduleFilePath = (0, modules_1.getAppModuleFilePath)(tree, context);
|
21
|
-
if (!moduleFilePath) {
|
22
|
-
return fileInfo;
|
23
|
-
}
|
24
|
-
fileInfo.moduleFilePath = moduleFilePath;
|
25
|
-
if (!tree.exists(moduleFilePath)) {
|
26
|
-
context.logger.warn(`The module file ${moduleFilePath} does not exist, the edition will be skipped`);
|
27
|
-
return fileInfo;
|
28
|
-
}
|
29
|
-
const sourceFile = ts.createSourceFile(moduleFilePath, tree.read(moduleFilePath).toString(), ts.ScriptTarget.ES2015, true);
|
30
|
-
fileInfo.sourceFile = sourceFile;
|
31
|
-
fileInfo.ngModulesMetadata = (0, ast_utils_1.getDecoratorMetadata)(sourceFile, 'NgModule', '@angular/core');
|
32
|
-
fileInfo.appModuleFile = tree.read(moduleFilePath).toString();
|
33
|
-
return fileInfo;
|
34
|
-
}
|
35
|
-
exports.getFileInfo = getFileInfo;
|
36
|
-
//# sourceMappingURL=file-info.js.map
|
package/utility/file-info.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"file-info.js","sourceRoot":"","sources":["../../src/utility/file-info.ts"],"names":[],"mappings":";;;AACA,qEAA2E;AAC3E,qGAAqG;AACrG,uCAA+C;AAmB/C;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,IAAU,EAAE,OAAyB;IAC/D,MAAM,QAAQ,GAAa;QACzB,cAAc,EAAE,SAAS;QACzB,UAAU,EAAE,SAAS;QACrB,iBAAiB,EAAE,SAAS;QAC5B,aAAa,EAAE,SAAS;KACzB,CAAC;IACF,MAAM,cAAc,GAAG,IAAA,8BAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3D,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,QAAQ,CAAC;KACjB;IACD,QAAQ,CAAC,cAAc,GAAG,cAAc,CAAC;IAEzC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE;QAChC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,cAAc,8CAA8C,CAAC,CAAC;QACrG,OAAO,QAAQ,CAAC;KACjB;IAED,MAAM,UAAU,GAAG,EAAE,CAAC,gBAAgB,CACpC,cAAc,EACd,IAAI,CAAC,IAAI,CAAC,cAAc,CAAE,CAAC,QAAQ,EAAE,EACrC,EAAE,CAAC,YAAY,CAAC,MAAM,EACtB,IAAI,CACL,CAAC;IACF,QAAQ,CAAC,UAAU,GAAG,UAAU,CAAC;IAEjC,QAAQ,CAAC,iBAAiB,GAAG,IAAA,gCAAoB,EAAC,UAAU,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;IAC3F,QAAQ,CAAC,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,CAAE,CAAC,QAAQ,EAAE,CAAC;IAE/D,OAAO,QAAQ,CAAC;AAClB,CAAC;AA9BD,kCA8BC"}
|
package/utility/generation.d.ts
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
import { Tree } from '@angular-devkit/schematics';
|
2
|
-
/** Type of generated item */
|
3
|
-
export type GeneratedItemType = '@o3r/core:component' | '@o3r/core:page' | '@o3r/core:service' | '@o3r/core:store' | '@o3r/core:schematics-update' | '@o3r/testing:playwright-scenario' | '@o3r/testing:playwright-sanity';
|
4
|
-
/** List of Otter items types */
|
5
|
-
export declare const OTTER_ITEM_TYPES: GeneratedItemType[];
|
6
|
-
/** List of the default destination paths for each generated entity */
|
7
|
-
export declare const TYPES_DEFAULT_FOLDER: {
|
8
|
-
[key in GeneratedItemType]: {
|
9
|
-
app?: string;
|
10
|
-
lib?: string;
|
11
|
-
};
|
12
|
-
};
|
13
|
-
/**
|
14
|
-
* Get destination path for a generated item
|
15
|
-
*
|
16
|
-
* @param typeOfItem
|
17
|
-
* @param directory
|
18
|
-
* @param tree
|
19
|
-
* @param project
|
20
|
-
*/
|
21
|
-
export declare function getDestinationPath(typeOfItem: GeneratedItemType, directory: string | null | undefined, tree: Tree, project?: string | null): string;
|
22
|
-
//# sourceMappingURL=generation.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"generation.d.ts","sourceRoot":"","sources":["../../src/utility/generation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAIlD,6BAA6B;AAC7B,MAAM,MAAM,iBAAiB,GAC3B,qBAAqB,GACrB,gBAAgB,GAChB,mBAAmB,GACnB,iBAAiB,GACjB,6BAA6B,GAC7B,kCAAkC,GAClC,gCAAgC,CAAC;AAEnC,gCAAgC;AAChC,eAAO,MAAM,gBAAgB,EAAE,iBAAiB,EAQ/C,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,oBAAoB,EAAE;KAAG,GAAG,IAAI,iBAAiB,GAAI;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAC;CAe7F,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CA+BnJ"}
|
package/utility/generation.js
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getDestinationPath = exports.TYPES_DEFAULT_FOLDER = exports.OTTER_ITEM_TYPES = void 0;
|
4
|
-
const loaders_1 = require("./loaders");
|
5
|
-
/** List of Otter items types */
|
6
|
-
exports.OTTER_ITEM_TYPES = [
|
7
|
-
'@o3r/core:component',
|
8
|
-
'@o3r/core:page',
|
9
|
-
'@o3r/core:service',
|
10
|
-
'@o3r/core:store',
|
11
|
-
'@o3r/core:schematics-update',
|
12
|
-
'@o3r/testing:playwright-scenario',
|
13
|
-
'@o3r/testing:playwright-sanity'
|
14
|
-
];
|
15
|
-
/** List of the default destination paths for each generated entity */
|
16
|
-
exports.TYPES_DEFAULT_FOLDER = {
|
17
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
18
|
-
'@o3r/core:component': { app: 'src/components', lib: 'components/src' },
|
19
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
20
|
-
'@o3r/core:page': { app: 'src/app' },
|
21
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
22
|
-
'@o3r/core:service': { app: 'src/services', lib: 'services/src' },
|
23
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
24
|
-
'@o3r/core:store': { app: 'src/store', lib: 'store/src' },
|
25
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
26
|
-
'@o3r/core:schematics-update': { app: 'src/schematics', lib: 'schematics/src' },
|
27
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
28
|
-
'@o3r/testing:playwright-scenario': { app: 'e2e-playwright/scenarios' },
|
29
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
30
|
-
'@o3r/testing:playwright-sanity': { app: 'e2e-playwright/sanity' }
|
31
|
-
};
|
32
|
-
/**
|
33
|
-
* Get destination path for a generated item
|
34
|
-
*
|
35
|
-
* @param typeOfItem
|
36
|
-
* @param directory
|
37
|
-
* @param tree
|
38
|
-
* @param project
|
39
|
-
*/
|
40
|
-
function getDestinationPath(typeOfItem, directory, tree, project) {
|
41
|
-
if (directory) {
|
42
|
-
return directory;
|
43
|
-
}
|
44
|
-
/**
|
45
|
-
* @param workspace
|
46
|
-
* @param generatorName
|
47
|
-
*/
|
48
|
-
const getSchematicsPropertyFrom = (workspace, generatorName) => {
|
49
|
-
return workspace.schematics?.[generatorName] || null;
|
50
|
-
};
|
51
|
-
/**
|
52
|
-
* @param generatorName
|
53
|
-
* @param propTree
|
54
|
-
* @param propProject
|
55
|
-
*/
|
56
|
-
const getSchematicsProperty = (generatorName, propTree, propProject) => {
|
57
|
-
const workspaceProject = (0, loaders_1.getProjectFromTree)(propTree, propProject);
|
58
|
-
return workspaceProject ? getSchematicsPropertyFrom(workspaceProject, generatorName) || getSchematicsPropertyFrom((0, loaders_1.readAngularJson)(propTree), generatorName) : null;
|
59
|
-
};
|
60
|
-
const config = getSchematicsProperty(typeOfItem, tree, project);
|
61
|
-
if (config && config.path) {
|
62
|
-
return config.path;
|
63
|
-
}
|
64
|
-
throw new Error('No destination directory configured.');
|
65
|
-
}
|
66
|
-
exports.getDestinationPath = getDestinationPath;
|
67
|
-
//# sourceMappingURL=generation.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"generation.js","sourceRoot":"","sources":["../../src/utility/generation.ts"],"names":[],"mappings":";;;AAGA,uCAAgE;AAYhE,gCAAgC;AACnB,QAAA,gBAAgB,GAAwB;IACnD,qBAAqB;IACrB,gBAAgB;IAChB,mBAAmB;IACnB,iBAAiB;IACjB,6BAA6B;IAC7B,kCAAkC;IAClC,gCAAgC;CACjC,CAAC;AAEF,sEAAsE;AACzD,QAAA,oBAAoB,GAAkE;IACjG,gEAAgE;IAChE,qBAAqB,EAAE,EAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,gBAAgB,EAAC;IACrE,gEAAgE;IAChE,gBAAgB,EAAE,EAAC,GAAG,EAAE,SAAS,EAAC;IAClC,gEAAgE;IAChE,mBAAmB,EAAE,EAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,cAAc,EAAC;IAC/D,gEAAgE;IAChE,iBAAiB,EAAE,EAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,WAAW,EAAC;IACvD,gEAAgE;IAChE,6BAA6B,EAAE,EAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,gBAAgB,EAAC;IAC7E,gEAAgE;IAChE,kCAAkC,EAAE,EAAE,GAAG,EAAE,0BAA0B,EAAE;IACvE,gEAAgE;IAChE,gCAAgC,EAAE,EAAE,GAAG,EAAE,uBAAuB,EAAE;CACnE,CAAC;AAEF;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,UAA6B,EAAE,SAAoC,EAAE,IAAU,EAAE,OAAuB;IACzI,IAAI,SAAS,EAAE;QACb,OAAO,SAAS,CAAC;KAClB;IAED;;;OAGG;IACH,MAAM,yBAAyB,GAAG,CAChC,SAA6C,EAC7C,aAAgC,EAAY,EAAE;QAC9C,OAAO,SAAS,CAAC,UAAU,EAAE,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC;IACvD,CAAC,CAAC;IAEF;;;;OAIG;IACH,MAAM,qBAAqB,GAAG,CAAoE,aAAgC,EAAE,QAAc,EAAE,WAA2B,EAAY,EAAE;QAC3L,MAAM,gBAAgB,GAAG,IAAA,4BAAkB,EAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;QACnE,OAAO,gBAAgB,CAAC,CAAC,CAAC,yBAAyB,CAAC,gBAAgB,EAAE,aAAa,CAAC,IAAI,yBAAyB,CAAC,IAAA,yBAAe,EAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACrK,CAAC,CAAC;IAEF,MAAM,MAAM,GAAG,qBAAqB,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAChE,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;QACzB,OAAO,MAAM,CAAC,IAAc,CAAC;KAC9B;IAED,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;AAC1D,CAAC;AA/BD,gDA+BC"}
|
package/utility/gitignore.d.ts
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
import { Tree } from '@angular-devkit/schematics';
|
2
|
-
/**
|
3
|
-
* Add patterns to .gitignore file
|
4
|
-
*
|
5
|
-
* @param tree Schematics files tree
|
6
|
-
* @param patternsToAdd List of patterns with description to add to gitignore files
|
7
|
-
*/
|
8
|
-
export declare function ignorePatterns(tree: Tree, patternsToAdd: {
|
9
|
-
description?: string;
|
10
|
-
patterns: string[];
|
11
|
-
}[]): import("@angular-devkit/schematics/src/tree/interface").Tree;
|
12
|
-
//# sourceMappingURL=gitignore.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"gitignore.d.ts","sourceRoot":"","sources":["../../src/utility/gitignore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAC,EAAE,gEAoBrG"}
|
package/utility/gitignore.js
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.ignorePatterns = void 0;
|
4
|
-
/**
|
5
|
-
* Add patterns to .gitignore file
|
6
|
-
*
|
7
|
-
* @param tree Schematics files tree
|
8
|
-
* @param patternsToAdd List of patterns with description to add to gitignore files
|
9
|
-
*/
|
10
|
-
function ignorePatterns(tree, patternsToAdd) {
|
11
|
-
if (tree.exists('/.gitignore')) {
|
12
|
-
let gitIgnoreFile = tree.read('/.gitignore').toString();
|
13
|
-
let found = false;
|
14
|
-
patternsToAdd
|
15
|
-
.map(({ description, patterns }) => ({ description, patterns: patterns.filter((pattern) => new RegExp('^' + pattern.replace(/([*/\\.])/g, '\\$1')).test(gitIgnoreFile)) }))
|
16
|
-
.filter(({ patterns }) => patterns.length)
|
17
|
-
.forEach(({ description, patterns }) => {
|
18
|
-
found = true;
|
19
|
-
gitIgnoreFile = gitIgnoreFile + `\n# ${description}\n${patterns.join('\n')}\n`;
|
20
|
-
});
|
21
|
-
if (found) {
|
22
|
-
tree.overwrite('/.gitignore', gitIgnoreFile);
|
23
|
-
}
|
24
|
-
}
|
25
|
-
return tree;
|
26
|
-
}
|
27
|
-
exports.ignorePatterns = ignorePatterns;
|
28
|
-
//# sourceMappingURL=gitignore.js.map
|
package/utility/gitignore.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"gitignore.js","sourceRoot":"","sources":["../../src/utility/gitignore.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,IAAU,EAAE,aAA2D;IACpG,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE;QAE9B,IAAI,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAE,CAAC,QAAQ,EAAE,CAAC;QACzD,IAAI,KAAK,GAAG,KAAK,CAAC;QAElB,aAAa;aACV,GAAG,CAAC,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,EAAC,WAAW,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,EAAC,CAAC,CAAC;aACxK,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC;aACzC,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE;YACrC,KAAK,GAAG,IAAI,CAAC;YACb,aAAa,GAAG,aAAa,GAAG,OAAO,WAAY,KAAK,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;QAClF,CAAC,CAAC,CAAC;QAEL,IAAI,KAAK,EAAE;YACT,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;SAC9C;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AApBD,wCAoBC"}
|
package/utility/index.d.ts
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
export * from './ast';
|
2
|
-
export * from './component';
|
3
|
-
export * from './dependencies';
|
4
|
-
export * from './file-info';
|
5
|
-
export * from './generation';
|
6
|
-
export * from './gitignore';
|
7
|
-
export * from './loaders';
|
8
|
-
export * from './modules';
|
9
|
-
export * from './routes';
|
10
|
-
export * from './sub-entry';
|
11
|
-
export * from './template-property.helper';
|
12
|
-
export * from './matching-peers';
|
13
|
-
export * from './package-manager-runner';
|
14
|
-
export * from './package-version';
|
15
|
-
export * from './monorepo';
|
16
|
-
export * from './update-imports';
|
17
|
-
export * from './collection';
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
package/utility/index.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utility/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC"}
|
package/utility/index.js
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
const tslib_1 = require("tslib");
|
4
|
-
tslib_1.__exportStar(require("./ast"), exports);
|
5
|
-
tslib_1.__exportStar(require("./component"), exports);
|
6
|
-
tslib_1.__exportStar(require("./dependencies"), exports);
|
7
|
-
tslib_1.__exportStar(require("./file-info"), exports);
|
8
|
-
tslib_1.__exportStar(require("./generation"), exports);
|
9
|
-
tslib_1.__exportStar(require("./gitignore"), exports);
|
10
|
-
tslib_1.__exportStar(require("./loaders"), exports);
|
11
|
-
tslib_1.__exportStar(require("./modules"), exports);
|
12
|
-
tslib_1.__exportStar(require("./routes"), exports);
|
13
|
-
tslib_1.__exportStar(require("./sub-entry"), exports);
|
14
|
-
tslib_1.__exportStar(require("./template-property.helper"), exports);
|
15
|
-
tslib_1.__exportStar(require("./matching-peers"), exports);
|
16
|
-
tslib_1.__exportStar(require("./package-manager-runner"), exports);
|
17
|
-
tslib_1.__exportStar(require("./package-version"), exports);
|
18
|
-
tslib_1.__exportStar(require("./monorepo"), exports);
|
19
|
-
tslib_1.__exportStar(require("./update-imports"), exports);
|
20
|
-
tslib_1.__exportStar(require("./collection"), exports);
|
21
|
-
//# sourceMappingURL=index.js.map
|
package/utility/index.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utility/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB;AACtB,sDAA4B;AAC5B,yDAA+B;AAC/B,sDAA4B;AAC5B,uDAA6B;AAC7B,sDAA4B;AAC5B,oDAA0B;AAC1B,oDAA0B;AAC1B,mDAAyB;AACzB,sDAA4B;AAC5B,qEAA2C;AAC3C,2DAAiC;AACjC,mEAAyC;AACzC,4DAAkC;AAClC,qDAA2B;AAC3B,2DAAiC;AACjC,uDAA6B"}
|
package/utility/loaders.d.ts
DELETED
@@ -1,122 +0,0 @@
|
|
1
|
-
import { Tree } from '@angular-devkit/schematics';
|
2
|
-
import { NodeDependencyType } from '@schematics/angular/utility/dependencies';
|
3
|
-
import type { PackageJson } from 'type-fest';
|
4
|
-
import type { WorkspaceProject, WorkspaceSchema } from '../interfaces/index';
|
5
|
-
/**
|
6
|
-
* Load the angular.json file
|
7
|
-
*
|
8
|
-
* @param tree File tree
|
9
|
-
* @param angularJsonFile Angular.json file path
|
10
|
-
* @throws Angular JSON invalid or non exist
|
11
|
-
* @deprecate use {@link getWorkspaceConfig} function instead, will be removed in Otter v10
|
12
|
-
*/
|
13
|
-
export declare function readAngularJson(tree: Tree, angularJsonFile?: string): WorkspaceSchema;
|
14
|
-
/**
|
15
|
-
* Load the Workspace configuration object
|
16
|
-
*
|
17
|
-
* @param tree File tree
|
18
|
-
* @param workspaceConfigFile Workspace config file path, /angular.json in an Angular project
|
19
|
-
* @returns null if the given config file does not exist
|
20
|
-
*/
|
21
|
-
export declare function getWorkspaceConfig<T extends WorkspaceSchema = WorkspaceSchema>(tree: Tree, workspaceConfigFile?: string): WorkspaceSchema | null;
|
22
|
-
/**
|
23
|
-
* Update angular.json file
|
24
|
-
*
|
25
|
-
* @param tree File tree
|
26
|
-
* @param workspace Angular workspace
|
27
|
-
* @param angularJsonFile Angular.json file path
|
28
|
-
*/
|
29
|
-
export declare function writeAngularJson(tree: Tree, workspace: WorkspaceSchema, angularJsonFile?: string): import("@angular-devkit/schematics/src/tree/interface").Tree;
|
30
|
-
/**
|
31
|
-
* Load the target's package.json file
|
32
|
-
*
|
33
|
-
* @param tree File tree
|
34
|
-
* @param workspaceProject Angular workspace project
|
35
|
-
* @throws Package JSON invalid or non exist
|
36
|
-
*/
|
37
|
-
export declare function readPackageJson(tree: Tree, workspaceProject: WorkspaceProject): PackageJson;
|
38
|
-
/**
|
39
|
-
* Get the workspace project
|
40
|
-
*
|
41
|
-
* @param tree File tree
|
42
|
-
* @param projectName Name of the Angular project
|
43
|
-
* @param projectType
|
44
|
-
*/
|
45
|
-
export declare function getProjectFromTree(tree: Tree, projectName?: string | null, projectType?: 'application' | 'library'): WorkspaceProject & {
|
46
|
-
name: string;
|
47
|
-
} | undefined;
|
48
|
-
/**
|
49
|
-
* Return the type of install to run depending on the project type (Peer or default)
|
50
|
-
*
|
51
|
-
* @param tree
|
52
|
-
*/
|
53
|
-
export declare function getProjectDepType(tree: Tree): NodeDependencyType.Default | NodeDependencyType.Peer;
|
54
|
-
/**
|
55
|
-
* Get the default project name
|
56
|
-
*
|
57
|
-
* @deprecated use {@link getProjectFromTree} function instead, will be removed in Otter V10
|
58
|
-
* @param projectType
|
59
|
-
* @param tree File tree
|
60
|
-
*/
|
61
|
-
export declare function getDefaultProjectName(tree: Tree, projectType?: 'application' | 'library'): string | undefined;
|
62
|
-
/**
|
63
|
-
* Get the folder of the templates for a specific sub-schematics
|
64
|
-
*
|
65
|
-
* @param rootPath Root directory of the schematics ran
|
66
|
-
* @param currentPath Directory of the current sub-schematics ran
|
67
|
-
* @param templateFolder Folder containing the templates
|
68
|
-
*/
|
69
|
-
export declare function getTemplateFolder(rootPath: string, currentPath: string, templateFolder?: string): string;
|
70
|
-
/**
|
71
|
-
* Get the path of all the files in the Tree
|
72
|
-
*
|
73
|
-
* @param basePath Base path from which starting the list
|
74
|
-
* @param tree Schematics file tree
|
75
|
-
* @param excludes Array of globs to be ignored
|
76
|
-
*/
|
77
|
-
export declare function getAllFilesInTree(tree: Tree, basePath?: string, excludes?: string[]): string[];
|
78
|
-
/**
|
79
|
-
* Get all files with specific extension from the specified folder for all the projects described in the workspace
|
80
|
-
*
|
81
|
-
* @deprecated please use {@link getFilesInFolderFromWorkspaceProjectsInTree}, will be removed in v9
|
82
|
-
* @param tree
|
83
|
-
* @param folderInProject
|
84
|
-
* @param extension
|
85
|
-
*/
|
86
|
-
export declare function getFilesInFolderFromWorkspaceProjects(tree: Tree, folderInProject: string, extension: string): string[];
|
87
|
-
/**
|
88
|
-
* Get all files with specific extension from the specified folder for all the projects described in the workspace
|
89
|
-
*
|
90
|
-
* @param tree
|
91
|
-
* @param folderInProject
|
92
|
-
* @param extension
|
93
|
-
*/
|
94
|
-
export declare function getFilesInFolderFromWorkspaceProjectsInTree(tree: Tree, folderInProject: string, extension: string): string[];
|
95
|
-
/**
|
96
|
-
* Get all files with specific extension from the tree
|
97
|
-
*
|
98
|
-
* @param tree
|
99
|
-
* @param extension
|
100
|
-
*/
|
101
|
-
export declare function getFilesWithExtensionFromTree(tree: Tree, extension: string): string[];
|
102
|
-
/**
|
103
|
-
* Get all files with specific extension from the root of all the projects described in the workspace
|
104
|
-
*
|
105
|
-
* @param tree
|
106
|
-
* @param extension
|
107
|
-
*/
|
108
|
-
export declare function getFilesFromRootOfWorkspaceProjects(tree: Tree, extension: string): string[];
|
109
|
-
/**
|
110
|
-
* Get all files with specific extension from the src folder for all the projects described in the workspace
|
111
|
-
*
|
112
|
-
* @param tree
|
113
|
-
* @param extension
|
114
|
-
*/
|
115
|
-
export declare function getFilesFromWorkspaceProjects(tree: Tree, extension: string): string[];
|
116
|
-
/**
|
117
|
-
* Get all the typescript files from the src folder for all the projects described in the workspace
|
118
|
-
*
|
119
|
-
* @param tree
|
120
|
-
*/
|
121
|
-
export declare function getSourceFilesFromWorkspaceProjects(tree: Tree): string[];
|
122
|
-
//# sourceMappingURL=loaders.d.ts.map
|
package/utility/loaders.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"loaders.d.ts","sourceRoot":"","sources":["../../src/utility/loaders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAK9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE7E;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,SAAkB,GAAG,eAAe,CAO9F;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE,mBAAmB,SAAkB,GAAG,eAAe,GAAG,IAAI,CAKzJ;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,SAAkB,gEAGzG;AAED;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