@rxap/schematics-ts-morph 16.0.0-dev.0 → 16.0.0-dev.2
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/CHANGELOG.md +105 -77
- package/README.md +1 -1
- package/package.json +4 -3
- package/src/index.d.ts +4 -55
- package/src/index.js +4 -57
- package/src/index.js.map +1 -1
- package/src/lib/add-component-animations.js +2 -1
- package/src/lib/add-component-animations.js.map +1 -1
- package/src/lib/add-component-input.js +4 -3
- package/src/lib/add-component-input.js.map +1 -1
- package/src/lib/add-component-provider.js +2 -1
- package/src/lib/add-component-provider.js.map +1 -1
- package/src/lib/add-dependency-injection.js +4 -3
- package/src/lib/add-dependency-injection.js.map +1 -1
- package/src/lib/add-fake-provider.js +3 -2
- package/src/lib/add-fake-provider.js.map +1 -1
- package/src/lib/add-method-class.js +3 -2
- package/src/lib/add-method-class.js.map +1 -1
- package/src/lib/add-ng-module-import.js +2 -1
- package/src/lib/add-ng-module-import.js.map +1 -1
- package/src/lib/add-ng-module-provider.js +2 -1
- package/src/lib/add-ng-module-provider.js.map +1 -1
- package/src/lib/add-operation-to-controller.d.ts +33 -0
- package/src/lib/add-operation-to-controller.js +197 -0
- package/src/lib/add-operation-to-controller.js.map +1 -0
- package/src/lib/add-variable-provider.js +3 -2
- package/src/lib/add-variable-provider.js.map +1 -1
- package/src/lib/angular/build-angular-base-path.d.ts +8 -0
- package/src/lib/angular/build-angular-base-path.js +15 -0
- package/src/lib/angular/build-angular-base-path.js.map +1 -0
- package/src/lib/angular/coerce-accordion-component.d.ts +7 -0
- package/src/lib/angular/coerce-accordion-component.js +21 -0
- package/src/lib/angular/coerce-accordion-component.js.map +1 -0
- package/src/lib/angular/coerce-component-class.d.ts +8 -0
- package/src/lib/angular/coerce-component-class.js +39 -0
- package/src/lib/angular/coerce-component-class.js.map +1 -0
- package/src/lib/angular/coerce-component.d.ts +15 -0
- package/src/lib/angular/coerce-component.js +41 -0
- package/src/lib/angular/coerce-component.js.map +1 -0
- package/src/lib/angular/coerce-data-source-class.d.ts +10 -0
- package/src/lib/angular/coerce-data-source-class.js +42 -0
- package/src/lib/angular/coerce-data-source-class.js.map +1 -0
- package/src/lib/angular/coerce-form-builder-provider.d.ts +10 -0
- package/src/lib/angular/coerce-form-builder-provider.js +35 -0
- package/src/lib/angular/coerce-form-builder-provider.js.map +1 -0
- package/src/lib/angular/coerce-form-component-provider.d.ts +10 -0
- package/src/lib/angular/coerce-form-component-provider.js +37 -0
- package/src/lib/angular/coerce-form-component-provider.js.map +1 -0
- package/src/lib/angular/coerce-form-definition.d.ts +19 -0
- package/src/lib/angular/coerce-form-definition.js +94 -0
- package/src/lib/angular/coerce-form-definition.js.map +1 -0
- package/src/lib/angular/coerce-form-provider.d.ts +10 -0
- package/src/lib/angular/coerce-form-provider.js +36 -0
- package/src/lib/angular/coerce-form-provider.js.map +1 -0
- package/src/lib/angular/coerce-form-providers-file.d.ts +7 -0
- package/src/lib/angular/coerce-form-providers-file.js +84 -0
- package/src/lib/angular/coerce-form-providers-file.js.map +1 -0
- package/src/lib/angular/coerce-form-table-action.d.ts +5 -0
- package/src/lib/angular/coerce-form-table-action.js +82 -0
- package/src/lib/angular/coerce-form-table-action.js.map +1 -0
- package/src/lib/angular/coerce-method-class.d.ts +11 -0
- package/src/lib/angular/coerce-method-class.js +52 -0
- package/src/lib/angular/coerce-method-class.js.map +1 -0
- package/src/lib/angular/coerce-navigation-table-action.d.ts +5 -0
- package/src/lib/angular/coerce-navigation-table-action.js +64 -0
- package/src/lib/angular/coerce-navigation-table-action.js.map +1 -0
- package/src/lib/angular/coerce-operation-table-action.d.ts +5 -0
- package/src/lib/angular/coerce-operation-table-action.js +33 -0
- package/src/lib/angular/coerce-operation-table-action.js.map +1 -0
- package/src/lib/angular/coerce-project-feature.d.ts +6 -0
- package/src/lib/angular/coerce-project-feature.js +19 -0
- package/src/lib/angular/coerce-project-feature.js.map +1 -0
- package/src/lib/angular/coerce-proxy-remote-method-class.d.ts +13 -0
- package/src/lib/angular/coerce-proxy-remote-method-class.js +90 -0
- package/src/lib/angular/coerce-proxy-remote-method-class.js.map +1 -0
- package/src/lib/angular/coerce-table-action-index-provider.d.ts +5 -0
- package/src/lib/angular/coerce-table-action-index-provider.js +27 -0
- package/src/lib/angular/coerce-table-action-index-provider.js.map +1 -0
- package/src/lib/angular/coerce-table-action-index.d.ts +4 -0
- package/src/lib/angular/coerce-table-action-index.js +16 -0
- package/src/lib/angular/coerce-table-action-index.js.map +1 -0
- package/src/lib/angular/coerce-table-action-provider.d.ts +8 -0
- package/src/lib/angular/coerce-table-action-provider.js +49 -0
- package/src/lib/angular/coerce-table-action-provider.js.map +1 -0
- package/src/lib/angular/coerce-table-action.d.ts +13 -0
- package/src/lib/angular/coerce-table-action.js +70 -0
- package/src/lib/angular/coerce-table-action.js.map +1 -0
- package/src/lib/angular/coerce-table-parameters-from-route.d.ts +6 -0
- package/src/lib/angular/coerce-table-parameters-from-route.js +48 -0
- package/src/lib/angular/coerce-table-parameters-from-route.js.map +1 -0
- package/src/lib/angular/coerce-tree-table-children-proxy-remote-method-class.d.ts +5 -0
- package/src/lib/angular/coerce-tree-table-children-proxy-remote-method-class.js +31 -0
- package/src/lib/angular/coerce-tree-table-children-proxy-remote-method-class.js.map +1 -0
- package/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.d.ts +5 -0
- package/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.js +31 -0
- package/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.js.map +1 -0
- package/src/lib/angular/has-accordion-component.d.ts +6 -0
- package/src/lib/angular/has-accordion-component.js +20 -0
- package/src/lib/angular/has-accordion-component.js.map +1 -0
- package/src/lib/angular/has-component.d.ts +8 -0
- package/src/lib/angular/has-component.js +26 -0
- package/src/lib/angular/has-component.js.map +1 -0
- package/src/lib/angular/has-project-feature.d.ts +5 -0
- package/src/lib/angular/has-project-feature.js +15 -0
- package/src/lib/angular/has-project-feature.js.map +1 -0
- package/src/lib/angular/has-table-component.d.ts +8 -0
- package/src/lib/angular/has-table-component.js +19 -0
- package/src/lib/angular/has-table-component.js.map +1 -0
- package/src/lib/angular/index.d.ts +26 -0
- package/src/lib/angular/index.js +30 -0
- package/src/lib/angular/index.js.map +1 -0
- package/src/lib/coerce-class-method.d.ts +1 -1
- package/src/lib/coerce-class-method.js +3 -2
- package/src/lib/coerce-class-method.js.map +1 -1
- package/src/lib/create-dto-class.d.ts +10 -0
- package/src/lib/create-dto-class.js +127 -0
- package/src/lib/create-dto-class.js.map +1 -0
- package/src/lib/get-form-providers-source-file.js +2 -1
- package/src/lib/get-form-providers-source-file.js.map +1 -1
- package/src/lib/index.d.ts +48 -0
- package/src/lib/index.js +52 -0
- package/src/lib/index.js.map +1 -0
- package/src/lib/{nestjs → nest}/add-nest-controller.js +2 -1
- package/src/lib/nest/add-nest-controller.js.map +1 -0
- package/src/lib/{nestjs → nest}/add-nest-module-controller.js +2 -1
- package/src/lib/nest/add-nest-module-controller.js.map +1 -0
- package/src/lib/{nestjs → nest}/add-nest-module-import.js +2 -1
- package/src/lib/nest/add-nest-module-import.js.map +1 -0
- package/src/lib/{nestjs → nest}/add-nest-module-provider.js +2 -1
- package/src/lib/nest/add-nest-module-provider.js.map +1 -0
- package/src/lib/nest/add-nest-module-to-app-module.d.ts +8 -0
- package/src/lib/nest/add-nest-module-to-app-module.js +18 -0
- package/src/lib/nest/add-nest-module-to-app-module.js.map +1 -0
- package/src/lib/nest/add-nest-provider-to-array.js.map +1 -0
- package/src/lib/nest/build-nest-base-path.d.ts +8 -0
- package/src/lib/nest/build-nest-base-path.js +17 -0
- package/src/lib/nest/build-nest-base-path.js.map +1 -0
- package/src/lib/nest/build-nest-controller-name.d.ts +9 -0
- package/src/lib/nest/build-nest-controller-name.js +23 -0
- package/src/lib/nest/build-nest-controller-name.js.map +1 -0
- package/src/lib/nest/coerce-dto-class.d.ts +9 -0
- package/src/lib/nest/coerce-dto-class.js +118 -0
- package/src/lib/nest/coerce-dto-class.js.map +1 -0
- package/src/lib/nest/coerce-form-submit-operation.d.ts +6 -0
- package/src/lib/nest/coerce-form-submit-operation.js +22 -0
- package/src/lib/nest/coerce-form-submit-operation.js.map +1 -0
- package/src/lib/nest/coerce-get-by-id-operation.d.ts +17 -0
- package/src/lib/nest/coerce-get-by-id-operation.js +66 -0
- package/src/lib/nest/coerce-get-by-id-operation.js.map +1 -0
- package/src/lib/nest/coerce-get-children-operation.d.ts +4 -0
- package/src/lib/nest/coerce-get-children-operation.js +55 -0
- package/src/lib/nest/coerce-get-children-operation.js.map +1 -0
- package/src/lib/nest/coerce-get-data-grid-operation.d.ts +7 -0
- package/src/lib/nest/coerce-get-data-grid-operation.js +33 -0
- package/src/lib/nest/coerce-get-data-grid-operation.js.map +1 -0
- package/src/lib/nest/coerce-get-page-operation.d.ts +8 -0
- package/src/lib/nest/coerce-get-page-operation.js +117 -0
- package/src/lib/nest/coerce-get-page-operation.js.map +1 -0
- package/src/lib/nest/coerce-get-root-operation.d.ts +4 -0
- package/src/lib/nest/coerce-get-root-operation.js +50 -0
- package/src/lib/nest/coerce-get-root-operation.js.map +1 -0
- package/src/lib/nest/coerce-nest-controller.d.ts +10 -0
- package/src/lib/nest/coerce-nest-controller.js +34 -0
- package/src/lib/nest/coerce-nest-controller.js.map +1 -0
- package/src/lib/nest/coerce-nest-module.d.ts +8 -0
- package/src/lib/nest/coerce-nest-module.js +28 -0
- package/src/lib/nest/coerce-nest-module.js.map +1 -0
- package/src/lib/nest/coerce-nest-service-project.d.ts +7 -0
- package/src/lib/nest/coerce-nest-service-project.js +33 -0
- package/src/lib/nest/coerce-nest-service-project.js.map +1 -0
- package/src/lib/nest/coerce-operation.d.ts +27 -0
- package/src/lib/nest/coerce-operation.js +80 -0
- package/src/lib/nest/coerce-operation.js.map +1 -0
- package/src/lib/nest/coerce-page-dto-class.d.ts +12 -0
- package/src/lib/nest/coerce-page-dto-class.js +29 -0
- package/src/lib/nest/coerce-page-dto-class.js.map +1 -0
- package/src/lib/nest/coerce-row-dto-class.d.ts +10 -0
- package/src/lib/nest/coerce-row-dto-class.js +13 -0
- package/src/lib/nest/coerce-row-dto-class.js.map +1 -0
- package/src/lib/nest/coerce-submit-data-grid-operation.d.ts +5 -0
- package/src/lib/nest/coerce-submit-data-grid-operation.js +23 -0
- package/src/lib/nest/coerce-submit-data-grid-operation.js.map +1 -0
- package/src/lib/nest/find-nest-module-declaration.js.map +1 -0
- package/src/lib/nest/find-nest-module-source-file.js.map +1 -0
- package/src/lib/nest/get-nest-module-metadata.js.map +1 -0
- package/src/lib/nest/has-nest-controller.d.ts +10 -0
- package/src/lib/nest/has-nest-controller.js +17 -0
- package/src/lib/nest/has-nest-controller.js.map +1 -0
- package/src/lib/nest/has-nest-module-class.js.map +1 -0
- package/src/lib/nest/has-nest-module.d.ts +8 -0
- package/src/lib/nest/has-nest-module.js +18 -0
- package/src/lib/nest/has-nest-module.js.map +1 -0
- package/src/lib/nest/index.d.ts +31 -0
- package/src/lib/nest/index.js +35 -0
- package/src/lib/nest/index.js.map +1 -0
- package/src/lib/nest/is-nest-module-class.js.map +1 -0
- package/src/lib/nest/nest-provider-object.js.map +1 -0
- package/src/lib/nest/project-utilities.d.ts +11 -0
- package/src/lib/nest/project-utilities.js +24 -0
- package/src/lib/nest/project-utilities.js.map +1 -0
- package/src/lib/operation-id-utilities.d.ts +14 -0
- package/src/lib/operation-id-utilities.js +59 -0
- package/src/lib/operation-id-utilities.js.map +1 -0
- package/src/lib/{apply-ts-morph-project.d.ts → ts-morph/apply-ts-morph-project.d.ts} +1 -1
- package/src/lib/{apply-ts-morph-project.js → ts-morph/apply-ts-morph-project.js} +5 -11
- package/src/lib/ts-morph/apply-ts-morph-project.js.map +1 -0
- package/src/lib/ts-morph/coerce-class-implementation.d.ts +2 -0
- package/src/lib/ts-morph/coerce-class-implementation.js +10 -0
- package/src/lib/ts-morph/coerce-class-implementation.js.map +1 -0
- package/src/lib/ts-morph/coerce-class-property.d.ts +2 -0
- package/src/lib/ts-morph/coerce-class-property.js +12 -0
- package/src/lib/ts-morph/coerce-class-property.js.map +1 -0
- package/src/lib/ts-morph/coerce-decorator.d.ts +9 -0
- package/src/lib/ts-morph/coerce-decorator.js +22 -0
- package/src/lib/ts-morph/coerce-decorator.js.map +1 -0
- package/src/lib/ts-morph/coerce-function.d.ts +2 -0
- package/src/lib/ts-morph/coerce-function.js +10 -0
- package/src/lib/ts-morph/coerce-function.js.map +1 -0
- package/src/lib/ts-morph/coerce-imports.d.ts +2 -0
- package/src/lib/ts-morph/coerce-imports.js +25 -0
- package/src/lib/ts-morph/coerce-imports.js.map +1 -0
- package/src/lib/ts-morph/coerce-interface.d.ts +2 -0
- package/src/lib/ts-morph/coerce-interface.js +15 -0
- package/src/lib/ts-morph/coerce-interface.js.map +1 -0
- package/src/lib/ts-morph/coerce-parameter-declaration.d.ts +2 -0
- package/src/lib/ts-morph/coerce-parameter-declaration.js +13 -0
- package/src/lib/ts-morph/coerce-parameter-declaration.js.map +1 -0
- package/src/lib/ts-morph/coerce-statements.d.ts +2 -0
- package/src/lib/ts-morph/coerce-statements.js +11 -0
- package/src/lib/ts-morph/coerce-statements.js.map +1 -0
- package/src/lib/ts-morph/find-function.d.ts +6 -0
- package/src/lib/ts-morph/find-function.js +8 -0
- package/src/lib/ts-morph/find-function.js.map +1 -0
- package/src/lib/ts-morph/index.d.ts +10 -0
- package/src/lib/ts-morph/index.js +14 -0
- package/src/lib/ts-morph/index.js.map +1 -0
- package/src/lib/ts-morph-transform.d.ts +15 -0
- package/src/lib/ts-morph-transform.js +46 -0
- package/src/lib/ts-morph-transform.js.map +1 -0
- package/src/lib/apply-ts-morph-project.js.map +0 -1
- package/src/lib/coerce-method-class.d.ts +0 -3
- package/src/lib/coerce-method-class.js +0 -14
- package/src/lib/coerce-method-class.js.map +0 -1
- package/src/lib/nestjs/add-nest-controller.js.map +0 -1
- package/src/lib/nestjs/add-nest-module-controller.js.map +0 -1
- package/src/lib/nestjs/add-nest-module-import.js.map +0 -1
- package/src/lib/nestjs/add-nest-module-provider.js.map +0 -1
- package/src/lib/nestjs/add-nest-provider-to-array.js.map +0 -1
- package/src/lib/nestjs/find-nest-module-declaration.js.map +0 -1
- package/src/lib/nestjs/find-nest-module-source-file.js.map +0 -1
- package/src/lib/nestjs/get-nest-module-metadata.js.map +0 -1
- package/src/lib/nestjs/has-nest-module-class.js.map +0 -1
- package/src/lib/nestjs/is-nest-module-class.js.map +0 -1
- package/src/lib/nestjs/nest-provider-object.js.map +0 -1
- /package/src/lib/{nestjs → nest}/add-nest-controller.d.ts +0 -0
- /package/src/lib/{nestjs → nest}/add-nest-module-controller.d.ts +0 -0
- /package/src/lib/{nestjs → nest}/add-nest-module-import.d.ts +0 -0
- /package/src/lib/{nestjs → nest}/add-nest-module-provider.d.ts +0 -0
- /package/src/lib/{nestjs → nest}/add-nest-provider-to-array.d.ts +0 -0
- /package/src/lib/{nestjs → nest}/add-nest-provider-to-array.js +0 -0
- /package/src/lib/{nestjs → nest}/find-nest-module-declaration.d.ts +0 -0
- /package/src/lib/{nestjs → nest}/find-nest-module-declaration.js +0 -0
- /package/src/lib/{nestjs → nest}/find-nest-module-source-file.d.ts +0 -0
- /package/src/lib/{nestjs → nest}/find-nest-module-source-file.js +0 -0
- /package/src/lib/{nestjs → nest}/get-nest-module-metadata.d.ts +0 -0
- /package/src/lib/{nestjs → nest}/get-nest-module-metadata.js +0 -0
- /package/src/lib/{nestjs → nest}/has-nest-module-class.d.ts +0 -0
- /package/src/lib/{nestjs → nest}/has-nest-module-class.js +0 -0
- /package/src/lib/{nestjs → nest}/is-nest-module-class.d.ts +0 -0
- /package/src/lib/{nestjs → nest}/is-nest-module-class.js +0 -0
- /package/src/lib/{nestjs → nest}/nest-provider-object.d.ts +0 -0
- /package/src/lib/{nestjs → nest}/nest-provider-object.js +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceRowDtoClass = void 0;
|
|
4
|
+
const coerce_dto_class_1 = require("./coerce-dto-class");
|
|
5
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
6
|
+
function CoerceRowDtoClass(options) {
|
|
7
|
+
let { project, name, propertyList, classStructure, importStructureList } = options;
|
|
8
|
+
propertyList !== null && propertyList !== void 0 ? propertyList : (propertyList = []);
|
|
9
|
+
propertyList.push({ name: '__rowId', type: 'string' }, { name: '__archived', type: 'boolean' }, { name: '__removedAt', type: 'string', isOptional: true });
|
|
10
|
+
return (0, coerce_dto_class_1.CoerceDtoClass)(project, (0, schematics_utilities_1.CoerceSuffix)(name, '-row'), propertyList);
|
|
11
|
+
}
|
|
12
|
+
exports.CoerceRowDtoClass = CoerceRowDtoClass;
|
|
13
|
+
//# sourceMappingURL=coerce-row-dto-class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-row-dto-class.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nest/coerce-row-dto-class.ts"],"names":[],"mappings":";;;AACA,yDAAoD;AACpD,qEAA0D;AAW1D,SAAgB,iBAAiB,CAAC,OAAiC;IACjE,IAAI,EAAC,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAC,GAAG,OAAO,CAAC;IACjF,YAAY,aAAZ,YAAY,cAAZ,YAAY,IAAZ,YAAY,GAAK,EAAE,EAAC;IACpB,YAAY,CAAC,IAAI,CACf,EAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAC,EACjC,EAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAC,EACrC,EAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAC,CACxD,CAAC;IACF,OAAO,IAAA,iCAAc,EACnB,OAAO,EACP,IAAA,mCAAY,EAAC,IAAI,EAAE,MAAM,CAAC,EAC1B,YAAY,CACb,CAAC;AACJ,CAAC;AAbD,8CAaC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CoerceFormSubmitOperationOptions } from './coerce-form-submit-operation';
|
|
2
|
+
export interface CoerceSubmitDataGridOperationOptions extends Omit<CoerceFormSubmitOperationOptions, 'operationName'> {
|
|
3
|
+
collection?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function CoerceSubmitDataGridOperation(options: Readonly<CoerceSubmitDataGridOperationOptions>): import("@angular-devkit/schematics").Rule;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceSubmitDataGridOperation = void 0;
|
|
4
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
const coerce_form_submit_operation_1 = require("./coerce-form-submit-operation");
|
|
6
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
7
|
+
function CoerceSubmitDataGridOperation(options) {
|
|
8
|
+
let { paramList, collection, controllerName, nestController, name } = options;
|
|
9
|
+
collection !== null && collection !== void 0 ? collection : (collection = false);
|
|
10
|
+
paramList !== null && paramList !== void 0 ? paramList : (paramList = []);
|
|
11
|
+
controllerName !== null && controllerName !== void 0 ? controllerName : (controllerName = nestController);
|
|
12
|
+
controllerName !== null && controllerName !== void 0 ? controllerName : (controllerName = name);
|
|
13
|
+
if (!controllerName) {
|
|
14
|
+
throw new schematics_1.SchematicsException('No controller name provided!');
|
|
15
|
+
}
|
|
16
|
+
controllerName = (0, schematics_utilities_1.CoerceSuffix)(controllerName, '-data-grid');
|
|
17
|
+
return (0, coerce_form_submit_operation_1.CoerceFormSubmitOperation)(Object.assign(Object.assign({}, options), {
|
|
18
|
+
// TODO : remove after migration to controllerName
|
|
19
|
+
name: controllerName, nestController: controllerName, controllerName,
|
|
20
|
+
paramList }));
|
|
21
|
+
}
|
|
22
|
+
exports.CoerceSubmitDataGridOperation = CoerceSubmitDataGridOperation;
|
|
23
|
+
//# sourceMappingURL=coerce-submit-data-grid-operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-submit-data-grid-operation.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nest/coerce-submit-data-grid-operation.ts"],"names":[],"mappings":";;;AAAA,qEAA0D;AAC1D,iFAA6G;AAC7G,2DAA+D;AAM/D,SAAgB,6BAA6B,CAAC,OAAuD;IACnG,IAAI,EAAC,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,IAAI,EAAC,GAAG,OAAO,CAAC;IAC5E,UAAU,aAAV,UAAU,cAAV,UAAU,IAAV,UAAU,GAAK,KAAK,EAAC;IACrB,SAAS,aAAT,SAAS,cAAT,SAAS,IAAT,SAAS,GAAK,EAAE,EAAC;IACjB,cAAc,aAAd,cAAc,cAAd,cAAc,IAAd,cAAc,GAAK,cAAc,EAAC;IAClC,cAAc,aAAd,cAAc,cAAd,cAAc,IAAd,cAAc,GAAK,IAAI,EAAC;IAExB,IAAI,CAAC,cAAc,EAAE;QACnB,MAAM,IAAI,gCAAmB,CAAC,8BAA8B,CAAC,CAAC;KAC/D;IAED,cAAc,GAAsD,IAAA,mCAAY,EAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IAE/G,OAAO,IAAA,wDAAyB,kCAC3B,OAAO;QACV,kDAAkD;QAClD,IAAI,EAAE,cAAc,EACpB,cAAc,EAAE,cAAc,EAC9B,cAAc;QACd,SAAS,IACT,CAAC;AACL,CAAC;AArBD,sEAqBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-nest-module-declaration.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nest/find-nest-module-declaration.ts"],"names":[],"mappings":";;;AACA,iFAA0E;AAC1E,iEAA2D;AAE3D,SAAgB,yBAAyB,CAAC,OAAgB,EAAE,SAAkB;IAC5E,MAAM,UAAU,GAAG,IAAA,uDAAwB,EAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAEhE,OAAO,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,QAAQ,CAAC,wCAAiB,CAAC,CAAA;AAChD,CAAC;AAJD,8DAIC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-nest-module-source-file.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nest/find-nest-module-source-file.ts"],"names":[],"mappings":";;;AACA,mEAA6D;AAE7D,SAAgB,wBAAwB,CAAC,OAAgB,EAAE,SAAkB;IAC3E,OAAO,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAClC,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,gBAAgB,EAAE,KAAK,SAAS,CAAC;QACrD,IAAA,0CAAkB,EAAC,IAAI,CAAC,CACzB,CAAA;AACH,CAAC;AALD,4DAKC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-nest-module-metadata.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nest/get-nest-module-metadata.ts"],"names":[],"mappings":";;;AAAA,uCAA+D;AAC/D,iEAA2D;AAC3D,oFAA8E;AAE9E,SAAgB,qBAAqB,CAAC,UAAsB;IAE1D,MAAM,gBAAgB,GAAG,UAAU,CAAC,QAAQ,CAAC,wCAAiB,CAAC,CAAC;IAEhE,IAAI,CAAC,gBAAgB,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,mBAAmB,UAAU,CAAC,WAAW,EAAE,wCAAwC,CAAC,CAAC;KACtG;IAED,MAAM,CAAE,QAAQ,CAAE,GAAG,IAAA,0DAA0B,EAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IAE5E,IAAI,CAAC,CAAC,QAAQ,YAAY,kCAAuB,CAAC,EAAE;QAClD,MAAM,IAAI,KAAK,CAAC,8CAA8C,UAAU,CAAC,WAAW,EAAE,kFAAkF,CAAC,CAAC;KAC3K;IAED,OAAO,QAAQ,CAAC;AAElB,CAAC;AAhBD,sDAgBC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
+
export interface HasNestControllerOptions {
|
|
3
|
+
project: string;
|
|
4
|
+
feature?: string;
|
|
5
|
+
shared?: boolean;
|
|
6
|
+
name: string;
|
|
7
|
+
module?: string;
|
|
8
|
+
nestModule?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function HasNestController(host: Tree, options: HasNestControllerOptions): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HasNestController = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
6
|
+
const project_utilities_1 = require("./project-utilities");
|
|
7
|
+
function HasNestController(host, options) {
|
|
8
|
+
let { name, module, nestModule } = options;
|
|
9
|
+
nestModule !== null && nestModule !== void 0 ? nestModule : (nestModule = module);
|
|
10
|
+
if (!(0, schematics_utilities_1.HasProject)(host, (0, project_utilities_1.buildNestProjectName)(options))) {
|
|
11
|
+
throw new schematics_1.SchematicsException(`The nest controller ${name} does not exists. The project ${(0, project_utilities_1.buildNestProjectName)(options)} does not exist.`);
|
|
12
|
+
}
|
|
13
|
+
const projectSourceRoot = (0, schematics_utilities_1.GetProjectSourceRoot)(host, (0, project_utilities_1.buildNestProjectName)(options));
|
|
14
|
+
return host.exists(`${projectSourceRoot}/${nestModule}/${name}.controller.ts`);
|
|
15
|
+
}
|
|
16
|
+
exports.HasNestController = HasNestController;
|
|
17
|
+
//# sourceMappingURL=has-nest-controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"has-nest-controller.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nest/has-nest-controller.ts"],"names":[],"mappings":";;;AAAA,2DAAuE;AACvE,qEAA8E;AAC9E,2DAAyD;AAWzD,SAAgB,iBAAiB,CAAC,IAAU,EAAE,OAAiC;IAC7E,IAAI,EAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAC,GAAG,OAAO,CAAC;IACzC,UAAU,aAAV,UAAU,cAAV,UAAU,IAAV,UAAU,GAAK,MAAM,EAAC;IACtB,IAAI,CAAC,IAAA,iCAAU,EAAC,IAAI,EAAE,IAAA,wCAAoB,EAAC,OAAO,CAAC,CAAC,EAAE;QACpD,MAAM,IAAI,gCAAmB,CAAC,uBAAwB,IAAK,iCAAkC,IAAA,wCAAoB,EAC/G,OAAO,CAAE,kBAAkB,CAAC,CAAC;KAChC;IACD,MAAM,iBAAiB,GAAG,IAAA,2CAAoB,EAAC,IAAI,EAAE,IAAA,wCAAoB,EAAC,OAAO,CAAC,CAAC,CAAC;IACpF,OAAO,IAAI,CAAC,MAAM,CAAC,GAAI,iBAAkB,IAAK,UAAW,IAAK,IAAK,gBAAgB,CAAC,CAAC;AACvF,CAAC;AATD,8CASC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"has-nest-module-class.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nest/has-nest-module-class.ts"],"names":[],"mappings":";;;AACA,iEAA2D;AAE3D,SAAgB,kBAAkB,CAAC,IAAgB;IACjD,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,wCAAiB,CAAC;QACvC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,CAC9C,iBAAiB,CAAC,uBAAuB,EAAE,KAAK,gBAAgB;YAChE,CAAC,CAAC,iBAAiB,CAAC,eAAe,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,KAAK,QAAQ,CAAC,CAC9F,CAAA;AACL,CAAC;AAND,gDAMC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HasNestModule = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
const project_utilities_1 = require("./project-utilities");
|
|
8
|
+
function HasNestModule(host, options) {
|
|
9
|
+
const projectName = (0, project_utilities_1.buildNestProjectName)(options);
|
|
10
|
+
const name = (0, schematics_utilities_1.dasherize)(options.name);
|
|
11
|
+
if (!(0, schematics_utilities_1.HasProject)(host, projectName)) {
|
|
12
|
+
throw new schematics_1.SchematicsException(`The nest module '${name}' does not exists. The project '${projectName}' does not exists`);
|
|
13
|
+
}
|
|
14
|
+
const projectSourceRoot = (0, schematics_utilities_1.GetProjectSourceRoot)(host, projectName);
|
|
15
|
+
return host.exists((0, path_1.join)(projectSourceRoot, `${name}/${name}.module.ts`));
|
|
16
|
+
}
|
|
17
|
+
exports.HasNestModule = HasNestModule;
|
|
18
|
+
//# sourceMappingURL=has-nest-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"has-nest-module.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nest/has-nest-module.ts"],"names":[],"mappings":";;;AAAA,2DAAuE;AACvE,qEAAyF;AACzF,+BAA4B;AAC5B,2DAAyD;AASzD,SAAgB,aAAa,CAAC,IAAU,EAAE,OAA6B;IACrE,MAAM,WAAW,GAAG,IAAA,wCAAoB,EAAC,OAAO,CAAC,CAAC;IAClD,MAAM,IAAI,GAAU,IAAA,gCAAS,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,IAAI,CAAC,IAAA,iCAAU,EAAC,IAAI,EAAE,WAAW,CAAC,EAAE;QAClC,MAAM,IAAI,gCAAmB,CAAC,oBAAqB,IAAK,mCAAoC,WAAY,mBAAmB,CAAC,CAAC;KAC9H;IACD,MAAM,iBAAiB,GAAG,IAAA,2CAAoB,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAClE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAA,WAAI,EAAC,iBAAiB,EAAE,GAAI,IAAK,IAAK,IAAK,YAAY,CAAC,CAAC,CAAC;AAC/E,CAAC;AARD,sCAQC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from './add-nest-controller';
|
|
2
|
+
export * from './add-nest-module-controller';
|
|
3
|
+
export * from './add-nest-module-import';
|
|
4
|
+
export * from './add-nest-module-provider';
|
|
5
|
+
export * from './add-nest-module-to-app-module';
|
|
6
|
+
export * from './add-nest-provider-to-array';
|
|
7
|
+
export * from './build-nest-base-path';
|
|
8
|
+
export * from './build-nest-controller-name';
|
|
9
|
+
export * from './coerce-dto-class';
|
|
10
|
+
export * from './coerce-form-submit-operation';
|
|
11
|
+
export * from './coerce-get-by-id-operation';
|
|
12
|
+
export * from './coerce-get-children-operation';
|
|
13
|
+
export * from './coerce-get-data-grid-operation';
|
|
14
|
+
export * from './coerce-get-page-operation';
|
|
15
|
+
export * from './coerce-get-root-operation';
|
|
16
|
+
export * from './coerce-nest-controller';
|
|
17
|
+
export * from './coerce-nest-module';
|
|
18
|
+
export * from './coerce-nest-service-project';
|
|
19
|
+
export * from './coerce-operation';
|
|
20
|
+
export * from './coerce-page-dto-class';
|
|
21
|
+
export * from './coerce-row-dto-class';
|
|
22
|
+
export * from './coerce-submit-data-grid-operation';
|
|
23
|
+
export * from './find-nest-module-declaration';
|
|
24
|
+
export * from './find-nest-module-source-file';
|
|
25
|
+
export * from './get-nest-module-metadata';
|
|
26
|
+
export * from './has-nest-controller';
|
|
27
|
+
export * from './has-nest-module-class';
|
|
28
|
+
export * from './has-nest-module';
|
|
29
|
+
export * from './is-nest-module-class';
|
|
30
|
+
export * from './nest-provider-object';
|
|
31
|
+
export * from './project-utilities';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./add-nest-controller"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./add-nest-module-controller"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./add-nest-module-import"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./add-nest-module-provider"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./add-nest-module-to-app-module"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./add-nest-provider-to-array"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./build-nest-base-path"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./build-nest-controller-name"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./coerce-dto-class"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./coerce-form-submit-operation"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./coerce-get-by-id-operation"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./coerce-get-children-operation"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./coerce-get-data-grid-operation"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./coerce-get-page-operation"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./coerce-get-root-operation"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./coerce-nest-controller"), exports);
|
|
20
|
+
tslib_1.__exportStar(require("./coerce-nest-module"), exports);
|
|
21
|
+
tslib_1.__exportStar(require("./coerce-nest-service-project"), exports);
|
|
22
|
+
tslib_1.__exportStar(require("./coerce-operation"), exports);
|
|
23
|
+
tslib_1.__exportStar(require("./coerce-page-dto-class"), exports);
|
|
24
|
+
tslib_1.__exportStar(require("./coerce-row-dto-class"), exports);
|
|
25
|
+
tslib_1.__exportStar(require("./coerce-submit-data-grid-operation"), exports);
|
|
26
|
+
tslib_1.__exportStar(require("./find-nest-module-declaration"), exports);
|
|
27
|
+
tslib_1.__exportStar(require("./find-nest-module-source-file"), exports);
|
|
28
|
+
tslib_1.__exportStar(require("./get-nest-module-metadata"), exports);
|
|
29
|
+
tslib_1.__exportStar(require("./has-nest-controller"), exports);
|
|
30
|
+
tslib_1.__exportStar(require("./has-nest-module-class"), exports);
|
|
31
|
+
tslib_1.__exportStar(require("./has-nest-module"), exports);
|
|
32
|
+
tslib_1.__exportStar(require("./is-nest-module-class"), exports);
|
|
33
|
+
tslib_1.__exportStar(require("./nest-provider-object"), exports);
|
|
34
|
+
tslib_1.__exportStar(require("./project-utilities"), exports);
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nest/index.ts"],"names":[],"mappings":";;;AAAA,gEAAsC;AACtC,uEAA6C;AAC7C,mEAAyC;AACzC,qEAA2C;AAC3C,0EAAgD;AAChD,uEAA6C;AAC7C,iEAAuC;AACvC,uEAA6C;AAC7C,6DAAmC;AACnC,yEAA+C;AAC/C,uEAA6C;AAC7C,0EAAgD;AAChD,2EAAiD;AACjD,sEAA4C;AAC5C,sEAA4C;AAC5C,mEAAyC;AACzC,+DAAqC;AACrC,wEAA8C;AAC9C,6DAAmC;AACnC,kEAAwC;AACxC,iEAAuC;AACvC,8EAAoD;AACpD,yEAA+C;AAC/C,yEAA+C;AAC/C,qEAA2C;AAC3C,gEAAsC;AACtC,kEAAwC;AACxC,4DAAkC;AAClC,iEAAuC;AACvC,iEAAuC;AACvC,8DAAoC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-nest-module-class.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nest/is-nest-module-class.ts"],"names":[],"mappings":";;;AAEA,SAAgB,iBAAiB,CAAC,WAA6B;IAC7D,OAAO,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,WAAW,EAAE,KAAK,QAAQ,CAAC,CAAA;AAC1F,CAAC;AAFD,8CAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nest-provider-object.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nest/nest-provider-object.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
+
export declare function buildNestProjectName(options: {
|
|
3
|
+
project: string;
|
|
4
|
+
feature?: string;
|
|
5
|
+
shared?: boolean;
|
|
6
|
+
}): string;
|
|
7
|
+
export declare function HasNestServiceProject(tree: Tree, options: {
|
|
8
|
+
project: string;
|
|
9
|
+
feature?: string;
|
|
10
|
+
shared?: boolean;
|
|
11
|
+
}): boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HasNestServiceProject = exports.buildNestProjectName = void 0;
|
|
4
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
function buildNestProjectName(options) {
|
|
6
|
+
if (options.feature) {
|
|
7
|
+
if (options.shared) {
|
|
8
|
+
return `service-feature-${options.feature}`;
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return `service-app-${options.project}-${options.feature}`;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
return options.project;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.buildNestProjectName = buildNestProjectName;
|
|
19
|
+
function HasNestServiceProject(tree, options) {
|
|
20
|
+
const projectName = buildNestProjectName(options);
|
|
21
|
+
return (0, schematics_utilities_1.HasProject)(tree, projectName);
|
|
22
|
+
}
|
|
23
|
+
exports.HasNestServiceProject = HasNestServiceProject;
|
|
24
|
+
//# sourceMappingURL=project-utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-utilities.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/nest/project-utilities.ts"],"names":[],"mappings":";;;AAAA,qEAAsD;AAItD,SAAgB,oBAAoB,CAAC,OAAgE;IACnG,IAAI,OAAO,CAAC,OAAO,EAAE;QACnB,IAAI,OAAO,CAAC,MAAM,EAAE;YAClB,OAAO,mBAAoB,OAAO,CAAC,OAAQ,EAAE,CAAC;SAC/C;aAAM;YACL,OAAO,eAAgB,OAAO,CAAC,OAAQ,IAAK,OAAO,CAAC,OAAQ,EAAE,CAAC;SAChE;KACF;SAAM;QACL,OAAO,OAAO,CAAC,OAAO,CAAC;KACxB;AACH,CAAC;AAVD,oDAUC;AAID,SAAgB,qBAAqB,CAAC,IAAU,EAAE,OAAgE;IAChH,MAAM,WAAW,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAClD,OAAO,IAAA,iCAAU,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC;AACvC,CAAC;AAHD,sDAGC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function OperationIdToClassName(operationId: string): string;
|
|
2
|
+
export declare function ServiceOperationIdToClassName(operationId: string): string;
|
|
3
|
+
export declare function OperationIdToResponseClassName(operationId: string): string;
|
|
4
|
+
export declare function OperationIdToParameterClassName(operationId: string): string;
|
|
5
|
+
export declare function OperationIdToClassImportPath(operationId: string): string;
|
|
6
|
+
export declare function ServiceOperationIdToClassImportPath(operationId: string): string;
|
|
7
|
+
export declare function OpenApiResponseClassImportPath(response: string, serverId?: string): string;
|
|
8
|
+
export declare function OperationIdToResponseClassImportPath(operationId: string): string;
|
|
9
|
+
export declare function OperationIdToParameterClassImportPath(operationId: string): string;
|
|
10
|
+
export declare function buildOperationId(options: {
|
|
11
|
+
project: string;
|
|
12
|
+
feature: string;
|
|
13
|
+
shared: boolean;
|
|
14
|
+
}, operation: string, controller: string): string;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildOperationId = exports.OperationIdToParameterClassImportPath = exports.OperationIdToResponseClassImportPath = exports.OpenApiResponseClassImportPath = exports.ServiceOperationIdToClassImportPath = exports.OperationIdToClassImportPath = exports.OperationIdToParameterClassName = exports.OperationIdToResponseClassName = exports.ServiceOperationIdToClassName = exports.OperationIdToClassName = void 0;
|
|
4
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
const project_utilities_1 = require("./nest/project-utilities");
|
|
6
|
+
function OperationIdToClassName(operationId) {
|
|
7
|
+
let [id] = operationId.split('@');
|
|
8
|
+
return (0, schematics_utilities_1.classify)(id) + 'RemoteMethod';
|
|
9
|
+
}
|
|
10
|
+
exports.OperationIdToClassName = OperationIdToClassName;
|
|
11
|
+
function ServiceOperationIdToClassName(operationId) {
|
|
12
|
+
let [id] = operationId.split('@');
|
|
13
|
+
return (0, schematics_utilities_1.classify)(id) + 'Command';
|
|
14
|
+
}
|
|
15
|
+
exports.ServiceOperationIdToClassName = ServiceOperationIdToClassName;
|
|
16
|
+
function OperationIdToResponseClassName(operationId) {
|
|
17
|
+
let [id] = operationId.split('@');
|
|
18
|
+
return (0, schematics_utilities_1.classify)(id) + 'Response';
|
|
19
|
+
}
|
|
20
|
+
exports.OperationIdToResponseClassName = OperationIdToResponseClassName;
|
|
21
|
+
function OperationIdToParameterClassName(operationId) {
|
|
22
|
+
let [id] = operationId.split('@');
|
|
23
|
+
return (0, schematics_utilities_1.classify)(id) + 'Parameter';
|
|
24
|
+
}
|
|
25
|
+
exports.OperationIdToParameterClassName = OperationIdToParameterClassName;
|
|
26
|
+
function OperationIdToClassImportPath(operationId) {
|
|
27
|
+
let [id, serverId] = operationId.split('@');
|
|
28
|
+
serverId !== null && serverId !== void 0 ? serverId : (serverId = 'legacy');
|
|
29
|
+
return `@eurogard/open-api-${(0, schematics_utilities_1.dasherize)(serverId)}/remote-methods/${(0, schematics_utilities_1.dasherize)(id)}.remote-method`;
|
|
30
|
+
}
|
|
31
|
+
exports.OperationIdToClassImportPath = OperationIdToClassImportPath;
|
|
32
|
+
function ServiceOperationIdToClassImportPath(operationId) {
|
|
33
|
+
let [id, serverId] = operationId.split('@');
|
|
34
|
+
serverId !== null && serverId !== void 0 ? serverId : (serverId = 'legacy');
|
|
35
|
+
return `@eurogard/service-open-api-${(0, schematics_utilities_1.dasherize)(serverId)}/commands/${(0, schematics_utilities_1.dasherize)(id)}.command`;
|
|
36
|
+
}
|
|
37
|
+
exports.ServiceOperationIdToClassImportPath = ServiceOperationIdToClassImportPath;
|
|
38
|
+
function OpenApiResponseClassImportPath(response, serverId = 'legacy') {
|
|
39
|
+
return `@eurogard/open-api-${(0, schematics_utilities_1.dasherize)(serverId)}/responses/${(0, schematics_utilities_1.dasherize)(response)
|
|
40
|
+
.replace('-response', '')}.response`;
|
|
41
|
+
}
|
|
42
|
+
exports.OpenApiResponseClassImportPath = OpenApiResponseClassImportPath;
|
|
43
|
+
function OperationIdToResponseClassImportPath(operationId) {
|
|
44
|
+
let [id, serverId] = operationId.split('@');
|
|
45
|
+
serverId !== null && serverId !== void 0 ? serverId : (serverId = 'legacy');
|
|
46
|
+
return `@eurogard/open-api-${(0, schematics_utilities_1.dasherize)(serverId)}/responses/${(0, schematics_utilities_1.dasherize)(id)}.response`;
|
|
47
|
+
}
|
|
48
|
+
exports.OperationIdToResponseClassImportPath = OperationIdToResponseClassImportPath;
|
|
49
|
+
function OperationIdToParameterClassImportPath(operationId) {
|
|
50
|
+
let [id, serverId] = operationId.split('@');
|
|
51
|
+
serverId !== null && serverId !== void 0 ? serverId : (serverId = 'legacy');
|
|
52
|
+
return `@eurogard/open-api-${(0, schematics_utilities_1.dasherize)(serverId)}/parameters/${(0, schematics_utilities_1.dasherize)(id)}.parameter`;
|
|
53
|
+
}
|
|
54
|
+
exports.OperationIdToParameterClassImportPath = OperationIdToParameterClassImportPath;
|
|
55
|
+
function buildOperationId(options, operation, controller) {
|
|
56
|
+
return `${(0, schematics_utilities_1.dasherize)(controller)}-controller-${(0, schematics_utilities_1.dasherize)(operation)}@${(0, project_utilities_1.buildNestProjectName)(options)}`;
|
|
57
|
+
}
|
|
58
|
+
exports.buildOperationId = buildOperationId;
|
|
59
|
+
//# sourceMappingURL=operation-id-utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-id-utilities.js","sourceRoot":"","sources":["../../../../../libs/ts-morph/src/lib/operation-id-utilities.ts"],"names":[],"mappings":";;;AAAA,qEAA6E;AAC7E,gEAA8D;AAE9D,SAAgB,sBAAsB,CAAC,WAAmB;IACxD,IAAI,CAAE,EAAE,CAAE,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,IAAA,+BAAQ,EAAC,EAAE,CAAC,GAAG,cAAc,CAAC;AACvC,CAAC;AAHD,wDAGC;AAED,SAAgB,6BAA6B,CAAC,WAAmB;IAC/D,IAAI,CAAE,EAAE,CAAE,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,IAAA,+BAAQ,EAAC,EAAE,CAAC,GAAG,SAAS,CAAC;AAClC,CAAC;AAHD,sEAGC;AAGD,SAAgB,8BAA8B,CAAC,WAAmB;IAChE,IAAI,CAAE,EAAE,CAAE,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,IAAA,+BAAQ,EAAC,EAAE,CAAC,GAAG,UAAU,CAAC;AACnC,CAAC;AAHD,wEAGC;AAED,SAAgB,+BAA+B,CAAC,WAAmB;IACjE,IAAI,CAAE,EAAE,CAAE,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,IAAA,+BAAQ,EAAC,EAAE,CAAC,GAAG,WAAW,CAAC;AACpC,CAAC;AAHD,0EAGC;AAED,SAAgB,4BAA4B,CAAC,WAAmB;IAC9D,IAAI,CAAE,EAAE,EAAE,QAAQ,CAAE,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9C,QAAQ,aAAR,QAAQ,cAAR,QAAQ,IAAR,QAAQ,GAAK,QAAQ,EAAC;IACtB,OAAO,sBAAuB,IAAA,gCAAS,EAAC,QAAQ,CAAE,mBAAoB,IAAA,gCAAS,EAAC,EAAE,CAAE,gBAAgB,CAAC;AACvG,CAAC;AAJD,oEAIC;AAED,SAAgB,mCAAmC,CAAC,WAAmB;IACrE,IAAI,CAAE,EAAE,EAAE,QAAQ,CAAE,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9C,QAAQ,aAAR,QAAQ,cAAR,QAAQ,IAAR,QAAQ,GAAK,QAAQ,EAAC;IACtB,OAAO,8BAA+B,IAAA,gCAAS,EAAC,QAAQ,CAAE,aAAc,IAAA,gCAAS,EAAC,EAAE,CAAE,UAAU,CAAC;AACnG,CAAC;AAJD,kFAIC;AAED,SAAgB,8BAA8B,CAAC,QAAgB,EAAE,WAAmB,QAAQ;IAC1F,OAAO,sBAAuB,IAAA,gCAAS,EAAC,QAAQ,CAAE,cAAe,IAAA,gCAAS,EAAC,QAAQ,CAAC;SACjF,OAAO,CAAC,WAAW,EAAE,EAAE,CAAE,WAAW,CAAC;AAC1C,CAAC;AAHD,wEAGC;AAED,SAAgB,oCAAoC,CAAC,WAAmB;IACtE,IAAI,CAAE,EAAE,EAAE,QAAQ,CAAE,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9C,QAAQ,aAAR,QAAQ,cAAR,QAAQ,IAAR,QAAQ,GAAK,QAAQ,EAAC;IACtB,OAAO,sBAAuB,IAAA,gCAAS,EAAC,QAAQ,CAAE,cAAe,IAAA,gCAAS,EAAC,EAAE,CAAE,WAAW,CAAC;AAC7F,CAAC;AAJD,oFAIC;AAED,SAAgB,qCAAqC,CAAC,WAAmB;IACvE,IAAI,CAAE,EAAE,EAAE,QAAQ,CAAE,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9C,QAAQ,aAAR,QAAQ,cAAR,QAAQ,IAAR,QAAQ,GAAK,QAAQ,EAAC;IACtB,OAAO,sBAAuB,IAAA,gCAAS,EAAC,QAAQ,CAAE,eAAgB,IAAA,gCAAS,EAAC,EAAE,CAAE,YAAY,CAAC;AAC/F,CAAC;AAJD,sFAIC;AACD,SAAgB,gBAAgB,CAAC,OAA8D,EAAE,SAAiB,EAAE,UAAkB;IACpI,OAAO,GAAI,IAAA,gCAAS,EAAC,UAAU,CAAE,eAAgB,IAAA,gCAAS,EAAC,SAAS,CAAE,IAAK,IAAA,wCAAoB,EAAC,OAAO,CAAE,EAAE,CAAC;AAC9G,CAAC;AAFD,4CAEC"}
|
|
@@ -9,28 +9,22 @@ function areSame(sourceFile1, sourceFile2) {
|
|
|
9
9
|
while (true) {
|
|
10
10
|
const leaf1 = leafNodes1.next();
|
|
11
11
|
const leaf2 = leafNodes2.next();
|
|
12
|
-
if (leaf1.done && leaf2.done)
|
|
12
|
+
if (leaf1.done && leaf2.done)
|
|
13
13
|
return true;
|
|
14
|
-
|
|
15
|
-
if (leaf1.done || leaf2.done) {
|
|
14
|
+
if (leaf1.done || leaf2.done)
|
|
16
15
|
return false;
|
|
17
|
-
|
|
18
|
-
if (leaf1.value.getText() !== leaf2.value.getText()) {
|
|
16
|
+
if (leaf1.value.getText() !== leaf2.value.getText())
|
|
19
17
|
return false;
|
|
20
|
-
}
|
|
21
18
|
}
|
|
22
19
|
function* getLeafNodes(sourceFile) {
|
|
23
20
|
yield* searchNode(sourceFile);
|
|
24
|
-
// @ts-ignore
|
|
25
21
|
function* searchNode(node) {
|
|
26
22
|
const children = node.getChildren();
|
|
27
|
-
if (children.length === 0)
|
|
23
|
+
if (children.length === 0)
|
|
28
24
|
yield node;
|
|
29
|
-
}
|
|
30
25
|
else {
|
|
31
|
-
for (const child of children)
|
|
26
|
+
for (const child of children)
|
|
32
27
|
yield* searchNode(child);
|
|
33
|
-
}
|
|
34
28
|
}
|
|
35
29
|
}
|
|
36
30
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-ts-morph-project.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/ts-morph/apply-ts-morph-project.ts"],"names":[],"mappings":";;;AACA,+BAA4B;AAC5B,uCAAqD;AAErD,SAAS,OAAO,CAAC,WAAuB,EAAE,WAAuB;IAC/D,MAAM,UAAU,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;IAC7C,MAAM,UAAU,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;IAE7C,OAAO,IAAI,EAAE;QACX,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;QAChC,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;QAEhC,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI;YAC1B,OAAO,IAAI,CAAC;QACd,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI;YAC1B,OAAO,KAAK,CAAC;QACf,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE;YACjD,OAAO,KAAK,CAAC;KAChB;IAED,QAAQ,CAAC,CAAC,YAAY,CAAC,UAAsB;QAC3C,KAAK,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAC9B,QAAQ,CAAC,CAAC,UAAU,CAAC,IAAU;YAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;YACpC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;gBAAE,MAAM,IAAI,CAAC;iBACjC;gBACH,KAAK,MAAM,KAAK,IAAI,QAAQ;oBAAE,KAAK,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;aACxD;QACH,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAgB,mBAAmB,CAAC,OAAgB,EAAE,WAAmB,EAAE,EAAE,kBAA2B,IAAI,EAAE,oBAA6B,KAAK;IAC9I,OAAO,IAAI,CAAC,EAAE;QAEZ,IAAI,eAAe,IAAI,iBAAiB,EAAE;YACxC,OAAO;iBACJ,cAAc,EAAE;iBAChB,OAAO,CAAC,UAAU,CAAC,EAAE;gBACpB,IAAI,iBAAiB,EAAE;oBACrB,UAAU,CAAC,iBAAiB,EAAE,CAAC;iBAChC;gBACD,IAAI,eAAe,EAAE;oBACnB,UAAU,CAAC,eAAe,EAAE,CAAA;iBAC7B;YACH,CAAC,CAAC,CAAC;SACN;QAED,OAAO;aACJ,cAAc,EAAE;aAChB,OAAO,CAAC,UAAU,CAAC,EAAE;YAEpB,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,QAAQ,EAAE,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;YAE1D,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;gBACzB,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;gBAC9D,MAAM,UAAU,GAAG,IAAI,kBAAO,EAAE,CAAC;gBACjC,MAAM,UAAU,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;gBAC5C,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,gBAAgB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,EAAE;oBAChF,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;iBACtC;aACF;iBAAM;gBACL,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;aACjD;QAEH,CAAC,CAAC,CAAC;IAEP,CAAC,CAAC;AACJ,CAAC;AApCD,kDAoCC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceClassImplementation = void 0;
|
|
4
|
+
function CoerceClassImplementation(classDeclaration, implementation) {
|
|
5
|
+
if (!classDeclaration.getImplements().some(impl => impl.getText() === implementation)) {
|
|
6
|
+
classDeclaration.addImplements(implementation);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.CoerceClassImplementation = CoerceClassImplementation;
|
|
10
|
+
//# sourceMappingURL=coerce-class-implementation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-class-implementation.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/ts-morph/coerce-class-implementation.ts"],"names":[],"mappings":";;;AAEA,SAAgB,yBAAyB,CAAC,gBAAkC,EAAE,cAAsB;IAClG,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,cAAc,CAAC,EAAE;QACrF,gBAAgB,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;KAChD;AACH,CAAC;AAJD,8DAIC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ClassDeclaration, OptionalKind, PropertyDeclarationStructure } from 'ts-morph';
|
|
2
|
+
export declare function CoerceClassProperty(classDeclaration: ClassDeclaration, propertyName: string, propertyStructure: Omit<OptionalKind<PropertyDeclarationStructure>, 'name'>): import("ts-morph").PropertyDeclaration;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceClassProperty = void 0;
|
|
4
|
+
function CoerceClassProperty(classDeclaration, propertyName, propertyStructure) {
|
|
5
|
+
let propertyDeclaration = classDeclaration.getProperty(propertyName);
|
|
6
|
+
if (!propertyDeclaration) {
|
|
7
|
+
propertyDeclaration = classDeclaration.addProperty(Object.assign(Object.assign({}, propertyStructure), { name: propertyName }));
|
|
8
|
+
}
|
|
9
|
+
return propertyDeclaration;
|
|
10
|
+
}
|
|
11
|
+
exports.CoerceClassProperty = CoerceClassProperty;
|
|
12
|
+
//# sourceMappingURL=coerce-class-property.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-class-property.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/ts-morph/coerce-class-property.ts"],"names":[],"mappings":";;;AAEA,SAAgB,mBAAmB,CACjC,gBAAkC,EAClC,YAAoB,EACpB,iBAA2E;IAG3E,IAAI,mBAAmB,GAAG,gBAAgB,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAErE,IAAI,CAAC,mBAAmB,EAAE;QACxB,mBAAmB,GAAG,gBAAgB,CAAC,WAAW,iCAC7C,iBAAiB,KACpB,IAAI,EAAE,YAAY,IAClB,CAAC;KACJ;IAED,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAhBD,kDAgBC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DecoratableNode, Decorator, DecoratorStructure, OptionalKind } from 'ts-morph';
|
|
2
|
+
import { FindFunctionFactory } from './find-function';
|
|
3
|
+
export declare function CoerceDecorator(decoratableNode: DecoratableNode, name: string, structure?: Partial<Omit<OptionalKind<DecoratorStructure>, 'name'>>, compareTo?: FindFunctionFactory<Partial<DecoratorStructure>, Decorator>): Decorator;
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use the overload with the name parameter
|
|
6
|
+
*/
|
|
7
|
+
export declare function CoerceDecorator(decoratableNode: DecoratableNode, structure: Partial<OptionalKind<DecoratorStructure>> & {
|
|
8
|
+
name: string;
|
|
9
|
+
}): Decorator;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceDecorator = void 0;
|
|
4
|
+
const find_function_1 = require("./find-function");
|
|
5
|
+
function CoerceDecorator(decoratableNode, structureOrName, structure = {}, compareTo = find_function_1.FindByNameFunction) {
|
|
6
|
+
let name;
|
|
7
|
+
if (typeof structureOrName === 'string') {
|
|
8
|
+
name = structureOrName;
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
name = structureOrName.name;
|
|
12
|
+
structure = structureOrName !== null && structureOrName !== void 0 ? structureOrName : structure;
|
|
13
|
+
}
|
|
14
|
+
let decorator = decoratableNode.getDecorator(compareTo(Object.assign(Object.assign({}, structure), { name })));
|
|
15
|
+
if (!decorator) {
|
|
16
|
+
decorator = decoratableNode.addDecorator({ name });
|
|
17
|
+
decorator.set(structure);
|
|
18
|
+
}
|
|
19
|
+
return decorator;
|
|
20
|
+
}
|
|
21
|
+
exports.CoerceDecorator = CoerceDecorator;
|
|
22
|
+
//# sourceMappingURL=coerce-decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-decorator.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/ts-morph/coerce-decorator.ts"],"names":[],"mappings":";;;AACA,mDAA0E;AAe1E,SAAgB,eAAe,CAC7B,eAAgC,EAChC,eAA0D,EAC1D,YAAyE,EAAE,EAC3E,YAA4F,kCAAkB;IAE9G,IAAI,IAAY,CAAC;IACjB,IAAI,OAAO,eAAe,KAAK,QAAQ,EAAE;QACvC,IAAI,GAAG,eAAe,CAAC;KACxB;SAAM;QACL,IAAI,GAAQ,eAAe,CAAC,IAAI,CAAC;QACjC,SAAS,GAAG,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,SAAS,CAAC;KAC1C;IACD,IAAI,SAAS,GAAG,eAAe,CAAC,YAAY,CAAC,SAAS,iCAAK,SAAS,KAAE,IAAI,IAAE,CAAC,CAAC;IAC9E,IAAI,CAAC,SAAS,EAAE;QACd,SAAS,GAAG,eAAe,CAAC,YAAY,CAAC,EAAC,IAAI,EAAC,CAAC,CAAC;QACjD,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;KAC1B;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAnBD,0CAmBC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceFunction = void 0;
|
|
4
|
+
function CoerceFunction(sourceFile, name, structure = {}) {
|
|
5
|
+
const functionDeclaration = sourceFile.getFunction(name) || sourceFile.addFunction({ name });
|
|
6
|
+
functionDeclaration.set(structure);
|
|
7
|
+
return functionDeclaration;
|
|
8
|
+
}
|
|
9
|
+
exports.CoerceFunction = CoerceFunction;
|
|
10
|
+
//# sourceMappingURL=coerce-function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-function.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/ts-morph/coerce-function.ts"],"names":[],"mappings":";;;AAEA,SAAgB,cAAc,CAC5B,UAAsB,EACtB,IAAY,EACZ,YAAiE,EAAE;IAEnE,MAAM,mBAAmB,GAAG,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,WAAW,CAAC,EAAC,IAAI,EAAC,CAAC,CAAC;IAC3F,mBAAmB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACnC,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AARD,wCAQC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceImports = void 0;
|
|
4
|
+
function CoerceImports(sourceFile, structures) {
|
|
5
|
+
for (const structure of Array.isArray(structures) ? structures : [structures]) {
|
|
6
|
+
const moduleSpecifier = structure.moduleSpecifier;
|
|
7
|
+
const namedImports = structure.namedImports;
|
|
8
|
+
if (!moduleSpecifier ||
|
|
9
|
+
!(Array.isArray(namedImports) && namedImports.every((named) => typeof named === 'string')) ||
|
|
10
|
+
!sourceFile.getImportDeclaration(moduleSpecifier)) {
|
|
11
|
+
sourceFile.addImportDeclaration(structure);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
const importDeclaration = sourceFile.getImportDeclaration(moduleSpecifier);
|
|
15
|
+
const existingImports = importDeclaration.getNamedImports();
|
|
16
|
+
for (const named of namedImports) {
|
|
17
|
+
if (!existingImports.some((existing) => existing.getName() === named)) {
|
|
18
|
+
importDeclaration.addNamedImport(named);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.CoerceImports = CoerceImports;
|
|
25
|
+
//# sourceMappingURL=coerce-imports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-imports.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/ts-morph/coerce-imports.ts"],"names":[],"mappings":";;;AAEA,SAAgB,aAAa,CAC3B,UAAsB,EACtB,UAA8G;IAG9G,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAE,UAAU,CAAE,EAAE;QAE/E,MAAM,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC;QAClD,MAAM,YAAY,GAAM,SAAS,CAAC,YAAY,CAAC;QAE/C,IAAI,CAAC,eAAe;YAClB,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC;YAC1F,CAAC,UAAU,CAAC,oBAAoB,CAAC,eAAe,CAAC,EAAE;YACnD,UAAU,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;SAC5C;aAAM;YACL,MAAM,iBAAiB,GAAG,UAAU,CAAC,oBAAoB,CAAC,eAAe,CAAE,CAAC;YAC5E,MAAM,eAAe,GAAK,iBAAiB,CAAC,eAAe,EAAE,CAAC;YAC9D,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE;gBAChC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,KAAK,CAAC,EAAE;oBACrE,iBAAiB,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;iBACzC;aACF;SACF;KAEF;AAEH,CAAC;AA1BD,sCA0BC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { InterfaceDeclarationStructure, OptionalKind, SourceFile } from 'ts-morph';
|
|
2
|
+
export declare function CoerceInterface(sourceFile: SourceFile, interfaceName: string, structure?: Omit<OptionalKind<InterfaceDeclarationStructure>, 'name'>): import("ts-morph").InterfaceDeclaration;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceInterface = void 0;
|
|
4
|
+
function CoerceInterface(sourceFile, interfaceName, structure = {}) {
|
|
5
|
+
let interfaceDeclaration = sourceFile.getInterface(interfaceName);
|
|
6
|
+
if (!interfaceDeclaration) {
|
|
7
|
+
interfaceDeclaration = sourceFile.addInterface({
|
|
8
|
+
name: interfaceName,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
interfaceDeclaration.set(structure);
|
|
12
|
+
return interfaceDeclaration;
|
|
13
|
+
}
|
|
14
|
+
exports.CoerceInterface = CoerceInterface;
|
|
15
|
+
//# sourceMappingURL=coerce-interface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-interface.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/ts-morph/coerce-interface.ts"],"names":[],"mappings":";;;AAEA,SAAgB,eAAe,CAC7B,UAAsB,EACtB,aAAqB,EACrB,YAAuE,EAAE;IAEzE,IAAI,oBAAoB,GAAG,UAAU,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;IAClE,IAAI,CAAC,oBAAoB,EAAE;QACzB,oBAAoB,GAAG,UAAU,CAAC,YAAY,CAAC;YAC7C,IAAI,EAAE,aAAa;SACpB,CAAC,CAAC;KACJ;IACD,oBAAoB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACpC,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAbD,0CAaC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { OptionalKind, ParameterDeclarationStructure, ParameteredNode } from 'ts-morph';
|
|
2
|
+
export declare function CoerceParameterDeclaration(node: ParameteredNode, name: string, structure?: Omit<OptionalKind<ParameterDeclarationStructure>, 'name'>): import("ts-morph").ParameterDeclaration;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceParameterDeclaration = void 0;
|
|
4
|
+
function CoerceParameterDeclaration(node, name, structure) {
|
|
5
|
+
let parameterDeclaration = node.getParameter(name);
|
|
6
|
+
if (!parameterDeclaration) {
|
|
7
|
+
parameterDeclaration = node.addParameter({ name });
|
|
8
|
+
parameterDeclaration.set(structure !== null && structure !== void 0 ? structure : {});
|
|
9
|
+
}
|
|
10
|
+
return parameterDeclaration;
|
|
11
|
+
}
|
|
12
|
+
exports.CoerceParameterDeclaration = CoerceParameterDeclaration;
|
|
13
|
+
//# sourceMappingURL=coerce-parameter-declaration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-parameter-declaration.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/ts-morph/coerce-parameter-declaration.ts"],"names":[],"mappings":";;;AAEA,SAAgB,0BAA0B,CACxC,IAAqB,EACrB,IAAY,EACZ,SAAqE;IAErE,IAAI,oBAAoB,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACnD,IAAI,CAAC,oBAAoB,EAAE;QACzB,oBAAoB,GAAG,IAAI,CAAC,YAAY,CAAC,EAAC,IAAI,EAAC,CAAC,CAAC;QACjD,oBAAoB,CAAC,GAAG,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAChC,EAAE,CAAC,CAAC;KACP;IACD,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAZD,gEAYC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceStatements = void 0;
|
|
4
|
+
function CoerceStatements(node, statements) {
|
|
5
|
+
if (node.getStatements().length ===
|
|
6
|
+
0) {
|
|
7
|
+
node.addStatements(statements);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.CoerceStatements = CoerceStatements;
|
|
11
|
+
//# sourceMappingURL=coerce-statements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-statements.js","sourceRoot":"","sources":["../../../../../../libs/ts-morph/src/lib/ts-morph/coerce-statements.ts"],"names":[],"mappings":";;;AAEA,SAAgB,gBAAgB,CAC9B,IAAqB,EACrB,UAAuF;IAEvF,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC,MAAM;QAC7B,CAAC,EAAE;QACH,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;KAChC;AACH,CAAC;AARD,4CAQC"}
|