@decaf-ts/for-nest 0.2.30 → 0.2.31
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/README.md +1 -1
- package/dist/for-nest.cjs +1 -1
- package/dist/for-nest.cjs.map +1 -1
- package/dist/for-nest.js +1 -1
- package/dist/for-nest.js.map +1 -1
- package/lib/cli-module.cjs +44 -9
- package/lib/cli-module.d.ts +9 -0
- package/lib/cli-module.js.map +1 -1
- package/lib/esm/cli-module.d.ts +9 -0
- package/lib/esm/cli-module.js +42 -9
- package/lib/esm/cli-module.js.map +1 -1
- package/lib/esm/factory/openapi/DtoBuilder.d.ts +21 -0
- package/lib/esm/factory/openapi/DtoBuilder.js +116 -90
- package/lib/esm/factory/openapi/DtoBuilder.js.map +1 -1
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/factory/openapi/DtoBuilder.cjs +115 -89
- package/lib/factory/openapi/DtoBuilder.d.ts +21 -0
- package/lib/factory/openapi/DtoBuilder.js.map +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -7,36 +7,29 @@ const decoration_2 = require("./../../overrides/decoration.cjs");
|
|
|
7
7
|
const decorator_validation_1 = require("@decaf-ts/decorator-validation");
|
|
8
8
|
const core_1 = require("@decaf-ts/core");
|
|
9
9
|
const logging_1 = require("@decaf-ts/logging");
|
|
10
|
+
const constants_1 = require("./../../overrides/constants.cjs");
|
|
10
11
|
const dtoCache = new Map();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
// ) {
|
|
33
|
-
// cacheData[key] = (model[key] as unknown as ICacheable[]).map((m) =>
|
|
34
|
-
// m.toCache()
|
|
35
|
-
// );
|
|
36
|
-
// } else cacheData[key] = model[key];
|
|
37
|
-
// }
|
|
38
|
-
// return (stringify ? JSON.stringify(cacheData) : cacheData) as any;
|
|
39
|
-
// }
|
|
12
|
+
/**
|
|
13
|
+
* Builds a Nest/Swagger DTO class for the given model and CRUD operation.
|
|
14
|
+
*
|
|
15
|
+
* Rules:
|
|
16
|
+
* - Only CREATE and UPDATE (and their bulk variants) produce a DTO;
|
|
17
|
+
* all other operations return the original model class unchanged.
|
|
18
|
+
* - @generated() properties (createdAt, updatedAt, createdBy, updatedBy,
|
|
19
|
+
* uuid, version, @composed pks, …) are **never** exposed in any DTO.
|
|
20
|
+
* - The @pk() property:
|
|
21
|
+
* • UPDATE – always included.
|
|
22
|
+
* • CREATE – included only when the pk is NOT auto-generated
|
|
23
|
+
* (checked via Model.pkProps().generated AND Model.generated()).
|
|
24
|
+
* - Relation properties (@oneToOne, @oneToMany, …):
|
|
25
|
+
* • CREATE – nested as DtoFor(CREATE, RelatedModel).
|
|
26
|
+
* • UPDATE – union of DtoFor(UPDATE, RelatedModel) **or** the
|
|
27
|
+
* related model's primary-key type (string / integer),
|
|
28
|
+
* expressed as a Swagger oneOf.
|
|
29
|
+
*
|
|
30
|
+
* Metadata.properties() now returns ALL properties across the prototype chain,
|
|
31
|
+
* so DTO inheritance is no longer needed; every DTO is a flat class.
|
|
32
|
+
*/
|
|
40
33
|
function DtoFor(op, model) {
|
|
41
34
|
if (!core_1.TransactionOperationKeys.includes(op)) {
|
|
42
35
|
return model;
|
|
@@ -45,36 +38,16 @@ function DtoFor(op, model) {
|
|
|
45
38
|
const cached = cache.get(model);
|
|
46
39
|
if (cached)
|
|
47
40
|
return cached;
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
const parentModel = ancestors.at(-1);
|
|
55
|
-
const parentDto = parentModel && decorator_validation_1.Model.isModel(parentModel)
|
|
56
|
-
? cache.get(parentModel) || DtoFor(op, parentModel)
|
|
57
|
-
: decorator_validation_1.Model;
|
|
58
|
-
class DynamicDTO extends parentDto {
|
|
41
|
+
const isUpdateOp = [
|
|
42
|
+
db_decorators_1.OperationKeys.UPDATE,
|
|
43
|
+
db_decorators_1.BulkCrudOperationKeys.UPDATE_ALL,
|
|
44
|
+
].includes(op);
|
|
45
|
+
class DynamicDTO {
|
|
59
46
|
}
|
|
60
47
|
cache.set(model, DynamicDTO);
|
|
61
48
|
Object.defineProperty(DynamicDTO, "name", {
|
|
62
49
|
value: `${(0, logging_1.toPascalCase)(model.name)}${(0, logging_1.toPascalCase)(op)}DTO`,
|
|
63
50
|
});
|
|
64
|
-
const schemaProps = decoration_1.Metadata.properties(model) || [];
|
|
65
|
-
const createdByMetadata = decoration_1.Metadata.get(model, core_1.PersistenceKeys.CREATED_BY);
|
|
66
|
-
const updatedByMetadata = decoration_1.Metadata.get(model, core_1.PersistenceKeys.UPDATED_BY);
|
|
67
|
-
const metadataOwnershipProps = [
|
|
68
|
-
...Object.keys(createdByMetadata || {}),
|
|
69
|
-
...Object.keys(updatedByMetadata || {}),
|
|
70
|
-
];
|
|
71
|
-
const manualOwnershipProps = ["createdBy", "updatedBy"].filter((prop) => schemaProps.includes(prop));
|
|
72
|
-
const ownershipProps = Array.from(new Set([...metadataOwnershipProps, ...manualOwnershipProps]));
|
|
73
|
-
const props = Array.from(new Set([...schemaProps, ...ownershipProps]));
|
|
74
|
-
const relations = collectRelations(model);
|
|
75
|
-
const relationProps = new Set(relations);
|
|
76
|
-
const generatedProps = props.filter((prop) => isGeneratedAcrossInheritance(model, prop));
|
|
77
|
-
const exceptions = new Set([...generatedProps, ...ownershipProps]);
|
|
78
51
|
const pkProp = (() => {
|
|
79
52
|
try {
|
|
80
53
|
return decorator_validation_1.Model.pk(model);
|
|
@@ -83,19 +56,27 @@ function DtoFor(op, model) {
|
|
|
83
56
|
return undefined;
|
|
84
57
|
}
|
|
85
58
|
})();
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
59
|
+
const pkIsGenerated = pkProp
|
|
60
|
+
? !!decorator_validation_1.Model.pkProps(model)?.generated ||
|
|
61
|
+
isGeneratedAcrossInheritance(model, pkProp)
|
|
62
|
+
: false;
|
|
63
|
+
const allProps = Array.from(new Set(decoration_1.Metadata.properties(model) || []));
|
|
64
|
+
const relations = new Set(decorator_validation_1.Model.relations(model) || []);
|
|
65
|
+
const scalarProps = allProps.filter((prop) => {
|
|
66
|
+
if (relations.has(prop))
|
|
89
67
|
return false;
|
|
90
|
-
if (
|
|
91
|
-
return isUpdateOp
|
|
68
|
+
if (prop === pkProp) {
|
|
69
|
+
return isUpdateOp || !pkIsGenerated;
|
|
92
70
|
}
|
|
71
|
+
if (isGeneratedAcrossInheritance(model, prop))
|
|
72
|
+
return false;
|
|
93
73
|
return true;
|
|
94
74
|
});
|
|
95
|
-
for (const prop of
|
|
96
|
-
const validation =
|
|
75
|
+
for (const prop of scalarProps) {
|
|
76
|
+
const validation = getValidationAcrossInheritance(model, prop);
|
|
97
77
|
const isRequired = !!validation?.[decorator_validation_1.ValidationKeys.REQUIRED];
|
|
98
|
-
const typeHint =
|
|
78
|
+
const typeHint = getTypeAcrossInheritance(model, prop) ??
|
|
79
|
+
Reflect.getMetadata("design:type", model.prototype, prop);
|
|
99
80
|
const apiOptions = {
|
|
100
81
|
required: isRequired,
|
|
101
82
|
};
|
|
@@ -114,22 +95,6 @@ function DtoFor(op, model) {
|
|
|
114
95
|
configurable: true,
|
|
115
96
|
});
|
|
116
97
|
}
|
|
117
|
-
function addRelation(relation, relationDto, isArray, isRequired) {
|
|
118
|
-
const apiOptions = {
|
|
119
|
-
type: relationDto,
|
|
120
|
-
required: isRequired,
|
|
121
|
-
isArray,
|
|
122
|
-
};
|
|
123
|
-
(0, decoration_2.ApiProperty)(apiOptions)(DynamicDTO.prototype, relation);
|
|
124
|
-
Object.defineProperty(DynamicDTO.prototype, relation, {
|
|
125
|
-
value: undefined,
|
|
126
|
-
writable: true,
|
|
127
|
-
enumerable: true,
|
|
128
|
-
configurable: true,
|
|
129
|
-
});
|
|
130
|
-
Reflect.defineMetadata("design:type", isArray ? Array : relationDto, DynamicDTO.prototype, relation);
|
|
131
|
-
}
|
|
132
|
-
// Add processed relations back to the DTO
|
|
133
98
|
for (const relation of relations) {
|
|
134
99
|
const relationMeta = decoration_1.Metadata.relations(model, relation);
|
|
135
100
|
if (!relationMeta) {
|
|
@@ -146,23 +111,64 @@ function DtoFor(op, model) {
|
|
|
146
111
|
continue;
|
|
147
112
|
}
|
|
148
113
|
const meta = decoration_1.Metadata.validationFor(model, relation);
|
|
114
|
+
const isArray = !!meta?.[decorator_validation_1.ValidationKeys.LIST];
|
|
115
|
+
const isRequired = !!meta?.[decorator_validation_1.ValidationKeys.REQUIRED];
|
|
149
116
|
const relationDto = DtoFor(op, relationType);
|
|
150
|
-
|
|
151
|
-
|
|
117
|
+
if (isUpdateOp) {
|
|
118
|
+
addRelationUpdate(DynamicDTO, relation, relationType, relationDto, isArray, isRequired);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
addRelation(DynamicDTO, relation, relationDto, isArray, isRequired);
|
|
122
|
+
}
|
|
152
123
|
}
|
|
153
124
|
return DynamicDTO;
|
|
154
125
|
}
|
|
155
|
-
function
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
126
|
+
function addRelation(DtoClass, relation, relationDto, isArray, isRequired) {
|
|
127
|
+
const apiOptions = {
|
|
128
|
+
type: relationDto,
|
|
129
|
+
required: isRequired,
|
|
130
|
+
isArray,
|
|
131
|
+
};
|
|
132
|
+
(0, decoration_2.ApiProperty)(apiOptions)(DtoClass.prototype, relation);
|
|
133
|
+
Reflect.defineMetadata("design:type", isArray ? Array : relationDto, DtoClass.prototype, relation);
|
|
134
|
+
Object.defineProperty(DtoClass.prototype, relation, {
|
|
135
|
+
value: undefined,
|
|
136
|
+
writable: true,
|
|
137
|
+
enumerable: true,
|
|
138
|
+
configurable: true,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function addRelationUpdate(DtoClass, relation, relationType, relationDto, isArray, isRequired) {
|
|
142
|
+
const extraModels = Reflect.getMetadata(constants_1.DECORATORS.API_EXTRA_MODELS, DtoClass) || [];
|
|
143
|
+
if (!extraModels.includes(relationDto)) {
|
|
144
|
+
Reflect.defineMetadata(constants_1.DECORATORS.API_EXTRA_MODELS, [...extraModels, relationDto], DtoClass);
|
|
161
145
|
}
|
|
162
|
-
|
|
146
|
+
const dtoRef = `#/components/schemas/${relationDto.name}`;
|
|
147
|
+
const pkTypeName = getPkOpenApiType(relationType);
|
|
148
|
+
const oneOfItems = [{ $ref: dtoRef }, { type: pkTypeName }];
|
|
149
|
+
const apiOptions = isArray
|
|
150
|
+
? { type: "array", required: isRequired, oneOf: oneOfItems }
|
|
151
|
+
: { type: Object, required: isRequired, oneOf: oneOfItems };
|
|
152
|
+
(0, decoration_2.ApiProperty)(apiOptions)(DtoClass.prototype, relation);
|
|
153
|
+
Reflect.defineMetadata("design:type", isArray ? Array : Object, DtoClass.prototype, relation);
|
|
154
|
+
Object.defineProperty(DtoClass.prototype, relation, {
|
|
155
|
+
value: undefined,
|
|
156
|
+
writable: true,
|
|
157
|
+
enumerable: true,
|
|
158
|
+
configurable: true,
|
|
159
|
+
});
|
|
163
160
|
}
|
|
164
|
-
function
|
|
165
|
-
|
|
161
|
+
function getPkOpenApiType(relationType) {
|
|
162
|
+
try {
|
|
163
|
+
const pkPropsMetadata = decorator_validation_1.Model.pkProps(relationType);
|
|
164
|
+
const pkType = pkPropsMetadata?.type;
|
|
165
|
+
if (pkType === Number || pkType === BigInt)
|
|
166
|
+
return "integer";
|
|
167
|
+
return "string";
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
return "string";
|
|
171
|
+
}
|
|
166
172
|
}
|
|
167
173
|
function isGeneratedAcrossInheritance(model, prop) {
|
|
168
174
|
let current = model;
|
|
@@ -173,6 +179,26 @@ function isGeneratedAcrossInheritance(model, prop) {
|
|
|
173
179
|
}
|
|
174
180
|
return false;
|
|
175
181
|
}
|
|
182
|
+
function getValidationAcrossInheritance(model, prop) {
|
|
183
|
+
let current = model;
|
|
184
|
+
while (current && current !== Object && current !== Function) {
|
|
185
|
+
const validation = decoration_1.Metadata.validationFor(current, prop);
|
|
186
|
+
if (validation)
|
|
187
|
+
return validation;
|
|
188
|
+
current = Object.getPrototypeOf(current);
|
|
189
|
+
}
|
|
190
|
+
return undefined;
|
|
191
|
+
}
|
|
192
|
+
function getTypeAcrossInheritance(model, prop) {
|
|
193
|
+
let current = model;
|
|
194
|
+
while (current && current !== Object && current !== Function) {
|
|
195
|
+
const type = decoration_1.Metadata.type(current, prop);
|
|
196
|
+
if (type)
|
|
197
|
+
return type;
|
|
198
|
+
current = Object.getPrototypeOf(current);
|
|
199
|
+
}
|
|
200
|
+
return undefined;
|
|
201
|
+
}
|
|
176
202
|
function getDtoCache(op) {
|
|
177
203
|
if (!dtoCache.has(op)) {
|
|
178
204
|
dtoCache.set(op, new WeakMap());
|
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
import { OperationKeys } from "@decaf-ts/db-decorators";
|
|
2
2
|
import { Constructor } from "@decaf-ts/decoration";
|
|
3
3
|
import { Model } from "@decaf-ts/decorator-validation";
|
|
4
|
+
/**
|
|
5
|
+
* Builds a Nest/Swagger DTO class for the given model and CRUD operation.
|
|
6
|
+
*
|
|
7
|
+
* Rules:
|
|
8
|
+
* - Only CREATE and UPDATE (and their bulk variants) produce a DTO;
|
|
9
|
+
* all other operations return the original model class unchanged.
|
|
10
|
+
* - @generated() properties (createdAt, updatedAt, createdBy, updatedBy,
|
|
11
|
+
* uuid, version, @composed pks, …) are **never** exposed in any DTO.
|
|
12
|
+
* - The @pk() property:
|
|
13
|
+
* • UPDATE – always included.
|
|
14
|
+
* • CREATE – included only when the pk is NOT auto-generated
|
|
15
|
+
* (checked via Model.pkProps().generated AND Model.generated()).
|
|
16
|
+
* - Relation properties (@oneToOne, @oneToMany, …):
|
|
17
|
+
* • CREATE – nested as DtoFor(CREATE, RelatedModel).
|
|
18
|
+
* • UPDATE – union of DtoFor(UPDATE, RelatedModel) **or** the
|
|
19
|
+
* related model's primary-key type (string / integer),
|
|
20
|
+
* expressed as a Swagger oneOf.
|
|
21
|
+
*
|
|
22
|
+
* Metadata.properties() now returns ALL properties across the prototype chain,
|
|
23
|
+
* so DTO inheritance is no longer needed; every DTO is a flat class.
|
|
24
|
+
*/
|
|
4
25
|
export declare function DtoFor<M extends Model>(op: OperationKeys, model: Constructor<M>): Constructor<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DtoBuilder.js","sourceRoot":"","sources":["../../../src/factory/openapi/DtoBuilder.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"DtoBuilder.js","sourceRoot":"","sources":["../../../src/factory/openapi/DtoBuilder.ts"],"names":[],"mappings":";;AAsCA,wBA4HC;AAlKD,2DAIiC;AACjC,qDAA6D;AAC7D,iEAAyD;AACzD,yEAAuE;AACvE,yCAA0D;AAC1D,+CAAiD;AACjD,+DAAuD;AAEvD,MAAM,QAAQ,GAAG,IAAI,GAAG,EAGrB,CAAC;AAEJ;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,MAAM,CACpB,EAAiB,EACjB,KAAqB;IAErB,IAAI,CAAC,+BAAwB,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;QAC3C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,KAAK,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;IAC9B,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAChC,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAE1B,MAAM,UAAU,GAAG;QACjB,6BAAa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|
|
56
56
|
* @constant
|
|
57
57
|
* @type {string}
|
|
58
58
|
*/
|
|
59
|
-
exports.VERSION = "0.2.
|
|
59
|
+
exports.VERSION = "0.2.30";
|
|
60
60
|
exports.PACKAGE_NAME = "@decaf-ts/for-nest";
|
|
61
61
|
decoration_1.Metadata.registerLibrary(exports.PACKAGE_NAME, exports.VERSION);
|
|
62
62
|
//# sourceMappingURL=index.js.map
|
package/lib/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decaf-ts/for-nest",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.31",
|
|
4
4
|
"description": "NestJS decaf integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"fabric-ca-client": {
|
|
121
121
|
"jsrsasign": "^11.1.0"
|
|
122
122
|
},
|
|
123
|
-
"minimatch": "^10.2.
|
|
123
|
+
"minimatch": "^10.2.3",
|
|
124
124
|
"test-exclude": "7.0.1",
|
|
125
125
|
"ajv": "^8.17.2"
|
|
126
126
|
}
|