@mutates/angular 0.1.5

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.
Files changed (89) hide show
  1. package/README.md +3 -0
  2. package/package.json +35 -0
  3. package/src/index.d.ts +8 -0
  4. package/src/index.js +12 -0
  5. package/src/index.js.map +1 -0
  6. package/src/lib/bootstrap/add-provider-to-bootstrap-application-fn.d.ts +4 -0
  7. package/src/lib/bootstrap/add-provider-to-bootstrap-application-fn.js +23 -0
  8. package/src/lib/bootstrap/add-provider-to-bootstrap-application-fn.js.map +1 -0
  9. package/src/lib/bootstrap/get-bootstrap-application-fn.d.ts +2 -0
  10. package/src/lib/bootstrap/get-bootstrap-application-fn.js +15 -0
  11. package/src/lib/bootstrap/get-bootstrap-application-fn.js.map +1 -0
  12. package/src/lib/bootstrap/get-bootstrap-fn.d.ts +2 -0
  13. package/src/lib/bootstrap/get-bootstrap-fn.js +15 -0
  14. package/src/lib/bootstrap/get-bootstrap-fn.js.map +1 -0
  15. package/src/lib/bootstrap/index.d.ts +3 -0
  16. package/src/lib/bootstrap/index.js +7 -0
  17. package/src/lib/bootstrap/index.js.map +1 -0
  18. package/src/lib/component/add-import-to-component.d.ts +4 -0
  19. package/src/lib/component/add-import-to-component.js +12 -0
  20. package/src/lib/component/add-import-to-component.js.map +1 -0
  21. package/src/lib/component/add-provider-to-component.d.ts +4 -0
  22. package/src/lib/component/add-provider-to-component.js +12 -0
  23. package/src/lib/component/add-provider-to-component.js.map +1 -0
  24. package/src/lib/component/add-style-url-to-component.d.ts +4 -0
  25. package/src/lib/component/add-style-url-to-component.js +11 -0
  26. package/src/lib/component/add-style-url-to-component.js.map +1 -0
  27. package/src/lib/component/index.d.ts +3 -0
  28. package/src/lib/component/index.js +7 -0
  29. package/src/lib/component/index.js.map +1 -0
  30. package/src/lib/create-angular-project.d.ts +2 -0
  31. package/src/lib/create-angular-project.js +12 -0
  32. package/src/lib/create-angular-project.js.map +1 -0
  33. package/src/lib/directive/add-provider-to-directive.d.ts +4 -0
  34. package/src/lib/directive/add-provider-to-directive.js +12 -0
  35. package/src/lib/directive/add-provider-to-directive.js.map +1 -0
  36. package/src/lib/directive/index.d.ts +1 -0
  37. package/src/lib/directive/index.js +5 -0
  38. package/src/lib/directive/index.js.map +1 -0
  39. package/src/lib/helpers/get-main-module.d.ts +2 -0
  40. package/src/lib/helpers/get-main-module.js +12 -0
  41. package/src/lib/helpers/get-main-module.js.map +1 -0
  42. package/src/lib/helpers/index.d.ts +6 -0
  43. package/src/lib/helpers/index.js +10 -0
  44. package/src/lib/helpers/index.js.map +1 -0
  45. package/src/lib/helpers/is-standalone-component.d.ts +2 -0
  46. package/src/lib/helpers/is-standalone-component.js +22 -0
  47. package/src/lib/helpers/is-standalone-component.js.map +1 -0
  48. package/src/lib/helpers/ng-component.d.ts +3 -0
  49. package/src/lib/helpers/ng-component.js +9 -0
  50. package/src/lib/helpers/ng-component.js.map +1 -0
  51. package/src/lib/helpers/ng-module.d.ts +7 -0
  52. package/src/lib/helpers/ng-module.js +23 -0
  53. package/src/lib/helpers/ng-module.js.map +1 -0
  54. package/src/lib/helpers/push-to-decorator-array-property.d.ts +5 -0
  55. package/src/lib/helpers/push-to-decorator-array-property.js +22 -0
  56. package/src/lib/helpers/push-to-decorator-array-property.js.map +1 -0
  57. package/src/lib/helpers/push-to-object-literal-array-property.d.ts +5 -0
  58. package/src/lib/helpers/push-to-object-literal-array-property.js +25 -0
  59. package/src/lib/helpers/push-to-object-literal-array-property.js.map +1 -0
  60. package/src/lib/module/add-bootstrap-to-ng-module.d.ts +4 -0
  61. package/src/lib/module/add-bootstrap-to-ng-module.js +12 -0
  62. package/src/lib/module/add-bootstrap-to-ng-module.js.map +1 -0
  63. package/src/lib/module/add-declaration-to-ng-module.d.ts +4 -0
  64. package/src/lib/module/add-declaration-to-ng-module.js +12 -0
  65. package/src/lib/module/add-declaration-to-ng-module.js.map +1 -0
  66. package/src/lib/module/add-entry-component-to-ng-module.d.ts +4 -0
  67. package/src/lib/module/add-entry-component-to-ng-module.js +12 -0
  68. package/src/lib/module/add-entry-component-to-ng-module.js.map +1 -0
  69. package/src/lib/module/add-export-to-ng-module.d.ts +4 -0
  70. package/src/lib/module/add-export-to-ng-module.js +12 -0
  71. package/src/lib/module/add-export-to-ng-module.js.map +1 -0
  72. package/src/lib/module/add-import-to-ng-module.d.ts +4 -0
  73. package/src/lib/module/add-import-to-ng-module.js +12 -0
  74. package/src/lib/module/add-import-to-ng-module.js.map +1 -0
  75. package/src/lib/module/add-provider-to-ng-module.d.ts +4 -0
  76. package/src/lib/module/add-provider-to-ng-module.js +12 -0
  77. package/src/lib/module/add-provider-to-ng-module.js.map +1 -0
  78. package/src/lib/module/add-schema-to-ng-module.d.ts +4 -0
  79. package/src/lib/module/add-schema-to-ng-module.js +12 -0
  80. package/src/lib/module/add-schema-to-ng-module.js.map +1 -0
  81. package/src/lib/module/index.d.ts +7 -0
  82. package/src/lib/module/index.js +11 -0
  83. package/src/lib/module/index.js.map +1 -0
  84. package/src/lib/ng-tree-file-system.d.ts +28 -0
  85. package/src/lib/ng-tree-file-system.js +122 -0
  86. package/src/lib/ng-tree-file-system.js.map +1 -0
  87. package/src/lib/testing/index.d.ts +2 -0
  88. package/src/lib/testing/index.js +10 -0
  89. package/src/lib/testing/index.js.map +1 -0
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @mutates/angular
2
+
3
+ [WIP]
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@mutates/angular",
3
+ "version": "0.1.5",
4
+ "keywords": [
5
+ "typescript",
6
+ "ast",
7
+ "mutations",
8
+ "angular",
9
+ "schematics"
10
+ ],
11
+ "homepage": "https://github.com/IKatsuba/mutates",
12
+ "repository": "https://github.com/IKatsuba/mutates",
13
+ "license": "Apache-2.0",
14
+ "contributors": [
15
+ "Igor Katsuba <igor@katsuba.dev>"
16
+ ],
17
+ "type": "commonjs",
18
+ "main": "./src/index.js",
19
+ "typings": "./src/index.d.ts",
20
+ "dependencies": {
21
+ "@mutates/core": "0.1.5",
22
+ "multimatch": "^7.0.0",
23
+ "ts-morph": "^22.0.0",
24
+ "tslib": "^2.3.0"
25
+ },
26
+ "peerDependencies": {
27
+ "@angular-devkit/schematics": ">=18.0.0"
28
+ },
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "authors": [
33
+ "Igor Katsuba <igor@katsuba.dev>"
34
+ ]
35
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ export * from './lib/bootstrap';
2
+ export * from './lib/component';
3
+ export * from './lib/directive';
4
+ export * from './lib/helpers';
5
+ export * from './lib/module';
6
+ export * from './lib/testing';
7
+ export * from './lib/create-angular-project';
8
+ export * from './lib/ng-tree-file-system';
package/src/index.js ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./lib/bootstrap"), exports);
5
+ tslib_1.__exportStar(require("./lib/component"), exports);
6
+ tslib_1.__exportStar(require("./lib/directive"), exports);
7
+ tslib_1.__exportStar(require("./lib/helpers"), exports);
8
+ tslib_1.__exportStar(require("./lib/module"), exports);
9
+ tslib_1.__exportStar(require("./lib/testing"), exports);
10
+ tslib_1.__exportStar(require("./lib/create-angular-project"), exports);
11
+ tslib_1.__exportStar(require("./lib/ng-tree-file-system"), exports);
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/angular/src/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC;AAChC,0DAAgC;AAChC,0DAAgC;AAChC,wDAA8B;AAC9B,uDAA6B;AAC7B,wDAA8B;AAC9B,uEAA6C;AAC7C,oEAA0C"}
@@ -0,0 +1,4 @@
1
+ import type { CallExpression } from 'ts-morph';
2
+ export declare function addProviderToBootstrapApplicationFn(callExpression: CallExpression, provider: string, { unique }?: {
3
+ unique?: boolean;
4
+ }): void;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addProviderToBootstrapApplicationFn = void 0;
4
+ const ts_morph_1 = require("ts-morph");
5
+ const push_to_object_literal_array_property_1 = require("../helpers/push-to-object-literal-array-property");
6
+ function addProviderToBootstrapApplicationFn(callExpression, provider, { unique = false } = {}) {
7
+ const [, options = callExpression.addArgument('{providers: []}')] = callExpression.getArguments();
8
+ if (!ts_morph_1.Node.isIdentifier(options) && !ts_morph_1.Node.isObjectLiteralExpression(options)) {
9
+ return;
10
+ }
11
+ (0, push_to_object_literal_array_property_1.pushToObjectLiteralArrayProperty)(getOptionsObject(options), 'providers', provider, {
12
+ unique,
13
+ });
14
+ }
15
+ exports.addProviderToBootstrapApplicationFn = addProviderToBootstrapApplicationFn;
16
+ function getOptionsObject(options) {
17
+ if (ts_morph_1.Node.isObjectLiteralExpression(options)) {
18
+ return options;
19
+ }
20
+ const definition = options.getDefinitionNodes()[0];
21
+ return definition.getChildrenOfKind(ts_morph_1.SyntaxKind.ObjectLiteralExpression)[0];
22
+ }
23
+ //# sourceMappingURL=add-provider-to-bootstrap-application-fn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-provider-to-bootstrap-application-fn.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/bootstrap/add-provider-to-bootstrap-application-fn.ts"],"names":[],"mappings":";;;AACA,uCAA4C;AAE5C,4GAAoG;AAEpG,SAAgB,mCAAmC,CACjD,cAA8B,EAC9B,QAAgB,EAChB,EAAE,MAAM,GAAG,KAAK,KAA2B,EAAE;IAE7C,MAAM,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,GAAG,cAAc,CAAC,YAAY,EAAE,CAAC;IAElG,IAAI,CAAC,eAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,eAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5E,OAAO;IACT,CAAC;IAED,IAAA,wEAAgC,EAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE;QACjF,MAAM;KACP,CAAC,CAAC;AACL,CAAC;AAdD,kFAcC;AAED,SAAS,gBAAgB,CAAC,OAA6C;IACrE,IAAI,eAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5C,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,UAAU,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,CAAC;IAEnD,OAAO,UAAU,CAAC,iBAAiB,CAAC,qBAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { CallExpression } from 'ts-morph';
2
+ export declare function getBootstrapApplicationFn(mainFilePath: string): CallExpression | undefined;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBootstrapApplicationFn = void 0;
4
+ const ts_morph_1 = require("ts-morph");
5
+ const core_1 = require("@mutates/core");
6
+ function getBootstrapApplicationFn(mainFilePath) {
7
+ var _a;
8
+ const [bootstrapApplicationImport] = (0, core_1.getImports)(mainFilePath, {
9
+ moduleSpecifier: '@angular/platform-browser',
10
+ });
11
+ const namedImport = bootstrapApplicationImport === null || bootstrapApplicationImport === void 0 ? void 0 : bootstrapApplicationImport.getNamedImports().find((imp) => imp.getName() === 'bootstrapApplication');
12
+ return (_a = namedImport === null || namedImport === void 0 ? void 0 : namedImport.getNameNode().findReferencesAsNodes().find((ref) => ts_morph_1.Node.isCallExpression(ref.getParent()))) === null || _a === void 0 ? void 0 : _a.getParentIfKind(ts_morph_1.SyntaxKind.CallExpression);
13
+ }
14
+ exports.getBootstrapApplicationFn = getBootstrapApplicationFn;
15
+ //# sourceMappingURL=get-bootstrap-application-fn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-bootstrap-application-fn.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/bootstrap/get-bootstrap-application-fn.ts"],"names":[],"mappings":";;;AACA,uCAA4C;AAE5C,wCAA2C;AAE3C,SAAgB,yBAAyB,CAAC,YAAoB;;IAC5D,MAAM,CAAC,0BAA0B,CAAC,GAAG,IAAA,iBAAU,EAAC,YAAY,EAAE;QAC5D,eAAe,EAAE,2BAA2B;KAC7C,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,0BAA0B,aAA1B,0BAA0B,uBAA1B,0BAA0B,CAC1C,eAAe,GAChB,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,sBAAsB,CAAC,CAAC;IAE3D,OAAO,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CACd,WAAW,GACZ,qBAAqB,GACrB,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,eAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,0CACpD,eAAe,CAAC,qBAAU,CAAC,cAAc,CAAC,CAAC;AACjD,CAAC;AAdD,8DAcC"}
@@ -0,0 +1,2 @@
1
+ import type { CallExpression } from 'ts-morph';
2
+ export declare function getBootstrapFn(mainFilePath: string): CallExpression | undefined;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBootstrapFn = void 0;
4
+ const ts_morph_1 = require("ts-morph");
5
+ const core_1 = require("@mutates/core");
6
+ function getBootstrapFn(mainFilePath) {
7
+ var _a, _b, _c;
8
+ const [platformBrowserImport] = (0, core_1.getImports)(mainFilePath, {
9
+ moduleSpecifier: '@angular/platform-browser-dynamic',
10
+ });
11
+ const namedImport = platformBrowserImport === null || platformBrowserImport === void 0 ? void 0 : platformBrowserImport.getNamedImports().find((imp) => imp.getName() === 'platformBrowserDynamic');
12
+ return (_c = (_b = (_a = namedImport === null || namedImport === void 0 ? void 0 : namedImport.getNameNode().findReferencesAsNodes().find((ref) => ts_morph_1.Node.isCallExpression(ref.getParent()))) === null || _a === void 0 ? void 0 : _a.getParentIfKind(ts_morph_1.SyntaxKind.CallExpression)) === null || _b === void 0 ? void 0 : _b.getParentIfKind(ts_morph_1.SyntaxKind.PropertyAccessExpression)) === null || _c === void 0 ? void 0 : _c.getParentIfKind(ts_morph_1.SyntaxKind.CallExpression);
13
+ }
14
+ exports.getBootstrapFn = getBootstrapFn;
15
+ //# sourceMappingURL=get-bootstrap-fn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-bootstrap-fn.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/bootstrap/get-bootstrap-fn.ts"],"names":[],"mappings":";;;AACA,uCAA4C;AAE5C,wCAA2C;AAE3C,SAAgB,cAAc,CAAC,YAAoB;;IACjD,MAAM,CAAC,qBAAqB,CAAC,GAAG,IAAA,iBAAU,EAAC,YAAY,EAAE;QACvD,eAAe,EAAE,mCAAmC;KACrD,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,qBAAqB,aAArB,qBAAqB,uBAArB,qBAAqB,CACrC,eAAe,GAChB,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,wBAAwB,CAAC,CAAC;IAE7D,OAAO,MAAA,MAAA,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CACd,WAAW,GACZ,qBAAqB,GACrB,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,eAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,0CACpD,eAAe,CAAC,qBAAU,CAAC,cAAc,CAAC,0CAC1C,eAAe,CAAC,qBAAU,CAAC,wBAAwB,CAAC,0CACpD,eAAe,CAAC,qBAAU,CAAC,cAAc,CAAC,CAAC;AACjD,CAAC;AAhBD,wCAgBC"}
@@ -0,0 +1,3 @@
1
+ export * from './add-provider-to-bootstrap-application-fn';
2
+ export * from './get-bootstrap-application-fn';
3
+ export * from './get-bootstrap-fn';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./add-provider-to-bootstrap-application-fn"), exports);
5
+ tslib_1.__exportStar(require("./get-bootstrap-application-fn"), exports);
6
+ tslib_1.__exportStar(require("./get-bootstrap-fn"), exports);
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/bootstrap/index.ts"],"names":[],"mappings":";;;AAAA,qFAA2D;AAC3D,yEAA+C;AAC/C,6DAAmC"}
@@ -0,0 +1,4 @@
1
+ import type { ClassDeclaration } from 'ts-morph';
2
+ export declare function addImportToComponent(classDeclaration: ClassDeclaration, importName: string, { unique }?: {
3
+ unique?: boolean;
4
+ }): void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addImportToComponent = void 0;
4
+ const push_to_decorator_array_property_1 = require("../helpers/push-to-decorator-array-property");
5
+ function addImportToComponent(classDeclaration, importName, { unique = false } = {}) {
6
+ (0, push_to_decorator_array_property_1.pushToDecoratorArrayProperty)(classDeclaration, 'Component', 'imports', importName, {
7
+ unique,
8
+ forceToArray: true,
9
+ });
10
+ }
11
+ exports.addImportToComponent = addImportToComponent;
12
+ //# sourceMappingURL=add-import-to-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-import-to-component.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/component/add-import-to-component.ts"],"names":[],"mappings":";;;AAEA,kGAA2F;AAE3F,SAAgB,oBAAoB,CAClC,gBAAkC,EAClC,UAAkB,EAClB,EAAE,MAAM,GAAG,KAAK,KAA2B,EAAE;IAE7C,IAAA,+DAA4B,EAAC,gBAAgB,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE;QACjF,MAAM;QACN,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC;AATD,oDASC"}
@@ -0,0 +1,4 @@
1
+ import type { ClassDeclaration } from 'ts-morph';
2
+ export declare function addProviderToComponent(classDeclaration: ClassDeclaration, provider: string, { unique }?: {
3
+ unique?: boolean;
4
+ }): void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addProviderToComponent = void 0;
4
+ const push_to_decorator_array_property_1 = require("../helpers/push-to-decorator-array-property");
5
+ function addProviderToComponent(classDeclaration, provider, { unique = false } = {}) {
6
+ (0, push_to_decorator_array_property_1.pushToDecoratorArrayProperty)(classDeclaration, 'Component', 'providers', provider, {
7
+ unique,
8
+ forceToArray: true,
9
+ });
10
+ }
11
+ exports.addProviderToComponent = addProviderToComponent;
12
+ //# sourceMappingURL=add-provider-to-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-provider-to-component.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/component/add-provider-to-component.ts"],"names":[],"mappings":";;;AAEA,kGAA2F;AAE3F,SAAgB,sBAAsB,CACpC,gBAAkC,EAClC,QAAgB,EAChB,EAAE,MAAM,GAAG,KAAK,KAA2B,EAAE;IAE7C,IAAA,+DAA4B,EAAC,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE;QACjF,MAAM;QACN,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC;AATD,wDASC"}
@@ -0,0 +1,4 @@
1
+ import type { ClassDeclaration } from 'ts-morph';
2
+ export declare function addStyleUrlToComponent(classDeclaration: ClassDeclaration, styleUrl: string, { unique }?: {
3
+ unique?: boolean;
4
+ }): void;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addStyleUrlToComponent = void 0;
4
+ const push_to_decorator_array_property_1 = require("../helpers/push-to-decorator-array-property");
5
+ function addStyleUrlToComponent(classDeclaration, styleUrl, { unique = false } = {}) {
6
+ (0, push_to_decorator_array_property_1.pushToDecoratorArrayProperty)(classDeclaration, 'Component', 'styleUrls', styleUrl, {
7
+ unique,
8
+ });
9
+ }
10
+ exports.addStyleUrlToComponent = addStyleUrlToComponent;
11
+ //# sourceMappingURL=add-style-url-to-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-style-url-to-component.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/component/add-style-url-to-component.ts"],"names":[],"mappings":";;;AAEA,kGAA2F;AAE3F,SAAgB,sBAAsB,CACpC,gBAAkC,EAClC,QAAgB,EAChB,EAAE,MAAM,GAAG,KAAK,KAA2B,EAAE;IAE7C,IAAA,+DAA4B,EAAC,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE;QACjF,MAAM;KACP,CAAC,CAAC;AACL,CAAC;AARD,wDAQC"}
@@ -0,0 +1,3 @@
1
+ export * from './add-import-to-component';
2
+ export * from './add-provider-to-component';
3
+ export * from './add-style-url-to-component';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./add-import-to-component"), exports);
5
+ tslib_1.__exportStar(require("./add-provider-to-component"), exports);
6
+ tslib_1.__exportStar(require("./add-style-url-to-component"), exports);
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/component/index.ts"],"names":[],"mappings":";;;AAAA,oEAA0C;AAC1C,sEAA4C;AAC5C,uEAA6C"}
@@ -0,0 +1,2 @@
1
+ import { Tree } from '@angular-devkit/schematics';
2
+ export declare function createAngularProject(tree: Tree): import("ts-morph").Project;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createAngularProject = void 0;
4
+ const core_1 = require("@mutates/core");
5
+ const ng_tree_file_system_1 = require("./ng-tree-file-system");
6
+ function createAngularProject(tree) {
7
+ const project = (0, core_1.createProject)(new ng_tree_file_system_1.NgTreeFileSystem(tree));
8
+ project.addSourceFilesAtPaths('**/*.ts');
9
+ return project;
10
+ }
11
+ exports.createAngularProject = createAngularProject;
12
+ //# sourceMappingURL=create-angular-project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-angular-project.js","sourceRoot":"","sources":["../../../../../packages/angular/src/lib/create-angular-project.ts"],"names":[],"mappings":";;;AAEA,wCAA8C;AAE9C,+DAAyD;AAEzD,SAAgB,oBAAoB,CAAC,IAAU;IAC7C,MAAM,OAAO,GAAG,IAAA,oBAAa,EAAC,IAAI,sCAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;IAE1D,OAAO,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;IAEzC,OAAO,OAAO,CAAC;AACjB,CAAC;AAND,oDAMC"}
@@ -0,0 +1,4 @@
1
+ import type { ClassDeclaration } from 'ts-morph';
2
+ export declare function addProviderToDirective(classDeclaration: ClassDeclaration, provider: string, { unique }?: {
3
+ unique?: boolean;
4
+ }): void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addProviderToDirective = void 0;
4
+ const push_to_decorator_array_property_1 = require("../helpers/push-to-decorator-array-property");
5
+ function addProviderToDirective(classDeclaration, provider, { unique = false } = {}) {
6
+ (0, push_to_decorator_array_property_1.pushToDecoratorArrayProperty)(classDeclaration, 'Directive', 'providers', provider, {
7
+ unique,
8
+ forceToArray: true,
9
+ });
10
+ }
11
+ exports.addProviderToDirective = addProviderToDirective;
12
+ //# sourceMappingURL=add-provider-to-directive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-provider-to-directive.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/directive/add-provider-to-directive.ts"],"names":[],"mappings":";;;AAEA,kGAA2F;AAE3F,SAAgB,sBAAsB,CACpC,gBAAkC,EAClC,QAAgB,EAChB,EAAE,MAAM,GAAG,KAAK,KAA2B,EAAE;IAE7C,IAAA,+DAA4B,EAAC,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE;QACjF,MAAM;QACN,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC;AATD,wDASC"}
@@ -0,0 +1 @@
1
+ export * from './add-provider-to-directive';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./add-provider-to-directive"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/directive/index.ts"],"names":[],"mappings":";;;AAAA,sEAA4C"}
@@ -0,0 +1,2 @@
1
+ import type { ClassDeclaration } from 'ts-morph';
2
+ export declare function getMainModule(mainFilePath: string): ClassDeclaration;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getMainModule = void 0;
4
+ const bootstrap_1 = require("../bootstrap");
5
+ function getMainModule(mainFilePath) {
6
+ const bootstrapFn = (0, bootstrap_1.getBootstrapFn)(mainFilePath);
7
+ const [mainModuleIdentifier] = bootstrapFn === null || bootstrapFn === void 0 ? void 0 : bootstrapFn.getArguments();
8
+ const [mainModuleClass] = mainModuleIdentifier.getDefinitionNodes();
9
+ return mainModuleClass;
10
+ }
11
+ exports.getMainModule = getMainModule;
12
+ //# sourceMappingURL=get-main-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-main-module.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/helpers/get-main-module.ts"],"names":[],"mappings":";;;AAEA,4CAA8C;AAE9C,SAAgB,aAAa,CAAC,YAAoB;IAChD,MAAM,WAAW,GAAG,IAAA,0BAAc,EAAC,YAAY,CAAC,CAAC;IAEjD,MAAM,CAAC,oBAAoB,CAAC,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,YAAY,EAAkB,CAAC;IAE3E,MAAM,CAAC,eAAe,CAAC,GAAG,oBAAoB,CAAC,kBAAkB,EAAwB,CAAC;IAE1F,OAAO,eAAe,CAAC;AACzB,CAAC;AARD,sCAQC"}
@@ -0,0 +1,6 @@
1
+ export * from './get-main-module';
2
+ export * from './is-standalone-component';
3
+ export * from './ng-component';
4
+ export * from './ng-module';
5
+ export * from './push-to-decorator-array-property';
6
+ export * from './push-to-object-literal-array-property';
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./get-main-module"), exports);
5
+ tslib_1.__exportStar(require("./is-standalone-component"), exports);
6
+ tslib_1.__exportStar(require("./ng-component"), exports);
7
+ tslib_1.__exportStar(require("./ng-module"), exports);
8
+ tslib_1.__exportStar(require("./push-to-decorator-array-property"), exports);
9
+ tslib_1.__exportStar(require("./push-to-object-literal-array-property"), exports);
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/helpers/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,oEAA0C;AAC1C,yDAA+B;AAC/B,sDAA4B;AAC5B,6EAAmD;AACnD,kFAAwD"}
@@ -0,0 +1,2 @@
1
+ import type { ClassDeclaration } from 'ts-morph';
2
+ export declare function isStandaloneComponent(component: ClassDeclaration): boolean;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isStandaloneComponent = void 0;
4
+ const ts_morph_1 = require("ts-morph");
5
+ function isStandaloneComponent(component) {
6
+ var _a;
7
+ const decorator = component.getDecorator('Component');
8
+ if (!decorator) {
9
+ return false;
10
+ }
11
+ const [metadata] = decorator.getArguments();
12
+ if (!ts_morph_1.Node.isObjectLiteralExpression(metadata)) {
13
+ return false;
14
+ }
15
+ const property = metadata.getProperty('standalone');
16
+ if (!ts_morph_1.Node.isPropertyAssignment(property)) {
17
+ return false;
18
+ }
19
+ return ((_a = property.getInitializer()) === null || _a === void 0 ? void 0 : _a.getText()) === 'true';
20
+ }
21
+ exports.isStandaloneComponent = isStandaloneComponent;
22
+ //# sourceMappingURL=is-standalone-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-standalone-component.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/helpers/is-standalone-component.ts"],"names":[],"mappings":";;;AACA,uCAAgC;AAEhC,SAAgB,qBAAqB,CAAC,SAA2B;;IAC/D,MAAM,SAAS,GAAG,SAAS,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;IAEtD,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,YAAY,EAAE,CAAC;IAE5C,IAAI,CAAC,eAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAEpD,IAAI,CAAC,eAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,CAAA,MAAA,QAAQ,CAAC,cAAc,EAAE,0CAAE,OAAO,EAAE,MAAK,MAAM,CAAC;AACzD,CAAC;AApBD,sDAoBC"}
@@ -0,0 +1,3 @@
1
+ import type { ClassDeclaration } from 'ts-morph';
2
+ import { Pattern, Query, StructureType } from '@mutates/core';
3
+ export declare function getNgComponents(pattern: Pattern, query?: Query<Omit<StructureType<ClassDeclaration>, 'kind'>>): ClassDeclaration[];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getNgComponents = void 0;
4
+ const core_1 = require("@mutates/core");
5
+ function getNgComponents(pattern, query) {
6
+ return (0, core_1.getClasses)(pattern, query).filter((declaration) => !!declaration.getDecorator('Component'));
7
+ }
8
+ exports.getNgComponents = getNgComponents;
9
+ //# sourceMappingURL=ng-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-component.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/helpers/ng-component.ts"],"names":[],"mappings":";;;AAEA,wCAA0E;AAE1E,SAAgB,eAAe,CAC7B,OAAgB,EAChB,KAA4D;IAE5D,OAAO,IAAA,iBAAU,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,MAAM,CACtC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,WAAW,CAAC,CACzD,CAAC;AACJ,CAAC;AAPD,0CAOC"}
@@ -0,0 +1,7 @@
1
+ import type { ClassDeclaration } from 'ts-morph';
2
+ import { Pattern, Query, StructureType } from '@mutates/core';
3
+ export declare function getNgModules(pattern: Pattern, query?: Query<Omit<StructureType<ClassDeclaration>, 'kind'>>): ClassDeclaration[];
4
+ /**
5
+ * Find NgModule where the component was declared.
6
+ */
7
+ export declare function findNgModule(ngComponent: ClassDeclaration, pattern: Pattern): ClassDeclaration | null;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findNgModule = exports.getNgModules = void 0;
4
+ const core_1 = require("@mutates/core");
5
+ function getNgModules(pattern, query) {
6
+ return (0, core_1.getClasses)(pattern, query).filter((declaration) => !!declaration.getDecorator('NgModule'));
7
+ }
8
+ exports.getNgModules = getNgModules;
9
+ /**
10
+ * Find NgModule where the component was declared.
11
+ */
12
+ function findNgModule(ngComponent, pattern) {
13
+ const allNgModules = getNgModules(pattern);
14
+ return (allNgModules.find((module) => {
15
+ const moduleFile = module.getSourceFile();
16
+ const imports = (0, core_1.getImports)(moduleFile.getFilePath(), {
17
+ namedImports: ngComponent.getName(),
18
+ });
19
+ return imports.some((i) => i.getModuleSpecifierSourceFile() === ngComponent.getSourceFile());
20
+ }) || null);
21
+ }
22
+ exports.findNgModule = findNgModule;
23
+ //# sourceMappingURL=ng-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-module.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/helpers/ng-module.ts"],"names":[],"mappings":";;;AAEA,wCAAsF;AAEtF,SAAgB,YAAY,CAC1B,OAAgB,EAChB,KAA4D;IAE5D,OAAO,IAAA,iBAAU,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC;AACpG,CAAC;AALD,oCAKC;AAED;;GAEG;AACH,SAAgB,YAAY,CAC1B,WAA6B,EAC7B,OAAgB;IAEhB,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IAE3C,OAAO,CACL,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;QAC3B,MAAM,UAAU,GAAG,MAAM,CAAC,aAAa,EAAE,CAAC;QAC1C,MAAM,OAAO,GAAG,IAAA,iBAAU,EAAC,UAAU,CAAC,WAAW,EAAE,EAAE;YACnD,YAAY,EAAE,WAAW,CAAC,OAAO,EAAE;SACpC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,4BAA4B,EAAE,KAAK,WAAW,CAAC,aAAa,EAAE,CAAC,CAAC;IAC/F,CAAC,CAAC,IAAI,IAAI,CACX,CAAC;AACJ,CAAC;AAhBD,oCAgBC"}
@@ -0,0 +1,5 @@
1
+ import type { ClassDeclaration } from 'ts-morph';
2
+ export declare function pushToDecoratorArrayProperty(classDeclaration: ClassDeclaration, decoratorName: string, propertyName: string, initializer: string, { unique, forceToArray }?: {
3
+ unique?: boolean;
4
+ forceToArray?: boolean;
5
+ }): void;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pushToDecoratorArrayProperty = void 0;
4
+ const ts_morph_1 = require("ts-morph");
5
+ const core_1 = require("@mutates/core");
6
+ const push_to_object_literal_array_property_1 = require("./push-to-object-literal-array-property");
7
+ // TODO: investigate how to handle consts in descriptors that don't accept array of array type, like styleUrls
8
+ function pushToDecoratorArrayProperty(classDeclaration, decoratorName, propertyName, initializer, { unique = false, forceToArray = false } = {}) {
9
+ const [decorator] = (0, core_1.getDecorators)(classDeclaration, {
10
+ name: decoratorName,
11
+ });
12
+ const [metadata = decorator.addArgument(`{${propertyName}: []}`)] = decorator.getArguments();
13
+ if (!ts_morph_1.Node.isObjectLiteralExpression(metadata)) {
14
+ return;
15
+ }
16
+ (0, push_to_object_literal_array_property_1.pushToObjectLiteralArrayProperty)(metadata, propertyName, initializer, {
17
+ unique,
18
+ forceToArray,
19
+ });
20
+ }
21
+ exports.pushToDecoratorArrayProperty = pushToDecoratorArrayProperty;
22
+ //# sourceMappingURL=push-to-decorator-array-property.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"push-to-decorator-array-property.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/helpers/push-to-decorator-array-property.ts"],"names":[],"mappings":";;;AACA,uCAAgC;AAEhC,wCAA8C;AAE9C,mGAA2F;AAE3F,8GAA8G;AAC9G,SAAgB,4BAA4B,CAC1C,gBAAkC,EAClC,aAAqB,EACrB,YAAoB,EACpB,WAAmB,EACnB,EAAE,MAAM,GAAG,KAAK,EAAE,YAAY,GAAG,KAAK,KAAmD,EAAE;IAE3F,MAAM,CAAC,SAAS,CAAC,GAAG,IAAA,oBAAa,EAAC,gBAAgB,EAAE;QAClD,IAAI,EAAE,aAAa;KACpB,CAAC,CAAC;IAEH,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,YAAY,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,YAAY,EAAE,CAAC;IAE7F,IAAI,CAAC,eAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9C,OAAO;IACT,CAAC;IAED,IAAA,wEAAgC,EAAC,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE;QACpE,MAAM;QACN,YAAY;KACb,CAAC,CAAC;AACL,CAAC;AArBD,oEAqBC"}
@@ -0,0 +1,5 @@
1
+ import type { ObjectLiteralExpression } from 'ts-morph';
2
+ export declare function pushToObjectLiteralArrayProperty(objectLiteral: ObjectLiteralExpression, propertyName: string, initializer: string, { unique, forceToArray }?: {
3
+ unique?: boolean;
4
+ forceToArray?: boolean;
5
+ }): void;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pushToObjectLiteralArrayProperty = void 0;
4
+ const ts_morph_1 = require("ts-morph");
5
+ function pushToObjectLiteralArrayProperty(objectLiteral, propertyName, initializer, { unique = false, forceToArray = false } = {}) {
6
+ var _a;
7
+ const property = (_a = objectLiteral.getProperty(propertyName)) !== null && _a !== void 0 ? _a : objectLiteral.addProperty(`${propertyName}: []`);
8
+ if (!ts_morph_1.Node.isPropertyAssignment(property)) {
9
+ return;
10
+ }
11
+ if (forceToArray && !ts_morph_1.Node.isArrayLiteralExpression(property.getInitializer())) {
12
+ property.setInitializer(`[${property.getInitializer().getText()}]`);
13
+ }
14
+ const importsInitializer = property.getInitializer();
15
+ if (!ts_morph_1.Node.isArrayLiteralExpression(importsInitializer)) {
16
+ return;
17
+ }
18
+ if (unique &&
19
+ importsInitializer.getElements().some((element) => element.getText() === initializer)) {
20
+ return;
21
+ }
22
+ importsInitializer.addElement(initializer);
23
+ }
24
+ exports.pushToObjectLiteralArrayProperty = pushToObjectLiteralArrayProperty;
25
+ //# sourceMappingURL=push-to-object-literal-array-property.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"push-to-object-literal-array-property.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/helpers/push-to-object-literal-array-property.ts"],"names":[],"mappings":";;;AACA,uCAAgC;AAEhC,SAAgB,gCAAgC,CAC9C,aAAsC,EACtC,YAAoB,EACpB,WAAmB,EACnB,EAAE,MAAM,GAAG,KAAK,EAAE,YAAY,GAAG,KAAK,KAAmD,EAAE;;IAE3F,MAAM,QAAQ,GACZ,MAAA,aAAa,CAAC,WAAW,CAAC,YAAY,CAAC,mCAAI,aAAa,CAAC,WAAW,CAAC,GAAG,YAAY,MAAM,CAAC,CAAC;IAE9F,IAAI,CAAC,eAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzC,OAAO;IACT,CAAC;IAED,IAAI,YAAY,IAAI,CAAC,eAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,EAAE,CAAC;QAC9E,QAAQ,CAAC,cAAc,CAAC,IAAI,QAAQ,CAAC,cAAc,EAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IACvE,CAAC;IAED,MAAM,kBAAkB,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IAErD,IAAI,CAAC,eAAI,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,EAAE,CAAC;QACvD,OAAO;IACT,CAAC;IAED,IACE,MAAM;QACN,kBAAkB,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,WAAW,CAAC,EACrF,CAAC;QACD,OAAO;IACT,CAAC;IAED,kBAAkB,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;AAC7C,CAAC;AA/BD,4EA+BC"}
@@ -0,0 +1,4 @@
1
+ import type { ClassDeclaration } from 'ts-morph';
2
+ export declare function addBootstrapToNgModule(classDeclaration: ClassDeclaration, component: string, { unique }?: {
3
+ unique?: boolean;
4
+ }): void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addBootstrapToNgModule = void 0;
4
+ const push_to_decorator_array_property_1 = require("../helpers/push-to-decorator-array-property");
5
+ function addBootstrapToNgModule(classDeclaration, component, { unique = false } = {}) {
6
+ (0, push_to_decorator_array_property_1.pushToDecoratorArrayProperty)(classDeclaration, 'NgModule', 'bootstrap', component, {
7
+ unique,
8
+ forceToArray: true,
9
+ });
10
+ }
11
+ exports.addBootstrapToNgModule = addBootstrapToNgModule;
12
+ //# sourceMappingURL=add-bootstrap-to-ng-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-bootstrap-to-ng-module.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/module/add-bootstrap-to-ng-module.ts"],"names":[],"mappings":";;;AAEA,kGAA2F;AAE3F,SAAgB,sBAAsB,CACpC,gBAAkC,EAClC,SAAiB,EACjB,EAAE,MAAM,GAAG,KAAK,KAA2B,EAAE;IAE7C,IAAA,+DAA4B,EAAC,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE;QACjF,MAAM;QACN,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC;AATD,wDASC"}
@@ -0,0 +1,4 @@
1
+ import type { ClassDeclaration } from 'ts-morph';
2
+ export declare function addDeclarationToNgModule(classDeclaration: ClassDeclaration, declaration: string, { unique }?: {
3
+ unique?: boolean;
4
+ }): void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addDeclarationToNgModule = void 0;
4
+ const push_to_decorator_array_property_1 = require("../helpers/push-to-decorator-array-property");
5
+ function addDeclarationToNgModule(classDeclaration, declaration, { unique = false } = {}) {
6
+ (0, push_to_decorator_array_property_1.pushToDecoratorArrayProperty)(classDeclaration, 'NgModule', 'declarations', declaration, {
7
+ unique,
8
+ forceToArray: true,
9
+ });
10
+ }
11
+ exports.addDeclarationToNgModule = addDeclarationToNgModule;
12
+ //# sourceMappingURL=add-declaration-to-ng-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-declaration-to-ng-module.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/module/add-declaration-to-ng-module.ts"],"names":[],"mappings":";;;AAEA,kGAA2F;AAE3F,SAAgB,wBAAwB,CACtC,gBAAkC,EAClC,WAAmB,EACnB,EAAE,MAAM,GAAG,KAAK,KAA2B,EAAE;IAE7C,IAAA,+DAA4B,EAAC,gBAAgB,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE;QACtF,MAAM;QACN,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC;AATD,4DASC"}
@@ -0,0 +1,4 @@
1
+ import type { ClassDeclaration } from 'ts-morph';
2
+ export declare function addEntryComponentToNgModule(classDeclaration: ClassDeclaration, component: string, { unique }?: {
3
+ unique?: boolean;
4
+ }): void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addEntryComponentToNgModule = void 0;
4
+ const push_to_decorator_array_property_1 = require("../helpers/push-to-decorator-array-property");
5
+ function addEntryComponentToNgModule(classDeclaration, component, { unique = false } = {}) {
6
+ (0, push_to_decorator_array_property_1.pushToDecoratorArrayProperty)(classDeclaration, 'NgModule', 'entryComponents', component, {
7
+ unique,
8
+ forceToArray: true,
9
+ });
10
+ }
11
+ exports.addEntryComponentToNgModule = addEntryComponentToNgModule;
12
+ //# sourceMappingURL=add-entry-component-to-ng-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-entry-component-to-ng-module.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/module/add-entry-component-to-ng-module.ts"],"names":[],"mappings":";;;AAEA,kGAA2F;AAE3F,SAAgB,2BAA2B,CACzC,gBAAkC,EAClC,SAAiB,EACjB,EAAE,MAAM,GAAG,KAAK,KAA2B,EAAE;IAE7C,IAAA,+DAA4B,EAAC,gBAAgB,EAAE,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE;QACvF,MAAM;QACN,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC;AATD,kEASC"}
@@ -0,0 +1,4 @@
1
+ import type { ClassDeclaration } from 'ts-morph';
2
+ export declare function addExportToNgModule(classDeclaration: ClassDeclaration, exportName: string, { unique }?: {
3
+ unique?: boolean;
4
+ }): void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addExportToNgModule = void 0;
4
+ const push_to_decorator_array_property_1 = require("../helpers/push-to-decorator-array-property");
5
+ function addExportToNgModule(classDeclaration, exportName, { unique = false } = {}) {
6
+ (0, push_to_decorator_array_property_1.pushToDecoratorArrayProperty)(classDeclaration, 'NgModule', 'exports', exportName, {
7
+ unique,
8
+ forceToArray: true,
9
+ });
10
+ }
11
+ exports.addExportToNgModule = addExportToNgModule;
12
+ //# sourceMappingURL=add-export-to-ng-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-export-to-ng-module.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/module/add-export-to-ng-module.ts"],"names":[],"mappings":";;;AAEA,kGAA2F;AAE3F,SAAgB,mBAAmB,CACjC,gBAAkC,EAClC,UAAkB,EAClB,EAAE,MAAM,GAAG,KAAK,KAA2B,EAAE;IAE7C,IAAA,+DAA4B,EAAC,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE;QAChF,MAAM;QACN,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC;AATD,kDASC"}
@@ -0,0 +1,4 @@
1
+ import type { ClassDeclaration } from 'ts-morph';
2
+ export declare function addImportToNgModule(classDeclaration: ClassDeclaration, moduleName: string, { unique }?: {
3
+ unique?: boolean;
4
+ }): void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addImportToNgModule = void 0;
4
+ const push_to_decorator_array_property_1 = require("../helpers/push-to-decorator-array-property");
5
+ function addImportToNgModule(classDeclaration, moduleName, { unique = false } = {}) {
6
+ (0, push_to_decorator_array_property_1.pushToDecoratorArrayProperty)(classDeclaration, 'NgModule', 'imports', moduleName, {
7
+ unique,
8
+ forceToArray: true,
9
+ });
10
+ }
11
+ exports.addImportToNgModule = addImportToNgModule;
12
+ //# sourceMappingURL=add-import-to-ng-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-import-to-ng-module.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/module/add-import-to-ng-module.ts"],"names":[],"mappings":";;;AAEA,kGAA2F;AAE3F,SAAgB,mBAAmB,CACjC,gBAAkC,EAClC,UAAkB,EAClB,EAAE,MAAM,GAAG,KAAK,KAA2B,EAAE;IAE7C,IAAA,+DAA4B,EAAC,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE;QAChF,MAAM;QACN,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC;AATD,kDASC"}
@@ -0,0 +1,4 @@
1
+ import type { ClassDeclaration } from 'ts-morph';
2
+ export declare function addProviderToNgModule(classDeclaration: ClassDeclaration, provider: string, { unique }?: {
3
+ unique?: boolean;
4
+ }): void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addProviderToNgModule = void 0;
4
+ const push_to_decorator_array_property_1 = require("../helpers/push-to-decorator-array-property");
5
+ function addProviderToNgModule(classDeclaration, provider, { unique = false } = {}) {
6
+ (0, push_to_decorator_array_property_1.pushToDecoratorArrayProperty)(classDeclaration, 'NgModule', 'providers', provider, {
7
+ unique,
8
+ forceToArray: true,
9
+ });
10
+ }
11
+ exports.addProviderToNgModule = addProviderToNgModule;
12
+ //# sourceMappingURL=add-provider-to-ng-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-provider-to-ng-module.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/module/add-provider-to-ng-module.ts"],"names":[],"mappings":";;;AAEA,kGAA2F;AAE3F,SAAgB,qBAAqB,CACnC,gBAAkC,EAClC,QAAgB,EAChB,EAAE,MAAM,GAAG,KAAK,KAA2B,EAAE;IAE7C,IAAA,+DAA4B,EAAC,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE;QAChF,MAAM;QACN,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC;AATD,sDASC"}
@@ -0,0 +1,4 @@
1
+ import type { ClassDeclaration } from 'ts-morph';
2
+ export declare function addSchemaToNgModule(classDeclaration: ClassDeclaration, schema: string, { unique }?: {
3
+ unique?: boolean;
4
+ }): void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addSchemaToNgModule = void 0;
4
+ const push_to_decorator_array_property_1 = require("../helpers/push-to-decorator-array-property");
5
+ function addSchemaToNgModule(classDeclaration, schema, { unique = false } = {}) {
6
+ (0, push_to_decorator_array_property_1.pushToDecoratorArrayProperty)(classDeclaration, 'NgModule', 'schemas', schema, {
7
+ unique,
8
+ forceToArray: true,
9
+ });
10
+ }
11
+ exports.addSchemaToNgModule = addSchemaToNgModule;
12
+ //# sourceMappingURL=add-schema-to-ng-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-schema-to-ng-module.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/module/add-schema-to-ng-module.ts"],"names":[],"mappings":";;;AAEA,kGAA2F;AAE3F,SAAgB,mBAAmB,CACjC,gBAAkC,EAClC,MAAc,EACd,EAAE,MAAM,GAAG,KAAK,KAA2B,EAAE;IAE7C,IAAA,+DAA4B,EAAC,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE;QAC5E,MAAM;QACN,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC;AATD,kDASC"}
@@ -0,0 +1,7 @@
1
+ export * from './add-bootstrap-to-ng-module';
2
+ export * from './add-declaration-to-ng-module';
3
+ export * from './add-entry-component-to-ng-module';
4
+ export * from './add-export-to-ng-module';
5
+ export * from './add-import-to-ng-module';
6
+ export * from './add-provider-to-ng-module';
7
+ export * from './add-schema-to-ng-module';
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./add-bootstrap-to-ng-module"), exports);
5
+ tslib_1.__exportStar(require("./add-declaration-to-ng-module"), exports);
6
+ tslib_1.__exportStar(require("./add-entry-component-to-ng-module"), exports);
7
+ tslib_1.__exportStar(require("./add-export-to-ng-module"), exports);
8
+ tslib_1.__exportStar(require("./add-import-to-ng-module"), exports);
9
+ tslib_1.__exportStar(require("./add-provider-to-ng-module"), exports);
10
+ tslib_1.__exportStar(require("./add-schema-to-ng-module"), exports);
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/module/index.ts"],"names":[],"mappings":";;;AAAA,uEAA6C;AAC7C,yEAA+C;AAC/C,6EAAmD;AACnD,oEAA0C;AAC1C,oEAA0C;AAC1C,sEAA4C;AAC5C,oEAA0C"}
@@ -0,0 +1,28 @@
1
+ import type { Tree } from '@angular-devkit/schematics';
2
+ import { FileSystemHost, RuntimeDirEntry } from 'ts-morph';
3
+ export declare class NgTreeFileSystem implements FileSystemHost {
4
+ private readonly tree;
5
+ constructor(tree: Tree);
6
+ isCaseSensitive(): boolean;
7
+ delete(path: string): Promise<void>;
8
+ deleteSync(path: string): void;
9
+ readDirSync(dirPath: string): RuntimeDirEntry[];
10
+ readFile(filePath: string, encoding?: string | undefined): Promise<string>;
11
+ readFileSync(filePath: string, encoding?: string | undefined): string;
12
+ writeFile(filePath: string, fileText: string): Promise<void>;
13
+ writeFileSync(filePath: string, fileText: string): void;
14
+ mkdir(dirPath: string): Promise<void>;
15
+ mkdirSync(dirPath: string): void;
16
+ move(srcPath: string, destPath: string): Promise<void>;
17
+ moveSync(srcPath: string, destPath: string): void;
18
+ copy(srcPath: string, destPath: string): Promise<void>;
19
+ copySync(srcPath: string, destPath: string): void;
20
+ fileExists(filePath: string): Promise<boolean>;
21
+ fileExistsSync(filePath: string): boolean;
22
+ directoryExists(dirPath: string): Promise<boolean>;
23
+ directoryExistsSync(dirPath: string): boolean;
24
+ realpathSync(path: string): string;
25
+ getCurrentDirectory(): string;
26
+ glob(patterns: readonly string[]): Promise<string[]>;
27
+ globSync(patterns: readonly string[]): string[];
28
+ }
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NgTreeFileSystem = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const node_path_1 = require("node:path");
6
+ const multimatch_1 = require("multimatch");
7
+ class NgTreeFileSystem {
8
+ constructor(tree) {
9
+ this.tree = tree;
10
+ }
11
+ isCaseSensitive() {
12
+ return true;
13
+ }
14
+ delete(path) {
15
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
16
+ return this.tree.delete(path);
17
+ });
18
+ }
19
+ deleteSync(path) {
20
+ return this.tree.delete(path);
21
+ }
22
+ readDirSync(dirPath) {
23
+ const { subdirs: directories, subfiles: files } = this.tree.getDir(dirPath);
24
+ return directories
25
+ .map((name) => ({
26
+ name,
27
+ isFile: false,
28
+ isDirectory: true,
29
+ isSymlink: false,
30
+ }))
31
+ .concat(files.map((name) => ({
32
+ name,
33
+ isFile: true,
34
+ isDirectory: false,
35
+ isSymlink: false,
36
+ })));
37
+ }
38
+ readFile(filePath, encoding) {
39
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
40
+ return this.tree.readText(filePath);
41
+ });
42
+ }
43
+ readFileSync(filePath, encoding) {
44
+ return this.tree.readText(filePath);
45
+ }
46
+ writeFile(filePath, fileText) {
47
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
48
+ this.writeFileSync(filePath, fileText);
49
+ });
50
+ }
51
+ writeFileSync(filePath, fileText) {
52
+ if (this.fileExistsSync(filePath)) {
53
+ this.tree.overwrite(filePath, fileText);
54
+ }
55
+ else {
56
+ this.tree.create(filePath, fileText);
57
+ }
58
+ }
59
+ mkdir(dirPath) {
60
+ return Promise.resolve(undefined);
61
+ }
62
+ mkdirSync(dirPath) {
63
+ // empty
64
+ }
65
+ move(srcPath, destPath) {
66
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
67
+ return this.moveSync(srcPath, destPath);
68
+ });
69
+ }
70
+ moveSync(srcPath, destPath) {
71
+ this.copySync(srcPath, destPath);
72
+ this.deleteSync(srcPath);
73
+ }
74
+ copy(srcPath, destPath) {
75
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
76
+ return this.copySync(srcPath, destPath);
77
+ });
78
+ }
79
+ copySync(srcPath, destPath) {
80
+ if (this.fileExistsSync(srcPath)) {
81
+ this.writeFileSync(destPath, this.readFileSync(srcPath));
82
+ }
83
+ else if (this.directoryExistsSync(srcPath)) {
84
+ const paths = this.readDirSync(srcPath);
85
+ paths.forEach((path) => this.copySync(path.name, (0, node_path_1.join)(destPath, (0, node_path_1.basename)(path.name))));
86
+ }
87
+ }
88
+ fileExists(filePath) {
89
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
90
+ return this.fileExistsSync(filePath);
91
+ });
92
+ }
93
+ fileExistsSync(filePath) {
94
+ return this.tree.exists(filePath);
95
+ }
96
+ directoryExists(dirPath) {
97
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
98
+ return this.directoryExistsSync(dirPath);
99
+ });
100
+ }
101
+ directoryExistsSync(dirPath) {
102
+ return this.tree.exists(dirPath);
103
+ }
104
+ realpathSync(path) {
105
+ return path;
106
+ }
107
+ getCurrentDirectory() {
108
+ return '/';
109
+ }
110
+ glob(patterns) {
111
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
112
+ return this.globSync(patterns);
113
+ });
114
+ }
115
+ globSync(patterns) {
116
+ return (0, multimatch_1.default)(this.readDirSync('/')
117
+ .filter((entry) => entry.isFile)
118
+ .map((entry) => entry.name), patterns);
119
+ }
120
+ }
121
+ exports.NgTreeFileSystem = NgTreeFileSystem;
122
+ //# sourceMappingURL=ng-tree-file-system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-tree-file-system.js","sourceRoot":"","sources":["../../../../../packages/angular/src/lib/ng-tree-file-system.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ import { UnitTestTree } from '@angular-devkit/schematics/testing';
2
+ export declare function createTestingTree(): UnitTestTree;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createTestingTree = void 0;
4
+ const schematics_1 = require("@angular-devkit/schematics");
5
+ const testing_1 = require("@angular-devkit/schematics/testing");
6
+ function createTestingTree() {
7
+ return new testing_1.UnitTestTree(new schematics_1.HostTree());
8
+ }
9
+ exports.createTestingTree = createTestingTree;
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/testing/index.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,gEAAkE;AAElE,SAAgB,iBAAiB;IAC/B,OAAO,IAAI,sBAAY,CAAC,IAAI,qBAAQ,EAAE,CAAC,CAAC;AAC1C,CAAC;AAFD,8CAEC"}