vona-module-test-vona 5.0.80 → 5.0.82
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/assets/img/vona.png +0 -0
- package/dist/bean/meta.asset.d.ts +1 -0
- package/dist/dto/postQuery.d.ts +1 -0
- package/dist/index.js +56 -50
- package/package.json +1 -1
- package/src/bean/meta.asset.ts +1 -0
- package/src/dto/postQuery.ts +3 -0
- package/test/runtime.test.ts +22 -0
- package/test/static.test.ts +2 -0
|
Binary file
|
package/dist/dto/postQuery.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export interface IDtoOptionsPostQuery extends IDecoratorDtoOptions {
|
|
|
4
4
|
}
|
|
5
5
|
declare const DtoPostQuery_base: new (...args: any[]) => import("vona-module-a-orm").DtoQueryPageBase & Partial<Pick<EntityPost, "title">>;
|
|
6
6
|
export declare class DtoPostQuery extends DtoPostQuery_base {
|
|
7
|
+
title?: string;
|
|
7
8
|
userName?: string;
|
|
8
9
|
}
|
|
9
10
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -178,28 +178,28 @@ function _initializerDefineProperty(e, i, r, l) {
|
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
var _dec$1p, _dec2$1p, _dec3$E, _dec4$E, _dec5$
|
|
181
|
+
var _dec$1p, _dec2$1p, _dec3$E, _dec4$E, _dec5$B, _dec6$A, _class$1p, _class2$E, _descriptor$j, _descriptor2$g;
|
|
182
182
|
let EntityCategory = (_dec$1p = Entity('testVonaCategory'), _dec2$1p = BeanInfo({
|
|
183
183
|
module: "test-vona"
|
|
184
|
-
}), _dec3$E = Api.field(), _dec4$E = Reflect.metadata("design:type", String), _dec5$
|
|
184
|
+
}), _dec3$E = Api.field(), _dec4$E = Reflect.metadata("design:type", String), _dec5$B = Api.field(v.optional(), v.tableIdentity()), _dec6$A = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$1p(_class$1p = _dec2$1p(_class$1p = (_class2$E = class EntityCategory extends EntityBase {
|
|
185
185
|
constructor(...args) {
|
|
186
186
|
super(...args);
|
|
187
187
|
_initializerDefineProperty(this, "name", _descriptor$j, this);
|
|
188
|
-
_initializerDefineProperty(this, "categoryIdParent", _descriptor2$
|
|
188
|
+
_initializerDefineProperty(this, "categoryIdParent", _descriptor2$g, this);
|
|
189
189
|
}
|
|
190
190
|
}, _descriptor$j = _applyDecoratedDescriptor(_class2$E.prototype, "name", [_dec3$E, _dec4$E], {
|
|
191
191
|
configurable: true,
|
|
192
192
|
enumerable: true,
|
|
193
193
|
writable: true,
|
|
194
194
|
initializer: null
|
|
195
|
-
}), _descriptor2$
|
|
195
|
+
}), _descriptor2$g = _applyDecoratedDescriptor(_class2$E.prototype, "categoryIdParent", [_dec5$B, _dec6$A], {
|
|
196
196
|
configurable: true,
|
|
197
197
|
enumerable: true,
|
|
198
198
|
writable: true,
|
|
199
199
|
initializer: null
|
|
200
200
|
}), _class2$E)) || _class$1p) || _class$1p);
|
|
201
201
|
|
|
202
|
-
var _dec$1o, _dec2$1o, _dec3$D, _dec4$D, _dec5$
|
|
202
|
+
var _dec$1o, _dec2$1o, _dec3$D, _dec4$D, _dec5$A, _dec6$z, _dec7$s, _dec8$o, _class$1o, _class2$D, _descriptor$i, _descriptor2$f, _descriptor3$8;
|
|
203
203
|
let EntityOrder = (_dec$1o = Entity('testVonaOrder', {
|
|
204
204
|
openapi: {
|
|
205
205
|
title: $locale('Order')
|
|
@@ -208,13 +208,13 @@ let EntityOrder = (_dec$1o = Entity('testVonaOrder', {
|
|
|
208
208
|
module: "test-vona"
|
|
209
209
|
}), _dec3$D = Api.field(v.openapi({
|
|
210
210
|
title: $locale('OrderNo')
|
|
211
|
-
}), v.default(''), v.min(3)), _dec4$D = Reflect.metadata("design:type", String), _dec5$
|
|
211
|
+
}), v.default(''), v.min(3)), _dec4$D = Reflect.metadata("design:type", String), _dec5$A = Api.field(v.openapi({
|
|
212
212
|
title: $locale('Remark')
|
|
213
|
-
}), v.optional()), _dec6$
|
|
213
|
+
}), v.optional()), _dec6$z = Reflect.metadata("design:type", String), _dec7$s = Api.field(v.tableIdentity()), _dec8$o = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$1o(_class$1o = _dec2$1o(_class$1o = (_class2$D = class EntityOrder extends EntityBase {
|
|
214
214
|
constructor(...args) {
|
|
215
215
|
super(...args);
|
|
216
216
|
_initializerDefineProperty(this, "orderNo", _descriptor$i, this);
|
|
217
|
-
_initializerDefineProperty(this, "remark", _descriptor2$
|
|
217
|
+
_initializerDefineProperty(this, "remark", _descriptor2$f, this);
|
|
218
218
|
_initializerDefineProperty(this, "userId", _descriptor3$8, this);
|
|
219
219
|
}
|
|
220
220
|
}, _descriptor$i = _applyDecoratedDescriptor(_class2$D.prototype, "orderNo", [_dec3$D, _dec4$D], {
|
|
@@ -222,7 +222,7 @@ let EntityOrder = (_dec$1o = Entity('testVonaOrder', {
|
|
|
222
222
|
enumerable: true,
|
|
223
223
|
writable: true,
|
|
224
224
|
initializer: null
|
|
225
|
-
}), _descriptor2$
|
|
225
|
+
}), _descriptor2$f = _applyDecoratedDescriptor(_class2$D.prototype, "remark", [_dec5$A, _dec6$z], {
|
|
226
226
|
configurable: true,
|
|
227
227
|
enumerable: true,
|
|
228
228
|
writable: true,
|
|
@@ -234,14 +234,14 @@ let EntityOrder = (_dec$1o = Entity('testVonaOrder', {
|
|
|
234
234
|
initializer: null
|
|
235
235
|
}), _class2$D)) || _class$1o) || _class$1o);
|
|
236
236
|
|
|
237
|
-
var _dec$1n, _dec2$1n, _dec3$C, _dec4$C, _dec5$
|
|
237
|
+
var _dec$1n, _dec2$1n, _dec3$C, _dec4$C, _dec5$z, _dec6$y, _dec7$r, _dec8$n, _class$1n, _class2$C, _descriptor$h, _descriptor2$e, _descriptor3$7;
|
|
238
238
|
let EntityPost = (_dec$1n = Entity('testVonaPost'), _dec2$1n = BeanInfo({
|
|
239
239
|
module: "test-vona"
|
|
240
|
-
}), _dec3$C = Api.field(), _dec4$C = Reflect.metadata("design:type", String), _dec5$
|
|
240
|
+
}), _dec3$C = Api.field(), _dec4$C = Reflect.metadata("design:type", String), _dec5$z = Api.field(v.tableIdentity()), _dec6$y = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec7$r = Api.field(v.optional()), _dec8$n = Reflect.metadata("design:type", Number), _dec$1n(_class$1n = _dec2$1n(_class$1n = (_class2$C = class EntityPost extends EntityBase {
|
|
241
241
|
constructor(...args) {
|
|
242
242
|
super(...args);
|
|
243
243
|
_initializerDefineProperty(this, "title", _descriptor$h, this);
|
|
244
|
-
_initializerDefineProperty(this, "userId", _descriptor2$
|
|
244
|
+
_initializerDefineProperty(this, "userId", _descriptor2$e, this);
|
|
245
245
|
_initializerDefineProperty(this, "stars", _descriptor3$7, this);
|
|
246
246
|
}
|
|
247
247
|
}, _descriptor$h = _applyDecoratedDescriptor(_class2$C.prototype, "title", [_dec3$C, _dec4$C], {
|
|
@@ -249,7 +249,7 @@ let EntityPost = (_dec$1n = Entity('testVonaPost'), _dec2$1n = BeanInfo({
|
|
|
249
249
|
enumerable: true,
|
|
250
250
|
writable: true,
|
|
251
251
|
initializer: null
|
|
252
|
-
}), _descriptor2$
|
|
252
|
+
}), _descriptor2$e = _applyDecoratedDescriptor(_class2$C.prototype, "userId", [_dec5$z, _dec6$y], {
|
|
253
253
|
configurable: true,
|
|
254
254
|
enumerable: true,
|
|
255
255
|
writable: true,
|
|
@@ -261,37 +261,37 @@ let EntityPost = (_dec$1n = Entity('testVonaPost'), _dec2$1n = BeanInfo({
|
|
|
261
261
|
initializer: null
|
|
262
262
|
}), _class2$C)) || _class$1n) || _class$1n);
|
|
263
263
|
|
|
264
|
-
var _dec$1m, _dec2$1m, _dec3$B, _dec4$B, _dec5$
|
|
264
|
+
var _dec$1m, _dec2$1m, _dec3$B, _dec4$B, _dec5$y, _dec6$x, _class$1m, _class2$B, _descriptor$g, _descriptor2$d;
|
|
265
265
|
let EntityPostContent = (_dec$1m = Entity('testVonaPostContent'), _dec2$1m = BeanInfo({
|
|
266
266
|
module: "test-vona"
|
|
267
|
-
}), _dec3$B = Api.field(), _dec4$B = Reflect.metadata("design:type", String), _dec5$
|
|
267
|
+
}), _dec3$B = Api.field(), _dec4$B = Reflect.metadata("design:type", String), _dec5$y = Api.field(v.tableIdentity()), _dec6$x = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$1m(_class$1m = _dec2$1m(_class$1m = (_class2$B = class EntityPostContent extends EntityBase {
|
|
268
268
|
constructor(...args) {
|
|
269
269
|
super(...args);
|
|
270
270
|
_initializerDefineProperty(this, "content", _descriptor$g, this);
|
|
271
|
-
_initializerDefineProperty(this, "postId", _descriptor2$
|
|
271
|
+
_initializerDefineProperty(this, "postId", _descriptor2$d, this);
|
|
272
272
|
}
|
|
273
273
|
}, _descriptor$g = _applyDecoratedDescriptor(_class2$B.prototype, "content", [_dec3$B, _dec4$B], {
|
|
274
274
|
configurable: true,
|
|
275
275
|
enumerable: true,
|
|
276
276
|
writable: true,
|
|
277
277
|
initializer: null
|
|
278
|
-
}), _descriptor2$
|
|
278
|
+
}), _descriptor2$d = _applyDecoratedDescriptor(_class2$B.prototype, "postId", [_dec5$y, _dec6$x], {
|
|
279
279
|
configurable: true,
|
|
280
280
|
enumerable: true,
|
|
281
281
|
writable: true,
|
|
282
282
|
initializer: null
|
|
283
283
|
}), _class2$B)) || _class$1m) || _class$1m);
|
|
284
284
|
|
|
285
|
-
var _dec$1l, _dec2$1l, _dec3$A, _dec4$A, _dec5$
|
|
285
|
+
var _dec$1l, _dec2$1l, _dec3$A, _dec4$A, _dec5$x, _dec6$w, _dec7$q, _dec8$m, _dec9$e, _dec0$e, _dec1$e, _dec10$c, _class$1l, _class2$A, _descriptor$f, _descriptor2$c, _descriptor3$6, _descriptor4$1, _descriptor5$1;
|
|
286
286
|
let EntityProduct = (_dec$1l = Entity('testVonaProduct', {
|
|
287
287
|
independent: true
|
|
288
288
|
}), _dec2$1l = BeanInfo({
|
|
289
289
|
module: "test-vona"
|
|
290
|
-
}), _dec3$A = Api.field(v.title($locale('Name'))), _dec4$A = Reflect.metadata("design:type", String), _dec5$
|
|
290
|
+
}), _dec3$A = Api.field(v.title($locale('Name'))), _dec4$A = Reflect.metadata("design:type", String), _dec5$x = Api.field(v.title($locale('Price'))), _dec6$w = Reflect.metadata("design:type", Number), _dec7$q = Api.field(v.title($locale('Quantity'))), _dec8$m = Reflect.metadata("design:type", Number), _dec9$e = Api.field(v.title($locale('Amount'))), _dec0$e = Reflect.metadata("design:type", Number), _dec1$e = Api.field(v.tableIdentity()), _dec10$c = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$1l(_class$1l = _dec2$1l(_class$1l = (_class2$A = class EntityProduct extends EntityBase {
|
|
291
291
|
constructor(...args) {
|
|
292
292
|
super(...args);
|
|
293
293
|
_initializerDefineProperty(this, "name", _descriptor$f, this);
|
|
294
|
-
_initializerDefineProperty(this, "price", _descriptor2$
|
|
294
|
+
_initializerDefineProperty(this, "price", _descriptor2$c, this);
|
|
295
295
|
_initializerDefineProperty(this, "quantity", _descriptor3$6, this);
|
|
296
296
|
_initializerDefineProperty(this, "amount", _descriptor4$1, this);
|
|
297
297
|
_initializerDefineProperty(this, "orderId", _descriptor5$1, this);
|
|
@@ -301,7 +301,7 @@ let EntityProduct = (_dec$1l = Entity('testVonaProduct', {
|
|
|
301
301
|
enumerable: true,
|
|
302
302
|
writable: true,
|
|
303
303
|
initializer: null
|
|
304
|
-
}), _descriptor2$
|
|
304
|
+
}), _descriptor2$c = _applyDecoratedDescriptor(_class2$A.prototype, "price", [_dec5$x, _dec6$w], {
|
|
305
305
|
configurable: true,
|
|
306
306
|
enumerable: true,
|
|
307
307
|
writable: true,
|
|
@@ -338,41 +338,41 @@ let EntityRole = (_dec$1k = Entity('testVonaRole'), _dec2$1k = BeanInfo({
|
|
|
338
338
|
initializer: null
|
|
339
339
|
}), _class2$z)) || _class$1k) || _class$1k);
|
|
340
340
|
|
|
341
|
-
var _dec$1j, _dec2$1j, _dec3$y, _dec4$y, _dec5$
|
|
341
|
+
var _dec$1j, _dec2$1j, _dec3$y, _dec4$y, _dec5$w, _dec6$v, _class$1j, _class2$y, _descriptor$d, _descriptor2$b;
|
|
342
342
|
let EntityRoleUser = (_dec$1j = Entity('testVonaRoleUser'), _dec2$1j = BeanInfo({
|
|
343
343
|
module: "test-vona"
|
|
344
|
-
}), _dec3$y = Api.field(v.tableIdentity()), _dec4$y = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec5$
|
|
344
|
+
}), _dec3$y = Api.field(v.tableIdentity()), _dec4$y = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec5$w = Api.field(v.tableIdentity()), _dec6$v = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$1j(_class$1j = _dec2$1j(_class$1j = (_class2$y = class EntityRoleUser extends EntityBase {
|
|
345
345
|
constructor(...args) {
|
|
346
346
|
super(...args);
|
|
347
347
|
_initializerDefineProperty(this, "userId", _descriptor$d, this);
|
|
348
|
-
_initializerDefineProperty(this, "roleId", _descriptor2$
|
|
348
|
+
_initializerDefineProperty(this, "roleId", _descriptor2$b, this);
|
|
349
349
|
}
|
|
350
350
|
}, _descriptor$d = _applyDecoratedDescriptor(_class2$y.prototype, "userId", [_dec3$y, _dec4$y], {
|
|
351
351
|
configurable: true,
|
|
352
352
|
enumerable: true,
|
|
353
353
|
writable: true,
|
|
354
354
|
initializer: null
|
|
355
|
-
}), _descriptor2$
|
|
355
|
+
}), _descriptor2$b = _applyDecoratedDescriptor(_class2$y.prototype, "roleId", [_dec5$w, _dec6$v], {
|
|
356
356
|
configurable: true,
|
|
357
357
|
enumerable: true,
|
|
358
358
|
writable: true,
|
|
359
359
|
initializer: null
|
|
360
360
|
}), _class2$y)) || _class$1j) || _class$1j);
|
|
361
361
|
|
|
362
|
-
var _dec$1i, _dec2$1i, _dec3$x, _dec4$x, _dec5$
|
|
362
|
+
var _dec$1i, _dec2$1i, _dec3$x, _dec4$x, _dec5$v, _dec6$u, _dec7$p, _dec8$l, _class$1i, _class2$x, _descriptor$c, _descriptor2$a, _descriptor3$5;
|
|
363
363
|
let EntityTest = (_dec$1i = Entity('testVonaTest', {
|
|
364
364
|
openapi: {
|
|
365
365
|
title: $locale('Test')
|
|
366
366
|
}
|
|
367
367
|
}), _dec2$1i = BeanInfo({
|
|
368
368
|
module: "test-vona"
|
|
369
|
-
}), _dec3$x = Api.field(v.title($locale('Test'))), _dec4$x = Reflect.metadata("design:type", String), _dec5$
|
|
369
|
+
}), _dec3$x = Api.field(v.title($locale('Test'))), _dec4$x = Reflect.metadata("design:type", String), _dec5$v = Api.field(), _dec6$u = Reflect.metadata("design:type", String), _dec7$p = Api.field(v.default(() => {
|
|
370
370
|
return new Date();
|
|
371
371
|
})), _dec8$l = Reflect.metadata("design:type", typeof Date === "undefined" ? Object : Date), _dec$1i(_class$1i = _dec2$1i(_class$1i = (_class2$x = class EntityTest extends EntityBase {
|
|
372
372
|
constructor(...args) {
|
|
373
373
|
super(...args);
|
|
374
374
|
_initializerDefineProperty(this, "title", _descriptor$c, this);
|
|
375
|
-
_initializerDefineProperty(this, "description", _descriptor2$
|
|
375
|
+
_initializerDefineProperty(this, "description", _descriptor2$a, this);
|
|
376
376
|
_initializerDefineProperty(this, "testDate", _descriptor3$5, this);
|
|
377
377
|
}
|
|
378
378
|
}, _descriptor$c = _applyDecoratedDescriptor(_class2$x.prototype, "title", [_dec3$x, _dec4$x], {
|
|
@@ -380,7 +380,7 @@ let EntityTest = (_dec$1i = Entity('testVonaTest', {
|
|
|
380
380
|
enumerable: true,
|
|
381
381
|
writable: true,
|
|
382
382
|
initializer: null
|
|
383
|
-
}), _descriptor2$
|
|
383
|
+
}), _descriptor2$a = _applyDecoratedDescriptor(_class2$x.prototype, "description", [_dec5$v, _dec6$u], {
|
|
384
384
|
configurable: true,
|
|
385
385
|
enumerable: true,
|
|
386
386
|
writable: true,
|
|
@@ -392,14 +392,14 @@ let EntityTest = (_dec$1i = Entity('testVonaTest', {
|
|
|
392
392
|
initializer: null
|
|
393
393
|
}), _class2$x)) || _class$1i) || _class$1i);
|
|
394
394
|
|
|
395
|
-
var _dec$1h, _dec2$1h, _dec3$w, _dec4$w, _dec5$
|
|
395
|
+
var _dec$1h, _dec2$1h, _dec3$w, _dec4$w, _dec5$u, _dec6$t, _dec7$o, _dec8$k, _class$1h, _class2$w, _descriptor$b, _descriptor2$9, _descriptor3$4;
|
|
396
396
|
let EntityUser = (_dec$1h = Entity('testVonaUser'), _dec2$1h = BeanInfo({
|
|
397
397
|
module: "test-vona"
|
|
398
|
-
}), _dec3$w = Api.field(), _dec4$w = Reflect.metadata("design:type", String), _dec5$
|
|
398
|
+
}), _dec3$w = Api.field(), _dec4$w = Reflect.metadata("design:type", String), _dec5$u = Api.field(v.optional()), _dec6$t = Reflect.metadata("design:type", Number), _dec7$o = Api.field(v.optional()), _dec8$k = Reflect.metadata("design:type", Number), _dec$1h(_class$1h = _dec2$1h(_class$1h = (_class2$w = class EntityUser extends EntityBase {
|
|
399
399
|
constructor(...args) {
|
|
400
400
|
super(...args);
|
|
401
401
|
_initializerDefineProperty(this, "name", _descriptor$b, this);
|
|
402
|
-
_initializerDefineProperty(this, "age", _descriptor2$
|
|
402
|
+
_initializerDefineProperty(this, "age", _descriptor2$9, this);
|
|
403
403
|
_initializerDefineProperty(this, "scores", _descriptor3$4, this);
|
|
404
404
|
}
|
|
405
405
|
}, _descriptor$b = _applyDecoratedDescriptor(_class2$w.prototype, "name", [_dec3$w, _dec4$w], {
|
|
@@ -407,7 +407,7 @@ let EntityUser = (_dec$1h = Entity('testVonaUser'), _dec2$1h = BeanInfo({
|
|
|
407
407
|
enumerable: true,
|
|
408
408
|
writable: true,
|
|
409
409
|
initializer: null
|
|
410
|
-
}), _descriptor2$
|
|
410
|
+
}), _descriptor2$9 = _applyDecoratedDescriptor(_class2$w.prototype, "age", [_dec5$u, _dec6$t], {
|
|
411
411
|
configurable: true,
|
|
412
412
|
enumerable: true,
|
|
413
413
|
writable: true,
|
|
@@ -704,7 +704,7 @@ let BeanTestCtx = (_dec$12 = Bean(), _dec2$12 = BeanInfo({
|
|
|
704
704
|
module: "test-vona"
|
|
705
705
|
}), _dec$12(_class$12 = _dec2$12(_class$12 = class BeanTestCtx extends TestCtx1 {}) || _class$12) || _class$12);
|
|
706
706
|
|
|
707
|
-
var _dec$11, _dec2$11, _dec3$v, _dec4$v, _class$11, _dec5$
|
|
707
|
+
var _dec$11, _dec2$11, _dec3$v, _dec4$v, _class$11, _dec5$t, _dec6$s, _dec7$n, _dec8$j, _dec9$d, _dec0$d, _dec1$d, _dec10$b, _dec11$b, _dec12$b, _dec13$b, _dec14$a, _dec15$a, _dec16$a, _class2$v, _class3;
|
|
708
708
|
let ServiceAopMethodBase = (_dec$11 = Aspect.aopMethod('test-vona:test', {
|
|
709
709
|
wrapper: '+'
|
|
710
710
|
}), _dec2$11 = Aspect.aopMethod('test-vona:test', {
|
|
@@ -714,7 +714,7 @@ let ServiceAopMethodBase = (_dec$11 = Aspect.aopMethod('test-vona:test', {
|
|
|
714
714
|
return 'hello';
|
|
715
715
|
}
|
|
716
716
|
}, _applyDecoratedDescriptor(_class$11.prototype, "testSyncBase", [_dec$11, _dec2$11, _dec3$v, _dec4$v], Object.getOwnPropertyDescriptor(_class$11.prototype, "testSyncBase"), _class$11.prototype), _class$11);
|
|
717
|
-
let ServiceAopMethod = (_dec5$
|
|
717
|
+
let ServiceAopMethod = (_dec5$t = Service(), _dec6$s = BeanInfo({
|
|
718
718
|
module: "test-vona"
|
|
719
719
|
}), _dec7$n = Aspect.aopMethod('test-vona:test', {
|
|
720
720
|
wrapper: '+'
|
|
@@ -728,7 +728,7 @@ let ServiceAopMethod = (_dec5$s = Service(), _dec6$r = BeanInfo({
|
|
|
728
728
|
wrapper: '+'
|
|
729
729
|
}), _dec14$a = Aspect.aopMethod('test-vona:test', {
|
|
730
730
|
wrapper: '-'
|
|
731
|
-
}), _dec15$a = Reflect.metadata("design:type", Function), _dec16$a = Reflect.metadata("design:paramtypes", []), _dec5$
|
|
731
|
+
}), _dec15$a = Reflect.metadata("design:type", Function), _dec16$a = Reflect.metadata("design:paramtypes", []), _dec5$t(_class2$v = _dec6$s(_class2$v = (_class3 = class ServiceAopMethod extends ServiceAopMethodBase {
|
|
732
732
|
constructor(...args) {
|
|
733
733
|
super(...args);
|
|
734
734
|
this._name = '';
|
|
@@ -747,7 +747,7 @@ let ServiceAopMethod = (_dec5$s = Service(), _dec6$r = BeanInfo({
|
|
|
747
747
|
}
|
|
748
748
|
}, _applyDecoratedDescriptor(_class3.prototype, "testSync", [_dec7$n, _dec8$j, _dec9$d, _dec0$d], Object.getOwnPropertyDescriptor(_class3.prototype, "testSync"), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, "testAsync", [_dec1$d, _dec10$b, _dec11$b, _dec12$b], Object.getOwnPropertyDescriptor(_class3.prototype, "testAsync"), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, "name", [_dec13$b, _dec14$a, _dec15$a, _dec16$a], Object.getOwnPropertyDescriptor(_class3.prototype, "name"), _class3.prototype), _class3)) || _class2$v) || _class2$v);
|
|
749
749
|
|
|
750
|
-
var _dec$10, _dec2$10, _dec3$u, _dec4$u, _dec5$
|
|
750
|
+
var _dec$10, _dec2$10, _dec3$u, _dec4$u, _dec5$s, _dec6$r, _dec7$m, _dec8$i, _dec9$c, _dec0$c, _dec1$c, _dec10$a, _dec11$a, _dec12$a, _dec13$a, _dec14$9, _dec15$9, _dec16$9, _dec17$8, _dec18$8, _dec19$8, _dec20$8, _dec21$6, _dec22$5, _dec23$5, _dec24$5, _dec25$5, _dec26$4, _dec27$4, _class$10, _class2$u;
|
|
751
751
|
function cacheKeyFn(args, prop, options) {
|
|
752
752
|
return `${this.$beanFullName}_${options.cacheProp ?? prop}_${getKeyHash(args)}`;
|
|
753
753
|
}
|
|
@@ -757,7 +757,7 @@ let ServiceCaching = (_dec$10 = Service(), _dec2$10 = BeanInfo({
|
|
|
757
757
|
cacheName: 'test-vona:test',
|
|
758
758
|
cacheProp: 'test',
|
|
759
759
|
cacheKeyFn: 'cacheKey'
|
|
760
|
-
}), _dec4$u = Reflect.metadata("design:type", Function), _dec5$
|
|
760
|
+
}), _dec4$u = Reflect.metadata("design:type", Function), _dec5$s = Reflect.metadata("design:paramtypes", [Number]), _dec6$r = Caching.get({
|
|
761
761
|
cacheName: 'test-vona:test',
|
|
762
762
|
cacheProp: 'test',
|
|
763
763
|
cacheKeyFn
|
|
@@ -831,7 +831,7 @@ let ServiceCaching = (_dec$10 = Service(), _dec2$10 = BeanInfo({
|
|
|
831
831
|
async clear() {
|
|
832
832
|
// do nothing
|
|
833
833
|
}
|
|
834
|
-
}, _applyDecoratedDescriptor(_class2$u.prototype, "get", [_dec3$u, _dec4$u, _dec5$
|
|
834
|
+
}, _applyDecoratedDescriptor(_class2$u.prototype, "get", [_dec3$u, _dec4$u, _dec5$s], Object.getOwnPropertyDescriptor(_class2$u.prototype, "get"), _class2$u.prototype), _applyDecoratedDescriptor(_class2$u.prototype, "get2", [_dec6$r, _dec7$m, _dec8$i], Object.getOwnPropertyDescriptor(_class2$u.prototype, "get2"), _class2$u.prototype), _applyDecoratedDescriptor(_class2$u.prototype, "get3", [_dec9$c, _dec0$c, _dec1$c], Object.getOwnPropertyDescriptor(_class2$u.prototype, "get3"), _class2$u.prototype), _applyDecoratedDescriptor(_class2$u.prototype, "get4", [_dec10$a, _dec11$a, _dec12$a], Object.getOwnPropertyDescriptor(_class2$u.prototype, "get4"), _class2$u.prototype), _applyDecoratedDescriptor(_class2$u.prototype, "set", [_dec13$a, _dec14$9, _dec15$9], Object.getOwnPropertyDescriptor(_class2$u.prototype, "set"), _class2$u.prototype), _applyDecoratedDescriptor(_class2$u.prototype, "set2", [_dec16$9, _dec17$8, _dec18$8], Object.getOwnPropertyDescriptor(_class2$u.prototype, "set2"), _class2$u.prototype), _applyDecoratedDescriptor(_class2$u.prototype, "set3", [_dec19$8, _dec20$8, _dec21$6], Object.getOwnPropertyDescriptor(_class2$u.prototype, "set3"), _class2$u.prototype), _applyDecoratedDescriptor(_class2$u.prototype, "del", [_dec22$5, _dec23$5, _dec24$5], Object.getOwnPropertyDescriptor(_class2$u.prototype, "del"), _class2$u.prototype), _applyDecoratedDescriptor(_class2$u.prototype, "clear", [_dec25$5, _dec26$4, _dec27$4], Object.getOwnPropertyDescriptor(_class2$u.prototype, "clear"), _class2$u.prototype), _class2$u)) || _class$10) || _class$10);
|
|
835
835
|
|
|
836
836
|
var _dec$$, _dec2$$, _class$$;
|
|
837
837
|
let ServiceCategory = (_dec$$ = Service(), _dec2$$ = BeanInfo({
|
|
@@ -1042,10 +1042,10 @@ let ServiceOrder = (_dec$_ = Service(), _dec2$_ = BeanInfo({
|
|
|
1042
1042
|
}
|
|
1043
1043
|
}) || _class$_) || _class$_);
|
|
1044
1044
|
|
|
1045
|
-
var _dec$Z, _dec2$Z, _dec3$t, _dec4$t, _dec5$
|
|
1045
|
+
var _dec$Z, _dec2$Z, _dec3$t, _dec4$t, _dec5$r, _class$Z, _class2$t;
|
|
1046
1046
|
let ServicePost = (_dec$Z = Service(), _dec2$Z = BeanInfo({
|
|
1047
1047
|
module: "test-vona"
|
|
1048
|
-
}), _dec3$t = Core.transaction(), _dec4$t = Reflect.metadata("design:type", Function), _dec5$
|
|
1048
|
+
}), _dec3$t = Core.transaction(), _dec4$t = Reflect.metadata("design:type", Function), _dec5$r = Reflect.metadata("design:paramtypes", []), _dec$Z(_class$Z = _dec2$Z(_class$Z = (_class2$t = class ServicePost extends BeanBase {
|
|
1049
1049
|
async findMany(params) {
|
|
1050
1050
|
return await this.scope.model.post.selectAndCount({
|
|
1051
1051
|
...params,
|
|
@@ -1287,7 +1287,7 @@ let ServicePost = (_dec$Z = Service(), _dec2$Z = BeanInfo({
|
|
|
1287
1287
|
// async count() {
|
|
1288
1288
|
// return await this.scope.model.post.count();
|
|
1289
1289
|
// }
|
|
1290
|
-
}, _applyDecoratedDescriptor(_class2$t.prototype, "transaction", [_dec3$t, _dec4$t, _dec5$
|
|
1290
|
+
}, _applyDecoratedDescriptor(_class2$t.prototype, "transaction", [_dec3$t, _dec4$t, _dec5$r], Object.getOwnPropertyDescriptor(_class2$t.prototype, "transaction"), _class2$t.prototype), _class2$t)) || _class$Z) || _class$Z);
|
|
1291
1291
|
|
|
1292
1292
|
var _dec$Y, _dec2$Y, _class$Y;
|
|
1293
1293
|
let ServiceProduct = (_dec$Y = Service(), _dec2$Y = BeanInfo({
|
|
@@ -1433,12 +1433,12 @@ let ServiceTestData = (_dec$U = Service(), _dec2$U = BeanInfo({
|
|
|
1433
1433
|
}
|
|
1434
1434
|
}) || _class$U) || _class$U);
|
|
1435
1435
|
|
|
1436
|
-
var _dec$T, _dec2$T, _dec3$s, _dec4$s, _dec5$
|
|
1436
|
+
var _dec$T, _dec2$T, _dec3$s, _dec4$s, _dec5$q, _dec6$q, _dec7$l, _dec8$h, _class$T, _class2$s;
|
|
1437
1437
|
const tableNameFail$1 = '__tempTransactionFail';
|
|
1438
1438
|
const tableNameSuccess$1 = '__tempTransactionSuccess';
|
|
1439
1439
|
let ServiceTransaction = (_dec$T = Service(), _dec2$T = BeanInfo({
|
|
1440
1440
|
module: "test-vona"
|
|
1441
|
-
}), _dec3$s = Core.transaction(), _dec4$s = Reflect.metadata("design:type", Function), _dec5$
|
|
1441
|
+
}), _dec3$s = Core.transaction(), _dec4$s = Reflect.metadata("design:type", Function), _dec5$q = Reflect.metadata("design:paramtypes", [Object]), _dec6$q = Core.transaction(), _dec7$l = Reflect.metadata("design:type", Function), _dec8$h = Reflect.metadata("design:paramtypes", [Object]), _dec$T(_class$T = _dec2$T(_class$T = (_class2$s = class ServiceTransaction extends BeanBase {
|
|
1442
1442
|
async fail(item) {
|
|
1443
1443
|
await this.bean.model.update(`${tableNameFail$1}`, item);
|
|
1444
1444
|
await this.bean.model.update(`${tableNameFail$1}error`, item);
|
|
@@ -1446,7 +1446,7 @@ let ServiceTransaction = (_dec$T = Service(), _dec2$T = BeanInfo({
|
|
|
1446
1446
|
async success(item) {
|
|
1447
1447
|
await this.bean.model.update(tableNameSuccess$1, item);
|
|
1448
1448
|
}
|
|
1449
|
-
}, _applyDecoratedDescriptor(_class2$s.prototype, "fail", [_dec3$s, _dec4$s, _dec5$
|
|
1449
|
+
}, _applyDecoratedDescriptor(_class2$s.prototype, "fail", [_dec3$s, _dec4$s, _dec5$q], Object.getOwnPropertyDescriptor(_class2$s.prototype, "fail"), _class2$s.prototype), _applyDecoratedDescriptor(_class2$s.prototype, "success", [_dec6$q, _dec7$l, _dec8$h], Object.getOwnPropertyDescriptor(_class2$s.prototype, "success"), _class2$s.prototype), _class2$s)) || _class$T) || _class$T);
|
|
1450
1450
|
|
|
1451
1451
|
var _dec$S, _dec2$S, _class$S;
|
|
1452
1452
|
let ServiceUser = (_dec$S = Service(), _dec2$S = BeanInfo({
|
|
@@ -1870,7 +1870,7 @@ let DtoPostGroup = (_dec$u = Dto(), _dec2$u = BeanInfo({
|
|
|
1870
1870
|
sum: 'stars'
|
|
1871
1871
|
}) {}) || _class$u) || _class$u);
|
|
1872
1872
|
|
|
1873
|
-
var _dec$t, _dec2$t, _dec3$p, _dec4$p, _class$t, _class2$p, _descriptor$8;
|
|
1873
|
+
var _dec$t, _dec2$t, _dec3$p, _dec4$p, _dec5$p, _dec6$p, _class$t, _class2$p, _descriptor$8, _descriptor2$8;
|
|
1874
1874
|
let DtoPostQuery = (_dec$t = Dto({
|
|
1875
1875
|
openapi: {
|
|
1876
1876
|
query: {
|
|
@@ -1879,19 +1879,25 @@ let DtoPostQuery = (_dec$t = Dto({
|
|
|
1879
1879
|
}
|
|
1880
1880
|
}), _dec2$t = BeanInfo({
|
|
1881
1881
|
module: "test-vona"
|
|
1882
|
-
}), _dec3$p = Api.field(v.optional(), v.openapi({
|
|
1882
|
+
}), _dec3$p = Api.field(v.optional()), _dec4$p = Reflect.metadata("design:type", String), _dec5$p = Api.field(v.optional(), v.openapi({
|
|
1883
1883
|
query: {
|
|
1884
1884
|
table: 'testVonaUser',
|
|
1885
1885
|
joinOn: ['userId', 'testVonaUser.id'],
|
|
1886
1886
|
originalName: 'name',
|
|
1887
1887
|
op: '_eqI_'
|
|
1888
1888
|
}
|
|
1889
|
-
})),
|
|
1889
|
+
})), _dec6$p = Reflect.metadata("design:type", String), _dec$t(_class$t = _dec2$t(_class$t = (_class2$p = class DtoPostQuery extends $Dto.queryPage(EntityPost, ['title']) {
|
|
1890
1890
|
constructor(...args) {
|
|
1891
1891
|
super(...args);
|
|
1892
|
-
_initializerDefineProperty(this, "
|
|
1892
|
+
_initializerDefineProperty(this, "title", _descriptor$8, this);
|
|
1893
|
+
_initializerDefineProperty(this, "userName", _descriptor2$8, this);
|
|
1893
1894
|
}
|
|
1894
|
-
}, _descriptor$8 = _applyDecoratedDescriptor(_class2$p.prototype, "
|
|
1895
|
+
}, _descriptor$8 = _applyDecoratedDescriptor(_class2$p.prototype, "title", [_dec3$p, _dec4$p], {
|
|
1896
|
+
configurable: true,
|
|
1897
|
+
enumerable: true,
|
|
1898
|
+
writable: true,
|
|
1899
|
+
initializer: null
|
|
1900
|
+
}), _descriptor2$8 = _applyDecoratedDescriptor(_class2$p.prototype, "userName", [_dec5$p, _dec6$p], {
|
|
1895
1901
|
configurable: true,
|
|
1896
1902
|
enumerable: true,
|
|
1897
1903
|
writable: true,
|
package/package.json
CHANGED
package/src/bean/meta.asset.ts
CHANGED
package/src/dto/postQuery.ts
CHANGED
|
@@ -10,6 +10,9 @@ export interface IDtoOptionsPostQuery extends IDecoratorDtoOptions {}
|
|
|
10
10
|
openapi: { query: { table: $tableName(EntityPost) } },
|
|
11
11
|
})
|
|
12
12
|
export class DtoPostQuery extends $Dto.queryPage(EntityPost, ['title']) {
|
|
13
|
+
@Api.field(v.optional())
|
|
14
|
+
title?: string;
|
|
15
|
+
|
|
13
16
|
@Api.field(v.optional(), v.openapi({
|
|
14
17
|
query: {
|
|
15
18
|
table: 'testVonaUser',
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import assert from 'node:assert';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { describe, it } from 'node:test';
|
|
4
|
+
import fse from 'fs-extra';
|
|
5
|
+
import { loadJSONFile } from 'vona';
|
|
6
|
+
import { app } from 'vona-mock';
|
|
7
|
+
|
|
8
|
+
describe('runtime.test.ts', () => {
|
|
9
|
+
it('action:runtime', async () => {
|
|
10
|
+
await app.bean.executor.mockCtx(async () => {
|
|
11
|
+
const runtimeFile = path.join(app.projectPath, '.app/runtime/-.json');
|
|
12
|
+
if (!fse.existsSync(runtimeFile)) throw new Error('dev server not running');
|
|
13
|
+
const runtime = await loadJSONFile(runtimeFile);
|
|
14
|
+
const runtimeUser = runtime['a-user'];
|
|
15
|
+
// isAuthenticated: isolate + header
|
|
16
|
+
const isAuthenticated = await app.bean.executor.newCtxIsolate(async () => {
|
|
17
|
+
return await app.bean.executor.performAction('get', '/test/vona/passport/isAuthenticated', { authToken: runtimeUser?.accessToken });
|
|
18
|
+
});
|
|
19
|
+
assert.equal(isAuthenticated, true);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
});
|
package/test/static.test.ts
CHANGED
|
@@ -15,6 +15,8 @@ describe('static.test.ts', () => {
|
|
|
15
15
|
const scopeTest = app.scope('test-vona');
|
|
16
16
|
const file = scopeTest.asset.get('static', 'img/vona.png');
|
|
17
17
|
assert.equal(file.includes('vona.png'), true);
|
|
18
|
+
const file2 = scopeTest.asset.get('img', 'vona.png');
|
|
19
|
+
assert.equal(file2.includes('vona.png'), true);
|
|
18
20
|
});
|
|
19
21
|
});
|
|
20
22
|
});
|