@rxap/schematics-ts-morph 16.0.1-dev.1 → 16.1.0-dev.1
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 +27 -0
- package/README.md +1 -1
- package/package.json +8 -8
- package/src/lib/angular/add-component-import.d.ts +9 -0
- package/src/lib/angular/add-component-import.js +9 -0
- package/src/lib/angular/add-component-import.js.map +1 -1
- package/src/lib/angular/add-component-input.d.ts +2 -1
- package/src/lib/angular/add-component-input.js +4 -3
- package/src/lib/angular/add-component-input.js.map +1 -1
- package/src/lib/angular/coerce-component-class.d.ts +2 -2
- package/src/lib/angular/coerce-component-class.js +2 -2
- package/src/lib/angular/coerce-component-class.js.map +1 -1
- package/src/lib/angular/coerce-component.js +4 -24
- package/src/lib/angular/coerce-component.js.map +1 -1
- package/src/lib/angular/coerce-form-definition-control.js +7 -3
- package/src/lib/angular/coerce-form-definition-control.js.map +1 -1
- package/src/lib/angular/coerce-form-definition.js +0 -8
- package/src/lib/angular/coerce-form-definition.js.map +1 -1
- package/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.js +1 -5
- package/src/lib/angular/coerce-tree-table-root-proxy-remote-method-class.js.map +1 -1
- package/src/lib/nest/add-operation-to-controller.d.ts +2 -1
- package/src/lib/nest/add-operation-to-controller.js +20 -19
- package/src/lib/nest/add-operation-to-controller.js.map +1 -1
- package/src/lib/nest/coerce-dto-class.d.ts +4 -1
- package/src/lib/nest/coerce-dto-class.js +34 -25
- package/src/lib/nest/coerce-dto-class.js.map +1 -1
- package/src/lib/nest/coerce-form-submit-operation.d.ts +1 -1
- package/src/lib/nest/coerce-form-submit-operation.js +1 -4
- package/src/lib/nest/coerce-form-submit-operation.js.map +1 -1
- package/src/lib/nest/coerce-get-by-id-operation.d.ts +2 -0
- package/src/lib/nest/coerce-get-by-id-operation.js +14 -15
- package/src/lib/nest/coerce-get-by-id-operation.js.map +1 -1
- package/src/lib/nest/coerce-get-children-operation.d.ts +2 -2
- package/src/lib/nest/coerce-get-children-operation.js +17 -20
- package/src/lib/nest/coerce-get-children-operation.js.map +1 -1
- package/src/lib/nest/coerce-get-page-operation.d.ts +1 -1
- package/src/lib/nest/coerce-get-root-operation.d.ts +4 -1
- package/src/lib/nest/coerce-get-root-operation.js +17 -19
- package/src/lib/nest/coerce-get-root-operation.js.map +1 -1
- package/src/lib/nest/coerce-options-operation.js +2 -2
- package/src/lib/nest/coerce-options-operation.js.map +1 -1
- package/src/lib/nest/create-dto-class.d.ts +10 -5
- package/src/lib/nest/create-dto-class.js +11 -40
- package/src/lib/nest/create-dto-class.js.map +1 -1
- package/src/lib/ts-morph/coerce-interface.d.ts +2 -0
- package/src/lib/ts-morph/coerce-interface.js +6 -4
- package/src/lib/ts-morph/coerce-interface.js.map +1 -1
- package/src/lib/ts-morph/write-type.d.ts +16 -4
- package/src/lib/ts-morph/write-type.js +56 -19
- package/src/lib/ts-morph/write-type.js.map +1 -1
- package/src/lib/types/form-definition-control.d.ts +2 -1
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoerceDtoClass = exports.CoercePropertyDeclaration = void 0;
|
|
4
4
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
const utilities_1 = require("@rxap/utilities");
|
|
5
6
|
const path_1 = require("path");
|
|
6
7
|
const ts_morph_1 = require("ts-morph");
|
|
7
8
|
const coerce_class_1 = require("../coerce-class");
|
|
8
9
|
const coerce_source_file_1 = require("../coerce-source-file");
|
|
9
10
|
const coerce_decorator_1 = require("../ts-morph/coerce-decorator");
|
|
10
11
|
const coerce_imports_1 = require("../ts-morph/coerce-imports");
|
|
11
|
-
const
|
|
12
|
+
const ts_morph_2 = require("@rxap/ts-morph");
|
|
12
13
|
function CoercePropertyDeclaration(node, name, structure = {}) {
|
|
13
14
|
let property = node.getProperty(name);
|
|
14
15
|
if (!property) {
|
|
@@ -19,13 +20,8 @@ function CoercePropertyDeclaration(node, name, structure = {}) {
|
|
|
19
20
|
}
|
|
20
21
|
exports.CoercePropertyDeclaration = CoercePropertyDeclaration;
|
|
21
22
|
function CoerceDtoClass(options) {
|
|
22
|
-
const { project, } = options;
|
|
23
|
-
let {
|
|
24
|
-
propertyList !== null && propertyList !== void 0 ? propertyList : (propertyList = []);
|
|
25
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
26
|
-
tsMorphTransform !== null && tsMorphTransform !== void 0 ? tsMorphTransform : (tsMorphTransform = () => { });
|
|
27
|
-
classStructure !== null && classStructure !== void 0 ? classStructure : (classStructure = {});
|
|
28
|
-
importStructureList !== null && importStructureList !== void 0 ? importStructureList : (importStructureList = []);
|
|
23
|
+
const { project, propertyList = [], tsMorphTransform = utilities_1.noop, classStructure = {}, importStructureList = [], } = options;
|
|
24
|
+
let { name, } = options;
|
|
29
25
|
name = (0, schematics_utilities_1.dasherize)(name);
|
|
30
26
|
const className = (0, schematics_utilities_1.CoerceSuffix)((0, schematics_utilities_1.classify)(name), 'Dto');
|
|
31
27
|
const fileName = (0, schematics_utilities_1.CoerceSuffix)(name, '.dto');
|
|
@@ -34,6 +30,9 @@ function CoerceDtoClass(options) {
|
|
|
34
30
|
classDeclaration.setIsExported(true);
|
|
35
31
|
classDeclaration.set(classStructure);
|
|
36
32
|
for (const property of propertyList) {
|
|
33
|
+
if (property.type === '<self>') {
|
|
34
|
+
property.type = className;
|
|
35
|
+
}
|
|
37
36
|
let propertyName = (0, schematics_utilities_1.camelize)(property.name);
|
|
38
37
|
const prefixMatch = property.name.match(/^(_+)/);
|
|
39
38
|
if (prefixMatch) {
|
|
@@ -41,8 +40,8 @@ function CoerceDtoClass(options) {
|
|
|
41
40
|
propertyName = prefixMatch[0] + propertyName;
|
|
42
41
|
}
|
|
43
42
|
const propertyDeclaration = CoercePropertyDeclaration(classDeclaration, propertyName).set({
|
|
44
|
-
type: (0,
|
|
45
|
-
hasQuestionToken: property.isOptional,
|
|
43
|
+
type: (0, ts_morph_2.WriteType)(property, sourceFile),
|
|
44
|
+
hasQuestionToken: !!property.isOptional,
|
|
46
45
|
hasExclamationToken: !property.isOptional,
|
|
47
46
|
});
|
|
48
47
|
(0, coerce_decorator_1.CoerceDecorator)(propertyDeclaration, 'Expose', {
|
|
@@ -66,12 +65,10 @@ function CoerceDtoClass(options) {
|
|
|
66
65
|
arguments: [
|
|
67
66
|
w => {
|
|
68
67
|
w.write('() => ');
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
property.type(w);
|
|
74
|
-
}
|
|
68
|
+
(0, ts_morph_2.WriteType)({
|
|
69
|
+
type: property.type,
|
|
70
|
+
isArray: false
|
|
71
|
+
}, sourceFile)(w);
|
|
75
72
|
},
|
|
76
73
|
],
|
|
77
74
|
});
|
|
@@ -81,14 +78,10 @@ function CoerceDtoClass(options) {
|
|
|
81
78
|
});
|
|
82
79
|
(0, coerce_decorator_1.CoerceDecorator)(propertyDeclaration, 'IsInstance', {
|
|
83
80
|
arguments: [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
else {
|
|
89
|
-
property.type(w);
|
|
90
|
-
}
|
|
91
|
-
},
|
|
81
|
+
(0, ts_morph_2.WriteType)({
|
|
82
|
+
type: property.type,
|
|
83
|
+
isArray: false
|
|
84
|
+
}, sourceFile),
|
|
92
85
|
w => {
|
|
93
86
|
if (property.isArray) {
|
|
94
87
|
ts_morph_1.Writers.object({ each: 'true' })(w);
|
|
@@ -110,7 +103,14 @@ function CoerceDtoClass(options) {
|
|
|
110
103
|
moduleSpecifier: 'class-validator',
|
|
111
104
|
});
|
|
112
105
|
}
|
|
113
|
-
|
|
106
|
+
let autoType = 'none';
|
|
107
|
+
if (typeof property.type === 'string') {
|
|
108
|
+
autoType = property.type;
|
|
109
|
+
}
|
|
110
|
+
else if (typeof property.type === 'object') {
|
|
111
|
+
autoType = property.type.name;
|
|
112
|
+
}
|
|
113
|
+
switch (autoType) {
|
|
114
114
|
case 'date':
|
|
115
115
|
(0, coerce_decorator_1.CoerceDecorator)(propertyDeclaration, 'IsDate', {
|
|
116
116
|
arguments: [],
|
|
@@ -167,6 +167,15 @@ function CoerceDtoClass(options) {
|
|
|
167
167
|
moduleSpecifier: 'class-validator',
|
|
168
168
|
});
|
|
169
169
|
break;
|
|
170
|
+
case 'unknown':
|
|
171
|
+
(0, coerce_decorator_1.CoerceDecorator)(propertyDeclaration, 'ApiProperty', {
|
|
172
|
+
arguments: [ts_morph_1.Writers.object({ type: w => w.quote('unknown') })],
|
|
173
|
+
});
|
|
174
|
+
importStructureList.push({
|
|
175
|
+
namedImports: ['ApiProperty'],
|
|
176
|
+
moduleSpecifier: '@nestjs/swagger',
|
|
177
|
+
});
|
|
178
|
+
break;
|
|
170
179
|
}
|
|
171
180
|
}
|
|
172
181
|
(0, coerce_imports_1.CoerceImports)(sourceFile, importStructureList);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-dto-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-dto-class.ts"],"names":[],"mappings":";;;AAAA,qEAKoC;AACpC,+BAA4B;AAC5B,uCAckB;AAClB,kDAA8C;AAC9C,8DAAyD;AACzD,mEAA+D;AAC/D,+DAA2D;AAC3D,
|
|
1
|
+
{"version":3,"file":"coerce-dto-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-dto-class.ts"],"names":[],"mappings":";;;AAAA,qEAKoC;AACpC,+CAAuC;AACvC,+BAA4B;AAC5B,uCAckB;AAClB,kDAA8C;AAC9C,8DAAyD;AACzD,mEAA+D;AAC/D,+DAA2D;AAC3D,6CAA2C;AAuB3C,SAAgB,yBAAyB,CACvC,IAAwD,EACxD,IAAY,EACZ,YAA+H,EAAE;IAEjI,IAAI,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACtC,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H,MAAM;YACR,KAAK,SAAS;gBACZ,IAAA,kCAAe,EACb,mBAAmB,EACnB,WAAW,EACX;oBACE,SAAS,EAAE,EAAE;iBACd,CACF,CAAC;gBACF,mBAAmB,CAAC,IAAI,CAAC;oBACvB,YAAY,EAAE,CAAE,WAAW,CAAE;oBAC7B,eAAe,EAAE,iBAAiB;iBACnC,CAAC,CAAC;gBACH,MAAM;YACN,KAAK,SAAS;gBACZ,IAAA,kCAAe,EACb,mBAAmB,EACnB,aAAa,EACb;oBACE,SAAS,EAAE,CAAC,kBAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,EAAC,CAAC,CAAC;iBAC9D,CACF,CAAC;gBACF,mBAAmB,CAAC,IAAI,CAAC;oBACvB,YAAY,EAAE,CAAE,aAAa,CAAE;oBAC/B,eAAe,EAAE,iBAAiB;iBACnC,CAAC,CAAC;gBACH,MAAM;SACX;KAEF;IAED,IAAA,8BAAa,EAAC,UAAU,EAAE,mBAAmB,CAAC,CAAC;IAE/C,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC;IAExD,OAAO;QACL,SAAS;QACT,QAAQ,EAAE,GAAG,GAAG,IAAA,WAAI,EAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE,UAAU,CAAC,2BAA2B,EAAE,CAAC;QAC7F,UAAU;QACV,gBAAgB;KACjB,CAAC;AAEJ,CAAC;AAvOD,wCAuOC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CoerceOperationOptions } from './coerce-operation';
|
|
2
2
|
import { DtoClassProperty } from './create-dto-class';
|
|
3
3
|
export interface CoerceFormSubmitOperationOptions extends Omit<CoerceOperationOptions, 'operationName'> {
|
|
4
|
-
propertyList?: DtoClassProperty[]
|
|
4
|
+
propertyList?: DtoClassProperty[];
|
|
5
5
|
bodyDtoName?: string;
|
|
6
6
|
}
|
|
7
7
|
export declare function CoerceFormSubmitOperation(options: CoerceFormSubmitOperationOptions): import("@angular-devkit/schematics").Rule;
|
|
@@ -6,10 +6,7 @@ const coerce_imports_1 = require("../ts-morph/coerce-imports");
|
|
|
6
6
|
const coerce_dto_class_1 = require("./coerce-dto-class");
|
|
7
7
|
const coerce_operation_1 = require("./coerce-operation");
|
|
8
8
|
function CoerceFormSubmitOperation(options) {
|
|
9
|
-
|
|
10
|
-
tsMorphTransform !== null && tsMorphTransform !== void 0 ? tsMorphTransform : (tsMorphTransform = () => ({}));
|
|
11
|
-
propertyList !== null && propertyList !== void 0 ? propertyList : (propertyList = []);
|
|
12
|
-
bodyDtoName !== null && bodyDtoName !== void 0 ? bodyDtoName : (bodyDtoName = (0, utilities_1.joinWithDash)([context, controllerName]));
|
|
9
|
+
const { tsMorphTransform = utilities_1.noop, controllerName, propertyList = [], context, bodyDtoName = (0, utilities_1.joinWithDash)([context, controllerName]), } = options;
|
|
13
10
|
return (0, coerce_operation_1.CoerceOperation)(Object.assign(Object.assign({}, options), { operationName: 'submit', tsMorphTransform: (project, sourceFile, classDeclaration, controllerName) => {
|
|
14
11
|
const { className: dtoClassName, filePath: dtoFilePath, } = (0, coerce_dto_class_1.CoerceDtoClass)({
|
|
15
12
|
project,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-form-submit-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-form-submit-operation.ts"],"names":[],"mappings":";;;AAAA,+
|
|
1
|
+
{"version":3,"file":"coerce-form-submit-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-form-submit-operation.ts"],"names":[],"mappings":";;;AAAA,+CAGyB;AACzB,+DAA2D;AAC3D,yDAAoD;AACpD,yDAG4B;AAQ5B,SAAgB,yBAAyB,CAAC,OAAyC;IACjF,MAAM,EACJ,gBAAgB,GAAG,gBAAI,EACvB,cAAc,EACd,YAAY,GAAE,EAAE,EAChB,OAAO,EACP,WAAW,GAAE,IAAA,wBAAY,EAAC,CAAE,OAAO,EAAE,cAAc,CAAE,CAAC,GACvD,GAAG,OAAO,CAAC;IAEZ,OAAO,IAAA,kCAAe,kCACjB,OAAO,KACV,aAAa,EAAE,QAAQ,EACvB,gBAAgB,EAAE,CAChB,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,EAAE;YAEF,MAAM,EACJ,SAAS,EAAE,YAAY,EACvB,QAAQ,EAAE,WAAW,GACtB,GAAG,IAAA,iCAAc,EAAC;gBACjB,OAAO;gBACP,IAAI,EAAE,WAAY;gBAClB,YAAY;aACb,CAAC,CAAC;YAEH,IAAA,8BAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,YAAY,CAAE;gBAC9B,eAAe,EAAE,WAAW;aAC7B,CAAC,CAAC;YAEH,uBACE,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,MAAM,IACX,gBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,CAAC,EAC3E;QAEJ,CAAC,IACD,CAAC;AAEL,CAAC;AA1CD,8DA0CC"}
|
|
@@ -3,5 +3,7 @@ import { DtoClassProperty } from './create-dto-class';
|
|
|
3
3
|
export interface CoerceGetByIdControllerOptions extends Omit<CoerceOperationOptions, 'operationName'> {
|
|
4
4
|
propertyList?: DtoClassProperty[];
|
|
5
5
|
isArray?: boolean;
|
|
6
|
+
idProperty?: DtoClassProperty;
|
|
7
|
+
operationName?: string;
|
|
6
8
|
}
|
|
7
9
|
export declare function CoerceGetByIdOperation(options: CoerceGetByIdControllerOptions): import("@angular-devkit/schematics").Rule;
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoerceGetByIdOperation = void 0;
|
|
4
4
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
-
const
|
|
5
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
6
6
|
const coerce_dto_class_1 = require("./coerce-dto-class");
|
|
7
7
|
const coerce_operation_1 = require("./coerce-operation");
|
|
8
8
|
function CoerceGetByIdOperation(options) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
paramList !== null && paramList !== void 0 ? paramList : (paramList = []);
|
|
9
|
+
const { controllerName, isArray, paramList = [], propertyList = [], idProperty = { name: 'uuid', type: 'string' }, operationName = 'getById', } = options;
|
|
10
|
+
let { nestModule } = options;
|
|
12
11
|
/**
|
|
13
12
|
* If the module is not specified. This controller has an own module. Else the
|
|
14
13
|
* module is originated by another controller.
|
|
@@ -29,30 +28,30 @@ function CoerceGetByIdOperation(options) {
|
|
|
29
28
|
* module = "report-details"
|
|
30
29
|
*/
|
|
31
30
|
const isFirstBornSibling = !nestModule || nestModule === controllerName;
|
|
32
|
-
if (isFirstBornSibling && !propertyList.some(param => param.name ===
|
|
33
|
-
propertyList.unshift(
|
|
34
|
-
name: 'uuid',
|
|
35
|
-
type: 'string',
|
|
36
|
-
});
|
|
31
|
+
if (isFirstBornSibling && !propertyList.some(param => param.name === idProperty.name)) {
|
|
32
|
+
propertyList.unshift(idProperty);
|
|
37
33
|
}
|
|
38
34
|
if (isFirstBornSibling) {
|
|
39
35
|
nestModule = controllerName;
|
|
40
36
|
}
|
|
41
|
-
if (!paramList.some(param => param.name ===
|
|
37
|
+
if (!paramList.some(param => param.name === idProperty.name)) {
|
|
42
38
|
paramList.push({
|
|
43
|
-
name:
|
|
44
|
-
type:
|
|
45
|
-
alias: isFirstBornSibling ? undefined : (0, schematics_utilities_1.CoerceSuffix)(nestModule, '-
|
|
39
|
+
name: idProperty.name,
|
|
40
|
+
type: idProperty.type,
|
|
41
|
+
alias: isFirstBornSibling ? undefined : (0, schematics_utilities_1.CoerceSuffix)(nestModule, '-' + idProperty.name),
|
|
46
42
|
fromParent: !isFirstBornSibling,
|
|
47
43
|
});
|
|
48
44
|
}
|
|
49
|
-
return (0, coerce_operation_1.CoerceOperation)(Object.assign(Object.assign({}, options), { nestModule,
|
|
45
|
+
return (0, coerce_operation_1.CoerceOperation)(Object.assign(Object.assign({}, options), { nestModule,
|
|
46
|
+
controllerName,
|
|
47
|
+
paramList,
|
|
48
|
+
operationName, tsMorphTransform: (project, sourceFile, classDeclaration, controllerName) => {
|
|
50
49
|
const { className: dtoClassName, filePath: dtoFilePath, } = (0, coerce_dto_class_1.CoerceDtoClass)({
|
|
51
50
|
project,
|
|
52
51
|
name: controllerName,
|
|
53
52
|
propertyList,
|
|
54
53
|
});
|
|
55
|
-
(0,
|
|
54
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
56
55
|
namedImports: [dtoClassName],
|
|
57
56
|
moduleSpecifier: dtoFilePath,
|
|
58
57
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-get-by-id-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-get-by-id-operation.ts"],"names":[],"mappings":";;;AAAA,qEAA0D;AAC1D
|
|
1
|
+
{"version":3,"file":"coerce-get-by-id-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-get-by-id-operation.ts"],"names":[],"mappings":";;;AAAA,qEAA0D;AAC1D,6CAA+C;AAC/C,yDAAoD;AACpD,yDAG4B;AAU5B,SAAgB,sBAAsB,CAAC,OAAuC;IAC5E,MAAM,EACJ,cAAc,EACd,OAAO,EACP,SAAS,GAAE,EAAE,EACb,YAAY,GAAG,EAAE,EACjB,UAAU,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,EAC7C,aAAa,GAAG,SAAS,GAC1B,GAAG,OAAO,CAAC;IACZ,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAE7B;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,kBAAkB,GAAG,CAAC,UAAU,IAAI,UAAU,KAAK,cAAc,CAAC;IA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AC,IACD,CAAC;AAEL,CAAC;AAnFD,wDAmFC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type CoerceGetChildrenOperationOptions =
|
|
1
|
+
import { CoerceGetRootOperationOptions } from './coerce-get-root-operation';
|
|
2
|
+
export type CoerceGetChildrenOperationOptions = CoerceGetRootOperationOptions;
|
|
3
3
|
export declare function CoerceGetChildrenOperation(options: Readonly<CoerceGetChildrenOperationOptions>): import("@angular-devkit/schematics").Rule;
|
|
@@ -2,14 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoerceGetChildrenOperation = void 0;
|
|
4
4
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
const utilities_1 = require("@rxap/utilities");
|
|
5
6
|
const coerce_imports_1 = require("../ts-morph/coerce-imports");
|
|
6
7
|
const coerce_dto_class_1 = require("./coerce-dto-class");
|
|
7
8
|
const coerce_operation_1 = require("./coerce-operation");
|
|
8
9
|
function CoerceGetChildrenOperation(options) {
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
const { tsMorphTransform = utilities_1.noop, paramList = [], propertyList = [], } = options;
|
|
11
|
+
let { controllerName } = options;
|
|
12
|
+
(0, utilities_1.CoerceArrayItems)(propertyList, [
|
|
13
|
+
{
|
|
14
|
+
name: 'hasChildren',
|
|
15
|
+
type: 'boolean',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'children',
|
|
19
|
+
type: '<self>',
|
|
20
|
+
isArray: true,
|
|
21
|
+
isOptional: true,
|
|
22
|
+
isType: true,
|
|
23
|
+
},
|
|
24
|
+
], (a, b) => a.name === b.name);
|
|
11
25
|
controllerName = (0, schematics_utilities_1.CoerceSuffix)(controllerName, '-tree-table');
|
|
12
|
-
paramList !== null && paramList !== void 0 ? paramList : (paramList = []);
|
|
13
26
|
paramList.push({
|
|
14
27
|
name: 'parentUuid',
|
|
15
28
|
type: 'string',
|
|
@@ -20,23 +33,7 @@ function CoerceGetChildrenOperation(options) {
|
|
|
20
33
|
const { className, filePath, } = (0, coerce_dto_class_1.CoerceDtoClass)({
|
|
21
34
|
project,
|
|
22
35
|
name: (0, schematics_utilities_1.CoerceSuffix)(controllerName, '-item'),
|
|
23
|
-
propertyList
|
|
24
|
-
{
|
|
25
|
-
name: 'uuid',
|
|
26
|
-
type: 'string',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: 'hasChildren',
|
|
30
|
-
type: 'boolean',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: 'children',
|
|
34
|
-
type: (0, schematics_utilities_1.classify)((0, schematics_utilities_1.CoerceSuffix)(controllerName, '-item-dto')),
|
|
35
|
-
isArray: true,
|
|
36
|
-
isOptional: true,
|
|
37
|
-
isType: true,
|
|
38
|
-
},
|
|
39
|
-
],
|
|
36
|
+
propertyList,
|
|
40
37
|
});
|
|
41
38
|
(0, coerce_imports_1.CoerceImports)(sourceFile, [
|
|
42
39
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-get-children-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-get-children-operation.ts"],"names":[],"mappings":";;;AAAA,qEAGoC;AACpC,+DAA2D;AAC3D,yDAAoD;
|
|
1
|
+
{"version":3,"file":"coerce-get-children-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-get-children-operation.ts"],"names":[],"mappings":";;;AAAA,qEAGoC;AACpC,+CAGyB;AACzB,+DAA2D;AAC3D,yDAAoD;AAEpD,yDAG4B;AAI5B,SAAgB,0BAA0B,CAAC,OAAoD;IAC7F,MAAM,EACJ,gBAAgB,GAAG,gBAAI,EACvB,SAAS,GAAG,EAAE,EACd,YAAY,GAAG,EAAE,GAClB,GAAG,OAAO,CAAC;IACZ,IAAI,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC;IACjC,IAA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Ac,CAAC,EAC3E;QACJ,CAAC,IACD,CAAC;AACL,CAAC;AApED,gEAoEC"}
|
|
@@ -5,7 +5,7 @@ import { CoerceOperationOptions } from './coerce-operation';
|
|
|
5
5
|
import { DtoClassProperty } from './create-dto-class';
|
|
6
6
|
export interface GetPageOperationProperty {
|
|
7
7
|
name: string;
|
|
8
|
-
type
|
|
8
|
+
type: TypeImport;
|
|
9
9
|
/**
|
|
10
10
|
* the property name of the source object. if not defined the name will be used
|
|
11
11
|
*/
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { CoerceOperationOptions } from './coerce-operation';
|
|
2
|
-
|
|
2
|
+
import { DtoClassProperty } from './create-dto-class';
|
|
3
|
+
export interface CoerceGetRootOperationOptions extends Omit<CoerceOperationOptions, 'operationName'> {
|
|
4
|
+
propertyList?: DtoClassProperty[];
|
|
5
|
+
}
|
|
3
6
|
export declare function CoerceGetRootOperation(options: Readonly<CoerceGetRootOperationOptions>): import("@angular-devkit/schematics").Rule;
|
|
@@ -2,34 +2,32 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CoerceGetRootOperation = void 0;
|
|
4
4
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
const utilities_1 = require("@rxap/utilities");
|
|
5
6
|
const coerce_imports_1 = require("../ts-morph/coerce-imports");
|
|
6
7
|
const coerce_dto_class_1 = require("./coerce-dto-class");
|
|
7
8
|
const coerce_operation_1 = require("./coerce-operation");
|
|
8
9
|
function CoerceGetRootOperation(options) {
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
const { tsMorphTransform = utilities_1.noop, propertyList = [], } = options;
|
|
11
|
+
let { controllerName } = options;
|
|
12
|
+
(0, utilities_1.CoerceArrayItems)(propertyList, [
|
|
13
|
+
{
|
|
14
|
+
name: 'hasChildren',
|
|
15
|
+
type: 'boolean',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'children',
|
|
19
|
+
type: '<self>',
|
|
20
|
+
isArray: true,
|
|
21
|
+
isOptional: true,
|
|
22
|
+
isType: true,
|
|
23
|
+
},
|
|
24
|
+
], (a, b) => a.name === b.name);
|
|
11
25
|
controllerName = (0, schematics_utilities_1.CoerceSuffix)(controllerName, '-tree-table');
|
|
12
26
|
return (0, coerce_operation_1.CoerceOperation)(Object.assign(Object.assign({}, options), { controllerName, operationName: 'get-root', tsMorphTransform: (project, sourceFile, classDeclaration, controllerName) => {
|
|
13
27
|
const { className, filePath, } = (0, coerce_dto_class_1.CoerceDtoClass)({
|
|
14
28
|
project,
|
|
15
29
|
name: (0, schematics_utilities_1.CoerceSuffix)(controllerName, '-item'),
|
|
16
|
-
propertyList
|
|
17
|
-
{
|
|
18
|
-
name: 'uuid',
|
|
19
|
-
type: 'string',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
name: 'hasChildren',
|
|
23
|
-
type: 'boolean',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
name: 'children',
|
|
27
|
-
type: (0, schematics_utilities_1.classify)((0, schematics_utilities_1.CoerceSuffix)(controllerName, '-item-dto')),
|
|
28
|
-
isArray: true,
|
|
29
|
-
isOptional: true,
|
|
30
|
-
isType: true,
|
|
31
|
-
},
|
|
32
|
-
],
|
|
30
|
+
propertyList,
|
|
33
31
|
});
|
|
34
32
|
(0, coerce_imports_1.CoerceImports)(sourceFile, [
|
|
35
33
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-get-root-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-get-root-operation.ts"],"names":[],"mappings":";;;AAAA,qEAGoC;AACpC,+DAA2D;AAC3D,yDAAoD;AACpD,yDAG4B;
|
|
1
|
+
{"version":3,"file":"coerce-get-root-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-get-root-operation.ts"],"names":[],"mappings":";;;AAAA,qEAGoC;AACpC,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AAC,CAAC;YAEH,uBACE,UAAU,EAAE,SAAS,GAAG,IAAI,IACzB,gBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,CAAC,EAC3E;QACJ,CAAC,IACD,CAAC;AACL,CAAC;AA7DD,wDA6DC"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CoerceOptionsOperationRule = void 0;
|
|
4
4
|
const utilities_1 = require("@rxap/utilities");
|
|
5
5
|
const coerce_imports_1 = require("../ts-morph/coerce-imports");
|
|
6
|
-
const
|
|
6
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
7
7
|
const coerce_dto_class_1 = require("./coerce-dto-class");
|
|
8
8
|
const coerce_operation_1 = require("./coerce-operation");
|
|
9
9
|
function CoerceOptionsOperationRule(options) {
|
|
@@ -20,7 +20,7 @@ function CoerceOptionsOperationRule(options) {
|
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
name: 'value',
|
|
23
|
-
type: (0,
|
|
23
|
+
type: (0, ts_morph_1.WriteType)(control, sourceFile),
|
|
24
24
|
},
|
|
25
25
|
],
|
|
26
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coerce-options-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-options-operation.ts"],"names":[],"mappings":";;;AACA,+CAA+C;AAC/C,+DAA2D;AAC3D,
|
|
1
|
+
{"version":3,"file":"coerce-options-operation.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/coerce-options-operation.ts"],"names":[],"mappings":";;;AACA,+CAA+C;AAC/C,+DAA2D;AAC3D,6CAA2C;AAE3C,yDAAoD;AACpD,yDAG4B;AAO5B,SAAgB,0BAA0B,CAAC,OAAoD;IAC7F,IAAI,EACF,eAAe,EACf,OAAO,EACP,OAAO,GACR,GAAG,OAAO,CAAC;IACZ,eAAe,aAAf,eA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, ImportDeclarationStructure, OptionalKind, SourceFile, WriterFunction } from 'ts-morph';
|
|
2
3
|
export interface DtoClassProperty {
|
|
3
4
|
name: string;
|
|
@@ -6,14 +7,18 @@ export interface DtoClassProperty {
|
|
|
6
7
|
*
|
|
7
8
|
* if type = '<self>' the type will be the name of the class
|
|
8
9
|
*/
|
|
9
|
-
type: string | WriterFunction;
|
|
10
|
-
isArray?: boolean;
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
type: string | WriterFunction | TypeImport | '<self>';
|
|
11
|
+
isArray?: boolean | null;
|
|
12
|
+
/**
|
|
13
|
+
* indicates that the @Type decorator should be used as the type of the property is another dto class
|
|
14
|
+
*/
|
|
15
|
+
isType?: boolean | null;
|
|
16
|
+
isOptional?: boolean | null;
|
|
13
17
|
/**
|
|
14
18
|
* Use to import the type
|
|
19
|
+
* @deprecated use the type property with a TypeImport object
|
|
15
20
|
*/
|
|
16
|
-
moduleSpecifier?: string;
|
|
21
|
+
moduleSpecifier?: string | null;
|
|
17
22
|
}
|
|
18
23
|
export declare function CreateDtoClass(sourceFile: SourceFile, className: string, propertyList: DtoClassProperty[], classStructure?: Omit<OptionalKind<ClassDeclarationStructure>, 'name'>, structures?: Array<OptionalKind<ImportDeclarationStructure>>): ClassDeclaration;
|
|
19
24
|
export declare function CreatePageDtoClass(sourceFile: SourceFile, className: string, rowType: string | WriterFunction, classStructure?: Omit<OptionalKind<ClassDeclarationStructure>, 'name'>, structures?: Array<OptionalKind<ImportDeclarationStructure>>): ClassDeclaration;
|
|
@@ -5,6 +5,7 @@ const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
|
5
5
|
const ts_morph_1 = require("ts-morph");
|
|
6
6
|
const coerce_class_1 = require("../coerce-class");
|
|
7
7
|
const coerce_imports_1 = require("../ts-morph/coerce-imports");
|
|
8
|
+
const ts_morph_2 = require("@rxap/ts-morph");
|
|
8
9
|
function CreateDtoClass(sourceFile, className, propertyList, classStructure, structures) {
|
|
9
10
|
var _a;
|
|
10
11
|
className = (0, schematics_utilities_1.CoerceSuffix)(className, 'Dto');
|
|
@@ -42,17 +43,10 @@ function CreateDtoClass(sourceFile, className, propertyList, classStructure, str
|
|
|
42
43
|
arguments: [
|
|
43
44
|
w => {
|
|
44
45
|
w.write('() => ');
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
else {
|
|
50
|
-
w.write(property.type);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
property.type(w);
|
|
55
|
-
}
|
|
46
|
+
(0, ts_morph_2.WriteType)({
|
|
47
|
+
type: property.type,
|
|
48
|
+
isArray: false
|
|
49
|
+
}, sourceFile)(w);
|
|
56
50
|
},
|
|
57
51
|
],
|
|
58
52
|
});
|
|
@@ -63,19 +57,10 @@ function CreateDtoClass(sourceFile, className, propertyList, classStructure, str
|
|
|
63
57
|
decorators.push({
|
|
64
58
|
name: 'IsInstance',
|
|
65
59
|
arguments: [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
w.write(property.type);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
property.type(w);
|
|
77
|
-
}
|
|
78
|
-
},
|
|
60
|
+
(0, ts_morph_2.WriteType)({
|
|
61
|
+
type: property.type,
|
|
62
|
+
isArray: false
|
|
63
|
+
}, sourceFile),
|
|
79
64
|
w => {
|
|
80
65
|
if (property.isArray) {
|
|
81
66
|
ts_morph_1.Writers.object({ each: 'true' })(w);
|
|
@@ -142,22 +127,8 @@ function CreateDtoClass(sourceFile, className, propertyList, classStructure, str
|
|
|
142
127
|
}
|
|
143
128
|
classStructure.properties.push({
|
|
144
129
|
name: property.name,
|
|
145
|
-
type:
|
|
146
|
-
|
|
147
|
-
if (typeof property.type === 'string') {
|
|
148
|
-
if (property.type === 'date') {
|
|
149
|
-
w.write('Date');
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
w.write(property.type);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
property.type(w);
|
|
157
|
-
}
|
|
158
|
-
w.write('>');
|
|
159
|
-
},
|
|
160
|
-
hasQuestionToken: property.isOptional,
|
|
130
|
+
type: (0, ts_morph_2.WriteType)(property, sourceFile),
|
|
131
|
+
hasQuestionToken: !!property.isOptional,
|
|
161
132
|
hasExclamationToken: !property.isOptional,
|
|
162
133
|
decorators,
|
|
163
134
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-dto-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/create-dto-class.ts"],"names":[],"mappings":";;;AAAA,qEAA0D;
|
|
1
|
+
{"version":3,"file":"create-dto-class.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/ts-morph/src/lib/nest/create-dto-class.ts"],"names":[],"mappings":";;;AAAA,qEAA0D;AAE1D,uCAUkB;AAClB,kDAA8C;AAC9C,+DAA2D;AAC3D,6CAGwB;AAuBxB,SAAgB,cAAc,CAC5B,UAAsB,EACtB,SAAiB,EACjB,YAAgC,EAChC,cAAsE,EACtE,UAA4D;;IAG5D,SAAS,GAAG,IAAA,mCAAY,EAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC3C,cAAc,aAAd,cAAc,cAAd,cAAc,IAAd,cAAc,GAAK,EAAE,EAAC;IACtB,MAAA,cAAc,CAAC,UAAU,oCAAzB,cAAc,CAAC,UAAU,GAAK,EAAE,EAAC;IACjC,cAAc,CAAC,UAAU,GAAG,IAAI,CAAC;IACjC,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE;QACnC,MAAM,UAAU,GAA4C;YAC1D;gBACE,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,EAAE;aACd;SACF,CAAC;QACF,IAAA,8BAAa,EACX,UAAU,EACV;YACE,YAAY,EAAE,CAAE,QAAQ,CAAE;YAC1B,eAAe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,KAAK,QAAQ,EAAE;YAC/B,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SAClB;aAAM;YACL,OAAO,CAAC,CAAC,CAAC,CAAC;SACZ;QACD,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACf,CAAC,CAAC;IACF,UAAU,aAAV,UAAU,cAAV,UAAU,IAAV,UAAU,GAAK,EAAE,EAAC;IAClB,UAAU,CAAC,IAAI,CAAC;QACd,YAAY,EAAE,CAAE,SAAS,CAAE;QAC3B,eAAe,EAAE,gBAAgB;KAClC,CAAC,CAAC;IAEH,OAAO,cAAc,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;AAEzF,CAAC;AArCD,gDAqCC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { NormalizedDataProperty } from '@rxap/ts-morph';
|
|
1
2
|
import { InterfaceDeclaration, InterfaceDeclarationStructure, OptionalKind, Project, SourceFile } from 'ts-morph';
|
|
2
3
|
import { TsMorphAngularProjectTransformOptions, TsMorphNestProjectTransformOptions, TsMorphTransformFunctionRule } from '../ts-morph-transform';
|
|
3
4
|
export declare function CoerceInterface(sourceFile: SourceFile, interfaceName: string, structure?: Omit<OptionalKind<InterfaceDeclarationStructure>, 'name'>): InterfaceDeclaration;
|
|
4
5
|
export interface CoerceInterfaceRuleOptions extends TsMorphNestProjectTransformOptions, TsMorphAngularProjectTransformOptions {
|
|
5
6
|
name: string;
|
|
6
7
|
structure?: Omit<OptionalKind<InterfaceDeclarationStructure>, 'name'>;
|
|
8
|
+
propertyList?: NormalizedDataProperty[];
|
|
7
9
|
tsMorphTransform?: (project: Project, sourceFile: SourceFile, interfaceDeclaration: InterfaceDeclaration) => void;
|
|
8
10
|
}
|
|
9
11
|
export declare function CoerceInterfaceRule(options: CoerceInterfaceRuleOptions, tsMorphTransForm: TsMorphTransformFunctionRule<TsMorphNestProjectTransformOptions | TsMorphAngularProjectTransformOptions>): import("@angular-devkit/schematics").Rule;
|