@rxap/schematics-ts-morph 16.0.0-dev.3 → 16.0.0-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/package.json +24 -8
- package/src/index.d.ts +140 -4
- package/src/index.js +150 -4
- package/src/index.js.map +1 -1
- package/src/lib/add-dir.js.map +1 -1
- package/src/lib/add-fake-provider.js +3 -3
- package/src/lib/add-fake-provider.js.map +1 -1
- package/src/lib/add-method-class.d.ts +1 -0
- package/src/lib/add-method-class.js +12 -4
- package/src/lib/add-method-class.js.map +1 -1
- package/src/lib/add-variable-provider.js +3 -3
- package/src/lib/add-variable-provider.js.map +1 -1
- package/src/lib/{add-component-animations.js → angular/add-component-animations.js} +3 -3
- package/src/lib/angular/add-component-animations.js.map +1 -0
- package/src/lib/{add-component-fake-provider.d.ts → angular/add-component-fake-provider.d.ts} +1 -1
- package/src/lib/{add-component-fake-provider.js → angular/add-component-fake-provider.js} +1 -1
- package/src/lib/angular/add-component-fake-provider.js.map +1 -0
- package/src/lib/angular/add-component-import.d.ts +2 -0
- package/src/lib/angular/add-component-import.js +21 -0
- package/src/lib/angular/add-component-import.js.map +1 -0
- package/src/lib/{add-component-input.js → angular/add-component-input.js} +4 -4
- package/src/lib/angular/add-component-input.js.map +1 -0
- package/src/lib/{add-component-provider.d.ts → angular/add-component-provider.d.ts} +1 -1
- package/src/lib/{add-component-provider.js → angular/add-component-provider.js} +4 -4
- package/src/lib/angular/add-component-provider.js.map +1 -0
- package/src/lib/angular/add-control-validator.js.map +1 -0
- package/src/lib/{add-dependency-injection.js → angular/add-dependency-injection.js} +5 -5
- package/src/lib/angular/add-dependency-injection.js.map +1 -0
- package/src/lib/angular/add-ng-module-export.d.ts +2 -0
- package/src/lib/angular/add-ng-module-export.js +21 -0
- package/src/lib/angular/add-ng-module-export.js.map +1 -0
- package/src/lib/{add-ng-module-import.js → angular/add-ng-module-import.js} +3 -3
- package/src/lib/angular/add-ng-module-import.js.map +1 -0
- package/src/lib/{add-ng-module-provider.d.ts → angular/add-ng-module-provider.d.ts} +1 -1
- package/src/lib/{add-ng-module-provider.js → angular/add-ng-module-provider.js} +4 -4
- package/src/lib/angular/add-ng-module-provider.js.map +1 -0
- package/src/lib/angular/build-angular-base-path.d.ts +2 -2
- package/src/lib/angular/build-angular-base-path.js +6 -1
- package/src/lib/angular/build-angular-base-path.js.map +1 -1
- package/src/lib/angular/coerce-accordion-component.d.ts +1 -1
- package/src/lib/angular/coerce-accordion-component.js +3 -3
- package/src/lib/angular/coerce-accordion-component.js.map +1 -1
- package/src/lib/angular/coerce-component-class.d.ts +1 -1
- package/src/lib/angular/coerce-component-class.js +7 -8
- package/src/lib/angular/coerce-component-class.js.map +1 -1
- package/src/lib/angular/coerce-component.d.ts +9 -9
- package/src/lib/angular/coerce-component.js +57 -18
- package/src/lib/angular/coerce-component.js.map +1 -1
- package/src/lib/angular/coerce-data-source-class.d.ts +17 -6
- package/src/lib/angular/coerce-data-source-class.js +51 -15
- package/src/lib/angular/coerce-data-source-class.js.map +1 -1
- package/src/lib/angular/coerce-dialog-component.d.ts +14 -0
- package/src/lib/angular/coerce-dialog-component.js +84 -0
- package/src/lib/angular/coerce-dialog-component.js.map +1 -0
- package/src/lib/angular/coerce-dialog-table-action-component.d.ts +8 -0
- package/src/lib/angular/coerce-dialog-table-action-component.js +102 -0
- package/src/lib/angular/coerce-dialog-table-action-component.js.map +1 -0
- package/src/lib/angular/coerce-dialog-table-action.d.ts +3 -0
- package/src/lib/angular/coerce-dialog-table-action.js +39 -0
- package/src/lib/angular/coerce-dialog-table-action.js.map +1 -0
- package/src/lib/angular/coerce-form-builder-provider.d.ts +2 -2
- package/src/lib/angular/coerce-form-builder-provider.js +4 -4
- package/src/lib/angular/coerce-form-builder-provider.js.map +1 -1
- package/src/lib/angular/coerce-form-component-provider.d.ts +2 -2
- package/src/lib/angular/coerce-form-component-provider.js +4 -4
- package/src/lib/angular/coerce-form-component-provider.js.map +1 -1
- package/src/lib/angular/coerce-form-definition-control.d.ts +20 -0
- package/src/lib/angular/coerce-form-definition-control.js +141 -0
- package/src/lib/angular/coerce-form-definition-control.js.map +1 -0
- package/src/lib/angular/coerce-form-definition-type.d.ts +10 -0
- package/src/lib/angular/coerce-form-definition-type.js +30 -0
- package/src/lib/angular/coerce-form-definition-type.js.map +1 -0
- package/src/lib/angular/coerce-form-definition.d.ts +4 -10
- package/src/lib/angular/coerce-form-definition.js +58 -76
- package/src/lib/angular/coerce-form-definition.js.map +1 -1
- package/src/lib/angular/coerce-form-provider.d.ts +2 -2
- package/src/lib/angular/coerce-form-provider.js +4 -4
- package/src/lib/angular/coerce-form-provider.js.map +1 -1
- package/src/lib/angular/coerce-form-providers-file.d.ts +2 -2
- package/src/lib/angular/coerce-form-providers-file.js +7 -7
- package/src/lib/angular/coerce-form-providers-file.js.map +1 -1
- package/src/lib/angular/coerce-form-table-action.d.ts +1 -0
- package/src/lib/angular/coerce-form-table-action.js +11 -11
- package/src/lib/angular/coerce-form-table-action.js.map +1 -1
- package/src/lib/angular/coerce-method-class.d.ts +4 -6
- package/src/lib/angular/coerce-method-class.js +12 -17
- package/src/lib/angular/coerce-method-class.js.map +1 -1
- package/src/lib/angular/coerce-navigation-table-action.d.ts +1 -1
- package/src/lib/angular/coerce-navigation-table-action.js +4 -4
- package/src/lib/angular/coerce-navigation-table-action.js.map +1 -1
- package/src/lib/angular/coerce-operation-table-action.d.ts +1 -0
- package/src/lib/angular/coerce-operation-table-action.js +8 -8
- package/src/lib/angular/coerce-operation-table-action.js.map +1 -1
- package/src/lib/angular/coerce-options-data-source.d.ts +6 -0
- package/src/lib/angular/coerce-options-data-source.js +47 -0
- package/src/lib/angular/coerce-options-data-source.js.map +1 -0
- package/src/lib/angular/coerce-project-feature.d.ts +2 -4
- package/src/lib/angular/coerce-project-feature.js +20 -6
- package/src/lib/angular/coerce-project-feature.js.map +1 -1
- package/src/lib/angular/coerce-proxy-remote-method-class.d.ts +3 -5
- package/src/lib/angular/coerce-proxy-remote-method-class.js +10 -7
- package/src/lib/angular/coerce-proxy-remote-method-class.js.map +1 -1
- package/src/lib/angular/coerce-table-action-index-provider.js +4 -6
- package/src/lib/angular/coerce-table-action-index-provider.js.map +1 -1
- package/src/lib/angular/coerce-table-action-index.js +2 -2
- package/src/lib/angular/coerce-table-action-index.js.map +1 -1
- package/src/lib/angular/coerce-table-action-provider.d.ts +3 -3
- package/src/lib/angular/coerce-table-action-provider.js +8 -8
- package/src/lib/angular/coerce-table-action-provider.js.map +1 -1
- package/src/lib/angular/coerce-table-action.d.ts +6 -6
- package/src/lib/angular/coerce-table-action.js +8 -7
- package/src/lib/angular/coerce-table-action.js.map +1 -1
- package/src/lib/angular/coerce-table-data-source.d.ts +9 -0
- package/src/lib/angular/coerce-table-data-source.js +50 -0
- package/src/lib/angular/coerce-table-data-source.js.map +1 -0
- package/src/lib/angular/coerce-table-parameters-from-route.js +5 -5
- package/src/lib/angular/coerce-table-parameters-from-route.js.map +1 -1
- package/src/lib/angular/coerce-table-select-resolve-value-method.d.ts +6 -0
- package/src/lib/angular/coerce-table-select-resolve-value-method.js +31 -0
- package/src/lib/angular/coerce-table-select-resolve-value-method.js.map +1 -0
- package/src/lib/angular/coerce-tree-table-children-proxy-remote-method-class.d.ts +1 -0
- package/src/lib/angular/coerce-tree-table-children-proxy-remote-method-class.js +6 -6
- package/src/lib/angular/coerce-tree-table-children-proxy-remote-method-class.js.map +1 -1
- package/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.d.ts +1 -0
- package/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.js +6 -6
- package/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.js.map +1 -1
- package/src/lib/angular/enforce-use-form-control-order.d.ts +5 -0
- package/src/lib/angular/enforce-use-form-control-order.js +33 -0
- package/src/lib/angular/enforce-use-form-control-order.js.map +1 -0
- package/src/lib/angular/find-component-module-source-file.js.map +1 -0
- package/src/lib/angular/find-component-source-file.js.map +1 -0
- package/src/lib/angular/find-routing-module.js.map +1 -0
- package/src/lib/angular/form-definition-utilities.d.ts +13 -0
- package/src/lib/angular/form-definition-utilities.js +29 -0
- package/src/lib/angular/form-definition-utilities.js.map +1 -0
- package/src/lib/angular/get-component-class.js.map +1 -0
- package/src/lib/angular/get-component-options-object.js.map +1 -0
- package/src/lib/angular/get-ng-module-options-object.js.map +1 -0
- package/src/lib/{handle-component-module.d.ts → angular/handle-component-module.d.ts} +1 -1
- package/src/lib/angular/handle-component-module.js.map +1 -0
- package/src/lib/{handle-component.d.ts → angular/handle-component.d.ts} +1 -1
- package/src/lib/angular/handle-component.js.map +1 -0
- package/src/lib/angular/has-accordion-component.d.ts +4 -3
- package/src/lib/angular/has-accordion-component.js +6 -1
- package/src/lib/angular/has-accordion-component.js.map +1 -1
- package/src/lib/angular/has-component.d.ts +2 -2
- package/src/lib/angular/has-component.js +2 -2
- package/src/lib/angular/has-component.js.map +1 -1
- package/src/lib/angular/has-dialog-component.d.ts +5 -0
- package/src/lib/angular/has-dialog-component.js +17 -0
- package/src/lib/angular/has-dialog-component.js.map +1 -0
- package/src/lib/angular/has-project-feature.d.ts +4 -3
- package/src/lib/angular/has-project-feature.js +5 -1
- package/src/lib/angular/has-project-feature.js.map +1 -1
- package/src/lib/angular/has-table-component.d.ts +2 -5
- package/src/lib/angular/has-table-component.js +5 -2
- package/src/lib/angular/has-table-component.js.map +1 -1
- package/src/lib/coerce-variable-declaration.d.ts +2 -2
- package/src/lib/coerce-variable-declaration.js +6 -3
- package/src/lib/coerce-variable-declaration.js.map +1 -1
- package/src/lib/get-form-providers-source-file.js +2 -2
- package/src/lib/get-form-providers-source-file.js.map +1 -1
- package/src/lib/nest/add-nest-controller.js +2 -2
- package/src/lib/nest/add-nest-controller.js.map +1 -1
- package/src/lib/nest/add-nest-module-controller.js +2 -2
- package/src/lib/nest/add-nest-module-controller.js.map +1 -1
- package/src/lib/nest/add-nest-module-import.js +2 -2
- package/src/lib/nest/add-nest-module-import.js.map +1 -1
- package/src/lib/nest/add-nest-module-provider.js +2 -2
- package/src/lib/nest/add-nest-module-provider.js.map +1 -1
- package/src/lib/nest/add-nest-module-to-app-module.d.ts +3 -4
- package/src/lib/nest/add-nest-module-to-app-module.js +15 -5
- package/src/lib/nest/add-nest-module-to-app-module.js.map +1 -1
- package/src/lib/{add-operation-to-controller.d.ts → nest/add-operation-to-controller.d.ts} +6 -2
- package/src/lib/{add-operation-to-controller.js → nest/add-operation-to-controller.js} +30 -11
- package/src/lib/nest/add-operation-to-controller.js.map +1 -0
- package/src/lib/nest/assert-nest-project.d.ts +7 -0
- package/src/lib/nest/assert-nest-project.js +15 -0
- package/src/lib/nest/assert-nest-project.js.map +1 -0
- package/src/lib/nest/build-nest-base-path.d.ts +2 -2
- package/src/lib/nest/build-nest-controller-name.d.ts +0 -3
- package/src/lib/nest/build-nest-controller-name.js +4 -7
- package/src/lib/nest/build-nest-controller-name.js.map +1 -1
- package/src/lib/nest/coerce-dto-class.d.ts +17 -3
- package/src/lib/nest/coerce-dto-class.js +72 -77
- package/src/lib/nest/coerce-dto-class.js.map +1 -1
- package/src/lib/nest/coerce-form-submit-operation.d.ts +2 -1
- package/src/lib/nest/coerce-form-submit-operation.js +11 -6
- package/src/lib/nest/coerce-form-submit-operation.js.map +1 -1
- package/src/lib/nest/coerce-get-by-id-operation.d.ts +3 -13
- package/src/lib/nest/coerce-get-by-id-operation.js +10 -14
- package/src/lib/nest/coerce-get-by-id-operation.js.map +1 -1
- package/src/lib/nest/coerce-get-children-operation.js +27 -32
- package/src/lib/nest/coerce-get-children-operation.js.map +1 -1
- package/src/lib/nest/coerce-get-data-grid-operation.d.ts +1 -1
- package/src/lib/nest/coerce-get-data-grid-operation.js +10 -14
- package/src/lib/nest/coerce-get-data-grid-operation.js.map +1 -1
- package/src/lib/nest/coerce-get-page-operation.d.ts +34 -5
- package/src/lib/nest/coerce-get-page-operation.js +140 -47
- package/src/lib/nest/coerce-get-page-operation.js.map +1 -1
- package/src/lib/nest/coerce-get-root-operation.js +27 -31
- package/src/lib/nest/coerce-get-root-operation.js.map +1 -1
- package/src/lib/nest/coerce-nest-controller.d.ts +8 -5
- package/src/lib/nest/coerce-nest-controller.js +63 -22
- package/src/lib/nest/coerce-nest-controller.js.map +1 -1
- package/src/lib/nest/coerce-nest-module.d.ts +4 -4
- package/src/lib/nest/coerce-nest-module.js +44 -18
- package/src/lib/nest/coerce-nest-module.js.map +1 -1
- package/src/lib/nest/coerce-nest-service-project.d.ts +4 -1
- package/src/lib/nest/coerce-nest-service-project.js +8 -5
- package/src/lib/nest/coerce-nest-service-project.js.map +1 -1
- package/src/lib/nest/coerce-operation.d.ts +11 -15
- package/src/lib/nest/coerce-operation.js +47 -32
- package/src/lib/nest/coerce-operation.js.map +1 -1
- package/src/lib/nest/coerce-options-operation.d.ts +8 -0
- package/src/lib/nest/coerce-options-operation.js +52 -0
- package/src/lib/nest/coerce-options-operation.js.map +1 -0
- package/src/lib/nest/coerce-page-dto-class.d.ts +1 -1
- package/src/lib/nest/coerce-page-dto-class.js +9 -3
- package/src/lib/nest/coerce-page-dto-class.js.map +1 -1
- package/src/lib/nest/coerce-row-dto-class.d.ts +7 -8
- package/src/lib/nest/coerce-row-dto-class.js +11 -12
- package/src/lib/nest/coerce-row-dto-class.js.map +1 -1
- package/src/lib/nest/coerce-submit-data-grid-operation.js +2 -10
- package/src/lib/nest/coerce-submit-data-grid-operation.js.map +1 -1
- package/src/lib/nest/coerce-table-select-operation.d.ts +6 -0
- package/src/lib/nest/coerce-table-select-operation.js +24 -0
- package/src/lib/nest/coerce-table-select-operation.js.map +1 -0
- package/src/lib/nest/coerce-table-select-value-resolve-operation.d.ts +8 -0
- package/src/lib/nest/coerce-table-select-value-resolve-operation.js +40 -0
- package/src/lib/nest/coerce-table-select-value-resolve-operation.js.map +1 -0
- package/src/lib/nest/coerce-tree-operation.d.ts +6 -0
- package/src/lib/nest/coerce-tree-operation.js +56 -0
- package/src/lib/nest/coerce-tree-operation.js.map +1 -0
- package/src/lib/{create-dto-class.d.ts → nest/create-dto-class.d.ts} +9 -0
- package/src/lib/{create-dto-class.js → nest/create-dto-class.js} +18 -14
- package/src/lib/nest/create-dto-class.js.map +1 -0
- package/src/lib/nest/has-nest-controller.d.ts +2 -3
- package/src/lib/nest/has-nest-controller.js +1 -2
- package/src/lib/nest/has-nest-controller.js.map +1 -1
- package/src/lib/nest/has-nest-module.d.ts +1 -1
- package/src/lib/{operation-id-utilities.d.ts → nest/operation-id-utilities.d.ts} +8 -6
- package/src/lib/nest/operation-id-utilities.js +88 -0
- package/src/lib/nest/operation-id-utilities.js.map +1 -0
- package/src/lib/nest/project-utilities.d.ts +8 -6
- package/src/lib/nest/project-utilities.js.map +1 -1
- package/src/lib/nest/remove-nest-module-provider.d.ts +3 -0
- package/src/lib/nest/remove-nest-module-provider.js +13 -0
- package/src/lib/nest/remove-nest-module-provider.js.map +1 -0
- package/src/lib/nest/remove-nest-provider-to-array.d.ts +3 -0
- package/src/lib/nest/remove-nest-provider-to-array.js +29 -0
- package/src/lib/nest/remove-nest-provider-to-array.js.map +1 -0
- package/src/lib/ts-morph/apply-ts-morph-project.d.ts +1 -1
- package/src/lib/ts-morph/apply-ts-morph-project.js +5 -67
- package/src/lib/ts-morph/apply-ts-morph-project.js.map +1 -1
- package/src/lib/ts-morph/coerce-interface.d.ts +9 -2
- package/src/lib/ts-morph/coerce-interface.js +20 -5
- package/src/lib/ts-morph/coerce-interface.js.map +1 -1
- package/src/lib/ts-morph/coerce-type-alias.d.ts +4 -0
- package/src/lib/ts-morph/coerce-type-alias.js +12 -0
- package/src/lib/ts-morph/coerce-type-alias.js.map +1 -0
- package/src/lib/ts-morph/write-type.d.ts +5 -0
- package/src/lib/ts-morph/write-type.js +34 -0
- package/src/lib/ts-morph/write-type.js.map +1 -0
- package/src/lib/ts-morph-transform.d.ts +27 -14
- package/src/lib/ts-morph-transform.js +11 -40
- package/src/lib/ts-morph-transform.js.map +1 -1
- package/src/lib/types/form-definition-control.d.ts +9 -0
- package/src/lib/types/form-definition-control.js +3 -0
- package/src/lib/types/form-definition-control.js.map +1 -0
- package/src/lib/add-component-animations.js.map +0 -1
- package/src/lib/add-component-fake-provider.js.map +0 -1
- package/src/lib/add-component-input.js.map +0 -1
- package/src/lib/add-component-provider.js.map +0 -1
- package/src/lib/add-control-validator.js.map +0 -1
- package/src/lib/add-dependency-injection.js.map +0 -1
- package/src/lib/add-ng-module-import.js.map +0 -1
- package/src/lib/add-ng-module-provider.js.map +0 -1
- package/src/lib/add-operation-to-controller.js.map +0 -1
- package/src/lib/create-dto-class.js.map +0 -1
- package/src/lib/find-component-module-source-file.js.map +0 -1
- package/src/lib/find-component-source-file.js.map +0 -1
- package/src/lib/find-routing-module.js.map +0 -1
- package/src/lib/get-component-class.js.map +0 -1
- package/src/lib/get-component-options-object.js.map +0 -1
- package/src/lib/get-ng-module-options-object.js.map +0 -1
- package/src/lib/handle-component-module.js.map +0 -1
- package/src/lib/handle-component.js.map +0 -1
- package/src/lib/index.d.ts +0 -48
- package/src/lib/index.js +0 -52
- package/src/lib/index.js.map +0 -1
- package/src/lib/nest/index.d.ts +0 -31
- package/src/lib/nest/index.js +0 -35
- package/src/lib/nest/index.js.map +0 -1
- package/src/lib/operation-id-utilities.js +0 -59
- package/src/lib/operation-id-utilities.js.map +0 -1
- package/src/lib/ts-morph/index.d.ts +0 -10
- package/src/lib/ts-morph/index.js +0 -14
- package/src/lib/ts-morph/index.js.map +0 -1
- /package/src/lib/{add-component-animations.d.ts → angular/add-component-animations.d.ts} +0 -0
- /package/src/lib/{add-component-input.d.ts → angular/add-component-input.d.ts} +0 -0
- /package/src/lib/{add-control-validator.d.ts → angular/add-control-validator.d.ts} +0 -0
- /package/src/lib/{add-control-validator.js → angular/add-control-validator.js} +0 -0
- /package/src/lib/{add-dependency-injection.d.ts → angular/add-dependency-injection.d.ts} +0 -0
- /package/src/lib/{add-ng-module-import.d.ts → angular/add-ng-module-import.d.ts} +0 -0
- /package/src/lib/{find-component-module-source-file.d.ts → angular/find-component-module-source-file.d.ts} +0 -0
- /package/src/lib/{find-component-module-source-file.js → angular/find-component-module-source-file.js} +0 -0
- /package/src/lib/{find-component-source-file.d.ts → angular/find-component-source-file.d.ts} +0 -0
- /package/src/lib/{find-component-source-file.js → angular/find-component-source-file.js} +0 -0
- /package/src/lib/{find-routing-module.d.ts → angular/find-routing-module.d.ts} +0 -0
- /package/src/lib/{find-routing-module.js → angular/find-routing-module.js} +0 -0
- /package/src/lib/{get-component-class.d.ts → angular/get-component-class.d.ts} +0 -0
- /package/src/lib/{get-component-class.js → angular/get-component-class.js} +0 -0
- /package/src/lib/{get-component-options-object.d.ts → angular/get-component-options-object.d.ts} +0 -0
- /package/src/lib/{get-component-options-object.js → angular/get-component-options-object.js} +0 -0
- /package/src/lib/{get-ng-module-options-object.d.ts → angular/get-ng-module-options-object.d.ts} +0 -0
- /package/src/lib/{get-ng-module-options-object.js → angular/get-ng-module-options-object.js} +0 -0
- /package/src/lib/{handle-component-module.js → angular/handle-component-module.js} +0 -0
- /package/src/lib/{handle-component.js → angular/handle-component.js} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CoerceProxyRemoteMethodClassOptions } from './coerce-proxy-remote-method-class';
|
|
2
2
|
export interface CoerceTreeTableRootProxyRemoteMethodClassOptions extends Omit<Omit<Omit<Omit<CoerceProxyRemoteMethodClassOptions, 'name'>, 'sourceType'>, 'targetType'>, 'proxyMethod'> {
|
|
3
3
|
getRootOperationId: string;
|
|
4
|
+
scope: string;
|
|
4
5
|
}
|
|
5
6
|
export declare function CoerceTreeTableRootProxyRemoteMethodClass(options: CoerceTreeTableRootProxyRemoteMethodClassOptions): import("@angular-devkit/schematics").Rule;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoerceTreeTableRootProxyRemoteMethodClass = void 0;
|
|
4
|
-
const
|
|
4
|
+
const operation_id_utilities_1 = require("../nest/operation-id-utilities");
|
|
5
5
|
const coerce_imports_1 = require("../ts-morph/coerce-imports");
|
|
6
|
-
const
|
|
6
|
+
const coerce_proxy_remote_method_class_1 = require("./coerce-proxy-remote-method-class");
|
|
7
7
|
function CoerceTreeTableRootProxyRemoteMethodClass(options) {
|
|
8
|
-
let { tsMorphTransform, getRootOperationId, } = options;
|
|
8
|
+
let { tsMorphTransform, getRootOperationId, scope, } = options;
|
|
9
9
|
tsMorphTransform !== null && tsMorphTransform !== void 0 ? tsMorphTransform : (tsMorphTransform = () => ({}));
|
|
10
10
|
return (0, coerce_proxy_remote_method_class_1.CoerceProxyRemoteMethodClass)(Object.assign(Object.assign({}, options), { name: 'tree-table-root', sourceType: 'Node<unknown>', targetType: `OpenApiRemoteMethodParameter<${(0, operation_id_utilities_1.OperationIdToParameterClassName)(getRootOperationId)}>`, proxyMethod: (0, operation_id_utilities_1.OperationIdToClassName)(getRootOperationId), tsMorphTransform: (project, sourceFile, classDeclaration) => {
|
|
11
11
|
(0, coerce_imports_1.CoerceImports)(sourceFile, {
|
|
12
12
|
namedImports: [(0, operation_id_utilities_1.OperationIdToClassName)(getRootOperationId)],
|
|
13
|
-
moduleSpecifier: (0, operation_id_utilities_1.OperationIdToClassImportPath)(getRootOperationId),
|
|
13
|
+
moduleSpecifier: (0, operation_id_utilities_1.OperationIdToClassImportPath)(getRootOperationId, scope),
|
|
14
14
|
});
|
|
15
15
|
(0, coerce_imports_1.CoerceImports)(sourceFile, {
|
|
16
16
|
namedImports: ['Node'],
|
|
17
|
-
moduleSpecifier: '@rxap/
|
|
17
|
+
moduleSpecifier: '@rxap/data-structure-tree',
|
|
18
18
|
});
|
|
19
19
|
(0, coerce_imports_1.CoerceImports)(sourceFile, {
|
|
20
20
|
namedImports: ['OpenApiRemoteMethodParameter'],
|
|
@@ -22,7 +22,7 @@ function CoerceTreeTableRootProxyRemoteMethodClass(options) {
|
|
|
22
22
|
});
|
|
23
23
|
(0, coerce_imports_1.CoerceImports)(sourceFile, {
|
|
24
24
|
namedImports: [(0, operation_id_utilities_1.OperationIdToParameterClassName)(getRootOperationId)],
|
|
25
|
-
moduleSpecifier: (0, operation_id_utilities_1.OperationIdToParameterClassImportPath)(getRootOperationId),
|
|
25
|
+
moduleSpecifier: (0, operation_id_utilities_1.OperationIdToParameterClassImportPath)(getRootOperationId, scope),
|
|
26
26
|
});
|
|
27
27
|
return tsMorphTransform(project, sourceFile, classDeclaration);
|
|
28
28
|
} }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-tree-table-root-proxy-remote-method-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"coerce-tree-table-root-proxy-remote-method-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.ts"],"names":[],"mappings":";;;AAKA,2EAKwC;AACxC,+DAA2D;AAC3D,yFAG4C;AAQ5C,SAAgB,yCAAyC,CAAC,OAAyD;IACjH,IAAI,EACF,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,GACN,GAAG,OAAO,CAAC;IACZ,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,IAAhB,gBAAgB,GAAK,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAC;IAChC,OAAO,IAAA,+DAA4B,kCAC9B,OAAO,KACV,IAAI,EAAE,iBAAiB,EACvB,UAAU,EAAE,eAAe,EAC3B,UAAU,EAAE,gCAAiC,IAAA,wDAA+B,EAAC,kBAAkB,CAAE,GAAG,EACpG,WAAW,EAAE,IAAA,+CAAsB,EAAC,kBAAkB,CAAC,EACvD,gBAAgB,EAAE,CAAC,OAAgB,EAAE,UAAsB,EAAE,gBAAkC,EAAE,EAAE;YACjG,IAAA,8BAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,IAAA,+CAAsB,EAAC,kBAAkB,CAAC,CAAE;gBAC5D,eAAe,EAAE,IAAA,qDAA4B,EAAC,kBAAkB,EAAE,KAAK,CAAC;aACzE,CAAC,CAAC;YACH,IAAA,8BAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,MAAM,CAAE;gBACxB,eAAe,EAAE,2BAA2B;aAC7C,CAAC,CAAC;YACH,IAAA,8BAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,8BAA8B,CAAE;gBAChD,eAAe,EAAE,8BAA8B;aAChD,CAAC,CAAC;YACH,IAAA,8BAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,IAAA,wDAA+B,EAAC,kBAAkB,CAAC,CAAE;gBACrE,eAAe,EAAE,IAAA,8DAAqC,EAAC,kBAAkB,EAAE,KAAK,CAAC;aAClF,CAAC,CAAC;YACH,OAAO,gBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;QAClE,CAAC,IACD,CAAC;AACL,CAAC;AAjCD,8FAiCC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TsMorphAngularProjectTransformOptions } from '../ts-morph-transform';
|
|
2
|
+
export interface EnforceUseFormControlOrderRuleOptions extends TsMorphAngularProjectTransformOptions {
|
|
3
|
+
formName: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function EnforceUseFormControlOrderRule(options: EnforceUseFormControlOrderRuleOptions): import("@angular-devkit/schematics").Rule;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnforceUseFormControlOrderRule = void 0;
|
|
4
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
const ts_morph_transform_1 = require("../ts-morph-transform");
|
|
6
|
+
function EnforceUseFormControlOrderRule(options) {
|
|
7
|
+
const { formName } = options;
|
|
8
|
+
const className = (0, schematics_utilities_1.CoerceSuffix)((0, schematics_utilities_1.classify)(formName), 'Form');
|
|
9
|
+
return (0, ts_morph_transform_1.TsMorphAngularProjectTransformRule)(options, (project) => {
|
|
10
|
+
const sourceFile = project.getSourceFileOrThrow('/' + (0, schematics_utilities_1.CoerceSuffix)(formName, '.form.ts'));
|
|
11
|
+
const classDeclaration = sourceFile.getClassOrThrow(className);
|
|
12
|
+
for (const propertyDeclaration of classDeclaration.getProperties()) {
|
|
13
|
+
const decoratorCount = propertyDeclaration.getDecorators().length;
|
|
14
|
+
if (decoratorCount === 1) {
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
const useFormControlDecorator = propertyDeclaration.getDecorator('UseFormControl');
|
|
18
|
+
if (useFormControlDecorator) {
|
|
19
|
+
const useFormControlIndex = useFormControlDecorator.getChildIndex();
|
|
20
|
+
if (useFormControlIndex !== decoratorCount - 1) {
|
|
21
|
+
const args = useFormControlDecorator.getArguments().map((a) => a.getText());
|
|
22
|
+
useFormControlDecorator.remove();
|
|
23
|
+
propertyDeclaration.addDecorator({
|
|
24
|
+
name: 'UseFormControl',
|
|
25
|
+
arguments: args,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
exports.EnforceUseFormControlOrderRule = EnforceUseFormControlOrderRule;
|
|
33
|
+
//# sourceMappingURL=enforce-use-form-control-order.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enforce-use-form-control-order.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/enforce-use-form-control-order.ts"],"names":[],"mappings":";;;AAAA,qEAGoC;AACpC,8DAG+B;AAM/B,SAAgB,8BAA8B,CAAC,OAA8C;IAC3F,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAC7B,MAAM,SAAS,GAAG,IAAA,mCAAY,EAAC,IAAA,+BAAQ,EAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;IAE3D,OAAO,IAAA,uDAAkC,EAAC,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE;QAE7D,MAAM,UAAU,GAAG,OAAO,CAAC,oBAAoB,CAAC,GAAG,GAAG,IAAA,mCAAY,EAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;QAC1F,MAAM,gBAAgB,GAAG,UAAU,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QAE/D,KAAK,MAAM,mBAAmB,IAAI,gBAAgB,CAAC,aAAa,EAAE,EAAE;YAClE,MAAM,cAAc,GAAG,mBAAmB,CAAC,aAAa,EAAE,CAAC,MAAM,CAAC;YAClE,IAAI,cAAc,KAAK,CAAC,EAAE;gBACxB,SAAS;aACV;YACD,MAAM,uBAAuB,GAAG,mBAAmB,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;YACnF,IAAI,uBAAuB,EAAE;gBAC3B,MAAM,mBAAmB,GAAG,uBAAuB,CAAC,aAAa,EAAE,CAAC;gBACpE,IAAI,mBAAmB,KAAK,cAAc,GAAG,CAAC,EAAE;oBAC9C,MAAM,IAAI,GAAG,uBAAuB,CAAC,YAAY,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;oBAC5E,uBAAuB,CAAC,MAAM,EAAE,CAAC;oBACjC,mBAAmB,CAAC,YAAY,CAAC;wBAC/B,IAAI,EAAE,gBAAgB;wBACtB,SAAS,EAAE,IAAI;qBAChB,CAAC,CAAC;iBACJ;aACF;SAEF;IAEH,CAAC,CAAC,CAAC;AACL,CAAC;AA9BD,wEA8BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-component-module-source-file.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/find-component-module-source-file.ts"],"names":[],"mappings":";;;AAAA,qEAAsD;AAMtD,SAAgB,6BAA6B,CAAC,IAAY,EAAE,OAAgB;IAC1E,OAAO,OAAO,CAAC,oBAAoB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAA,+BAAQ,EAAC,IAAI,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC;AAC/G,CAAC;AAFD,sEAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-component-source-file.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/find-component-source-file.ts"],"names":[],"mappings":";;;AAAA,qEAGoC;AAMpC,SAAgB,uBAAuB,CAAC,IAAY,EAAE,OAAgB;IACpE,MAAM,SAAS,GAAG,IAAA,mCAAY,EAAC,IAAA,+BAAQ,EAAC,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC;IAC5D,IAAI;QACF,OAAO,OAAO,CAAC,oBAAoB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;KACrF;IAAC,OAAO,CAAM,EAAE;QAEf,OAAO,CAAC,KAAK,CAAC,yBAA0B,SAAU,yBAAyB,EAAE,OAAO;aACjF,cAAc,EAAE;aAChB,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;aAC3C,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CACvD,CAAC;QAEF,MAAM,CAAC,CAAC;KACT;AACH,CAAC;AAdD,0DAcC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-routing-module.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/find-routing-module.ts"],"names":[],"mappings":";;;AACA,+BAA4B;AAE5B,SAAgB,iBAAiB,CAAC,IAAU,EAAE,QAAgB;;IAC5D,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtC,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,QAAQ,EAAE;QACnC,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACtC,IAAI,MAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,0CAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,mBAAmB,CAAC,EAAE;YACrE,OAAO,QAAQ,CAAC;SACjB;KACF;IACD,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;AACvD,CAAC;AATD,8CASC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SourceFile } from 'ts-morph';
|
|
2
|
+
export interface GetFormDefinitionClassNameOptions {
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function GetFormDefinitionClassName({ name }: GetFormDefinitionClassNameOptions): string;
|
|
6
|
+
export type GetFormDefinitionInterfaceNameOptions = GetFormDefinitionClassNameOptions;
|
|
7
|
+
export declare function GetFormDefinitionInterfaceName(options: GetFormDefinitionInterfaceNameOptions): string;
|
|
8
|
+
export type CoerceFormDefinitionClassOptions = GetFormDefinitionClassNameOptions;
|
|
9
|
+
export declare function CoerceFormDefinitionClass(sourceFile: SourceFile, options: CoerceFormDefinitionClassOptions): import("ts-morph").ClassDeclaration;
|
|
10
|
+
export type GetFormDefinitionFileNameOptions = GetFormDefinitionClassNameOptions;
|
|
11
|
+
export declare function GetFormDefinitionFileName({ name }: GetFormDefinitionFileNameOptions): string;
|
|
12
|
+
export type GetFormDefinitionFilePathOptions = GetFormDefinitionFileNameOptions;
|
|
13
|
+
export declare function GetFormDefinitionFilePath(options: GetFormDefinitionFileNameOptions): string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetFormDefinitionFilePath = exports.GetFormDefinitionFileName = exports.CoerceFormDefinitionClass = exports.GetFormDefinitionInterfaceName = exports.GetFormDefinitionClassName = void 0;
|
|
4
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
const coerce_class_1 = require("../coerce-class");
|
|
6
|
+
const utilities_1 = require("@rxap/utilities");
|
|
7
|
+
function GetFormDefinitionClassName({ name }) {
|
|
8
|
+
return (0, schematics_utilities_1.CoerceSuffix)((0, schematics_utilities_1.classify)(name), 'Form');
|
|
9
|
+
}
|
|
10
|
+
exports.GetFormDefinitionClassName = GetFormDefinitionClassName;
|
|
11
|
+
function GetFormDefinitionInterfaceName(options) {
|
|
12
|
+
const className = GetFormDefinitionClassName(options);
|
|
13
|
+
return `I${className}`;
|
|
14
|
+
}
|
|
15
|
+
exports.GetFormDefinitionInterfaceName = GetFormDefinitionInterfaceName;
|
|
16
|
+
function CoerceFormDefinitionClass(sourceFile, options) {
|
|
17
|
+
const className = GetFormDefinitionClassName(options);
|
|
18
|
+
return (0, coerce_class_1.CoerceClass)(sourceFile, className, { isExported: true });
|
|
19
|
+
}
|
|
20
|
+
exports.CoerceFormDefinitionClass = CoerceFormDefinitionClass;
|
|
21
|
+
function GetFormDefinitionFileName({ name }) {
|
|
22
|
+
return (0, schematics_utilities_1.CoerceSuffix)((0, utilities_1.dasherize)(name), '.form.ts');
|
|
23
|
+
}
|
|
24
|
+
exports.GetFormDefinitionFileName = GetFormDefinitionFileName;
|
|
25
|
+
function GetFormDefinitionFilePath(options) {
|
|
26
|
+
return '/' + GetFormDefinitionFileName(options) + '?';
|
|
27
|
+
}
|
|
28
|
+
exports.GetFormDefinitionFilePath = GetFormDefinitionFilePath;
|
|
29
|
+
//# sourceMappingURL=form-definition-utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-definition-utilities.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/form-definition-utilities.ts"],"names":[],"mappings":";;;AAAA,qEAGoC;AAEpC,kDAA8C;AAC9C,+CAA4C;AAM5C,SAAgB,0BAA0B,CAAC,EAAE,IAAI,EAAqC;IACpF,OAAO,IAAA,mCAAY,EAAC,IAAA,+BAAQ,EAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;AAC9C,CAAC;AAFD,gEAEC;AAID,SAAgB,8BAA8B,CAAC,OAA8C;IAC3F,MAAM,SAAS,GAAG,0BAA0B,CAAC,OAAO,CAAC,CAAC;IACtD,OAAO,IAAK,SAAU,EAAE,CAAC;AAC3B,CAAC;AAHD,wEAGC;AAID,SAAgB,yBAAyB,CAAC,UAAsB,EAAE,OAAyC;IACzG,MAAM,SAAS,GAAG,0BAA0B,CAAC,OAAO,CAAC,CAAC;IACtD,OAAO,IAAA,0BAAW,EAAC,UAAU,EAAE,SAAS,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AAClE,CAAC;AAHD,8DAGC;AAID,SAAgB,yBAAyB,CAAC,EAAE,IAAI,EAAoC;IAClF,OAAO,IAAA,mCAAY,EAAC,IAAA,qBAAS,EAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;AACnD,CAAC;AAFD,8DAEC;AAID,SAAgB,yBAAyB,CAAC,OAAyC;IACjF,OAAO,GAAG,GAAG,yBAAyB,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC;AACxD,CAAC;AAFD,8DAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-component-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/get-component-class.ts"],"names":[],"mappings":";;;AAKA,SAAgB,iBAAiB,CAAC,UAAsB;IACtD,MAAM,kBAAkB,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC;IAE9F,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;KACnE;IAED,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AARD,8CAQC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-component-options-object.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/get-component-options-object.ts"],"names":[],"mappings":";;;AAAA,uCAIkB;AAElB,SAAgB,yBAAyB,CAAC,UAAsB;IAG9D,MAAM,kBAAkB,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC;IAE9F,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;KACnE;IAED,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,YAAY,CAAC,WAAW,CAAE,CAAC;IACzE,IAAI,gBAAgB,GAAG,kBAAkB,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;IAE5D,IAAI,CAAC,gBAAgB,EAAE;QACrB,gBAAgB,GAAG,kBAAkB,CAAC,WAAW,CAAC,kBAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;KACvE;IAED,IAAI,CAAC,CAAC,gBAAgB,YAAY,kCAAuB,CAAC,EAAE;QAC1D,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;KAC9E;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AArBD,8DAqBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-ng-module-options-object.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/get-ng-module-options-object.ts"],"names":[],"mappings":";;;AAAA,uCAIkB;AAElB,SAAgB,wBAAwB,CAAC,UAAsB;IAG7D,MAAM,iBAAiB,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC;IAE5F,IAAI,CAAC,iBAAiB,EAAE;QACtB,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;KAClE;IAED,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,YAAY,CAAC,UAAU,CAAE,CAAC;IACtE,IAAI,eAAe,GAAG,iBAAiB,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;IAE1D,IAAI,CAAC,eAAe,EAAE;QACpB,eAAe,GAAG,iBAAiB,CAAC,WAAW,CAAC,kBAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;KACrE;IAED,IAAI,CAAC,CAAC,eAAe,YAAY,kCAAuB,CAAC,EAAE;QACzD,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;KAC7E;IAED,OAAO,eAAe,CAAC;AACzB,CAAC;AArBD,4DAqBC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ToValueContext } from './to-value-context';
|
|
2
1
|
import { SourceFile } from 'ts-morph';
|
|
2
|
+
import { ToValueContext } from '../to-value-context';
|
|
3
3
|
export interface HandleComponentModule {
|
|
4
4
|
handleComponentModule(context: ToValueContext & {
|
|
5
5
|
sourceFile: SourceFile;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handle-component-module.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/handle-component-module.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handle-component.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/handle-component.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
-
export
|
|
2
|
+
export interface HasAccordionComponentOptions {
|
|
3
3
|
accordionName: string;
|
|
4
4
|
project: string;
|
|
5
|
-
feature
|
|
6
|
-
}
|
|
5
|
+
feature?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function HasAccordionComponent(host: Tree, options: HasAccordionComponentOptions): boolean;
|
|
@@ -14,7 +14,12 @@ function HasAccordionComponent(host, options) {
|
|
|
14
14
|
throw new schematics_1.SchematicsException(`The accordion component '${accordionName}' does not exists. The project '${project}' has not the feature does not exists.`);
|
|
15
15
|
}
|
|
16
16
|
const projectSourceRoot = (0, schematics_utilities_1.GetProjectSourceRoot)(host, options.project);
|
|
17
|
-
|
|
17
|
+
if (feature) {
|
|
18
|
+
return host.exists((0, path_1.join)(projectSourceRoot, 'feature', feature, accordionName, accordionName + '.component.ts'));
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
return host.exists((0, path_1.join)(projectSourceRoot, 'app', accordionName, accordionName + '.component.ts'));
|
|
22
|
+
}
|
|
18
23
|
}
|
|
19
24
|
exports.HasAccordionComponent = HasAccordionComponent;
|
|
20
25
|
//# sourceMappingURL=has-accordion-component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"has-accordion-component.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/has-accordion-component.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,qEAGoC;AACpC,+DAA0D;AAC1D,+BAA4B;
|
|
1
|
+
{"version":3,"file":"has-accordion-component.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/has-accordion-component.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,qEAGoC;AACpC,+DAA0D;AAC1D,+BAA4B;AAQ5B,SAAgB,qBAAqB,CACnC,IAAU,EACV,OAAqC;IAErC,MAAM,EACJ,aAAa,EACb,OAAO,EACP,OAAO,GACR,GAAG,OAAO,CAAC;IACZ,IAAI,CAAC,IAAA,iCAAU,EAAC,IAAI,EAAE,OAAO,CAAC,EAAE;QAC9B,MAAM,IAAI,gCAAmB,CAAC,4BAA6B,aAAc,mCAAoC,OAAQ,oBAAoB,CAAC,CAAC;KAC5I;IACD,IAAI,CAAC,IAAA,uCAAiB,EAAC,IAAI,EAAE,OAAO,CAAC,EAAE;QACrC,MAAM,IAAI,gCAAmB,CAAC,4BAA6B,aAAc,mCAAoC,OAAQ,wCAAwC,CAAC,CAAC;KAChK;IACD,MAAM,iBAAiB,GAAG,IAAA,2CAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACtE,IAAI,OAAO,EAAE;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,IAAA,WAAI,EAAC,iBAAiB,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,GAAG,eAAe,CAAC,CAAC,CAAC;KACjH;SAAM;QACL,OAAO,IAAI,CAAC,MAAM,CAAC,IAAA,WAAI,EAAC,iBAAiB,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,GAAG,eAAe,CAAC,CAAC,CAAC;KACpG;AACH,CAAC;AArBD,sDAqBC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Tree } from '@angular-devkit/schematics';
|
|
2
2
|
export interface HasComponentOptions {
|
|
3
3
|
project: string;
|
|
4
|
-
feature
|
|
4
|
+
feature?: string | null;
|
|
5
5
|
name: string;
|
|
6
|
-
directory?: string;
|
|
6
|
+
directory?: string | null;
|
|
7
7
|
}
|
|
8
8
|
export declare function HasComponent(host: Tree, options: Readonly<HasComponentOptions>): boolean;
|
|
@@ -19,8 +19,8 @@ function HasComponent(host, options) {
|
|
|
19
19
|
if (!basePath.endsWith(name)) {
|
|
20
20
|
basePath = (0, path_1.join)(basePath, name);
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const fullPath = (0, path_1.join)(basePath, name + '.component.ts');
|
|
23
|
+
return host.exists(fullPath);
|
|
24
24
|
}
|
|
25
25
|
exports.HasComponent = HasComponent;
|
|
26
26
|
//# sourceMappingURL=has-component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"has-component.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/has-component.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,qEAGoC;AACpC,+DAA0D;AAC1D,+BAA4B;AAC5B,uEAAiE;AASjE,SAAgB,YAAY,CAAC,IAAU,EAAE,OAAsC;IAC7E,MAAM,EACJ,OAAO,EACP,OAAO,EACP,IAAI,GACL,GAAG,OAAO,CAAC;IAEZ,IAAI,CAAC,IAAA,iCAAU,EAAC,IAAI,EAAE,OAAO,CAAC,EAAE;QAC9B,MAAM,IAAI,gCAAmB,CAAC,kBAAmB,IAAK,mCAAoC,OAAQ,oBAAoB,CAAC,CAAC;KACzH;IACD,MAAM,IAAI,GAAG,IAAA,qCAAc,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3C,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,IAAA,uCAAiB,EAAC,IAAI,EAAE,OAAO,CAAC,EAAE;QAC3D,MAAM,IAAI,gCAAmB,CAAC,kBAAmB,IAAK,mCAAoC,OAAQ,0BAA2B,OAAQ,IAAI,CAAC,CAAC;KAC5I;IACD,IAAI,QAAQ,GAAG,IAAA,8CAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QAC5B,QAAQ,GAAG,IAAA,WAAI,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;KACjC;IACD,
|
|
1
|
+
{"version":3,"file":"has-component.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/has-component.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,qEAGoC;AACpC,+DAA0D;AAC1D,+BAA4B;AAC5B,uEAAiE;AASjE,SAAgB,YAAY,CAAC,IAAU,EAAE,OAAsC;IAC7E,MAAM,EACJ,OAAO,EACP,OAAO,EACP,IAAI,GACL,GAAG,OAAO,CAAC;IAEZ,IAAI,CAAC,IAAA,iCAAU,EAAC,IAAI,EAAE,OAAO,CAAC,EAAE;QAC9B,MAAM,IAAI,gCAAmB,CAAC,kBAAmB,IAAK,mCAAoC,OAAQ,oBAAoB,CAAC,CAAC;KACzH;IACD,MAAM,IAAI,GAAG,IAAA,qCAAc,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3C,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,IAAA,uCAAiB,EAAC,IAAI,EAAE,OAAO,CAAC,EAAE;QAC3D,MAAM,IAAI,gCAAmB,CAAC,kBAAmB,IAAK,mCAAoC,OAAQ,0BAA2B,OAAQ,IAAI,CAAC,CAAC;KAC5I;IACD,IAAI,QAAQ,GAAG,IAAA,8CAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QAC5B,QAAQ,GAAG,IAAA,WAAI,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;KACjC;IACD,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,QAAQ,EAAE,IAAI,GAAG,eAAe,CAAC,CAAC;IACxD,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAE/B,CAAC;AArBD,oCAqBC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
+
import { HasComponentOptions } from './has-component';
|
|
3
|
+
export interface HasDialogComponentOptions extends HasComponentOptions {
|
|
4
|
+
}
|
|
5
|
+
export declare function HasDialogComponent(host: Tree, options: HasDialogComponentOptions): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HasDialogComponent = void 0;
|
|
4
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
const has_component_1 = require("./has-component");
|
|
6
|
+
function HasDialogComponent(host, options) {
|
|
7
|
+
let { name, project, feature, directory, } = options;
|
|
8
|
+
name !== null && name !== void 0 ? name : (name = (0, schematics_utilities_1.CoerceSuffix)(name, '-dialog'));
|
|
9
|
+
return (0, has_component_1.HasComponent)(host, {
|
|
10
|
+
project,
|
|
11
|
+
feature,
|
|
12
|
+
name: name,
|
|
13
|
+
directory,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
exports.HasDialogComponent = HasDialogComponent;
|
|
17
|
+
//# sourceMappingURL=has-dialog-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"has-dialog-component.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/has-dialog-component.ts"],"names":[],"mappings":";;;AACA,qEAA0D;AAC1D,mDAGyB;AAMzB,SAAgB,kBAAkB,CAChC,IAAU,EACV,OAAkC;IAElC,IAAI,EACF,IAAI,EACJ,OAAO,EACP,OAAO,EACP,SAAS,GACV,GAAG,OAAO,CAAC;IACZ,IAAI,aAAJ,IAAI,cAAJ,IAAI,IAAJ,IAAI,GAAK,IAAA,mCAAY,EAAC,IAAI,EAAE,SAAS,CAAC,EAAC;IACvC,OAAO,IAAA,4BAAY,EAAC,IAAI,EAAE;QACxB,OAAO;QACP,OAAO;QACP,IAAI,EAAE,IAAI;QACV,SAAS;KACV,CAAC,CAAC;AACL,CAAC;AAjBD,gDAiBC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
-
export
|
|
2
|
+
export interface HasProjectFeatureOptions {
|
|
3
3
|
project: string;
|
|
4
|
-
feature
|
|
5
|
-
}
|
|
4
|
+
feature?: string | null;
|
|
5
|
+
}
|
|
6
|
+
export declare function HasProjectFeature(host: Tree, { project, feature, }: HasProjectFeatureOptions): boolean;
|
|
@@ -5,11 +5,15 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
5
5
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
6
6
|
const path_1 = require("path");
|
|
7
7
|
function HasProjectFeature(host, { project, feature, }) {
|
|
8
|
+
if (!feature) {
|
|
9
|
+
throw new schematics_1.SchematicsException(`The feature option is not set. Can not determine if the project '${project}' has the feature.`);
|
|
10
|
+
}
|
|
8
11
|
if (!(0, schematics_utilities_1.HasProject)(host, project)) {
|
|
9
12
|
throw new schematics_1.SchematicsException(`The feature '${feature}' does not exists. The project '${project}' does not exists.`);
|
|
10
13
|
}
|
|
11
14
|
const projectSourceRoot = (0, schematics_utilities_1.GetProjectSourceRoot)(host, project);
|
|
12
|
-
return host.exists((0, path_1.join)(projectSourceRoot, `feature/${feature}/index.ts`))
|
|
15
|
+
return host.exists((0, path_1.join)(projectSourceRoot, `feature/${feature}/index.ts`)) ||
|
|
16
|
+
host.exists((0, path_1.join)(projectSourceRoot, `feature/${feature}/routes.ts`));
|
|
13
17
|
}
|
|
14
18
|
exports.HasProjectFeature = HasProjectFeature;
|
|
15
19
|
//# sourceMappingURL=has-project-feature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"has-project-feature.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/has-project-feature.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,qEAGoC;AACpC,+BAA4B;
|
|
1
|
+
{"version":3,"file":"has-project-feature.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/has-project-feature.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,qEAGoC;AACpC,+BAA4B;AAO5B,SAAgB,iBAAiB,CAC/B,IAAU,EACV,EACE,OAAO,EACP,OAAO,GACkB;IAE3B,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,gCAAmB,CAAC,oEAAqE,OAAQ,oBAAoB,CAAC,CAAC;KAClI;IACD,IAAI,CAAC,IAAA,iCAAU,EAAC,IAAI,EAAE,OAAO,CAAC,EAAE;QAC9B,MAAM,IAAI,gCAAmB,CAAC,gBAAiB,OAAQ,mCAAoC,OAAQ,oBAAoB,CAAC,CAAC;KAC1H;IACD,MAAM,iBAAiB,GAAG,IAAA,2CAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9D,OAAO,IAAI,CAAC,MAAM,CAAC,IAAA,WAAI,EAAC,iBAAiB,EAAE,WAAY,OAAQ,WAAW,CAAC,CAAC;QAC1E,IAAI,CAAC,MAAM,CAAC,IAAA,WAAI,EAAC,iBAAiB,EAAE,WAAY,OAAQ,YAAY,CAAC,CAAC,CAAC;AAC3E,CAAC;AAhBD,8CAgBC"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
feature: string;
|
|
5
|
-
name: string;
|
|
6
|
-
directory?: string;
|
|
2
|
+
import { HasComponentOptions } from './has-component';
|
|
3
|
+
export interface HasTableComponentOptions extends HasComponentOptions {
|
|
7
4
|
}
|
|
8
5
|
export declare function HasTableComponent(host: Tree, options: HasTableComponentOptions): boolean;
|
|
@@ -4,8 +4,10 @@ exports.HasTableComponent = void 0;
|
|
|
4
4
|
const has_component_1 = require("./has-component");
|
|
5
5
|
const build_angular_base_path_1 = require("./build-angular-base-path");
|
|
6
6
|
const path_1 = require("path");
|
|
7
|
+
const utilities_1 = require("@rxap/utilities");
|
|
7
8
|
function HasTableComponent(host, options) {
|
|
8
|
-
|
|
9
|
+
let { name } = options;
|
|
10
|
+
name = (0, utilities_1.CoerceSuffix)(name, '-table');
|
|
9
11
|
if (!(0, has_component_1.HasComponent)(host, options)) {
|
|
10
12
|
return false;
|
|
11
13
|
}
|
|
@@ -13,7 +15,8 @@ function HasTableComponent(host, options) {
|
|
|
13
15
|
if (!basePath.endsWith(name)) {
|
|
14
16
|
basePath = (0, path_1.join)(basePath, name);
|
|
15
17
|
}
|
|
16
|
-
|
|
18
|
+
const fullPath = (0, path_1.join)(basePath, name + '.ts');
|
|
19
|
+
return host.exists(fullPath);
|
|
17
20
|
}
|
|
18
21
|
exports.HasTableComponent = HasTableComponent;
|
|
19
22
|
//# sourceMappingURL=has-table-component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"has-table-component.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/has-table-component.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"has-table-component.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/angular/has-table-component.ts"],"names":[],"mappings":";;;AACA,mDAGyB;AACzB,uEAAiE;AACjE,+BAA4B;AAC5B,+CAA+C;AAK/C,SAAgB,iBAAiB,CAAC,IAAU,EAAE,OAAiC;IAC7E,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IACvB,IAAI,GAAG,IAAA,wBAAY,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACpC,IAAI,CAAC,IAAA,4BAAY,EAAC,IAAI,EAAE,OAAO,CAAC,EAAE;QAChC,OAAO,KAAK,CAAC;KACd;IAED,IAAI,QAAQ,GAAG,IAAA,8CAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QAC5B,QAAQ,GAAG,IAAA,WAAI,EAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;KACjC;IACD,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,QAAQ,EAAE,IAAI,GAAG,KAAK,CAAC,CAAC;IAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC;AAbD,8CAaC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { OptionalKind, SourceFile, VariableDeclaration, VariableDeclarationStructure } from 'ts-morph';
|
|
2
|
-
export declare function CoerceVariableDeclaration(sourceFile: SourceFile, name: string, defaultDeclaration
|
|
1
|
+
import { OptionalKind, SourceFile, VariableDeclaration, VariableDeclarationStructure, VariableStatementStructure } from 'ts-morph';
|
|
2
|
+
export declare function CoerceVariableDeclaration(sourceFile: SourceFile, name: string, defaultDeclaration?: Omit<OptionalKind<VariableDeclarationStructure>, 'name'>, variableStatementStructure?: Partial<Omit<OptionalKind<VariableStatementStructure>, 'declarations'>>): VariableDeclaration;
|
|
@@ -2,15 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoerceVariableDeclaration = void 0;
|
|
4
4
|
const ts_morph_1 = require("ts-morph");
|
|
5
|
-
function CoerceVariableDeclaration(sourceFile, name, defaultDeclaration) {
|
|
5
|
+
function CoerceVariableDeclaration(sourceFile, name, defaultDeclaration = {}, variableStatementStructure) {
|
|
6
|
+
var _a, _b;
|
|
6
7
|
const declaration = Object.assign(Object.assign({}, defaultDeclaration), { name });
|
|
7
8
|
let variableStatement = sourceFile.getVariableStatement(name);
|
|
8
9
|
if (!variableStatement) {
|
|
9
|
-
|
|
10
|
+
variableStatementStructure !== null && variableStatementStructure !== void 0 ? variableStatementStructure : (variableStatementStructure = {
|
|
10
11
|
isExported: true,
|
|
11
12
|
declarationKind: ts_morph_1.VariableDeclarationKind.Const,
|
|
12
|
-
declarations: [declaration],
|
|
13
13
|
});
|
|
14
|
+
(_a = variableStatementStructure.isExported) !== null && _a !== void 0 ? _a : (variableStatementStructure.isExported = true);
|
|
15
|
+
(_b = variableStatementStructure.declarationKind) !== null && _b !== void 0 ? _b : (variableStatementStructure.declarationKind = ts_morph_1.VariableDeclarationKind.Const);
|
|
16
|
+
variableStatement = sourceFile.addVariableStatement(Object.assign(Object.assign({}, variableStatementStructure), { declarations: [declaration] }));
|
|
14
17
|
}
|
|
15
18
|
let variableDeclaration = variableStatement.getDeclarations()[0];
|
|
16
19
|
if (!variableDeclaration) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-variable-declaration.js","sourceRoot":"","sources":["../../../../../../packages/schematic/ts-morph/src/lib/coerce-variable-declaration.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"coerce-variable-declaration.js","sourceRoot":"","sources":["../../../../../../packages/schematic/ts-morph/src/lib/coerce-variable-declaration.ts"],"names":[],"mappings":";;;AAAA,uCAOkB;AAElB,SAAgB,yBAAyB,CACvC,UAAsB,EACtB,IAAY,EACZ,qBAA+E,EAAE,EACjF,0BAAoG;;IAGpG,MAAM,WAAW,mCACZ,kBAAkB,KACrB,IAAI,GACL,CAAC;IAEF,IAAI,iBAAiB,GAAG,UAAU,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC9D,IAAI,CAAC,iBAAiB,EAAE;QACtB,0BAA0B,aAA1B,0BAA0B,cAA1B,0BAA0B,IAA1B,0BAA0B,GAAK;YAC7B,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,kCAAuB,CAAC,KAAK;SAC/C,EAAC;QACF,MAAA,0BAA0B,CAAC,UAAU,oCAArC,0BAA0B,CAAC,UAAU,GAAK,IAAI,EAAC;QAC/C,MAAA,0BAA0B,CAAC,eAAe,oCAA1C,0BAA0B,CAAC,eAAe,GAAK,kCAAuB,CAAC,KAAK,EAAC;QAC7E,iBAAiB,GAAG,UAAU,CAAC,oBAAoB,iCAC9C,0BAA0B,KAC7B,YAAY,EAAE,CAAE,WAAW,CAAE,IAC7B,CAAC;KACJ;IAED,IAAI,mBAAmB,GAAG,iBAAiB,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC;IAEjE,IAAI,CAAC,mBAAmB,EAAE;QACxB,mBAAmB,GAAG,iBAAiB,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;KACrE;IAED,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAjCD,8DAiCC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AddToFormProviders = exports.GetFormProvidersFile = void 0;
|
|
4
4
|
const add_to_array_1 = require("./add-to-array");
|
|
5
|
-
const
|
|
5
|
+
const coerce_imports_1 = require("./ts-morph/coerce-imports");
|
|
6
6
|
function GetFormProvidersFile(project) {
|
|
7
7
|
var _a;
|
|
8
8
|
const formProviderSourceFilePath = 'form.providers';
|
|
@@ -11,7 +11,7 @@ function GetFormProvidersFile(project) {
|
|
|
11
11
|
exports.GetFormProvidersFile = GetFormProvidersFile;
|
|
12
12
|
function AddToFormProviders(project, value, overwrite = false) {
|
|
13
13
|
const sourceFile = GetFormProvidersFile(project);
|
|
14
|
-
(0,
|
|
14
|
+
(0, coerce_imports_1.CoerceImports)(sourceFile, {
|
|
15
15
|
moduleSpecifier: '@angular/core',
|
|
16
16
|
namedImports: ['Provider'],
|
|
17
17
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-form-providers-source-file.js","sourceRoot":"","sources":["../../../../../../packages/schematic/ts-morph/src/lib/get-form-providers-source-file.ts"],"names":[],"mappings":";;;AAIA,iDAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"get-form-providers-source-file.js","sourceRoot":"","sources":["../../../../../../packages/schematic/ts-morph/src/lib/get-form-providers-source-file.ts"],"names":[],"mappings":";;;AAIA,iDAA4C;AAC5C,8DAA0D;AAE1D,SAAgB,oBAAoB,CAAC,OAAgB;;IACnD,MAAM,0BAA0B,GAAG,gBAAgB,CAAC;IACpD,OAAO,MAAA,OAAO,CAAC,aAAa,CAAC,0BAA0B,GAAG,KAAK,CAAC,mCAC9D,OAAO,CAAC,gBAAgB,CAAC,0BAA0B,GAAG,KAAK,CAAC,CAAC;AACjE,CAAC;AAJD,oDAIC;AAED,SAAgB,kBAAkB,CAAC,OAAgB,EAAE,KAAa,EAAE,SAAS,GAAG,KAAK;IACnF,MAAM,UAAU,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACjD,IAAA,8BAAa,EAAC,UAAU,EAAE;QACxB,eAAe,EAAE,eAAe;QAChC,YAAY,EAAE,CAAE,UAAU,CAAE;KAC7B,CAAC,CAAC;IACH,IAAA,yBAAU,EAAC,UAAU,EAAE,eAAe,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;IACxE,OAAO,UAAU,CAAC;AACpB,CAAC;AARD,gDAQC"}
|
|
@@ -6,7 +6,7 @@ const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
|
6
6
|
const coerce_source_file_1 = require("../coerce-source-file");
|
|
7
7
|
const find_nest_module_source_file_1 = require("./find-nest-module-source-file");
|
|
8
8
|
const add_nest_module_controller_1 = require("./add-nest-module-controller");
|
|
9
|
-
const
|
|
9
|
+
const coerce_imports_1 = require("../ts-morph/coerce-imports");
|
|
10
10
|
function AddNestController(project, name, options = {}) {
|
|
11
11
|
var _a, _b;
|
|
12
12
|
const sourceFile = (_a = options.sourceFile) !== null && _a !== void 0 ? _a : (0, coerce_source_file_1.CoerceSourceFile)(project, `${(0, schematics_utilities_1.dasherize)(name)}.controller.ts`);
|
|
@@ -20,7 +20,7 @@ function AddNestController(project, name, options = {}) {
|
|
|
20
20
|
},
|
|
21
21
|
],
|
|
22
22
|
});
|
|
23
|
-
(0,
|
|
23
|
+
(0, coerce_imports_1.CoerceImports)(sourceFile, {
|
|
24
24
|
namedImports: ['Controller'],
|
|
25
25
|
moduleSpecifier: '@nestjs/common',
|
|
26
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-nest-controller.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/add-nest-controller.ts"],"names":[],"mappings":";;;AAIA,kDAA8C;AAC9C,qEAIoC;AACpC,8DAAyD;AACzD,iFAA0E;AAC1E,6EAAuE;AACvE
|
|
1
|
+
{"version":3,"file":"add-nest-controller.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/add-nest-controller.ts"],"names":[],"mappings":";;;AAIA,kDAA8C;AAC9C,qEAIoC;AACpC,8DAAyD;AACzD,iFAA0E;AAC1E,6EAAuE;AACvE,+DAA2D;AAS3D,SAAgB,iBAAiB,CAC/B,OAAgB,EAChB,IAAY,EACZ,UAAoC,EAAE;;IAGtC,MAAM,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,IAAA,qCAAgB,EAAC,OAAO,EAAE,GAAI,IAAA,gCAAS,EAAC,IAAI,CAAE,gBAAgB,CAAC,CAAC;IAEzG,MAAM,eAAe,GAAG,IAAA,mCAAY,EAAC,IAAA,+BAAQ,EAAC,IAAI,CAAC,EAAE,YAAY,CAAC,CAAC;IAEnE,IAAA,0BAAW,EACT,UAAU,EACV,eAAe,EACf;QACE,UAAU,EAAE,IAAI;QAChB,UAAU,EAAE;YACV;gBACE,IAAI,EAAE,YAAY;gBAClB,SAAS,EAAE,CAAE,CAAC,CAAC,EAAE,WAAC,OAAA,CAAC,CAAC,KAAK,CAAC,MAAA,OAAO,CAAC,MAAM,mCAAI,IAAA,gCAAS,EAAC,IAAI,CAAC,CAAC,CAAA,EAAA,CAAE;aAC/D;SACF;KACF,CACF,CAAC;IAEF,IAAA,8BAAa,EAAC,UAAU,EAAE;QACxB,YAAY,EAAE,CAAE,YAAY,CAAE;QAC9B,eAAe,EAAE,gBAAgB;KAClC,CAAC,CAAC;IAEH,IAAI,OAAO,CAAC,WAAW,KAAK,KAAK,EAAE;QAEjC,MAAM,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,UAAU,CAAC,gBAAgB,EAAE,CAAC;QAEvE,IAAI,gBAAwC,CAAC;QAE7C,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;YAC7B,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC,UAAU,CAAE,CAAC;SACvD;aAAM;YACL,gBAAgB,GAAG,IAAA,uDAAwB,EAAC,OAAO,EAAE,UAAU,CAAC,CAAC;SAClE;QAED,IAAI,CAAC,gBAAgB,EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,kCAAmC,UAAW,GAAG,CAAC,CAAC;SACpE;QAED,IAAA,oDAAuB,EACrB,gBAAgB,EAChB,eAAe,EACf;YACE;gBACE,YAAY,EAAE,CAAE,eAAe,CAAE;gBACjC,eAAe,EAAE,IAAI,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;aAC5F;SACF,CACF,CAAC;KAEH;IAED,OAAO,UAAU,CAAC;AAEpB,CAAC;AA5DD,8CA4DC"}
|
|
@@ -4,9 +4,9 @@ exports.AddNestModuleController = void 0;
|
|
|
4
4
|
const get_coerce_array_literal_form_object_literal_1 = require("../get-coerce-array-literal-form-object-literal");
|
|
5
5
|
const get_nest_module_metadata_1 = require("./get-nest-module-metadata");
|
|
6
6
|
const add_nest_provider_to_array_1 = require("./add-nest-provider-to-array");
|
|
7
|
-
const
|
|
7
|
+
const coerce_imports_1 = require("../ts-morph/coerce-imports");
|
|
8
8
|
function AddNestModuleController(sourceFile, controller, structures = [], overwrite = false) {
|
|
9
|
-
(0,
|
|
9
|
+
(0, coerce_imports_1.CoerceImports)(sourceFile, structures);
|
|
10
10
|
const metadata = (0, get_nest_module_metadata_1.GetNestModuleMetadata)(sourceFile);
|
|
11
11
|
const providerArray = (0, get_coerce_array_literal_form_object_literal_1.GetCoerceArrayLiteralFromObjectLiteral)(metadata, 'controllers');
|
|
12
12
|
(0, add_nest_provider_to_array_1.AddNestProviderToArray)(controller, providerArray, overwrite);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-nest-module-controller.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/add-nest-module-controller.ts"],"names":[],"mappings":";;;AAKA,kHAAyG;AACzG,yEAAmE;AACnE,6EAAsE;AACtE
|
|
1
|
+
{"version":3,"file":"add-nest-module-controller.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/add-nest-module-controller.ts"],"names":[],"mappings":";;;AAKA,kHAAyG;AACzG,yEAAmE;AACnE,6EAAsE;AACtE,+DAA2D;AAE3D,SAAgB,uBAAuB,CACrC,UAAsB,EACtB,UAAkB,EAClB,aAAsE,EAAE,EACxE,SAAS,GAAG,KAAK;IAGjB,IAAA,8BAAa,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAEtC,MAAM,QAAQ,GAAG,IAAA,gDAAqB,EAAC,UAAU,CAAC,CAAC;IAEnD,MAAM,aAAa,GAAG,IAAA,qFAAsC,EAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAEtF,IAAA,mDAAsB,EAAC,UAAU,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;AAE/D,CAAC;AAfD,0DAeC"}
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AddNestModuleImport = void 0;
|
|
4
4
|
const get_nest_module_metadata_1 = require("./get-nest-module-metadata");
|
|
5
5
|
const get_coerce_array_literal_form_object_literal_1 = require("../get-coerce-array-literal-form-object-literal");
|
|
6
|
-
const
|
|
6
|
+
const coerce_imports_1 = require("../ts-morph/coerce-imports");
|
|
7
7
|
function AddNestModuleImport(sourceFile, moduleName, structures = [], importWriter, overwrite = false) {
|
|
8
|
-
(0,
|
|
8
|
+
(0, coerce_imports_1.CoerceImports)(sourceFile, structures);
|
|
9
9
|
const metadata = (0, get_nest_module_metadata_1.GetNestModuleMetadata)(sourceFile);
|
|
10
10
|
const importsArray = (0, get_coerce_array_literal_form_object_literal_1.GetCoerceArrayLiteralFromObjectLiteral)(metadata, 'imports');
|
|
11
11
|
const hasModule = importsArray.getElements().find(element => element.getFullText().trim().startsWith(moduleName));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-nest-module-import.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/add-nest-module-import.ts"],"names":[],"mappings":";;;AAMA,yEAAmE;AACnE,kHAAyG;AACzG
|
|
1
|
+
{"version":3,"file":"add-nest-module-import.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/add-nest-module-import.ts"],"names":[],"mappings":";;;AAMA,yEAAmE;AACnE,kHAAyG;AACzG,+DAA2D;AAE3D,SAAgB,mBAAmB,CACjC,UAAsB,EACtB,UAAkB,EAClB,aAAsE,EAAE,EACxE,YAA6B,EAC7B,SAAS,GAAG,KAAK;IAGjB,IAAA,8BAAa,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAEtC,MAAM,QAAQ,GAAG,IAAA,gDAAqB,EAAC,UAAU,CAAC,CAAC;IAEnD,MAAM,YAAY,GAAG,IAAA,qFAAsC,EAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAEjF,MAAM,SAAS,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;IAElH,IAAI,CAAC,SAAS,IAAI,SAAS,EAAE;QAE3B,IAAI,SAAS,EAAE;YACb,YAAY,CAAC,aAAa,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,CAAC;SACvD;QAED,YAAY,CAAC,UAAU,CAAC,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,UAAU,CAAC,CAAC;KAErD;AAEH,CAAC;AA1BD,kDA0BC"}
|
|
@@ -4,9 +4,9 @@ exports.AddNestModuleProvider = void 0;
|
|
|
4
4
|
const get_coerce_array_literal_form_object_literal_1 = require("../get-coerce-array-literal-form-object-literal");
|
|
5
5
|
const get_nest_module_metadata_1 = require("./get-nest-module-metadata");
|
|
6
6
|
const add_nest_provider_to_array_1 = require("./add-nest-provider-to-array");
|
|
7
|
-
const
|
|
7
|
+
const coerce_imports_1 = require("../ts-morph/coerce-imports");
|
|
8
8
|
function AddNestModuleProvider(sourceFile, providerObject, structures = [], overwrite = false) {
|
|
9
|
-
(0,
|
|
9
|
+
(0, coerce_imports_1.CoerceImports)(sourceFile, structures);
|
|
10
10
|
const metadata = (0, get_nest_module_metadata_1.GetNestModuleMetadata)(sourceFile);
|
|
11
11
|
const providerArray = (0, get_coerce_array_literal_form_object_literal_1.GetCoerceArrayLiteralFromObjectLiteral)(metadata, 'providers');
|
|
12
12
|
(0, add_nest_provider_to_array_1.AddNestProviderToArray)(providerObject, providerArray, overwrite);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-nest-module-provider.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/add-nest-module-provider.ts"],"names":[],"mappings":";;;AAKA,kHAAyG;AACzG,yEAAmE;AACnE,6EAAsE;AAEtE
|
|
1
|
+
{"version":3,"file":"add-nest-module-provider.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/add-nest-module-provider.ts"],"names":[],"mappings":";;;AAKA,kHAAyG;AACzG,yEAAmE;AACnE,6EAAsE;AAEtE,+DAA2D;AAE3D,SAAgB,qBAAqB,CACnC,UAAsB,EACtB,cAA2C,EAC3C,aAAsE,EAAE,EACxE,SAAS,GAAG,KAAK;IAGjB,IAAA,8BAAa,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAEtC,MAAM,QAAQ,GAAG,IAAA,gDAAqB,EAAC,UAAU,CAAC,CAAC;IAEnD,MAAM,aAAa,GAAG,IAAA,qFAAsC,EAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAEpF,IAAA,mDAAsB,EAAC,cAAc,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;AAEnE,CAAC;AAfD,sDAeC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
feature?: string;
|
|
5
|
-
shared?: boolean;
|
|
2
|
+
import { TsMorphNestProjectTransformOptions } from '../ts-morph-transform';
|
|
3
|
+
export interface AddNestModuleToAppModuleOptions extends TsMorphNestProjectTransformOptions {
|
|
6
4
|
name: string;
|
|
5
|
+
appModulePath?: string;
|
|
7
6
|
}
|
|
8
7
|
export declare function AddNestModuleToAppModule(options: AddNestModuleToAppModuleOptions): Rule;
|
|
@@ -2,19 +2,29 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AddNestModuleToAppModule = void 0;
|
|
4
4
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
const path_1 = require("path");
|
|
5
6
|
const ts_morph_transform_1 = require("../ts-morph-transform");
|
|
6
7
|
const add_nest_module_import_1 = require("./add-nest-module-import");
|
|
8
|
+
const DEFAULT_APP_MODULE_PATH = '/app/app.module.ts';
|
|
7
9
|
function AddNestModuleToAppModule(options) {
|
|
8
|
-
const { name } = options;
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
const { project, feature, shared, name, directory } = options;
|
|
11
|
+
let { appModulePath } = options;
|
|
12
|
+
appModulePath !== null && appModulePath !== void 0 ? appModulePath : (appModulePath = DEFAULT_APP_MODULE_PATH);
|
|
13
|
+
return (0, ts_morph_transform_1.TsMorphNestProjectTransformRule)({
|
|
14
|
+
project,
|
|
15
|
+
feature,
|
|
16
|
+
shared,
|
|
17
|
+
}, (project, [sourceFile]) => {
|
|
18
|
+
const cleanAppModulePath = (0, path_1.dirname)(appModulePath.replace(/^\//, ''));
|
|
19
|
+
const modulePath = (0, path_1.join)(directory !== null && directory !== void 0 ? directory : '', name + '.module');
|
|
20
|
+
const relativePath = (0, path_1.relative)(cleanAppModulePath, modulePath);
|
|
11
21
|
(0, add_nest_module_import_1.AddNestModuleImport)(sourceFile, (0, schematics_utilities_1.classify)(name) + 'Module', [
|
|
12
22
|
{
|
|
13
23
|
namedImports: [(0, schematics_utilities_1.classify)(name) + 'Module'],
|
|
14
|
-
moduleSpecifier:
|
|
24
|
+
moduleSpecifier: relativePath,
|
|
15
25
|
},
|
|
16
26
|
]);
|
|
17
|
-
});
|
|
27
|
+
}, [appModulePath]);
|
|
18
28
|
}
|
|
19
29
|
exports.AddNestModuleToAppModule = AddNestModuleToAppModule;
|
|
20
30
|
//# sourceMappingURL=add-nest-module-to-app-module.js.map
|