@mutates/angular 0.1.5 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/index.d.ts +3 -0
- package/src/index.js +3 -0
- package/src/index.js.map +1 -1
- package/src/lib/bootstrap/get-bootstrap-application-fn.js +8 -3
- package/src/lib/bootstrap/get-bootstrap-application-fn.js.map +1 -1
- package/src/lib/bootstrap/get-bootstrap-module-fn.d.ts +2 -0
- package/src/lib/bootstrap/get-bootstrap-module-fn.js +17 -0
- package/src/lib/bootstrap/get-bootstrap-module-fn.js.map +1 -0
- package/src/lib/bootstrap/index.d.ts +1 -2
- package/src/lib/bootstrap/index.js +1 -2
- package/src/lib/bootstrap/index.js.map +1 -1
- package/src/lib/component/get-components.d.ts +4 -0
- package/src/lib/component/get-components.js +13 -0
- package/src/lib/component/get-components.js.map +1 -0
- package/src/lib/component/index.d.ts +1 -3
- package/src/lib/component/index.js +1 -3
- package/src/lib/component/index.js.map +1 -1
- package/src/lib/create-angular-project.d.ts +2 -1
- package/src/lib/create-angular-project.js +2 -4
- package/src/lib/create-angular-project.js.map +1 -1
- package/src/lib/directive/get-directives.d.ts +4 -0
- package/src/lib/directive/get-directives.js +13 -0
- package/src/lib/directive/get-directives.js.map +1 -0
- package/src/lib/directive/index.d.ts +1 -1
- package/src/lib/directive/index.js +1 -1
- package/src/lib/directive/index.js.map +1 -1
- package/src/lib/helpers/get-app-module.d.ts +2 -0
- package/src/lib/helpers/{get-main-module.js → get-app-module.js} +5 -5
- package/src/lib/helpers/get-app-module.js.map +1 -0
- package/src/lib/helpers/index.d.ts +2 -4
- package/src/lib/helpers/index.js +2 -4
- package/src/lib/helpers/index.js.map +1 -1
- package/src/lib/helpers/is-standalone.d.ts +2 -0
- package/src/lib/helpers/is-standalone.js +27 -0
- package/src/lib/helpers/is-standalone.js.map +1 -0
- package/src/lib/injectable/get-injectables.d.ts +4 -0
- package/src/lib/injectable/get-injectables.js +13 -0
- package/src/lib/injectable/get-injectables.js.map +1 -0
- package/src/lib/injectable/index.d.ts +1 -0
- package/src/lib/injectable/index.js +5 -0
- package/src/lib/injectable/index.js.map +1 -0
- package/src/lib/metadata/get-metadata.d.ts +14 -0
- package/src/lib/metadata/get-metadata.js +42 -0
- package/src/lib/metadata/get-metadata.js.map +1 -0
- package/src/lib/metadata/index.d.ts +1 -0
- package/src/lib/metadata/index.js +5 -0
- package/src/lib/metadata/index.js.map +1 -0
- package/src/lib/module/get-ng-modules.d.ts +4 -0
- package/src/lib/module/get-ng-modules.js +13 -0
- package/src/lib/module/get-ng-modules.js.map +1 -0
- package/src/lib/module/index.d.ts +1 -7
- package/src/lib/module/index.js +1 -7
- package/src/lib/module/index.js.map +1 -1
- package/src/lib/pipe/get-pipes.d.ts +4 -0
- package/src/lib/pipe/get-pipes.js +13 -0
- package/src/lib/pipe/get-pipes.js.map +1 -0
- package/src/lib/pipe/index.d.ts +1 -0
- package/src/lib/pipe/index.js +5 -0
- package/src/lib/pipe/index.js.map +1 -0
- package/src/lib/bootstrap/add-provider-to-bootstrap-application-fn.d.ts +0 -4
- package/src/lib/bootstrap/add-provider-to-bootstrap-application-fn.js +0 -23
- package/src/lib/bootstrap/add-provider-to-bootstrap-application-fn.js.map +0 -1
- package/src/lib/bootstrap/get-bootstrap-fn.d.ts +0 -2
- package/src/lib/bootstrap/get-bootstrap-fn.js +0 -15
- package/src/lib/bootstrap/get-bootstrap-fn.js.map +0 -1
- package/src/lib/component/add-import-to-component.d.ts +0 -4
- package/src/lib/component/add-import-to-component.js +0 -12
- package/src/lib/component/add-import-to-component.js.map +0 -1
- package/src/lib/component/add-provider-to-component.d.ts +0 -4
- package/src/lib/component/add-provider-to-component.js +0 -12
- package/src/lib/component/add-provider-to-component.js.map +0 -1
- package/src/lib/component/add-style-url-to-component.d.ts +0 -4
- package/src/lib/component/add-style-url-to-component.js +0 -11
- package/src/lib/component/add-style-url-to-component.js.map +0 -1
- package/src/lib/directive/add-provider-to-directive.d.ts +0 -4
- package/src/lib/directive/add-provider-to-directive.js +0 -12
- package/src/lib/directive/add-provider-to-directive.js.map +0 -1
- package/src/lib/helpers/get-main-module.d.ts +0 -2
- package/src/lib/helpers/get-main-module.js.map +0 -1
- package/src/lib/helpers/is-standalone-component.d.ts +0 -2
- package/src/lib/helpers/is-standalone-component.js +0 -22
- package/src/lib/helpers/is-standalone-component.js.map +0 -1
- package/src/lib/helpers/ng-component.d.ts +0 -3
- package/src/lib/helpers/ng-component.js +0 -9
- package/src/lib/helpers/ng-component.js.map +0 -1
- package/src/lib/helpers/ng-module.d.ts +0 -7
- package/src/lib/helpers/ng-module.js +0 -23
- package/src/lib/helpers/ng-module.js.map +0 -1
- package/src/lib/module/add-bootstrap-to-ng-module.d.ts +0 -4
- package/src/lib/module/add-bootstrap-to-ng-module.js +0 -12
- package/src/lib/module/add-bootstrap-to-ng-module.js.map +0 -1
- package/src/lib/module/add-declaration-to-ng-module.d.ts +0 -4
- package/src/lib/module/add-declaration-to-ng-module.js +0 -12
- package/src/lib/module/add-declaration-to-ng-module.js.map +0 -1
- package/src/lib/module/add-entry-component-to-ng-module.d.ts +0 -4
- package/src/lib/module/add-entry-component-to-ng-module.js +0 -12
- package/src/lib/module/add-entry-component-to-ng-module.js.map +0 -1
- package/src/lib/module/add-export-to-ng-module.d.ts +0 -4
- package/src/lib/module/add-export-to-ng-module.js +0 -12
- package/src/lib/module/add-export-to-ng-module.js.map +0 -1
- package/src/lib/module/add-import-to-ng-module.d.ts +0 -4
- package/src/lib/module/add-import-to-ng-module.js +0 -12
- package/src/lib/module/add-import-to-ng-module.js.map +0 -1
- package/src/lib/module/add-provider-to-ng-module.d.ts +0 -4
- package/src/lib/module/add-provider-to-ng-module.js +0 -12
- package/src/lib/module/add-provider-to-ng-module.js.map +0 -1
- package/src/lib/module/add-schema-to-ng-module.d.ts +0 -4
- package/src/lib/module/add-schema-to-ng-module.js +0 -12
- package/src/lib/module/add-schema-to-ng-module.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mutates/angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"typescript",
|
|
6
6
|
"ast",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"main": "./src/index.js",
|
|
19
19
|
"typings": "./src/index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@mutates/core": "0.
|
|
21
|
+
"@mutates/core": "0.3.0",
|
|
22
22
|
"multimatch": "^7.0.0",
|
|
23
23
|
"ts-morph": "^22.0.0",
|
|
24
24
|
"tslib": "^2.3.0"
|
package/src/index.d.ts
CHANGED
|
@@ -2,7 +2,10 @@ export * from './lib/bootstrap';
|
|
|
2
2
|
export * from './lib/component';
|
|
3
3
|
export * from './lib/directive';
|
|
4
4
|
export * from './lib/helpers';
|
|
5
|
+
export * from './lib/injectable';
|
|
6
|
+
export * from './lib/metadata';
|
|
5
7
|
export * from './lib/module';
|
|
8
|
+
export * from './lib/pipe';
|
|
6
9
|
export * from './lib/testing';
|
|
7
10
|
export * from './lib/create-angular-project';
|
|
8
11
|
export * from './lib/ng-tree-file-system';
|
package/src/index.js
CHANGED
|
@@ -5,7 +5,10 @@ tslib_1.__exportStar(require("./lib/bootstrap"), exports);
|
|
|
5
5
|
tslib_1.__exportStar(require("./lib/component"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./lib/directive"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./lib/helpers"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./lib/injectable"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./lib/metadata"), exports);
|
|
8
10
|
tslib_1.__exportStar(require("./lib/module"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./lib/pipe"), exports);
|
|
9
12
|
tslib_1.__exportStar(require("./lib/testing"), exports);
|
|
10
13
|
tslib_1.__exportStar(require("./lib/create-angular-project"), exports);
|
|
11
14
|
tslib_1.__exportStar(require("./lib/ng-tree-file-system"), exports);
|
package/src/index.js.map
CHANGED
|
@@ -1 +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"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/angular/src/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC;AAChC,0DAAgC;AAChC,0DAAgC;AAChC,wDAA8B;AAC9B,2DAAiC;AACjC,yDAA+B;AAC/B,uDAA6B;AAC7B,qDAA2B;AAC3B,wDAA8B;AAC9B,uEAA6C;AAC7C,oEAA0C"}
|
|
@@ -5,11 +5,16 @@ const ts_morph_1 = require("ts-morph");
|
|
|
5
5
|
const core_1 = require("@mutates/core");
|
|
6
6
|
function getBootstrapApplicationFn(mainFilePath) {
|
|
7
7
|
var _a;
|
|
8
|
-
const [
|
|
8
|
+
const [namedImport] = (0, core_1.getNamedImports)((0, core_1.getImports)(mainFilePath, {
|
|
9
9
|
moduleSpecifier: '@angular/platform-browser',
|
|
10
|
+
}), {
|
|
11
|
+
name: 'bootstrapApplication',
|
|
10
12
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
if (!namedImport) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
return (_a = (0, core_1.getImportRefs)(namedImport)
|
|
17
|
+
.find((ref) => ts_morph_1.Node.isCallExpression(ref.getParent()))) === null || _a === void 0 ? void 0 : _a.getParentIfKind(ts_morph_1.SyntaxKind.CallExpression);
|
|
13
18
|
}
|
|
14
19
|
exports.getBootstrapApplicationFn = getBootstrapApplicationFn;
|
|
15
20
|
//# sourceMappingURL=get-bootstrap-application-fn.js.map
|
|
@@ -1 +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,
|
|
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,wCAA2E;AAE3E,SAAgB,yBAAyB,CAAC,YAAoB;;IAC5D,MAAM,CAAC,WAAW,CAAC,GAAG,IAAA,sBAAe,EACnC,IAAA,iBAAU,EAAC,YAAY,EAAE;QACvB,eAAe,EAAE,2BAA2B;KAC7C,CAAC,EACF;QACE,IAAI,EAAE,sBAAsB;KAC7B,CACF,CAAC;IAEF,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO;IACT,CAAC;IAED,OAAO,MAAA,IAAA,oBAAa,EAAC,WAAW,CAAC;SAC9B,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;AAjBD,8DAiBC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBootstrapModuleFn = void 0;
|
|
4
|
+
const ts_morph_1 = require("ts-morph");
|
|
5
|
+
const core_1 = require("@mutates/core");
|
|
6
|
+
function getBootstrapModuleFn(mainFilePath) {
|
|
7
|
+
var _a, _b, _c;
|
|
8
|
+
const namedImport = (0, core_1.getNamedImports)((0, core_1.getImports)(mainFilePath, {
|
|
9
|
+
moduleSpecifier: '@angular/platform-browser-dynamic',
|
|
10
|
+
}), {
|
|
11
|
+
name: 'platformBrowserDynamic',
|
|
12
|
+
});
|
|
13
|
+
return (_c = (_b = (_a = (0, core_1.getImportRefs)(namedImport)
|
|
14
|
+
.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);
|
|
15
|
+
}
|
|
16
|
+
exports.getBootstrapModuleFn = getBootstrapModuleFn;
|
|
17
|
+
//# sourceMappingURL=get-bootstrap-module-fn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-bootstrap-module-fn.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/bootstrap/get-bootstrap-module-fn.ts"],"names":[],"mappings":";;;AACA,uCAA4C;AAE5C,wCAA2E;AAE3E,SAAgB,oBAAoB,CAAC,YAAoB;;IACvD,MAAM,WAAW,GAAG,IAAA,sBAAe,EACjC,IAAA,iBAAU,EAAC,YAAY,EAAE;QACvB,eAAe,EAAE,mCAAmC;KACrD,CAAC,EACF;QACE,IAAI,EAAE,wBAAwB;KAC/B,CACF,CAAC;IAEF,OAAO,MAAA,MAAA,MAAA,IAAA,oBAAa,EAAC,WAAW,CAAC;SAC9B,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;AAfD,oDAeC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./add-provider-to-bootstrap-application-fn"), exports);
|
|
5
4
|
tslib_1.__exportStar(require("./get-bootstrap-application-fn"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./get-bootstrap-fn"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./get-bootstrap-module-fn"), exports);
|
|
7
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/bootstrap/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/bootstrap/index.ts"],"names":[],"mappings":";;;AAAA,yEAA+C;AAC/C,oEAA0C"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ClassDeclaration } from 'ts-morph';
|
|
2
|
+
import { Pattern, Query, StructureType } from '@mutates/core';
|
|
3
|
+
export declare function getComponents(pattern: Pattern, query?: Query<Omit<StructureType<ClassDeclaration>, 'kind'>>): ClassDeclaration[];
|
|
4
|
+
export declare function isComponent(declaration: ClassDeclaration): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isComponent = exports.getComponents = void 0;
|
|
4
|
+
const core_1 = require("@mutates/core");
|
|
5
|
+
function getComponents(pattern, query) {
|
|
6
|
+
return (0, core_1.getClasses)(pattern, query).filter(isComponent);
|
|
7
|
+
}
|
|
8
|
+
exports.getComponents = getComponents;
|
|
9
|
+
function isComponent(declaration) {
|
|
10
|
+
return !!declaration.getDecorator('Component');
|
|
11
|
+
}
|
|
12
|
+
exports.isComponent = isComponent;
|
|
13
|
+
//# sourceMappingURL=get-components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-components.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/component/get-components.ts"],"names":[],"mappings":";;;AAEA,wCAA0E;AAE1E,SAAgB,aAAa,CAC3B,OAAgB,EAChB,KAA4D;IAE5D,OAAO,IAAA,iBAAU,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AACxD,CAAC;AALD,sCAKC;AAED,SAAgB,WAAW,CAAC,WAA6B;IACvD,OAAO,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;AACjD,CAAC;AAFD,kCAEC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./
|
|
5
|
-
tslib_1.__exportStar(require("./add-provider-to-component"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./add-style-url-to-component"), exports);
|
|
4
|
+
tslib_1.__exportStar(require("./get-components"), exports);
|
|
7
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/component/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/component/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
-
|
|
2
|
+
import { ProjectOptions } from 'ts-morph';
|
|
3
|
+
export declare function createAngularProject(tree: Tree, options?: Omit<ProjectOptions, 'fileSystem'>): import("ts-morph").Project;
|
|
@@ -3,10 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createAngularProject = void 0;
|
|
4
4
|
const core_1 = require("@mutates/core");
|
|
5
5
|
const ng_tree_file_system_1 = require("./ng-tree-file-system");
|
|
6
|
-
function createAngularProject(tree) {
|
|
7
|
-
|
|
8
|
-
project.addSourceFilesAtPaths('**/*.ts');
|
|
9
|
-
return project;
|
|
6
|
+
function createAngularProject(tree, options) {
|
|
7
|
+
return (0, core_1.createProject)(new ng_tree_file_system_1.NgTreeFileSystem(tree), options);
|
|
10
8
|
}
|
|
11
9
|
exports.createAngularProject = createAngularProject;
|
|
12
10
|
//# sourceMappingURL=create-angular-project.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-angular-project.js","sourceRoot":"","sources":["../../../../../packages/angular/src/lib/create-angular-project.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"create-angular-project.js","sourceRoot":"","sources":["../../../../../packages/angular/src/lib/create-angular-project.ts"],"names":[],"mappings":";;;AAGA,wCAA8C;AAE9C,+DAAyD;AAEzD,SAAgB,oBAAoB,CAAC,IAAU,EAAE,OAA4C;IAC3F,OAAO,IAAA,oBAAa,EAAC,IAAI,sCAAgB,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;AAC5D,CAAC;AAFD,oDAEC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ClassDeclaration } from 'ts-morph';
|
|
2
|
+
import { Pattern, Query, StructureType } from '@mutates/core';
|
|
3
|
+
export declare function getDirectives(pattern: Pattern, query?: Query<Omit<StructureType<ClassDeclaration>, 'kind'>>): ClassDeclaration[];
|
|
4
|
+
export declare function isDirective(declaration: ClassDeclaration): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isDirective = exports.getDirectives = void 0;
|
|
4
|
+
const core_1 = require("@mutates/core");
|
|
5
|
+
function getDirectives(pattern, query) {
|
|
6
|
+
return (0, core_1.getClasses)(pattern, query).filter(isDirective);
|
|
7
|
+
}
|
|
8
|
+
exports.getDirectives = getDirectives;
|
|
9
|
+
function isDirective(declaration) {
|
|
10
|
+
return !!declaration.getDecorator('Directive');
|
|
11
|
+
}
|
|
12
|
+
exports.isDirective = isDirective;
|
|
13
|
+
//# sourceMappingURL=get-directives.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-directives.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/directive/get-directives.ts"],"names":[],"mappings":";;;AAEA,wCAA0E;AAE1E,SAAgB,aAAa,CAC3B,OAAgB,EAChB,KAA4D;IAE5D,OAAO,IAAA,iBAAU,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AACxD,CAAC;AALD,sCAKC;AAED,SAAgB,WAAW,CAAC,WAA6B;IACvD,OAAO,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;AACjD,CAAC;AAFD,kCAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './get-directives';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./
|
|
4
|
+
tslib_1.__exportStar(require("./get-directives"), exports);
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/directive/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/directive/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getAppModule = void 0;
|
|
4
4
|
const bootstrap_1 = require("../bootstrap");
|
|
5
|
-
function
|
|
6
|
-
const bootstrapFn = (0, bootstrap_1.
|
|
5
|
+
function getAppModule(mainFilePath) {
|
|
6
|
+
const bootstrapFn = (0, bootstrap_1.getBootstrapModuleFn)(mainFilePath);
|
|
7
7
|
const [mainModuleIdentifier] = bootstrapFn === null || bootstrapFn === void 0 ? void 0 : bootstrapFn.getArguments();
|
|
8
8
|
const [mainModuleClass] = mainModuleIdentifier.getDefinitionNodes();
|
|
9
9
|
return mainModuleClass;
|
|
10
10
|
}
|
|
11
|
-
exports.
|
|
12
|
-
//# sourceMappingURL=get-
|
|
11
|
+
exports.getAppModule = getAppModule;
|
|
12
|
+
//# sourceMappingURL=get-app-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-app-module.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/helpers/get-app-module.ts"],"names":[],"mappings":";;;AAEA,4CAAoD;AAEpD,SAAgB,YAAY,CAAC,YAAoB;IAC/C,MAAM,WAAW,GAAG,IAAA,gCAAoB,EAAC,YAAY,CAAC,CAAC;IAEvD,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,oCAQC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export * from './get-
|
|
2
|
-
export * from './is-standalone
|
|
3
|
-
export * from './ng-component';
|
|
4
|
-
export * from './ng-module';
|
|
1
|
+
export * from './get-app-module';
|
|
2
|
+
export * from './is-standalone';
|
|
5
3
|
export * from './push-to-decorator-array-property';
|
|
6
4
|
export * from './push-to-object-literal-array-property';
|
package/src/lib/helpers/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./get-
|
|
5
|
-
tslib_1.__exportStar(require("./is-standalone
|
|
6
|
-
tslib_1.__exportStar(require("./ng-component"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./ng-module"), exports);
|
|
4
|
+
tslib_1.__exportStar(require("./get-app-module"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./is-standalone"), exports);
|
|
8
6
|
tslib_1.__exportStar(require("./push-to-decorator-array-property"), exports);
|
|
9
7
|
tslib_1.__exportStar(require("./push-to-object-literal-array-property"), exports);
|
|
10
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/helpers/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/helpers/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,0DAAgC;AAChC,6EAAmD;AACnD,kFAAwD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isStandalone = void 0;
|
|
4
|
+
const core_1 = require("@mutates/core");
|
|
5
|
+
const get_metadata_1 = require("../metadata/get-metadata");
|
|
6
|
+
function isStandalone(ngEntity) {
|
|
7
|
+
var _a;
|
|
8
|
+
const [metadata] = (0, get_metadata_1.getMetadata)(ngEntity, [
|
|
9
|
+
get_metadata_1.MetadataType.NgModule,
|
|
10
|
+
get_metadata_1.MetadataType.Component,
|
|
11
|
+
get_metadata_1.MetadataType.Directive,
|
|
12
|
+
get_metadata_1.MetadataType.Pipe,
|
|
13
|
+
get_metadata_1.MetadataType.Injectable,
|
|
14
|
+
]);
|
|
15
|
+
if (!metadata) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
const [property] = (0, core_1.getObjectProperties)(metadata, {
|
|
19
|
+
name: 'standalone',
|
|
20
|
+
});
|
|
21
|
+
if (!property) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
return ((_a = property.getInitializer()) === null || _a === void 0 ? void 0 : _a.getText()) === 'true';
|
|
25
|
+
}
|
|
26
|
+
exports.isStandalone = isStandalone;
|
|
27
|
+
//# sourceMappingURL=is-standalone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-standalone.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/helpers/is-standalone.ts"],"names":[],"mappings":";;;AAEA,wCAAoD;AAEpD,2DAAqE;AAErE,SAAgB,YAAY,CAAC,QAA0B;;IACrD,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAA,0BAAW,EAAC,QAAQ,EAAE;QACvC,2BAAY,CAAC,QAAQ;QACrB,2BAAY,CAAC,SAAS;QACtB,2BAAY,CAAC,SAAS;QACtB,2BAAY,CAAC,IAAI;QACjB,2BAAY,CAAC,UAAU;KACxB,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAA,0BAAmB,EAAC,QAAQ,EAAE;QAC/C,IAAI,EAAE,YAAY;KACnB,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,CAAA,MAAA,QAAQ,CAAC,cAAc,EAAE,0CAAE,OAAO,EAAE,MAAK,MAAM,CAAC;AACzD,CAAC;AAtBD,oCAsBC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ClassDeclaration } from 'ts-morph';
|
|
2
|
+
import { Pattern, Query, StructureType } from '@mutates/core';
|
|
3
|
+
export declare function getInjectables(pattern: Pattern, query?: Query<Omit<StructureType<ClassDeclaration>, 'kind'>>): ClassDeclaration[];
|
|
4
|
+
export declare function isInjectable(declaration: ClassDeclaration): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isInjectable = exports.getInjectables = void 0;
|
|
4
|
+
const core_1 = require("@mutates/core");
|
|
5
|
+
function getInjectables(pattern, query) {
|
|
6
|
+
return (0, core_1.getClasses)(pattern, query).filter(isInjectable);
|
|
7
|
+
}
|
|
8
|
+
exports.getInjectables = getInjectables;
|
|
9
|
+
function isInjectable(declaration) {
|
|
10
|
+
return !!declaration.getDecorator('Injectable');
|
|
11
|
+
}
|
|
12
|
+
exports.isInjectable = isInjectable;
|
|
13
|
+
//# sourceMappingURL=get-injectables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-injectables.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/injectable/get-injectables.ts"],"names":[],"mappings":";;;AAEA,wCAA0E;AAE1E,SAAgB,cAAc,CAC5B,OAAgB,EAChB,KAA4D;IAE5D,OAAO,IAAA,iBAAU,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AACzD,CAAC;AALD,wCAKC;AAED,SAAgB,YAAY,CAAC,WAA6B;IACxD,OAAO,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;AAClD,CAAC;AAFD,oCAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get-injectables';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/injectable/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ClassDeclaration, ObjectLiteralExpression } from 'ts-morph';
|
|
2
|
+
export declare enum MetadataType {
|
|
3
|
+
NgModule = "NgModule",
|
|
4
|
+
Component = "Component",
|
|
5
|
+
Directive = "Directive",
|
|
6
|
+
Pipe = "Pipe",
|
|
7
|
+
Injectable = "Injectable"
|
|
8
|
+
}
|
|
9
|
+
export declare function getMetadata(klass: ClassDeclaration | ClassDeclaration[], metadataType: MetadataType | MetadataType[]): ObjectLiteralExpression[];
|
|
10
|
+
export declare function getNgModuleMetadata(klass: ClassDeclaration | ClassDeclaration[]): ObjectLiteralExpression[];
|
|
11
|
+
export declare function getComponentMetadata(klass: ClassDeclaration | ClassDeclaration[]): ObjectLiteralExpression[];
|
|
12
|
+
export declare function getDirectiveMetadata(klass: ClassDeclaration | ClassDeclaration[]): ObjectLiteralExpression[];
|
|
13
|
+
export declare function getPipeMetadata(klass: ClassDeclaration | ClassDeclaration[]): ObjectLiteralExpression[];
|
|
14
|
+
export declare function getInjectableMetadata(klass: ClassDeclaration | ClassDeclaration[]): ObjectLiteralExpression[];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getInjectableMetadata = exports.getPipeMetadata = exports.getDirectiveMetadata = exports.getComponentMetadata = exports.getNgModuleMetadata = exports.getMetadata = exports.MetadataType = void 0;
|
|
4
|
+
const ts_morph_1 = require("ts-morph");
|
|
5
|
+
const core_1 = require("@mutates/core");
|
|
6
|
+
var MetadataType;
|
|
7
|
+
(function (MetadataType) {
|
|
8
|
+
MetadataType["NgModule"] = "NgModule";
|
|
9
|
+
MetadataType["Component"] = "Component";
|
|
10
|
+
MetadataType["Directive"] = "Directive";
|
|
11
|
+
MetadataType["Pipe"] = "Pipe";
|
|
12
|
+
MetadataType["Injectable"] = "Injectable";
|
|
13
|
+
})(MetadataType || (exports.MetadataType = MetadataType = {}));
|
|
14
|
+
function getMetadata(klass, metadataType) {
|
|
15
|
+
const decorators = (0, core_1.getDecorators)(klass, {
|
|
16
|
+
name: metadataType,
|
|
17
|
+
});
|
|
18
|
+
const metadatas = decorators.map((decorator) => decorator.getArguments()).flat();
|
|
19
|
+
return metadatas.filter((metadata) => ts_morph_1.Node.isObjectLiteralExpression(metadata));
|
|
20
|
+
}
|
|
21
|
+
exports.getMetadata = getMetadata;
|
|
22
|
+
function getNgModuleMetadata(klass) {
|
|
23
|
+
return getMetadata(klass, MetadataType.NgModule);
|
|
24
|
+
}
|
|
25
|
+
exports.getNgModuleMetadata = getNgModuleMetadata;
|
|
26
|
+
function getComponentMetadata(klass) {
|
|
27
|
+
return getMetadata(klass, MetadataType.Component);
|
|
28
|
+
}
|
|
29
|
+
exports.getComponentMetadata = getComponentMetadata;
|
|
30
|
+
function getDirectiveMetadata(klass) {
|
|
31
|
+
return getMetadata(klass, MetadataType.Directive);
|
|
32
|
+
}
|
|
33
|
+
exports.getDirectiveMetadata = getDirectiveMetadata;
|
|
34
|
+
function getPipeMetadata(klass) {
|
|
35
|
+
return getMetadata(klass, MetadataType.Pipe);
|
|
36
|
+
}
|
|
37
|
+
exports.getPipeMetadata = getPipeMetadata;
|
|
38
|
+
function getInjectableMetadata(klass) {
|
|
39
|
+
return getMetadata(klass, MetadataType.Injectable);
|
|
40
|
+
}
|
|
41
|
+
exports.getInjectableMetadata = getInjectableMetadata;
|
|
42
|
+
//# sourceMappingURL=get-metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-metadata.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/metadata/get-metadata.ts"],"names":[],"mappings":";;;AAAA,uCAA2E;AAE3E,wCAA8C;AAE9C,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,qCAAqB,CAAA;IACrB,uCAAuB,CAAA;IACvB,uCAAuB,CAAA;IACvB,6BAAa,CAAA;IACb,yCAAyB,CAAA;AAC3B,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB;AAED,SAAgB,WAAW,CACzB,KAA4C,EAC5C,YAA2C;IAE3C,MAAM,UAAU,GAAG,IAAA,oBAAa,EAAC,KAAK,EAAE;QACtC,IAAI,EAAE,YAAY;KACnB,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAEjF,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAuC,EAAE,CACxE,eAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CACzC,CAAC;AACJ,CAAC;AAbD,kCAaC;AAED,SAAgB,mBAAmB,CACjC,KAA4C;IAE5C,OAAO,WAAW,CAAC,KAAK,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;AACnD,CAAC;AAJD,kDAIC;AAED,SAAgB,oBAAoB,CAClC,KAA4C;IAE5C,OAAO,WAAW,CAAC,KAAK,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;AACpD,CAAC;AAJD,oDAIC;AAED,SAAgB,oBAAoB,CAClC,KAA4C;IAE5C,OAAO,WAAW,CAAC,KAAK,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;AACpD,CAAC;AAJD,oDAIC;AAED,SAAgB,eAAe,CAC7B,KAA4C;IAE5C,OAAO,WAAW,CAAC,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;AAC/C,CAAC;AAJD,0CAIC;AAED,SAAgB,qBAAqB,CACnC,KAA4C;IAE5C,OAAO,WAAW,CAAC,KAAK,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;AACrD,CAAC;AAJD,sDAIC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get-metadata';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/metadata/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ClassDeclaration } from 'ts-morph';
|
|
2
|
+
import { Pattern, Query, StructureType } from '@mutates/core';
|
|
3
|
+
export declare function getNgModule(pattern: Pattern, query?: Query<Omit<StructureType<ClassDeclaration>, 'kind'>>): ClassDeclaration[];
|
|
4
|
+
export declare function isNgModule(declaration: ClassDeclaration): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isNgModule = exports.getNgModule = void 0;
|
|
4
|
+
const core_1 = require("@mutates/core");
|
|
5
|
+
function getNgModule(pattern, query) {
|
|
6
|
+
return (0, core_1.getClasses)(pattern, query).filter(isNgModule);
|
|
7
|
+
}
|
|
8
|
+
exports.getNgModule = getNgModule;
|
|
9
|
+
function isNgModule(declaration) {
|
|
10
|
+
return !!declaration.getDecorator('NgModule');
|
|
11
|
+
}
|
|
12
|
+
exports.isNgModule = isNgModule;
|
|
13
|
+
//# sourceMappingURL=get-ng-modules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-ng-modules.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/module/get-ng-modules.ts"],"names":[],"mappings":";;;AAEA,wCAA0E;AAE1E,SAAgB,WAAW,CACzB,OAAgB,EAChB,KAA4D;IAE5D,OAAO,IAAA,iBAAU,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACvD,CAAC;AALD,kCAKC;AAED,SAAgB,UAAU,CAAC,WAA6B;IACtD,OAAO,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;AAChD,CAAC;AAFD,gCAEC"}
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
export * from './
|
|
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';
|
|
1
|
+
export * from './get-ng-modules';
|
package/src/lib/module/index.js
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./
|
|
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);
|
|
4
|
+
tslib_1.__exportStar(require("./get-ng-modules"), exports);
|
|
11
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/module/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/module/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ClassDeclaration } from 'ts-morph';
|
|
2
|
+
import { Pattern, Query, StructureType } from '@mutates/core';
|
|
3
|
+
export declare function getPipes(pattern: Pattern, query?: Query<Omit<StructureType<ClassDeclaration>, 'kind'>>): ClassDeclaration[];
|
|
4
|
+
export declare function isPipe(declaration: ClassDeclaration): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isPipe = exports.getPipes = void 0;
|
|
4
|
+
const core_1 = require("@mutates/core");
|
|
5
|
+
function getPipes(pattern, query) {
|
|
6
|
+
return (0, core_1.getClasses)(pattern, query).filter(isPipe);
|
|
7
|
+
}
|
|
8
|
+
exports.getPipes = getPipes;
|
|
9
|
+
function isPipe(declaration) {
|
|
10
|
+
return !!declaration.getDecorator('Pipe');
|
|
11
|
+
}
|
|
12
|
+
exports.isPipe = isPipe;
|
|
13
|
+
//# sourceMappingURL=get-pipes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-pipes.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/pipe/get-pipes.ts"],"names":[],"mappings":";;;AAEA,wCAA0E;AAE1E,SAAgB,QAAQ,CACtB,OAAgB,EAChB,KAA4D;IAE5D,OAAO,IAAA,iBAAU,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC;AALD,4BAKC;AAED,SAAgB,MAAM,CAAC,WAA6B;IAClD,OAAO,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AAC5C,CAAC;AAFD,wBAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get-pipes';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/angular/src/lib/pipe/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B"}
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|