@flusys/nestjs-entity-builder 9.1.0 → 9.1.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/README.md +52 -25
- package/config/entity-builder.constants.d.ts +2 -0
- package/config/message-keys.d.ts +93 -12
- package/controllers/definition-bundle.controller.d.ts +15 -0
- package/controllers/flow-definition.controller.d.ts +7 -1
- package/controllers/index.d.ts +1 -1
- package/dtos/definition-bundle.dto.d.ts +57 -0
- package/dtos/flow.dto.d.ts +12 -20
- package/dtos/index.d.ts +1 -0
- package/entities/flow-definition.entity.d.ts +3 -9
- package/entities/flow-execution.entity.d.ts +3 -0
- package/entities/flow-version.entity.d.ts +10 -0
- package/entities/index.d.ts +3 -3
- package/fesm/21.js +96 -14
- package/fesm/458.js +695 -0
- package/fesm/{489.js → 582.js} +22 -30
- package/fesm/{996.js → 677.js} +1453 -1078
- package/fesm/794.js +135 -240
- package/fesm/{719.js → 870.js} +1955 -220
- package/fesm/{362.js → 897.js} +566 -2
- package/fesm/{606.js → 946.js} +564 -290
- package/fesm/config/index.js +15 -2
- package/fesm/controllers/index.js +9 -9
- package/fesm/docs/index.js +7 -4
- package/fesm/dtos/index.js +451 -256
- package/fesm/entities/index.js +58 -3
- package/fesm/guards/index.js +101 -22
- package/fesm/index.js +429 -948
- package/fesm/interfaces/index.js +19 -2
- package/fesm/modules/index.js +10 -628
- package/fesm/rule-engine/index.js +12 -3
- package/fesm/services/index.js +97 -27
- package/flow-engine/flow-api-key.d.ts +3 -7
- package/flow-engine/flow-graph.validator.d.ts +4 -2
- package/flow-engine/flow-permission-logic.d.ts +2 -0
- package/flow-engine/flow-run.types.d.ts +17 -8
- package/flow-engine/flow.types.d.ts +101 -13
- package/guards/designer-writable.interceptor.d.ts +12 -0
- package/guards/index.d.ts +1 -0
- package/interfaces/definition-bundle.interface.d.ts +111 -0
- package/interfaces/entity-builder-module.interface.d.ts +6 -0
- package/interfaces/flow-definition.interface.d.ts +13 -9
- package/interfaces/index.d.ts +1 -0
- package/package.json +5 -5
- package/rule-engine/rule-engine.service.d.ts +1 -0
- package/rule-engine/rule-permission.d.ts +3 -7
- package/services/definition-bundle.diff.d.ts +62 -0
- package/services/definition-bundle.file.d.ts +7 -0
- package/services/definition-bundle.service.d.ts +32 -0
- package/services/entity-builder-config.service.d.ts +2 -0
- package/services/entity-flow-scaffold.d.ts +1 -1
- package/services/flow-definition.service.d.ts +25 -12
- package/services/flow-execution.service.d.ts +7 -0
- package/services/flow-executor.service.d.ts +8 -8
- package/services/generic-entity.service.d.ts +1 -1
- package/services/index.d.ts +3 -1
- package/services/schema-evolution.service.d.ts +3 -1
- package/services/schema-sync.service.d.ts +5 -1
- package/controllers/flow-api-key.controller.d.ts +0 -14
- package/entities/flow-api-key.entity.d.ts +0 -10
- package/services/flow-api-key.service.d.ts +0 -31
package/fesm/dtos/index.js
CHANGED
|
@@ -1,35 +1,438 @@
|
|
|
1
|
-
import * as __rspack_external_node_crypto_2e7c4b46 from "node:crypto";
|
|
2
|
-
import * as __rspack_external_typeorm from "typeorm";
|
|
3
1
|
export const __rspack_esm_id = 685;
|
|
4
2
|
export const __rspack_esm_ids = [685];
|
|
5
3
|
export const __webpack_modules__ = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
4
|
+
6691(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
5
|
+
/* import */ var _nestjs_swagger__rspack_import_0 = __webpack_require__(6176);
|
|
6
|
+
/* import */ var class_transformer__rspack_import_1 = __webpack_require__(5812);
|
|
7
|
+
/* import */ var class_validator__rspack_import_2 = __webpack_require__(5421);
|
|
8
|
+
/* import */ var _config_entity_builder_constants_js__rspack_import_4 = __webpack_require__(6576);
|
|
9
|
+
/* import */ var _enums_entity_status_enum_js__rspack_import_6 = __webpack_require__(1313);
|
|
10
|
+
/* import */ var _enums_field_type_enum_js__rspack_import_5 = __webpack_require__(9614);
|
|
11
|
+
/* import */ var _flow_engine_flow_types_js__rspack_import_3 = __webpack_require__(6256);
|
|
12
|
+
/* import */ var _interfaces_definition_bundle_interface_js__rspack_import_7 = __webpack_require__(8835);
|
|
13
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
14
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
16
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
} else {
|
|
18
|
+
for(var i = decorators.length - 1; i >= 0; i--){
|
|
19
|
+
if (d = decorators[i]) {
|
|
20
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
25
|
+
}
|
|
26
|
+
function _ts_metadata(metadataKey, metadataValue) {
|
|
27
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
28
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
const Nullable = ()=>(0,class_validator__rspack_import_2.ValidateIf)((_object, value)=>value !== null);
|
|
40
|
+
class BundleFieldDto {
|
|
41
|
+
id;
|
|
42
|
+
code;
|
|
43
|
+
label;
|
|
44
|
+
fieldType;
|
|
45
|
+
nullable;
|
|
46
|
+
unique;
|
|
47
|
+
isIndexed;
|
|
48
|
+
defaultValue;
|
|
49
|
+
validationRules;
|
|
50
|
+
selectOptions;
|
|
51
|
+
relationTarget;
|
|
52
|
+
order;
|
|
53
|
+
uiConfig;
|
|
54
|
+
isSearchable;
|
|
55
|
+
deprecated;
|
|
56
|
+
}
|
|
57
|
+
_ts_decorate([
|
|
58
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
59
|
+
(0,class_validator__rspack_import_2.IsUUID)(),
|
|
60
|
+
_ts_metadata("design:type", String)
|
|
61
|
+
], BundleFieldDto.prototype, "id", void 0);
|
|
62
|
+
_ts_decorate([
|
|
63
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
64
|
+
(0,class_validator__rspack_import_2.IsString)(),
|
|
65
|
+
(0,class_validator__rspack_import_2.MaxLength)((/* inlined export .ENTITY_CODE_MAX_LENGTH */63)),
|
|
66
|
+
(0,class_validator__rspack_import_2.Matches)(_config_entity_builder_constants_js__rspack_import_4/* .ENTITY_CODE_PATTERN */.vs),
|
|
67
|
+
_ts_metadata("design:type", String)
|
|
68
|
+
], BundleFieldDto.prototype, "code", void 0);
|
|
69
|
+
_ts_decorate([
|
|
70
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
71
|
+
(0,class_validator__rspack_import_2.IsString)(),
|
|
72
|
+
(0,class_validator__rspack_import_2.IsNotEmpty)(),
|
|
73
|
+
(0,class_validator__rspack_import_2.MaxLength)(255),
|
|
74
|
+
_ts_metadata("design:type", String)
|
|
75
|
+
], BundleFieldDto.prototype, "label", void 0);
|
|
76
|
+
_ts_decorate([
|
|
77
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
78
|
+
enum: _enums_field_type_enum_js__rspack_import_5/* .FieldType */.P
|
|
79
|
+
}),
|
|
80
|
+
(0,class_validator__rspack_import_2.IsEnum)(_enums_field_type_enum_js__rspack_import_5/* .FieldType */.P),
|
|
81
|
+
_ts_metadata("design:type", typeof _enums_field_type_enum_js__rspack_import_5/* .FieldType */.P === "undefined" ? Object : _enums_field_type_enum_js__rspack_import_5/* .FieldType */.P)
|
|
82
|
+
], BundleFieldDto.prototype, "fieldType", void 0);
|
|
83
|
+
_ts_decorate([
|
|
84
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
85
|
+
(0,class_validator__rspack_import_2.IsBoolean)(),
|
|
86
|
+
_ts_metadata("design:type", Boolean)
|
|
87
|
+
], BundleFieldDto.prototype, "nullable", void 0);
|
|
88
|
+
_ts_decorate([
|
|
89
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
90
|
+
(0,class_validator__rspack_import_2.IsBoolean)(),
|
|
91
|
+
_ts_metadata("design:type", Boolean)
|
|
92
|
+
], BundleFieldDto.prototype, "unique", void 0);
|
|
93
|
+
_ts_decorate([
|
|
94
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
95
|
+
(0,class_validator__rspack_import_2.IsBoolean)(),
|
|
96
|
+
_ts_metadata("design:type", Boolean)
|
|
97
|
+
], BundleFieldDto.prototype, "isIndexed", void 0);
|
|
98
|
+
_ts_decorate([
|
|
99
|
+
(0,_nestjs_swagger__rspack_import_0.ApiPropertyOptional)(),
|
|
100
|
+
(0,class_validator__rspack_import_2.Allow)(),
|
|
101
|
+
_ts_metadata("design:type", Object)
|
|
102
|
+
], BundleFieldDto.prototype, "defaultValue", void 0);
|
|
103
|
+
_ts_decorate([
|
|
104
|
+
(0,_nestjs_swagger__rspack_import_0.ApiPropertyOptional)({
|
|
105
|
+
type: Object,
|
|
106
|
+
nullable: true
|
|
107
|
+
}),
|
|
108
|
+
Nullable(),
|
|
109
|
+
(0,class_validator__rspack_import_2.IsObject)(),
|
|
110
|
+
_ts_metadata("design:type", Object)
|
|
111
|
+
], BundleFieldDto.prototype, "validationRules", void 0);
|
|
112
|
+
_ts_decorate([
|
|
113
|
+
(0,_nestjs_swagger__rspack_import_0.ApiPropertyOptional)({
|
|
114
|
+
type: [
|
|
115
|
+
Object
|
|
116
|
+
],
|
|
117
|
+
nullable: true
|
|
118
|
+
}),
|
|
119
|
+
Nullable(),
|
|
120
|
+
(0,class_validator__rspack_import_2.IsArray)(),
|
|
121
|
+
_ts_metadata("design:type", Object)
|
|
122
|
+
], BundleFieldDto.prototype, "selectOptions", void 0);
|
|
123
|
+
_ts_decorate([
|
|
124
|
+
(0,_nestjs_swagger__rspack_import_0.ApiPropertyOptional)({
|
|
125
|
+
description: 'Code of the entity a RELATION field points to',
|
|
126
|
+
nullable: true
|
|
127
|
+
}),
|
|
128
|
+
Nullable(),
|
|
129
|
+
(0,class_validator__rspack_import_2.IsString)(),
|
|
130
|
+
(0,class_validator__rspack_import_2.Matches)(_config_entity_builder_constants_js__rspack_import_4/* .ENTITY_CODE_PATTERN */.vs),
|
|
131
|
+
_ts_metadata("design:type", Object)
|
|
132
|
+
], BundleFieldDto.prototype, "relationTarget", void 0);
|
|
133
|
+
_ts_decorate([
|
|
134
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
135
|
+
(0,class_validator__rspack_import_2.IsInt)(),
|
|
136
|
+
(0,class_validator__rspack_import_2.Min)(0),
|
|
137
|
+
_ts_metadata("design:type", Number)
|
|
138
|
+
], BundleFieldDto.prototype, "order", void 0);
|
|
139
|
+
_ts_decorate([
|
|
140
|
+
(0,_nestjs_swagger__rspack_import_0.ApiPropertyOptional)({
|
|
141
|
+
type: Object,
|
|
142
|
+
nullable: true
|
|
143
|
+
}),
|
|
144
|
+
Nullable(),
|
|
145
|
+
(0,class_validator__rspack_import_2.IsObject)(),
|
|
146
|
+
_ts_metadata("design:type", Object)
|
|
147
|
+
], BundleFieldDto.prototype, "uiConfig", void 0);
|
|
148
|
+
_ts_decorate([
|
|
149
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
150
|
+
(0,class_validator__rspack_import_2.IsBoolean)(),
|
|
151
|
+
_ts_metadata("design:type", Boolean)
|
|
152
|
+
], BundleFieldDto.prototype, "isSearchable", void 0);
|
|
153
|
+
_ts_decorate([
|
|
154
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
155
|
+
(0,class_validator__rspack_import_2.IsBoolean)(),
|
|
156
|
+
_ts_metadata("design:type", Boolean)
|
|
157
|
+
], BundleFieldDto.prototype, "deprecated", void 0);
|
|
158
|
+
class BundleEntityDto {
|
|
159
|
+
id;
|
|
160
|
+
code;
|
|
161
|
+
label;
|
|
162
|
+
description;
|
|
163
|
+
status;
|
|
164
|
+
isSoftDeleteEnabled;
|
|
165
|
+
isAuditEnabled;
|
|
166
|
+
uiConfig;
|
|
167
|
+
fields;
|
|
168
|
+
}
|
|
169
|
+
_ts_decorate([
|
|
170
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
171
|
+
(0,class_validator__rspack_import_2.IsUUID)(),
|
|
172
|
+
_ts_metadata("design:type", String)
|
|
173
|
+
], BundleEntityDto.prototype, "id", void 0);
|
|
174
|
+
_ts_decorate([
|
|
175
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
176
|
+
(0,class_validator__rspack_import_2.IsString)(),
|
|
177
|
+
(0,class_validator__rspack_import_2.MaxLength)((/* inlined export .ENTITY_CODE_MAX_LENGTH */63)),
|
|
178
|
+
(0,class_validator__rspack_import_2.Matches)(_config_entity_builder_constants_js__rspack_import_4/* .ENTITY_CODE_PATTERN */.vs),
|
|
179
|
+
_ts_metadata("design:type", String)
|
|
180
|
+
], BundleEntityDto.prototype, "code", void 0);
|
|
181
|
+
_ts_decorate([
|
|
182
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
183
|
+
(0,class_validator__rspack_import_2.IsString)(),
|
|
184
|
+
(0,class_validator__rspack_import_2.IsNotEmpty)(),
|
|
185
|
+
(0,class_validator__rspack_import_2.MaxLength)(255),
|
|
186
|
+
_ts_metadata("design:type", String)
|
|
187
|
+
], BundleEntityDto.prototype, "label", void 0);
|
|
188
|
+
_ts_decorate([
|
|
189
|
+
(0,_nestjs_swagger__rspack_import_0.ApiPropertyOptional)({
|
|
190
|
+
nullable: true
|
|
191
|
+
}),
|
|
192
|
+
Nullable(),
|
|
193
|
+
(0,class_validator__rspack_import_2.IsString)(),
|
|
194
|
+
(0,class_validator__rspack_import_2.MaxLength)(500),
|
|
195
|
+
_ts_metadata("design:type", Object)
|
|
196
|
+
], BundleEntityDto.prototype, "description", void 0);
|
|
197
|
+
_ts_decorate([
|
|
198
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
199
|
+
enum: _enums_entity_status_enum_js__rspack_import_6/* .EntityStatus */.c
|
|
200
|
+
}),
|
|
201
|
+
(0,class_validator__rspack_import_2.IsEnum)(_enums_entity_status_enum_js__rspack_import_6/* .EntityStatus */.c),
|
|
202
|
+
_ts_metadata("design:type", typeof _enums_entity_status_enum_js__rspack_import_6/* .EntityStatus */.c === "undefined" ? Object : _enums_entity_status_enum_js__rspack_import_6/* .EntityStatus */.c)
|
|
203
|
+
], BundleEntityDto.prototype, "status", void 0);
|
|
204
|
+
_ts_decorate([
|
|
205
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
206
|
+
(0,class_validator__rspack_import_2.IsBoolean)(),
|
|
207
|
+
_ts_metadata("design:type", Boolean)
|
|
208
|
+
], BundleEntityDto.prototype, "isSoftDeleteEnabled", void 0);
|
|
209
|
+
_ts_decorate([
|
|
210
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
211
|
+
(0,class_validator__rspack_import_2.IsBoolean)(),
|
|
212
|
+
_ts_metadata("design:type", Boolean)
|
|
213
|
+
], BundleEntityDto.prototype, "isAuditEnabled", void 0);
|
|
214
|
+
_ts_decorate([
|
|
215
|
+
(0,_nestjs_swagger__rspack_import_0.ApiPropertyOptional)({
|
|
216
|
+
type: Object,
|
|
217
|
+
nullable: true
|
|
218
|
+
}),
|
|
219
|
+
Nullable(),
|
|
220
|
+
(0,class_validator__rspack_import_2.IsObject)(),
|
|
221
|
+
_ts_metadata("design:type", Object)
|
|
222
|
+
], BundleEntityDto.prototype, "uiConfig", void 0);
|
|
223
|
+
_ts_decorate([
|
|
224
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
225
|
+
type: [
|
|
226
|
+
BundleFieldDto
|
|
227
|
+
]
|
|
228
|
+
}),
|
|
229
|
+
(0,class_validator__rspack_import_2.IsArray)(),
|
|
230
|
+
(0,class_validator__rspack_import_2.ValidateNested)({
|
|
231
|
+
each: true
|
|
232
|
+
}),
|
|
233
|
+
(0,class_transformer__rspack_import_1.Type)(()=>BundleFieldDto),
|
|
234
|
+
_ts_metadata("design:type", Array)
|
|
235
|
+
], BundleEntityDto.prototype, "fields", void 0);
|
|
236
|
+
class BundleFlowDto {
|
|
237
|
+
name;
|
|
238
|
+
slug;
|
|
239
|
+
description;
|
|
240
|
+
isActive;
|
|
241
|
+
retainExecutions;
|
|
242
|
+
nodes;
|
|
243
|
+
edges;
|
|
244
|
+
}
|
|
245
|
+
_ts_decorate([
|
|
246
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
247
|
+
(0,class_validator__rspack_import_2.IsString)(),
|
|
248
|
+
(0,class_validator__rspack_import_2.IsNotEmpty)(),
|
|
249
|
+
(0,class_validator__rspack_import_2.MaxLength)(255),
|
|
250
|
+
_ts_metadata("design:type", String)
|
|
251
|
+
], BundleFlowDto.prototype, "name", void 0);
|
|
252
|
+
_ts_decorate([
|
|
253
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
254
|
+
(0,class_validator__rspack_import_2.IsString)(),
|
|
255
|
+
(0,class_validator__rspack_import_2.Matches)(_flow_engine_flow_types_js__rspack_import_3/* .FLOW_SLUG_PATTERN */.YD),
|
|
256
|
+
_ts_metadata("design:type", String)
|
|
257
|
+
], BundleFlowDto.prototype, "slug", void 0);
|
|
258
|
+
_ts_decorate([
|
|
259
|
+
(0,_nestjs_swagger__rspack_import_0.ApiPropertyOptional)({
|
|
260
|
+
nullable: true
|
|
261
|
+
}),
|
|
262
|
+
Nullable(),
|
|
263
|
+
(0,class_validator__rspack_import_2.IsString)(),
|
|
264
|
+
(0,class_validator__rspack_import_2.MaxLength)(500),
|
|
265
|
+
_ts_metadata("design:type", Object)
|
|
266
|
+
], BundleFlowDto.prototype, "description", void 0);
|
|
267
|
+
_ts_decorate([
|
|
268
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
269
|
+
(0,class_validator__rspack_import_2.IsBoolean)(),
|
|
270
|
+
_ts_metadata("design:type", Boolean)
|
|
271
|
+
], BundleFlowDto.prototype, "isActive", void 0);
|
|
272
|
+
_ts_decorate([
|
|
273
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)(),
|
|
274
|
+
(0,class_validator__rspack_import_2.IsInt)(),
|
|
275
|
+
(0,class_validator__rspack_import_2.Min)(0),
|
|
276
|
+
(0,class_validator__rspack_import_2.Max)(10000),
|
|
277
|
+
_ts_metadata("design:type", Number)
|
|
278
|
+
], BundleFlowDto.prototype, "retainExecutions", void 0);
|
|
279
|
+
_ts_decorate([
|
|
280
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
281
|
+
type: [
|
|
282
|
+
Object
|
|
283
|
+
]
|
|
284
|
+
}),
|
|
285
|
+
(0,class_validator__rspack_import_2.IsArray)(),
|
|
286
|
+
(0,class_validator__rspack_import_2.IsObject)({
|
|
287
|
+
each: true
|
|
288
|
+
}),
|
|
289
|
+
_ts_metadata("design:type", Array)
|
|
290
|
+
], BundleFlowDto.prototype, "nodes", void 0);
|
|
291
|
+
_ts_decorate([
|
|
292
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
293
|
+
type: [
|
|
294
|
+
Object
|
|
295
|
+
]
|
|
296
|
+
}),
|
|
297
|
+
(0,class_validator__rspack_import_2.IsArray)(),
|
|
298
|
+
(0,class_validator__rspack_import_2.IsObject)({
|
|
299
|
+
each: true
|
|
300
|
+
}),
|
|
301
|
+
_ts_metadata("design:type", Array)
|
|
302
|
+
], BundleFlowDto.prototype, "edges", void 0);
|
|
303
|
+
class DefinitionBundleDto {
|
|
304
|
+
format;
|
|
305
|
+
version;
|
|
306
|
+
entities;
|
|
307
|
+
flows;
|
|
308
|
+
}
|
|
309
|
+
_ts_decorate([
|
|
310
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
311
|
+
example: _interfaces_definition_bundle_interface_js__rspack_import_7/* .DEFINITION_BUNDLE_FORMAT */.D
|
|
312
|
+
}),
|
|
313
|
+
(0,class_validator__rspack_import_2.Equals)(_interfaces_definition_bundle_interface_js__rspack_import_7/* .DEFINITION_BUNDLE_FORMAT */.D),
|
|
314
|
+
_ts_metadata("design:type", Object)
|
|
315
|
+
], DefinitionBundleDto.prototype, "format", void 0);
|
|
316
|
+
_ts_decorate([
|
|
317
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
318
|
+
example: (/* inlined export .DEFINITION_BUNDLE_VERSION */1)
|
|
319
|
+
}),
|
|
320
|
+
(0,class_validator__rspack_import_2.Equals)((/* inlined export .DEFINITION_BUNDLE_VERSION */1)),
|
|
321
|
+
_ts_metadata("design:type", Object)
|
|
322
|
+
], DefinitionBundleDto.prototype, "version", void 0);
|
|
323
|
+
_ts_decorate([
|
|
324
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
325
|
+
type: [
|
|
326
|
+
BundleEntityDto
|
|
327
|
+
]
|
|
328
|
+
}),
|
|
329
|
+
(0,class_validator__rspack_import_2.IsArray)(),
|
|
330
|
+
(0,class_validator__rspack_import_2.ValidateNested)({
|
|
331
|
+
each: true
|
|
332
|
+
}),
|
|
333
|
+
(0,class_transformer__rspack_import_1.Type)(()=>BundleEntityDto),
|
|
334
|
+
_ts_metadata("design:type", Array)
|
|
335
|
+
], DefinitionBundleDto.prototype, "entities", void 0);
|
|
336
|
+
_ts_decorate([
|
|
337
|
+
(0,_nestjs_swagger__rspack_import_0.ApiProperty)({
|
|
338
|
+
type: [
|
|
339
|
+
BundleFlowDto
|
|
340
|
+
]
|
|
341
|
+
}),
|
|
342
|
+
(0,class_validator__rspack_import_2.IsArray)(),
|
|
343
|
+
(0,class_validator__rspack_import_2.ValidateNested)({
|
|
344
|
+
each: true
|
|
345
|
+
}),
|
|
346
|
+
(0,class_transformer__rspack_import_1.Type)(()=>BundleFlowDto),
|
|
347
|
+
_ts_metadata("design:type", Array)
|
|
348
|
+
], DefinitionBundleDto.prototype, "flows", void 0);
|
|
349
|
+
class ExportBundleDto {
|
|
350
|
+
entityCodes;
|
|
351
|
+
flowSlugs;
|
|
352
|
+
}
|
|
353
|
+
_ts_decorate([
|
|
354
|
+
(0,_nestjs_swagger__rspack_import_0.ApiPropertyOptional)({
|
|
355
|
+
type: [
|
|
356
|
+
String
|
|
357
|
+
],
|
|
358
|
+
description: 'Entity codes to export (all when left out)'
|
|
359
|
+
}),
|
|
360
|
+
(0,class_validator__rspack_import_2.IsOptional)(),
|
|
361
|
+
(0,class_validator__rspack_import_2.IsArray)(),
|
|
362
|
+
(0,class_validator__rspack_import_2.ArrayUnique)(),
|
|
363
|
+
(0,class_validator__rspack_import_2.IsString)({
|
|
364
|
+
each: true
|
|
365
|
+
}),
|
|
366
|
+
_ts_metadata("design:type", Array)
|
|
367
|
+
], ExportBundleDto.prototype, "entityCodes", void 0);
|
|
368
|
+
_ts_decorate([
|
|
369
|
+
(0,_nestjs_swagger__rspack_import_0.ApiPropertyOptional)({
|
|
370
|
+
type: [
|
|
371
|
+
String
|
|
372
|
+
],
|
|
373
|
+
description: 'Flow slugs to export (every published flow when left out)'
|
|
374
|
+
}),
|
|
375
|
+
(0,class_validator__rspack_import_2.IsOptional)(),
|
|
376
|
+
(0,class_validator__rspack_import_2.IsArray)(),
|
|
377
|
+
(0,class_validator__rspack_import_2.ArrayUnique)(),
|
|
378
|
+
(0,class_validator__rspack_import_2.IsString)({
|
|
379
|
+
each: true
|
|
380
|
+
}),
|
|
381
|
+
_ts_metadata("design:type", Array)
|
|
382
|
+
], ExportBundleDto.prototype, "flowSlugs", void 0);
|
|
383
|
+
/** Form values arrive as text: `true` / `false` become booleans, anything else is left for the validator to refuse. */ const FormBoolean = ()=>(0,class_transformer__rspack_import_1.Transform)(({ value })=>value === 'true' ? true : value === 'false' ? false : value);
|
|
384
|
+
/** The form fields sent with the bundle file to plan-import / apply-import. */ class ImportBundleOptionsDto {
|
|
385
|
+
deprecateMissingFields;
|
|
386
|
+
confirm;
|
|
387
|
+
expectedChecksum;
|
|
388
|
+
expectedPlanChecksum;
|
|
389
|
+
}
|
|
390
|
+
_ts_decorate([
|
|
391
|
+
(0,_nestjs_swagger__rspack_import_0.ApiPropertyOptional)({
|
|
392
|
+
description: 'Deprecate fields this environment has and the bundle does not (their columns and data stay)',
|
|
393
|
+
default: false
|
|
394
|
+
}),
|
|
395
|
+
(0,class_validator__rspack_import_2.IsOptional)(),
|
|
396
|
+
FormBoolean(),
|
|
397
|
+
(0,class_validator__rspack_import_2.IsBoolean)(),
|
|
398
|
+
_ts_metadata("design:type", Boolean)
|
|
399
|
+
], ImportBundleOptionsDto.prototype, "deprecateMissingFields", void 0);
|
|
400
|
+
_ts_decorate([
|
|
401
|
+
(0,_nestjs_swagger__rspack_import_0.ApiPropertyOptional)({
|
|
402
|
+
description: 'apply-import: acknowledge steps that lose (or may lose) data',
|
|
403
|
+
default: false
|
|
404
|
+
}),
|
|
405
|
+
(0,class_validator__rspack_import_2.IsOptional)(),
|
|
406
|
+
FormBoolean(),
|
|
407
|
+
(0,class_validator__rspack_import_2.IsBoolean)(),
|
|
408
|
+
_ts_metadata("design:type", Boolean)
|
|
409
|
+
], ImportBundleOptionsDto.prototype, "confirm", void 0);
|
|
410
|
+
_ts_decorate([
|
|
411
|
+
(0,_nestjs_swagger__rspack_import_0.ApiPropertyOptional)({
|
|
412
|
+
description: 'apply-import: the checksum of the bundle that was reviewed; a different bundle is refused'
|
|
413
|
+
}),
|
|
414
|
+
(0,class_validator__rspack_import_2.IsOptional)(),
|
|
415
|
+
(0,class_validator__rspack_import_2.IsString)(),
|
|
416
|
+
(0,class_validator__rspack_import_2.Matches)(/^[0-9a-f]{64}$/),
|
|
417
|
+
_ts_metadata("design:type", String)
|
|
418
|
+
], ImportBundleOptionsDto.prototype, "expectedChecksum", void 0);
|
|
419
|
+
_ts_decorate([
|
|
420
|
+
(0,_nestjs_swagger__rspack_import_0.ApiPropertyOptional)({
|
|
421
|
+
description: 'apply-import: the planChecksum of the plan that was reviewed; a changed plan is refused, and it is required with confirm'
|
|
422
|
+
}),
|
|
423
|
+
(0,class_validator__rspack_import_2.IsOptional)(),
|
|
424
|
+
(0,class_validator__rspack_import_2.IsString)(),
|
|
425
|
+
(0,class_validator__rspack_import_2.Matches)(/^[0-9a-f]{64}$/),
|
|
426
|
+
_ts_metadata("design:type", String)
|
|
427
|
+
], ImportBundleOptionsDto.prototype, "expectedPlanChecksum", void 0);
|
|
27
428
|
|
|
28
429
|
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
430
|
+
JE: () => (DefinitionBundleDto),
|
|
431
|
+
KH: () => (BundleFlowDto),
|
|
432
|
+
QJ: () => (ExportBundleDto),
|
|
433
|
+
U3: () => (BundleFieldDto),
|
|
434
|
+
hX: () => (BundleEntityDto),
|
|
435
|
+
vS: () => (ImportBundleOptionsDto)
|
|
33
436
|
});
|
|
34
437
|
|
|
35
438
|
|
|
@@ -38,6 +441,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
38
441
|
/* import */ var _entity_definition_dto_js__rspack_import_0 = __webpack_require__(680);
|
|
39
442
|
/* import */ var _field_definition_dto_js__rspack_import_1 = __webpack_require__(2003);
|
|
40
443
|
/* import */ var _schema_change_dto_js__rspack_import_2 = __webpack_require__(4945);
|
|
444
|
+
/* import */ var _definition_bundle_dto_js__rspack_import_3 = __webpack_require__(6691);
|
|
445
|
+
|
|
41
446
|
|
|
42
447
|
|
|
43
448
|
|
|
@@ -45,13 +450,17 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
45
450
|
__webpack_require__.d(__webpack_exports__, {
|
|
46
451
|
C3: () => (/* reexport safe */ _field_definition_dto_js__rspack_import_1.C3),
|
|
47
452
|
C5: () => (/* reexport safe */ _field_definition_dto_js__rspack_import_1.C5),
|
|
453
|
+
JE: () => (/* reexport safe */ _definition_bundle_dto_js__rspack_import_3.JE),
|
|
48
454
|
Jd: () => (/* reexport safe */ _entity_definition_dto_js__rspack_import_0.Jd),
|
|
455
|
+
KH: () => (/* reexport safe */ _definition_bundle_dto_js__rspack_import_3.KH),
|
|
49
456
|
M3: () => (/* reexport safe */ _schema_change_dto_js__rspack_import_2.M3),
|
|
50
457
|
OW: () => (/* reexport safe */ _schema_change_dto_js__rspack_import_2.OW),
|
|
51
458
|
Oi: () => (/* reexport safe */ _schema_change_dto_js__rspack_import_2.Oi),
|
|
52
459
|
Ot: () => (/* reexport safe */ _entity_definition_dto_js__rspack_import_0.Ot),
|
|
53
460
|
Pc: () => (/* reexport safe */ _entity_definition_dto_js__rspack_import_0.Pc),
|
|
54
461
|
Pr: () => (/* reexport safe */ _schema_change_dto_js__rspack_import_2.Pr),
|
|
462
|
+
QJ: () => (/* reexport safe */ _definition_bundle_dto_js__rspack_import_3.QJ),
|
|
463
|
+
U3: () => (/* reexport safe */ _definition_bundle_dto_js__rspack_import_3.U3),
|
|
55
464
|
Vj: () => (/* reexport safe */ _field_definition_dto_js__rspack_import_1.Vj),
|
|
56
465
|
_e: () => (/* reexport safe */ _entity_definition_dto_js__rspack_import_0._e),
|
|
57
466
|
ar: () => (/* reexport safe */ _entity_definition_dto_js__rspack_import_0.ar),
|
|
@@ -60,255 +469,39 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
60
469
|
d_: () => (/* reexport safe */ _entity_definition_dto_js__rspack_import_0.d_),
|
|
61
470
|
et: () => (/* reexport safe */ _entity_definition_dto_js__rspack_import_0.et),
|
|
62
471
|
hL: () => (/* reexport safe */ _entity_definition_dto_js__rspack_import_0.hL),
|
|
472
|
+
hX: () => (/* reexport safe */ _definition_bundle_dto_js__rspack_import_3.hX),
|
|
473
|
+
vS: () => (/* reexport safe */ _definition_bundle_dto_js__rspack_import_3.vS),
|
|
63
474
|
ym: () => (/* reexport safe */ _schema_change_dto_js__rspack_import_2.ym)
|
|
64
475
|
});
|
|
65
476
|
|
|
66
477
|
|
|
67
478
|
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
* DRAFT - metadata created, table not yet materialized.
|
|
72
|
-
* ACTIVE - table exists; flows read and write its records.
|
|
73
|
-
* DEPRECATED - no new writes; physical table/data left intact.
|
|
74
|
-
*/ var EntityStatus = /*#__PURE__*/ function(EntityStatus) {
|
|
75
|
-
EntityStatus["DRAFT"] = "DRAFT";
|
|
76
|
-
EntityStatus["ACTIVE"] = "ACTIVE";
|
|
77
|
-
EntityStatus["DEPRECATED"] = "DEPRECATED";
|
|
78
|
-
return EntityStatus;
|
|
79
|
-
}({});
|
|
479
|
+
8835(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
480
|
+
const DEFINITION_BUNDLE_FORMAT = 'flusys.entity-builder.bundle';
|
|
481
|
+
const DEFINITION_BUNDLE_VERSION = 1;
|
|
80
482
|
|
|
81
483
|
__webpack_require__.d(__webpack_exports__, {
|
|
82
|
-
c: () => (EntityStatus)
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
},
|
|
87
|
-
9614(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
88
|
-
/**
|
|
89
|
-
* Storable field types a FieldDefinition can declare.
|
|
90
|
-
* Mapped to a driver-specific column type by SchemaDialectAdapterService.
|
|
91
|
-
*/ var FieldType = /*#__PURE__*/ function(FieldType) {
|
|
92
|
-
FieldType["TEXT"] = "TEXT";
|
|
93
|
-
FieldType["LONG_TEXT"] = "LONG_TEXT";
|
|
94
|
-
FieldType["INTEGER"] = "INTEGER";
|
|
95
|
-
FieldType["DECIMAL"] = "DECIMAL";
|
|
96
|
-
FieldType["BOOLEAN"] = "BOOLEAN";
|
|
97
|
-
FieldType["DATE"] = "DATE";
|
|
98
|
-
FieldType["DATETIME"] = "DATETIME";
|
|
99
|
-
FieldType["EMAIL"] = "EMAIL";
|
|
100
|
-
FieldType["SINGLE_SELECT"] = "SINGLE_SELECT";
|
|
101
|
-
FieldType["MULTI_SELECT"] = "MULTI_SELECT";
|
|
102
|
-
FieldType["RELATION"] = "RELATION";
|
|
103
|
-
FieldType["JSON"] = "JSON";
|
|
104
|
-
FieldType["FILE"] = "FILE";
|
|
105
|
-
return FieldType;
|
|
106
|
-
}({});
|
|
107
|
-
|
|
108
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
109
|
-
P: () => (FieldType)
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
5313(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
115
|
-
/* import */ var node_crypto__rspack_import_0 = __webpack_require__(2561);
|
|
116
|
-
/* import */ var typeorm__rspack_import_1 = __webpack_require__(7158);
|
|
117
|
-
/* import */ var _enums_field_type_enum_js__rspack_import_2 = __webpack_require__(9614);
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
/** Columns every dynamic table may carry (the `Identity` contract). Everything else is a designed field. */ const SYSTEM_COLUMN_NAMES = [
|
|
122
|
-
'id',
|
|
123
|
-
'created_at',
|
|
124
|
-
'updated_at',
|
|
125
|
-
'deleted_at',
|
|
126
|
-
'created_by_id',
|
|
127
|
-
'updated_by_id',
|
|
128
|
-
'deleted_by_id'
|
|
129
|
-
];
|
|
130
|
-
/** Field types stored as unbounded text or JSON: an index or unique constraint on them fails (MySQL) or breaks on large values (PostgreSQL). */ const NON_INDEXABLE_FIELD_TYPES = [
|
|
131
|
-
_enums_field_type_enum_js__rspack_import_2/* .FieldType.LONG_TEXT */.P.LONG_TEXT,
|
|
132
|
-
_enums_field_type_enum_js__rspack_import_2/* .FieldType.JSON */.P.JSON,
|
|
133
|
-
_enums_field_type_enum_js__rspack_import_2/* .FieldType.MULTI_SELECT */.P.MULTI_SELECT
|
|
134
|
-
];
|
|
135
|
-
const isIndexableFieldType = (fieldType)=>!NON_INDEXABLE_FIELD_TYPES.includes(fieldType);
|
|
136
|
-
const uuidColumn = (name, driver, options = {})=>new typeorm__rspack_import_1.TableColumn({
|
|
137
|
-
name,
|
|
138
|
-
...driver === 'postgres' ? {
|
|
139
|
-
type: 'uuid'
|
|
140
|
-
} : {
|
|
141
|
-
type: 'char',
|
|
142
|
-
length: '36'
|
|
143
|
-
},
|
|
144
|
-
...options
|
|
145
|
-
});
|
|
146
|
-
function buildSystemColumns(flags, driver) {
|
|
147
|
-
const columns = [
|
|
148
|
-
uuidColumn('id', driver, {
|
|
149
|
-
isPrimary: true,
|
|
150
|
-
isGenerated: true,
|
|
151
|
-
generationStrategy: 'uuid'
|
|
152
|
-
}),
|
|
153
|
-
new typeorm__rspack_import_1.TableColumn({
|
|
154
|
-
name: 'created_at',
|
|
155
|
-
type: 'timestamp',
|
|
156
|
-
isNullable: false,
|
|
157
|
-
default: 'CURRENT_TIMESTAMP'
|
|
158
|
-
}),
|
|
159
|
-
new typeorm__rspack_import_1.TableColumn({
|
|
160
|
-
name: 'updated_at',
|
|
161
|
-
type: 'timestamp',
|
|
162
|
-
isNullable: false,
|
|
163
|
-
default: 'CURRENT_TIMESTAMP'
|
|
164
|
-
})
|
|
165
|
-
];
|
|
166
|
-
if (flags.isSoftDeleteEnabled) columns.push(softDeleteColumn());
|
|
167
|
-
if (flags.isAuditEnabled) columns.push(...auditColumns(driver));
|
|
168
|
-
return columns;
|
|
169
|
-
}
|
|
170
|
-
const softDeleteColumn = ()=>new typeorm__rspack_import_1.TableColumn({
|
|
171
|
-
name: 'deleted_at',
|
|
172
|
-
type: 'timestamp',
|
|
173
|
-
isNullable: true
|
|
174
|
-
});
|
|
175
|
-
const auditColumns = (driver)=>[
|
|
176
|
-
uuidColumn('created_by_id', driver, {
|
|
177
|
-
isNullable: true
|
|
178
|
-
}),
|
|
179
|
-
uuidColumn('updated_by_id', driver, {
|
|
180
|
-
isNullable: true
|
|
181
|
-
}),
|
|
182
|
-
uuidColumn('deleted_by_id', driver, {
|
|
183
|
-
isNullable: true
|
|
184
|
-
})
|
|
185
|
-
];
|
|
186
|
-
const sameColumns = (columnNames, expected)=>columnNames.length === expected.length && expected.every((c)=>columnNames.includes(c));
|
|
187
|
-
const NAME_HASH_LENGTH = 8;
|
|
188
|
-
/**
|
|
189
|
-
* Deterministic index/constraint name within the driver's identifier limit. The hash of
|
|
190
|
-
* `table.column` keeps names distinct when the readable part is cut short, and when two
|
|
191
|
-
* table/column pairs would read the same (`eb_a_b` + `c` vs `eb_a` + `b_c`).
|
|
192
|
-
*/ function indexName(prefix, table, column, maxLength) {
|
|
193
|
-
const hash = (0,node_crypto__rspack_import_0.createHash)('sha256').update(`${table}.${column}`).digest('hex').slice(0, NAME_HASH_LENGTH);
|
|
194
|
-
const room = maxLength - prefix.length - hash.length - 2;
|
|
195
|
-
return `${prefix}_${`${table}_${column}`.slice(0, room)}_${hash}`;
|
|
196
|
-
}
|
|
197
|
-
const plainIndex = (table, column, driver, adapter)=>new typeorm__rspack_import_1.TableIndex({
|
|
198
|
-
name: indexName('idx', table, column, adapter.maxIdentifierLength(driver)),
|
|
199
|
-
columnNames: [
|
|
200
|
-
column
|
|
201
|
-
]
|
|
202
|
-
});
|
|
203
|
-
const tableUnique = (table, column, driver, adapter)=>new typeorm__rspack_import_1.TableUnique({
|
|
204
|
-
name: indexName('uq', table, column, adapter.maxIdentifierLength(driver)),
|
|
205
|
-
columnNames: [
|
|
206
|
-
column
|
|
207
|
-
]
|
|
208
|
-
});
|
|
209
|
-
/** MySQL has no unique constraints (TypeORM refuses them), only unique indexes. */ async function addUnique(qr, table, column, driver, adapter) {
|
|
210
|
-
const name = indexName('uq', table.name, column, adapter.maxIdentifierLength(driver));
|
|
211
|
-
if (driver === 'mysql') {
|
|
212
|
-
await qr.createIndex(table, new typeorm__rspack_import_1.TableIndex({
|
|
213
|
-
name,
|
|
214
|
-
columnNames: [
|
|
215
|
-
column
|
|
216
|
-
],
|
|
217
|
-
isUnique: true
|
|
218
|
-
}));
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
await qr.createUniqueConstraint(table, new typeorm__rspack_import_1.TableUnique({
|
|
222
|
-
name,
|
|
223
|
-
columnNames: [
|
|
224
|
-
column
|
|
225
|
-
]
|
|
226
|
-
}));
|
|
227
|
-
}
|
|
228
|
-
/** The stored column type, with a `uuid` stored before MySQL support became char(36) resolved to what MySQL accepts. */ function columnType(field, driver, adapter) {
|
|
229
|
-
const type = field.dbType || adapter.mapFieldType(field.fieldType, driver);
|
|
230
|
-
return driver === 'mysql' && type === 'uuid' ? 'char' : type;
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Column for a field. `enforceNotNull` controls whether the DB column is NOT NULL: true when
|
|
234
|
-
* the table is brand new (no rows can violate it); false when adding to a table that already
|
|
235
|
-
* has rows (the NOT NULL is applied afterwards, once the column has been backfilled).
|
|
236
|
-
*/ function buildFieldColumn(field, driver, adapter, options) {
|
|
237
|
-
const sizing = adapter.getColumnSizing(field.fieldType, driver);
|
|
238
|
-
return new typeorm__rspack_import_1.TableColumn({
|
|
239
|
-
name: field.code,
|
|
240
|
-
type: columnType(field, driver, adapter),
|
|
241
|
-
length: sizing.length,
|
|
242
|
-
precision: sizing.precision ?? undefined,
|
|
243
|
-
scale: sizing.scale,
|
|
244
|
-
isNullable: options.enforceNotNull ? field.nullable : true,
|
|
245
|
-
isUnique: options.withUnique ? field.unique : false
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
/** The SQL type text for a field type on a driver, e.g. `varchar(255)`, `numeric(18,4)`, `char(36)`. */ function sqlTypeFor(fieldType, driver, adapter) {
|
|
249
|
-
const base = adapter.mapFieldType(fieldType, driver);
|
|
250
|
-
const sizing = adapter.getColumnSizing(fieldType, driver);
|
|
251
|
-
if (sizing.length) return `${base}(${sizing.length})`;
|
|
252
|
-
if (sizing.precision !== undefined) return `${base}(${sizing.precision},${sizing.scale ?? 0})`;
|
|
253
|
-
return base;
|
|
254
|
-
}
|
|
255
|
-
/** Coarse type family, so `character varying` (pg) and `varchar` (mysql) compare equal. */ function typeFamily(type) {
|
|
256
|
-
const t = type.toLowerCase();
|
|
257
|
-
if (t === 'uuid') return 'uuid';
|
|
258
|
-
if (t.includes('json')) return 'json';
|
|
259
|
-
if (t.includes('timestamp') || t === 'datetime') return 'timestamp';
|
|
260
|
-
if (t === 'date') return 'date';
|
|
261
|
-
if (t.includes('bool') || t === 'tinyint') return 'boolean';
|
|
262
|
-
if (t.includes('int') && !t.includes('point')) return 'integer';
|
|
263
|
-
if (t.includes('numeric') || t.includes('decimal')) return 'numeric';
|
|
264
|
-
if (t.includes('char') || t === 'varchar') return 'varchar';
|
|
265
|
-
if (t.includes('text')) return 'text';
|
|
266
|
-
return t;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
270
|
-
$6: () => (addUnique),
|
|
271
|
-
Rm: () => (buildSystemColumns),
|
|
272
|
-
cg: () => (sqlTypeFor),
|
|
273
|
-
fu: () => (buildFieldColumn),
|
|
274
|
-
jp: () => (typeFamily),
|
|
275
|
-
mo: () => (indexName)
|
|
276
484
|
}, {
|
|
277
|
-
|
|
278
|
-
HK: auditColumns,
|
|
279
|
-
OG: softDeleteColumn,
|
|
280
|
-
d4: isIndexableFieldType,
|
|
281
|
-
gW: NON_INDEXABLE_FIELD_TYPES,
|
|
282
|
-
mq: SYSTEM_COLUMN_NAMES,
|
|
283
|
-
uy: tableUnique,
|
|
284
|
-
v7: plainIndex
|
|
485
|
+
D: DEFINITION_BUNDLE_FORMAT
|
|
285
486
|
});
|
|
286
487
|
|
|
287
488
|
|
|
288
|
-
},
|
|
289
|
-
2561(module) {
|
|
290
|
-
|
|
291
|
-
module.exports = __rspack_external_node_crypto_2e7c4b46;
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
},
|
|
295
|
-
7158(module) {
|
|
296
|
-
|
|
297
|
-
module.exports = __rspack_external_typeorm;
|
|
298
|
-
|
|
299
|
-
|
|
300
489
|
},
|
|
301
490
|
|
|
302
491
|
};
|
|
303
492
|
import { __webpack_require__ } from '../runtime.js';
|
|
304
493
|
var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
|
|
305
|
-
import * as __rspack_chunk_1 from '../
|
|
494
|
+
import * as __rspack_chunk_1 from '../897.js';
|
|
306
495
|
__webpack_require__.C(__rspack_chunk_1);
|
|
307
496
|
import * as __rspack_chunk_2 from './index.js';
|
|
308
497
|
__webpack_require__.C(__rspack_chunk_2);
|
|
309
|
-
var __webpack_exports__ = __webpack_exec__(7508);var
|
|
498
|
+
var __webpack_exports__ = __webpack_exec__(7508);var __webpack_exports__BundleEntityDto = __webpack_exports__.hX;
|
|
499
|
+
var __webpack_exports__BundleFieldDto = __webpack_exports__.U3;
|
|
500
|
+
var __webpack_exports__BundleFlowDto = __webpack_exports__.KH;
|
|
501
|
+
var __webpack_exports__CreateDynamicEntityDto = __webpack_exports__.Ot;
|
|
310
502
|
var __webpack_exports__CreateEntityDefinitionDto = __webpack_exports__._e;
|
|
311
503
|
var __webpack_exports__CreateFieldDefinitionDto = __webpack_exports__.Vj;
|
|
504
|
+
var __webpack_exports__DefinitionBundleDto = __webpack_exports__.JE;
|
|
312
505
|
var __webpack_exports__ENTITY_CHANGE_KEYS = __webpack_exports__.Oi;
|
|
313
506
|
var __webpack_exports__EntityChangesDto = __webpack_exports__.OW;
|
|
314
507
|
var __webpack_exports__EntityDefinitionResponseDto = __webpack_exports__.d_;
|
|
@@ -316,12 +509,14 @@ var __webpack_exports__EntityFieldSpecDto = __webpack_exports__.ar;
|
|
|
316
509
|
var __webpack_exports__EntityFlowInputLabelsDto = __webpack_exports__.et;
|
|
317
510
|
var __webpack_exports__EntityFlowNamesDto = __webpack_exports__.Jd;
|
|
318
511
|
var __webpack_exports__EntityFlowTextsDto = __webpack_exports__.Pc;
|
|
512
|
+
var __webpack_exports__ExportBundleDto = __webpack_exports__.QJ;
|
|
319
513
|
var __webpack_exports__FIELD_CHANGE_KEYS = __webpack_exports__.bD;
|
|
320
514
|
var __webpack_exports__FieldChangesDto = __webpack_exports__.Pr;
|
|
321
515
|
var __webpack_exports__FieldDefinitionResponseDto = __webpack_exports__.C5;
|
|
516
|
+
var __webpack_exports__ImportBundleOptionsDto = __webpack_exports__.vS;
|
|
322
517
|
var __webpack_exports__SchemaChangeAction = __webpack_exports__.M3;
|
|
323
518
|
var __webpack_exports__SchemaChangeRequestDto = __webpack_exports__.ym;
|
|
324
519
|
var __webpack_exports__SchemaCheckRequestDto = __webpack_exports__.ct;
|
|
325
520
|
var __webpack_exports__UpdateEntityDefinitionDto = __webpack_exports__.hL;
|
|
326
521
|
var __webpack_exports__UpdateFieldDefinitionDto = __webpack_exports__.C3;
|
|
327
|
-
export { __webpack_exports__CreateDynamicEntityDto as CreateDynamicEntityDto, __webpack_exports__CreateEntityDefinitionDto as CreateEntityDefinitionDto, __webpack_exports__CreateFieldDefinitionDto as CreateFieldDefinitionDto, __webpack_exports__ENTITY_CHANGE_KEYS as ENTITY_CHANGE_KEYS, __webpack_exports__EntityChangesDto as EntityChangesDto, __webpack_exports__EntityDefinitionResponseDto as EntityDefinitionResponseDto, __webpack_exports__EntityFieldSpecDto as EntityFieldSpecDto, __webpack_exports__EntityFlowInputLabelsDto as EntityFlowInputLabelsDto, __webpack_exports__EntityFlowNamesDto as EntityFlowNamesDto, __webpack_exports__EntityFlowTextsDto as EntityFlowTextsDto, __webpack_exports__FIELD_CHANGE_KEYS as FIELD_CHANGE_KEYS, __webpack_exports__FieldChangesDto as FieldChangesDto, __webpack_exports__FieldDefinitionResponseDto as FieldDefinitionResponseDto, __webpack_exports__SchemaChangeAction as SchemaChangeAction, __webpack_exports__SchemaChangeRequestDto as SchemaChangeRequestDto, __webpack_exports__SchemaCheckRequestDto as SchemaCheckRequestDto, __webpack_exports__UpdateEntityDefinitionDto as UpdateEntityDefinitionDto, __webpack_exports__UpdateFieldDefinitionDto as UpdateFieldDefinitionDto };
|
|
522
|
+
export { __webpack_exports__BundleEntityDto as BundleEntityDto, __webpack_exports__BundleFieldDto as BundleFieldDto, __webpack_exports__BundleFlowDto as BundleFlowDto, __webpack_exports__CreateDynamicEntityDto as CreateDynamicEntityDto, __webpack_exports__CreateEntityDefinitionDto as CreateEntityDefinitionDto, __webpack_exports__CreateFieldDefinitionDto as CreateFieldDefinitionDto, __webpack_exports__DefinitionBundleDto as DefinitionBundleDto, __webpack_exports__ENTITY_CHANGE_KEYS as ENTITY_CHANGE_KEYS, __webpack_exports__EntityChangesDto as EntityChangesDto, __webpack_exports__EntityDefinitionResponseDto as EntityDefinitionResponseDto, __webpack_exports__EntityFieldSpecDto as EntityFieldSpecDto, __webpack_exports__EntityFlowInputLabelsDto as EntityFlowInputLabelsDto, __webpack_exports__EntityFlowNamesDto as EntityFlowNamesDto, __webpack_exports__EntityFlowTextsDto as EntityFlowTextsDto, __webpack_exports__ExportBundleDto as ExportBundleDto, __webpack_exports__FIELD_CHANGE_KEYS as FIELD_CHANGE_KEYS, __webpack_exports__FieldChangesDto as FieldChangesDto, __webpack_exports__FieldDefinitionResponseDto as FieldDefinitionResponseDto, __webpack_exports__ImportBundleOptionsDto as ImportBundleOptionsDto, __webpack_exports__SchemaChangeAction as SchemaChangeAction, __webpack_exports__SchemaChangeRequestDto as SchemaChangeRequestDto, __webpack_exports__SchemaCheckRequestDto as SchemaCheckRequestDto, __webpack_exports__UpdateEntityDefinitionDto as UpdateEntityDefinitionDto, __webpack_exports__UpdateFieldDefinitionDto as UpdateFieldDefinitionDto };
|