vona-module-test-vona 5.0.43 → 5.0.45
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/dist/.metadata/index.d.ts +32 -0
- package/dist/controller/captcha.d.ts +8 -0
- package/dist/dto/signin.d.ts +7 -0
- package/dist/index.js +615 -432
- package/dist/service/category.d.ts +1 -0
- package/dist/service/post.d.ts +24 -10
- package/dist/service/product.d.ts +3 -0
- package/dist/service/user.d.ts +13 -0
- package/package.json +1 -1
- package/src/.metadata/index.ts +43 -0
- package/src/controller/captcha.ts +18 -0
- package/src/dto/signin.ts +14 -0
- package/src/service/category.ts +88 -0
- package/src/service/order.ts +14 -10
- package/src/service/post.ts +53 -14
- package/src/service/product.ts +6 -0
- package/src/service/user.ts +39 -8
- package/test/captcha.test.ts +80 -0
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BeanInfo, BeanAopBase, BeanAopMethodBase, BeanBase, cast, retry, BeanScopeBase } from 'vona';
|
|
2
2
|
import { Aop, AopMethod, Aspect } from 'vona-module-a-aspect';
|
|
3
3
|
import { Api, v, Arg } from 'vona-module-a-openapi';
|
|
4
|
-
import { Entity, EntityBase, Model, $relation, BeanModelBase, Database, $Dto, TableIdentity as TableIdentity$1 } from 'vona-module-a-orm';
|
|
4
|
+
import { Entity, EntityBase, Model, $relation, BeanModelBase, $relationDynamic, Database, $Dto, TableIdentity as TableIdentity$1 } from 'vona-module-a-orm';
|
|
5
5
|
import { ModelCategoryChain as ModelCategoryChain$1 } from 'vona-module-test-vona';
|
|
6
6
|
import moment from 'moment';
|
|
7
7
|
import { Bean, Service, Scope } from 'vona-module-a-bean';
|
|
@@ -22,15 +22,15 @@ import { z } from 'zod';
|
|
|
22
22
|
import { DtoJwtToken } from 'vona-module-a-jwt';
|
|
23
23
|
import { SymbolUploadValue } from 'vona-module-a-upload';
|
|
24
24
|
|
|
25
|
-
var _dec$
|
|
26
|
-
let AopRegExp = (_dec$
|
|
25
|
+
var _dec$1c, _dec2$1c, _class$1c;
|
|
26
|
+
let AopRegExp = (_dec$1c = Aop({
|
|
27
27
|
match: [/^test-vona\.service\.test\w+$/, 'testCtx'],
|
|
28
28
|
meta: {
|
|
29
29
|
mode: 'test'
|
|
30
30
|
}
|
|
31
|
-
}), _dec2$
|
|
31
|
+
}), _dec2$1c = BeanInfo({
|
|
32
32
|
module: "test-vona"
|
|
33
|
-
}), _dec$
|
|
33
|
+
}), _dec$1c(_class$1c = _dec2$1c(_class$1c = class AopRegExp extends BeanAopBase {
|
|
34
34
|
__get_name__(next) {
|
|
35
35
|
const value = next();
|
|
36
36
|
return `${value}:regexpaop`;
|
|
@@ -52,24 +52,24 @@ let AopRegExp = (_dec$19 = Aop({
|
|
|
52
52
|
const result = await next();
|
|
53
53
|
return `${result}:regexpaop`;
|
|
54
54
|
}
|
|
55
|
-
}) || _class$
|
|
55
|
+
}) || _class$1c) || _class$1c);
|
|
56
56
|
|
|
57
|
-
var _dec$
|
|
57
|
+
var _dec$1b, _dec2$1b, _class$1b;
|
|
58
58
|
class AopSimpleBase extends BeanAopBase {
|
|
59
59
|
actionSync(_args, next) {
|
|
60
60
|
const result = next();
|
|
61
61
|
return `${result}:simpleaop`;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
let AopSimple = (_dec$
|
|
64
|
+
let AopSimple = (_dec$1b = Aop({
|
|
65
65
|
match: 'testCtx',
|
|
66
66
|
dependencies: 'test-vona:regExp',
|
|
67
67
|
meta: {
|
|
68
68
|
mode: 'test'
|
|
69
69
|
}
|
|
70
|
-
}), _dec2$
|
|
70
|
+
}), _dec2$1b = BeanInfo({
|
|
71
71
|
module: "test-vona"
|
|
72
|
-
}), _dec$
|
|
72
|
+
}), _dec$1b(_class$1b = _dec2$1b(_class$1b = class AopSimple extends AopSimpleBase {
|
|
73
73
|
// magic
|
|
74
74
|
__get__(prop, next) {
|
|
75
75
|
const value = next();
|
|
@@ -109,14 +109,14 @@ let AopSimple = (_dec$18 = Aop({
|
|
|
109
109
|
const result = await next();
|
|
110
110
|
return `${result}:simpleaop`;
|
|
111
111
|
}
|
|
112
|
-
}) || _class$
|
|
112
|
+
}) || _class$1b) || _class$1b);
|
|
113
113
|
|
|
114
|
-
var _dec$
|
|
115
|
-
let AopMethodTest = (_dec$
|
|
114
|
+
var _dec$1a, _dec2$1a, _class$1a;
|
|
115
|
+
let AopMethodTest = (_dec$1a = AopMethod({
|
|
116
116
|
wrapper: ''
|
|
117
|
-
}), _dec2$
|
|
117
|
+
}), _dec2$1a = BeanInfo({
|
|
118
118
|
module: "test-vona"
|
|
119
|
-
}), _dec$
|
|
119
|
+
}), _dec$1a(_class$1a = _dec2$1a(_class$1a = class AopMethodTest extends BeanAopMethodBase {
|
|
120
120
|
get(options, next, _receiver, _prop) {
|
|
121
121
|
const res = next();
|
|
122
122
|
return this._wrapper(options.wrapper, res);
|
|
@@ -143,7 +143,7 @@ let AopMethodTest = (_dec$17 = AopMethod({
|
|
|
143
143
|
if (index === data.length - wrapper.length) data = data.substring(0, index);
|
|
144
144
|
return data;
|
|
145
145
|
}
|
|
146
|
-
}) || _class$
|
|
146
|
+
}) || _class$1a) || _class$1a);
|
|
147
147
|
|
|
148
148
|
function _applyDecoratedDescriptor(i, e, r, n, l) {
|
|
149
149
|
var a = {};
|
|
@@ -162,251 +162,251 @@ function _initializerDefineProperty(e, i, r, l) {
|
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
var _dec$
|
|
166
|
-
let EntityCategory = (_dec$
|
|
165
|
+
var _dec$19, _dec2$19, _dec3$v, _dec4$v, _dec5$u, _dec6$t, _class$19, _class2$v, _descriptor$d, _descriptor2$c;
|
|
166
|
+
let EntityCategory = (_dec$19 = Entity('testVonaCategory'), _dec2$19 = BeanInfo({
|
|
167
167
|
module: "test-vona"
|
|
168
|
-
}), _dec3$
|
|
168
|
+
}), _dec3$v = Api.field(), _dec4$v = Reflect.metadata("design:type", String), _dec5$u = Api.field(v.optional(), v.tableIdentity()), _dec6$t = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$19(_class$19 = _dec2$19(_class$19 = (_class2$v = class EntityCategory extends EntityBase {
|
|
169
169
|
constructor(...args) {
|
|
170
170
|
super(...args);
|
|
171
|
-
_initializerDefineProperty(this, "name", _descriptor$
|
|
172
|
-
_initializerDefineProperty(this, "categoryIdParent", _descriptor2$
|
|
171
|
+
_initializerDefineProperty(this, "name", _descriptor$d, this);
|
|
172
|
+
_initializerDefineProperty(this, "categoryIdParent", _descriptor2$c, this);
|
|
173
173
|
}
|
|
174
|
-
}, _descriptor$
|
|
174
|
+
}, _descriptor$d = _applyDecoratedDescriptor(_class2$v.prototype, "name", [_dec3$v, _dec4$v], {
|
|
175
175
|
configurable: true,
|
|
176
176
|
enumerable: true,
|
|
177
177
|
writable: true,
|
|
178
178
|
initializer: null
|
|
179
|
-
}), _descriptor2$
|
|
179
|
+
}), _descriptor2$c = _applyDecoratedDescriptor(_class2$v.prototype, "categoryIdParent", [_dec5$u, _dec6$t], {
|
|
180
180
|
configurable: true,
|
|
181
181
|
enumerable: true,
|
|
182
182
|
writable: true,
|
|
183
183
|
initializer: null
|
|
184
|
-
}), _class2$
|
|
184
|
+
}), _class2$v)) || _class$19) || _class$19);
|
|
185
185
|
|
|
186
|
-
var _dec$
|
|
187
|
-
let EntityOrder = (_dec$
|
|
186
|
+
var _dec$18, _dec2$18, _dec3$u, _dec4$u, _dec5$t, _dec6$s, _dec7$n, _dec8$j, _class$18, _class2$u, _descriptor$c, _descriptor2$b, _descriptor3$6;
|
|
187
|
+
let EntityOrder = (_dec$18 = Entity('testVonaOrder', {
|
|
188
188
|
openapi: {
|
|
189
189
|
title: $locale('Order')
|
|
190
190
|
}
|
|
191
|
-
}), _dec2$
|
|
191
|
+
}), _dec2$18 = BeanInfo({
|
|
192
192
|
module: "test-vona"
|
|
193
|
-
}), _dec3$
|
|
193
|
+
}), _dec3$u = Api.field(v.openapi({
|
|
194
194
|
title: $locale('OrderNo')
|
|
195
|
-
}), v.default(''), v.min(3)), _dec4$
|
|
195
|
+
}), v.default(''), v.min(3)), _dec4$u = Reflect.metadata("design:type", String), _dec5$t = Api.field(v.openapi({
|
|
196
196
|
title: $locale('Remark')
|
|
197
|
-
}), v.optional()), _dec6$
|
|
197
|
+
}), v.optional()), _dec6$s = Reflect.metadata("design:type", String), _dec7$n = Api.field(v.tableIdentity()), _dec8$j = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$18(_class$18 = _dec2$18(_class$18 = (_class2$u = class EntityOrder extends EntityBase {
|
|
198
198
|
constructor(...args) {
|
|
199
199
|
super(...args);
|
|
200
|
-
_initializerDefineProperty(this, "orderNo", _descriptor$
|
|
201
|
-
_initializerDefineProperty(this, "remark", _descriptor2$
|
|
200
|
+
_initializerDefineProperty(this, "orderNo", _descriptor$c, this);
|
|
201
|
+
_initializerDefineProperty(this, "remark", _descriptor2$b, this);
|
|
202
202
|
_initializerDefineProperty(this, "userId", _descriptor3$6, this);
|
|
203
203
|
}
|
|
204
|
-
}, _descriptor$
|
|
204
|
+
}, _descriptor$c = _applyDecoratedDescriptor(_class2$u.prototype, "orderNo", [_dec3$u, _dec4$u], {
|
|
205
205
|
configurable: true,
|
|
206
206
|
enumerable: true,
|
|
207
207
|
writable: true,
|
|
208
208
|
initializer: null
|
|
209
|
-
}), _descriptor2$
|
|
209
|
+
}), _descriptor2$b = _applyDecoratedDescriptor(_class2$u.prototype, "remark", [_dec5$t, _dec6$s], {
|
|
210
210
|
configurable: true,
|
|
211
211
|
enumerable: true,
|
|
212
212
|
writable: true,
|
|
213
213
|
initializer: null
|
|
214
|
-
}), _descriptor3$6 = _applyDecoratedDescriptor(_class2$
|
|
214
|
+
}), _descriptor3$6 = _applyDecoratedDescriptor(_class2$u.prototype, "userId", [_dec7$n, _dec8$j], {
|
|
215
215
|
configurable: true,
|
|
216
216
|
enumerable: true,
|
|
217
217
|
writable: true,
|
|
218
218
|
initializer: null
|
|
219
|
-
}), _class2$
|
|
219
|
+
}), _class2$u)) || _class$18) || _class$18);
|
|
220
220
|
|
|
221
|
-
var _dec$
|
|
222
|
-
let EntityPost = (_dec$
|
|
221
|
+
var _dec$17, _dec2$17, _dec3$t, _dec4$t, _dec5$s, _dec6$r, _dec7$m, _dec8$i, _class$17, _class2$t, _descriptor$b, _descriptor2$a, _descriptor3$5;
|
|
222
|
+
let EntityPost = (_dec$17 = Entity('testVonaPost'), _dec2$17 = BeanInfo({
|
|
223
223
|
module: "test-vona"
|
|
224
|
-
}), _dec3$
|
|
224
|
+
}), _dec3$t = Api.field(), _dec4$t = Reflect.metadata("design:type", String), _dec5$s = Api.field(v.tableIdentity()), _dec6$r = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec7$m = Api.field(v.optional()), _dec8$i = Reflect.metadata("design:type", Number), _dec$17(_class$17 = _dec2$17(_class$17 = (_class2$t = class EntityPost extends EntityBase {
|
|
225
225
|
constructor(...args) {
|
|
226
226
|
super(...args);
|
|
227
|
-
_initializerDefineProperty(this, "title", _descriptor$
|
|
228
|
-
_initializerDefineProperty(this, "userId", _descriptor2$
|
|
227
|
+
_initializerDefineProperty(this, "title", _descriptor$b, this);
|
|
228
|
+
_initializerDefineProperty(this, "userId", _descriptor2$a, this);
|
|
229
229
|
_initializerDefineProperty(this, "stars", _descriptor3$5, this);
|
|
230
230
|
}
|
|
231
|
-
}, _descriptor$
|
|
231
|
+
}, _descriptor$b = _applyDecoratedDescriptor(_class2$t.prototype, "title", [_dec3$t, _dec4$t], {
|
|
232
232
|
configurable: true,
|
|
233
233
|
enumerable: true,
|
|
234
234
|
writable: true,
|
|
235
235
|
initializer: null
|
|
236
|
-
}), _descriptor2$
|
|
236
|
+
}), _descriptor2$a = _applyDecoratedDescriptor(_class2$t.prototype, "userId", [_dec5$s, _dec6$r], {
|
|
237
237
|
configurable: true,
|
|
238
238
|
enumerable: true,
|
|
239
239
|
writable: true,
|
|
240
240
|
initializer: null
|
|
241
|
-
}), _descriptor3$5 = _applyDecoratedDescriptor(_class2$
|
|
241
|
+
}), _descriptor3$5 = _applyDecoratedDescriptor(_class2$t.prototype, "stars", [_dec7$m, _dec8$i], {
|
|
242
242
|
configurable: true,
|
|
243
243
|
enumerable: true,
|
|
244
244
|
writable: true,
|
|
245
245
|
initializer: null
|
|
246
|
-
}), _class2$
|
|
246
|
+
}), _class2$t)) || _class$17) || _class$17);
|
|
247
247
|
|
|
248
|
-
var _dec$
|
|
249
|
-
let EntityPostContent = (_dec$
|
|
248
|
+
var _dec$16, _dec2$16, _dec3$s, _dec4$s, _dec5$r, _dec6$q, _class$16, _class2$s, _descriptor$a, _descriptor2$9;
|
|
249
|
+
let EntityPostContent = (_dec$16 = Entity('testVonaPostContent'), _dec2$16 = BeanInfo({
|
|
250
250
|
module: "test-vona"
|
|
251
|
-
}), _dec3$
|
|
251
|
+
}), _dec3$s = Api.field(), _dec4$s = Reflect.metadata("design:type", String), _dec5$r = Api.field(v.tableIdentity()), _dec6$q = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$16(_class$16 = _dec2$16(_class$16 = (_class2$s = class EntityPostContent extends EntityBase {
|
|
252
252
|
constructor(...args) {
|
|
253
253
|
super(...args);
|
|
254
|
-
_initializerDefineProperty(this, "content", _descriptor$
|
|
255
|
-
_initializerDefineProperty(this, "postId", _descriptor2$
|
|
254
|
+
_initializerDefineProperty(this, "content", _descriptor$a, this);
|
|
255
|
+
_initializerDefineProperty(this, "postId", _descriptor2$9, this);
|
|
256
256
|
}
|
|
257
|
-
}, _descriptor$
|
|
257
|
+
}, _descriptor$a = _applyDecoratedDescriptor(_class2$s.prototype, "content", [_dec3$s, _dec4$s], {
|
|
258
258
|
configurable: true,
|
|
259
259
|
enumerable: true,
|
|
260
260
|
writable: true,
|
|
261
261
|
initializer: null
|
|
262
|
-
}), _descriptor2$
|
|
262
|
+
}), _descriptor2$9 = _applyDecoratedDescriptor(_class2$s.prototype, "postId", [_dec5$r, _dec6$q], {
|
|
263
263
|
configurable: true,
|
|
264
264
|
enumerable: true,
|
|
265
265
|
writable: true,
|
|
266
266
|
initializer: null
|
|
267
|
-
}), _class2$
|
|
267
|
+
}), _class2$s)) || _class$16) || _class$16);
|
|
268
268
|
|
|
269
|
-
var _dec$
|
|
270
|
-
let EntityProduct = (_dec$
|
|
269
|
+
var _dec$15, _dec2$15, _dec3$r, _dec4$r, _dec5$q, _dec6$p, _dec7$l, _dec8$h, _dec9$a, _dec0$a, _dec1$a, _dec10$8, _class$15, _class2$r, _descriptor$9, _descriptor2$8, _descriptor3$4, _descriptor4, _descriptor5;
|
|
270
|
+
let EntityProduct = (_dec$15 = Entity('testVonaProduct', {
|
|
271
271
|
independent: true
|
|
272
|
-
}), _dec2$
|
|
272
|
+
}), _dec2$15 = BeanInfo({
|
|
273
273
|
module: "test-vona"
|
|
274
|
-
}), _dec3$
|
|
274
|
+
}), _dec3$r = Api.field(v.openapi({
|
|
275
275
|
title: $locale('Name')
|
|
276
|
-
})), _dec4$
|
|
276
|
+
})), _dec4$r = Reflect.metadata("design:type", String), _dec5$q = Api.field(v.title($locale('Price'))), _dec6$p = Reflect.metadata("design:type", Number), _dec7$l = Api.field(v.title($locale('Quantity'))), _dec8$h = Reflect.metadata("design:type", Number), _dec9$a = Api.field(v.title($locale('Amount'))), _dec0$a = Reflect.metadata("design:type", Number), _dec1$a = Api.field(v.tableIdentity()), _dec10$8 = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$15(_class$15 = _dec2$15(_class$15 = (_class2$r = class EntityProduct extends EntityBase {
|
|
277
277
|
constructor(...args) {
|
|
278
278
|
super(...args);
|
|
279
|
-
_initializerDefineProperty(this, "name", _descriptor$
|
|
280
|
-
_initializerDefineProperty(this, "price", _descriptor2$
|
|
279
|
+
_initializerDefineProperty(this, "name", _descriptor$9, this);
|
|
280
|
+
_initializerDefineProperty(this, "price", _descriptor2$8, this);
|
|
281
281
|
_initializerDefineProperty(this, "quantity", _descriptor3$4, this);
|
|
282
282
|
_initializerDefineProperty(this, "amount", _descriptor4, this);
|
|
283
283
|
_initializerDefineProperty(this, "orderId", _descriptor5, this);
|
|
284
284
|
}
|
|
285
|
-
}, _descriptor$
|
|
285
|
+
}, _descriptor$9 = _applyDecoratedDescriptor(_class2$r.prototype, "name", [_dec3$r, _dec4$r], {
|
|
286
286
|
configurable: true,
|
|
287
287
|
enumerable: true,
|
|
288
288
|
writable: true,
|
|
289
289
|
initializer: null
|
|
290
|
-
}), _descriptor2$
|
|
290
|
+
}), _descriptor2$8 = _applyDecoratedDescriptor(_class2$r.prototype, "price", [_dec5$q, _dec6$p], {
|
|
291
291
|
configurable: true,
|
|
292
292
|
enumerable: true,
|
|
293
293
|
writable: true,
|
|
294
294
|
initializer: null
|
|
295
|
-
}), _descriptor3$4 = _applyDecoratedDescriptor(_class2$
|
|
295
|
+
}), _descriptor3$4 = _applyDecoratedDescriptor(_class2$r.prototype, "quantity", [_dec7$l, _dec8$h], {
|
|
296
296
|
configurable: true,
|
|
297
297
|
enumerable: true,
|
|
298
298
|
writable: true,
|
|
299
299
|
initializer: null
|
|
300
|
-
}), _descriptor4 = _applyDecoratedDescriptor(_class2$
|
|
300
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2$r.prototype, "amount", [_dec9$a, _dec0$a], {
|
|
301
301
|
configurable: true,
|
|
302
302
|
enumerable: true,
|
|
303
303
|
writable: true,
|
|
304
304
|
initializer: null
|
|
305
|
-
}), _descriptor5 = _applyDecoratedDescriptor(_class2$
|
|
305
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2$r.prototype, "orderId", [_dec1$a, _dec10$8], {
|
|
306
306
|
configurable: true,
|
|
307
307
|
enumerable: true,
|
|
308
308
|
writable: true,
|
|
309
309
|
initializer: null
|
|
310
|
-
}), _class2$
|
|
310
|
+
}), _class2$r)) || _class$15) || _class$15);
|
|
311
311
|
|
|
312
|
-
var _dec$
|
|
313
|
-
let EntityRole = (_dec$
|
|
312
|
+
var _dec$14, _dec2$14, _dec3$q, _dec4$q, _class$14, _class2$q, _descriptor$8;
|
|
313
|
+
let EntityRole = (_dec$14 = Entity('testVonaRole'), _dec2$14 = BeanInfo({
|
|
314
314
|
module: "test-vona"
|
|
315
|
-
}), _dec3$
|
|
315
|
+
}), _dec3$q = Api.field(), _dec4$q = Reflect.metadata("design:type", String), _dec$14(_class$14 = _dec2$14(_class$14 = (_class2$q = class EntityRole extends EntityBase {
|
|
316
316
|
constructor(...args) {
|
|
317
317
|
super(...args);
|
|
318
|
-
_initializerDefineProperty(this, "name", _descriptor$
|
|
318
|
+
_initializerDefineProperty(this, "name", _descriptor$8, this);
|
|
319
319
|
}
|
|
320
|
-
}, _descriptor$
|
|
320
|
+
}, _descriptor$8 = _applyDecoratedDescriptor(_class2$q.prototype, "name", [_dec3$q, _dec4$q], {
|
|
321
321
|
configurable: true,
|
|
322
322
|
enumerable: true,
|
|
323
323
|
writable: true,
|
|
324
324
|
initializer: null
|
|
325
|
-
}), _class2$
|
|
325
|
+
}), _class2$q)) || _class$14) || _class$14);
|
|
326
326
|
|
|
327
|
-
var _dec$
|
|
328
|
-
let EntityRoleUser = (_dec$
|
|
327
|
+
var _dec$13, _dec2$13, _dec3$p, _dec4$p, _dec5$p, _dec6$o, _class$13, _class2$p, _descriptor$7, _descriptor2$7;
|
|
328
|
+
let EntityRoleUser = (_dec$13 = Entity('testVonaRoleUser'), _dec2$13 = BeanInfo({
|
|
329
329
|
module: "test-vona"
|
|
330
|
-
}), _dec3$
|
|
330
|
+
}), _dec3$p = Api.field(v.tableIdentity()), _dec4$p = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec5$p = Api.field(v.tableIdentity()), _dec6$o = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$13(_class$13 = _dec2$13(_class$13 = (_class2$p = class EntityRoleUser extends EntityBase {
|
|
331
331
|
constructor(...args) {
|
|
332
332
|
super(...args);
|
|
333
|
-
_initializerDefineProperty(this, "userId", _descriptor$
|
|
334
|
-
_initializerDefineProperty(this, "roleId", _descriptor2$
|
|
333
|
+
_initializerDefineProperty(this, "userId", _descriptor$7, this);
|
|
334
|
+
_initializerDefineProperty(this, "roleId", _descriptor2$7, this);
|
|
335
335
|
}
|
|
336
|
-
}, _descriptor$
|
|
336
|
+
}, _descriptor$7 = _applyDecoratedDescriptor(_class2$p.prototype, "userId", [_dec3$p, _dec4$p], {
|
|
337
337
|
configurable: true,
|
|
338
338
|
enumerable: true,
|
|
339
339
|
writable: true,
|
|
340
340
|
initializer: null
|
|
341
|
-
}), _descriptor2$
|
|
341
|
+
}), _descriptor2$7 = _applyDecoratedDescriptor(_class2$p.prototype, "roleId", [_dec5$p, _dec6$o], {
|
|
342
342
|
configurable: true,
|
|
343
343
|
enumerable: true,
|
|
344
344
|
writable: true,
|
|
345
345
|
initializer: null
|
|
346
|
-
}), _class2$
|
|
346
|
+
}), _class2$p)) || _class$13) || _class$13);
|
|
347
347
|
|
|
348
|
-
var _dec
|
|
349
|
-
let EntityTest = (_dec
|
|
348
|
+
var _dec$12, _dec2$12, _dec3$o, _dec4$o, _dec5$o, _dec6$n, _dec7$k, _dec8$g, _class$12, _class2$o, _descriptor$6, _descriptor2$6, _descriptor3$3;
|
|
349
|
+
let EntityTest = (_dec$12 = Entity('testVonaTest', {
|
|
350
350
|
openapi: {
|
|
351
351
|
title: $locale('Test')
|
|
352
352
|
}
|
|
353
|
-
}), _dec2
|
|
353
|
+
}), _dec2$12 = BeanInfo({
|
|
354
354
|
module: "test-vona"
|
|
355
|
-
}), _dec3$
|
|
355
|
+
}), _dec3$o = Api.field(v.title($locale('Test'))), _dec4$o = Reflect.metadata("design:type", String), _dec5$o = Api.field(), _dec6$n = Reflect.metadata("design:type", String), _dec7$k = Api.field(v.default(() => {
|
|
356
356
|
return new Date();
|
|
357
|
-
})), _dec8$
|
|
357
|
+
})), _dec8$g = Reflect.metadata("design:type", typeof Date === "undefined" ? Object : Date), _dec$12(_class$12 = _dec2$12(_class$12 = (_class2$o = class EntityTest extends EntityBase {
|
|
358
358
|
constructor(...args) {
|
|
359
359
|
super(...args);
|
|
360
|
-
_initializerDefineProperty(this, "title", _descriptor$
|
|
361
|
-
_initializerDefineProperty(this, "description", _descriptor2$
|
|
360
|
+
_initializerDefineProperty(this, "title", _descriptor$6, this);
|
|
361
|
+
_initializerDefineProperty(this, "description", _descriptor2$6, this);
|
|
362
362
|
_initializerDefineProperty(this, "testDate", _descriptor3$3, this);
|
|
363
363
|
}
|
|
364
|
-
}, _descriptor$
|
|
364
|
+
}, _descriptor$6 = _applyDecoratedDescriptor(_class2$o.prototype, "title", [_dec3$o, _dec4$o], {
|
|
365
365
|
configurable: true,
|
|
366
366
|
enumerable: true,
|
|
367
367
|
writable: true,
|
|
368
368
|
initializer: null
|
|
369
|
-
}), _descriptor2$
|
|
369
|
+
}), _descriptor2$6 = _applyDecoratedDescriptor(_class2$o.prototype, "description", [_dec5$o, _dec6$n], {
|
|
370
370
|
configurable: true,
|
|
371
371
|
enumerable: true,
|
|
372
372
|
writable: true,
|
|
373
373
|
initializer: null
|
|
374
|
-
}), _descriptor3$3 = _applyDecoratedDescriptor(_class2$
|
|
374
|
+
}), _descriptor3$3 = _applyDecoratedDescriptor(_class2$o.prototype, "testDate", [_dec7$k, _dec8$g], {
|
|
375
375
|
configurable: true,
|
|
376
376
|
enumerable: true,
|
|
377
377
|
writable: true,
|
|
378
378
|
initializer: null
|
|
379
|
-
}), _class2$
|
|
379
|
+
}), _class2$o)) || _class$12) || _class$12);
|
|
380
380
|
|
|
381
|
-
var _dec$
|
|
382
|
-
let EntityUser = (_dec$
|
|
381
|
+
var _dec$11, _dec2$11, _dec3$n, _dec4$n, _dec5$n, _dec6$m, _dec7$j, _dec8$f, _class$11, _class2$n, _descriptor$5, _descriptor2$5, _descriptor3$2;
|
|
382
|
+
let EntityUser = (_dec$11 = Entity('testVonaUser'), _dec2$11 = BeanInfo({
|
|
383
383
|
module: "test-vona"
|
|
384
|
-
}), _dec3$
|
|
384
|
+
}), _dec3$n = Api.field(), _dec4$n = Reflect.metadata("design:type", String), _dec5$n = Api.field(v.optional()), _dec6$m = Reflect.metadata("design:type", Number), _dec7$j = Api.field(v.optional()), _dec8$f = Reflect.metadata("design:type", Number), _dec$11(_class$11 = _dec2$11(_class$11 = (_class2$n = class EntityUser extends EntityBase {
|
|
385
385
|
constructor(...args) {
|
|
386
386
|
super(...args);
|
|
387
|
-
_initializerDefineProperty(this, "name", _descriptor$
|
|
388
|
-
_initializerDefineProperty(this, "age", _descriptor2$
|
|
387
|
+
_initializerDefineProperty(this, "name", _descriptor$5, this);
|
|
388
|
+
_initializerDefineProperty(this, "age", _descriptor2$5, this);
|
|
389
389
|
_initializerDefineProperty(this, "scores", _descriptor3$2, this);
|
|
390
390
|
}
|
|
391
|
-
}, _descriptor$
|
|
391
|
+
}, _descriptor$5 = _applyDecoratedDescriptor(_class2$n.prototype, "name", [_dec3$n, _dec4$n], {
|
|
392
392
|
configurable: true,
|
|
393
393
|
enumerable: true,
|
|
394
394
|
writable: true,
|
|
395
395
|
initializer: null
|
|
396
|
-
}), _descriptor2$
|
|
396
|
+
}), _descriptor2$5 = _applyDecoratedDescriptor(_class2$n.prototype, "age", [_dec5$n, _dec6$m], {
|
|
397
397
|
configurable: true,
|
|
398
398
|
enumerable: true,
|
|
399
399
|
writable: true,
|
|
400
400
|
initializer: null
|
|
401
|
-
}), _descriptor3$2 = _applyDecoratedDescriptor(_class2$
|
|
401
|
+
}), _descriptor3$2 = _applyDecoratedDescriptor(_class2$n.prototype, "scores", [_dec7$j, _dec8$f], {
|
|
402
402
|
configurable: true,
|
|
403
403
|
enumerable: true,
|
|
404
404
|
writable: true,
|
|
405
405
|
initializer: null
|
|
406
|
-
}), _class2$
|
|
406
|
+
}), _class2$n)) || _class$11) || _class$11);
|
|
407
407
|
|
|
408
|
-
var _dec$
|
|
409
|
-
let ModelCategory = (_dec$
|
|
408
|
+
var _dec$10, _dec2$10, _class$10;
|
|
409
|
+
let ModelCategory = (_dec$10 = Model({
|
|
410
410
|
entity: EntityCategory,
|
|
411
411
|
relations: {
|
|
412
412
|
children: $relation.hasMany(() => ModelCategory, 'categoryIdParent', {
|
|
@@ -417,12 +417,12 @@ let ModelCategory = (_dec$Z = Model({
|
|
|
417
417
|
cache: {
|
|
418
418
|
modelsClear: () => ModelCategoryChain$1
|
|
419
419
|
}
|
|
420
|
-
}), _dec2$
|
|
420
|
+
}), _dec2$10 = BeanInfo({
|
|
421
421
|
module: "test-vona"
|
|
422
|
-
}), _dec$
|
|
422
|
+
}), _dec$10(_class$10 = _dec2$10(_class$10 = class ModelCategory extends BeanModelBase {}) || _class$10) || _class$10);
|
|
423
423
|
|
|
424
|
-
var _dec
|
|
425
|
-
let ModelCategoryChain = (_dec
|
|
424
|
+
var _dec$$, _dec2$$, _class$$;
|
|
425
|
+
let ModelCategoryChain = (_dec$$ = Model({
|
|
426
426
|
entity: EntityCategory,
|
|
427
427
|
relations: {
|
|
428
428
|
parent: $relation.belongsTo(() => ModelCategoryChain, () => ModelCategoryChain, 'categoryIdParent', {
|
|
@@ -430,19 +430,19 @@ let ModelCategoryChain = (_dec$Y = Model({
|
|
|
430
430
|
columns: ['id', 'name', 'categoryIdParent']
|
|
431
431
|
})
|
|
432
432
|
}
|
|
433
|
-
}), _dec2
|
|
433
|
+
}), _dec2$$ = BeanInfo({
|
|
434
434
|
module: "test-vona"
|
|
435
|
-
}), _dec
|
|
435
|
+
}), _dec$$(_class$$ = _dec2$$(_class$$ = class ModelCategoryChain extends BeanModelBase {}) || _class$$) || _class$$);
|
|
436
436
|
|
|
437
|
-
var _dec$
|
|
438
|
-
let ModelProduct = (_dec$
|
|
437
|
+
var _dec$_, _dec2$_, _class$_;
|
|
438
|
+
let ModelProduct = (_dec$_ = Model({
|
|
439
439
|
entity: EntityProduct
|
|
440
|
-
}), _dec2$
|
|
440
|
+
}), _dec2$_ = BeanInfo({
|
|
441
441
|
module: "test-vona"
|
|
442
|
-
}), _dec$
|
|
442
|
+
}), _dec$_(_class$_ = _dec2$_(_class$_ = class ModelProduct extends BeanModelBase {}) || _class$_) || _class$_);
|
|
443
443
|
|
|
444
|
-
var _dec$
|
|
445
|
-
let ModelOrderStats = (_dec$
|
|
444
|
+
var _dec$Z, _dec2$Z, _class$Z;
|
|
445
|
+
let ModelOrderStats = (_dec$Z = Model({
|
|
446
446
|
entity: EntityOrder,
|
|
447
447
|
relations: {
|
|
448
448
|
productStats: $relation.hasMany(() => ModelProduct, 'orderId', {
|
|
@@ -460,12 +460,12 @@ let ModelOrderStats = (_dec$W = Model({
|
|
|
460
460
|
}
|
|
461
461
|
})
|
|
462
462
|
}
|
|
463
|
-
}), _dec2$
|
|
463
|
+
}), _dec2$Z = BeanInfo({
|
|
464
464
|
module: "test-vona"
|
|
465
|
-
}), _dec$
|
|
465
|
+
}), _dec$Z(_class$Z = _dec2$Z(_class$Z = class ModelOrderStats extends BeanModelBase {}) || _class$Z) || _class$Z);
|
|
466
466
|
|
|
467
|
-
var _dec$
|
|
468
|
-
let ModelPostContent = (_dec$
|
|
467
|
+
var _dec$Y, _dec2$Y, _class$Y;
|
|
468
|
+
let ModelPostContent = (_dec$Y = Model({
|
|
469
469
|
entity: EntityPostContent,
|
|
470
470
|
relations: {
|
|
471
471
|
post: $relation.belongsTo(() => ModelPostContent, () => ModelPost, 'postId')
|
|
@@ -473,12 +473,12 @@ let ModelPostContent = (_dec$V = Model({
|
|
|
473
473
|
cache: {
|
|
474
474
|
modelsClear: () => ModelPost
|
|
475
475
|
}
|
|
476
|
-
}), _dec2$
|
|
476
|
+
}), _dec2$Y = BeanInfo({
|
|
477
477
|
module: "test-vona"
|
|
478
|
-
}), _dec$
|
|
478
|
+
}), _dec$Y(_class$Y = _dec2$Y(_class$Y = class ModelPostContent extends BeanModelBase {}) || _class$Y) || _class$Y);
|
|
479
479
|
|
|
480
|
-
var _dec$
|
|
481
|
-
let ModelPost = (_dec$
|
|
480
|
+
var _dec$X, _dec2$X, _class$X;
|
|
481
|
+
let ModelPost = (_dec$X = Model({
|
|
482
482
|
entity: EntityPost,
|
|
483
483
|
relations: {
|
|
484
484
|
postContent: $relation.hasOne(ModelPostContent, 'postId', {
|
|
@@ -489,12 +489,12 @@ let ModelPost = (_dec$U = Model({
|
|
|
489
489
|
columns: ['id', 'name']
|
|
490
490
|
})
|
|
491
491
|
}
|
|
492
|
-
}), _dec2$
|
|
492
|
+
}), _dec2$X = BeanInfo({
|
|
493
493
|
module: "test-vona"
|
|
494
|
-
}), _dec$
|
|
494
|
+
}), _dec$X(_class$X = _dec2$X(_class$X = class ModelPost extends BeanModelBase {}) || _class$X) || _class$X);
|
|
495
495
|
|
|
496
|
-
var _dec$
|
|
497
|
-
let ModelUserStats = (_dec$
|
|
496
|
+
var _dec$W, _dec2$W, _class$W;
|
|
497
|
+
let ModelUserStats = (_dec$W = Model({
|
|
498
498
|
entity: EntityUser,
|
|
499
499
|
relations: {
|
|
500
500
|
posts: $relation.hasMany(() => ModelPost, 'userId', {
|
|
@@ -510,12 +510,12 @@ let ModelUserStats = (_dec$T = Model({
|
|
|
510
510
|
}
|
|
511
511
|
})
|
|
512
512
|
}
|
|
513
|
-
}), _dec2$
|
|
513
|
+
}), _dec2$W = BeanInfo({
|
|
514
514
|
module: "test-vona"
|
|
515
|
-
}), _dec$
|
|
515
|
+
}), _dec$W(_class$W = _dec2$W(_class$W = class ModelUserStats extends BeanModelBase {}) || _class$W) || _class$W);
|
|
516
516
|
|
|
517
|
-
var _dec$
|
|
518
|
-
let ModelUserStatsGroup = (_dec$
|
|
517
|
+
var _dec$V, _dec2$V, _class$V;
|
|
518
|
+
let ModelUserStatsGroup = (_dec$V = Model({
|
|
519
519
|
entity: EntityUser,
|
|
520
520
|
relations: {
|
|
521
521
|
posts: $relation.hasMany(() => ModelPost, 'userId', {
|
|
@@ -535,12 +535,12 @@ let ModelUserStatsGroup = (_dec$S = Model({
|
|
|
535
535
|
orders: [['name', 'asc']]
|
|
536
536
|
}, undefined, true)
|
|
537
537
|
}
|
|
538
|
-
}), _dec2$
|
|
538
|
+
}), _dec2$V = BeanInfo({
|
|
539
539
|
module: "test-vona"
|
|
540
|
-
}), _dec$
|
|
540
|
+
}), _dec$V(_class$V = _dec2$V(_class$V = class ModelUserStatsGroup extends BeanModelBase {}) || _class$V) || _class$V);
|
|
541
541
|
|
|
542
|
-
var _dec$
|
|
543
|
-
let ModelUser = (_dec$
|
|
542
|
+
var _dec$U, _dec2$U, _class$U;
|
|
543
|
+
let ModelUser = (_dec$U = Model({
|
|
544
544
|
entity: EntityUser,
|
|
545
545
|
relations: {
|
|
546
546
|
posts: $relation.hasMany(() => ModelPost, 'userId', {
|
|
@@ -553,12 +553,12 @@ let ModelUser = (_dec$R = Model({
|
|
|
553
553
|
cache: {
|
|
554
554
|
modelsClear: [() => ModelUserStats, () => ModelUserStatsGroup]
|
|
555
555
|
}
|
|
556
|
-
}), _dec2$
|
|
556
|
+
}), _dec2$U = BeanInfo({
|
|
557
557
|
module: "test-vona"
|
|
558
|
-
}), _dec$
|
|
558
|
+
}), _dec$U(_class$U = _dec2$U(_class$U = class ModelUser extends BeanModelBase {}) || _class$U) || _class$U);
|
|
559
559
|
|
|
560
|
-
var _dec$
|
|
561
|
-
let ModelOrder = (_dec$
|
|
560
|
+
var _dec$T, _dec2$T, _class$T;
|
|
561
|
+
let ModelOrder = (_dec$T = Model({
|
|
562
562
|
entity: EntityOrder,
|
|
563
563
|
relations: {
|
|
564
564
|
user: $relation.belongsTo(() => ModelOrder, () => ModelUser, 'userId', {
|
|
@@ -573,39 +573,39 @@ let ModelOrder = (_dec$Q = Model({
|
|
|
573
573
|
cache: {
|
|
574
574
|
modelsClear: () => ModelOrderStats
|
|
575
575
|
}
|
|
576
|
-
}), _dec2$
|
|
576
|
+
}), _dec2$T = BeanInfo({
|
|
577
577
|
module: "test-vona"
|
|
578
|
-
}), _dec$
|
|
578
|
+
}), _dec$T(_class$T = _dec2$T(_class$T = class ModelOrder extends BeanModelBase {}) || _class$T) || _class$T);
|
|
579
579
|
|
|
580
|
-
var _dec$
|
|
581
|
-
let ModelRoleUser = (_dec$
|
|
580
|
+
var _dec$S, _dec2$S, _class$S;
|
|
581
|
+
let ModelRoleUser = (_dec$S = Model({
|
|
582
582
|
entity: EntityRoleUser
|
|
583
|
-
}), _dec2$
|
|
583
|
+
}), _dec2$S = BeanInfo({
|
|
584
584
|
module: "test-vona"
|
|
585
|
-
}), _dec$
|
|
585
|
+
}), _dec$S(_class$S = _dec2$S(_class$S = class ModelRoleUser extends BeanModelBase {}) || _class$S) || _class$S);
|
|
586
586
|
|
|
587
|
-
var _dec$
|
|
588
|
-
let ModelRole = (_dec$
|
|
587
|
+
var _dec$R, _dec2$R, _class$R;
|
|
588
|
+
let ModelRole = (_dec$R = Model({
|
|
589
589
|
entity: EntityRole,
|
|
590
590
|
relations: {
|
|
591
591
|
users: $relation.belongsToMany(() => ModelRoleUser, () => ModelUser, 'roleId', 'userId', {
|
|
592
592
|
columns: ['id', 'name']
|
|
593
593
|
})
|
|
594
594
|
}
|
|
595
|
-
}), _dec2$
|
|
595
|
+
}), _dec2$R = BeanInfo({
|
|
596
596
|
module: "test-vona"
|
|
597
|
-
}), _dec$
|
|
597
|
+
}), _dec$R(_class$R = _dec2$R(_class$R = class ModelRole extends BeanModelBase {}) || _class$R) || _class$R);
|
|
598
598
|
|
|
599
|
-
var _dec$
|
|
600
|
-
let ModelTest = (_dec$
|
|
599
|
+
var _dec$Q, _dec2$Q, _class$Q;
|
|
600
|
+
let ModelTest = (_dec$Q = Model({
|
|
601
601
|
entity: EntityTest,
|
|
602
602
|
client: 'default'
|
|
603
|
-
}), _dec2$
|
|
603
|
+
}), _dec2$Q = BeanInfo({
|
|
604
604
|
module: "test-vona"
|
|
605
|
-
}), _dec$
|
|
605
|
+
}), _dec$Q(_class$Q = _dec2$Q(_class$Q = class ModelTest extends BeanModelBase {}) || _class$Q) || _class$Q);
|
|
606
606
|
|
|
607
|
-
var _dec$
|
|
608
|
-
let ModelTestDynamicTable = (_dec$
|
|
607
|
+
var _dec$P, _dec2$P, _class$P;
|
|
608
|
+
let ModelTestDynamicTable = (_dec$P = Model({
|
|
609
609
|
entity: EntityTest,
|
|
610
610
|
table(ctx, defaultTable) {
|
|
611
611
|
if (ctx.instanceName !== '') return defaultTable;
|
|
@@ -616,11 +616,11 @@ let ModelTestDynamicTable = (_dec$M = Model({
|
|
|
616
616
|
// do nothing
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
}), _dec2$
|
|
619
|
+
}), _dec2$P = BeanInfo({
|
|
620
620
|
module: "test-vona"
|
|
621
|
-
}), _dec$
|
|
621
|
+
}), _dec$P(_class$P = _dec2$P(_class$P = class ModelTestDynamicTable extends BeanModelBase {}) || _class$P) || _class$P);
|
|
622
622
|
|
|
623
|
-
var _dec$
|
|
623
|
+
var _dec$O, _dec2$O, _class$O;
|
|
624
624
|
class TestCtx0 extends BeanBase {
|
|
625
625
|
constructor(...args) {
|
|
626
626
|
super(...args);
|
|
@@ -682,35 +682,35 @@ class TestCtx1 extends TestCtx0 {
|
|
|
682
682
|
});
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
|
-
let BeanTestCtx = (_dec$
|
|
685
|
+
let BeanTestCtx = (_dec$O = Bean(), _dec2$O = BeanInfo({
|
|
686
686
|
module: "test-vona"
|
|
687
|
-
}), _dec$
|
|
687
|
+
}), _dec$O(_class$O = _dec2$O(_class$O = class BeanTestCtx extends TestCtx1 {}) || _class$O) || _class$O);
|
|
688
688
|
|
|
689
|
-
var _dec$
|
|
690
|
-
let ServiceAopMethodBase = (_dec$
|
|
689
|
+
var _dec$N, _dec2$N, _dec3$m, _dec4$m, _class$N, _dec5$m, _dec6$l, _dec7$i, _dec8$e, _dec9$9, _dec0$9, _dec1$9, _dec10$7, _dec11$7, _dec12$7, _dec13$7, _dec14$6, _dec15$6, _dec16$6, _class2$m, _class3;
|
|
690
|
+
let ServiceAopMethodBase = (_dec$N = Aspect.aopMethod('test-vona:test', {
|
|
691
691
|
wrapper: '+'
|
|
692
|
-
}), _dec2$
|
|
692
|
+
}), _dec2$N = Aspect.aopMethod('test-vona:test', {
|
|
693
693
|
wrapper: '-'
|
|
694
|
-
}), _dec3$
|
|
694
|
+
}), _dec3$m = Reflect.metadata("design:type", Function), _dec4$m = Reflect.metadata("design:paramtypes", []), _class$N = class ServiceAopMethodBase extends BeanBase {
|
|
695
695
|
testSyncBase() {
|
|
696
696
|
return 'hello';
|
|
697
697
|
}
|
|
698
|
-
}, _applyDecoratedDescriptor(_class$
|
|
699
|
-
let ServiceAopMethod = (_dec5$
|
|
698
|
+
}, _applyDecoratedDescriptor(_class$N.prototype, "testSyncBase", [_dec$N, _dec2$N, _dec3$m, _dec4$m], Object.getOwnPropertyDescriptor(_class$N.prototype, "testSyncBase"), _class$N.prototype), _class$N);
|
|
699
|
+
let ServiceAopMethod = (_dec5$m = Service(), _dec6$l = BeanInfo({
|
|
700
700
|
module: "test-vona"
|
|
701
|
-
}), _dec7$
|
|
701
|
+
}), _dec7$i = Aspect.aopMethod('test-vona:test', {
|
|
702
702
|
wrapper: '+'
|
|
703
|
-
}), _dec8$
|
|
703
|
+
}), _dec8$e = Aspect.aopMethod('test-vona:test', {
|
|
704
704
|
wrapper: '-'
|
|
705
|
-
}), _dec9$9 = Reflect.metadata("design:type", Function),
|
|
705
|
+
}), _dec9$9 = Reflect.metadata("design:type", Function), _dec0$9 = Reflect.metadata("design:paramtypes", []), _dec1$9 = Aspect.aopMethod('test-vona:test', {
|
|
706
706
|
wrapper: '+'
|
|
707
|
-
}),
|
|
707
|
+
}), _dec10$7 = Aspect.aopMethod('test-vona:test', {
|
|
708
708
|
wrapper: '-'
|
|
709
|
-
}),
|
|
709
|
+
}), _dec11$7 = Reflect.metadata("design:type", Function), _dec12$7 = Reflect.metadata("design:paramtypes", []), _dec13$7 = Aspect.aopMethod('test-vona:test', {
|
|
710
710
|
wrapper: '+'
|
|
711
|
-
}),
|
|
711
|
+
}), _dec14$6 = Aspect.aopMethod('test-vona:test', {
|
|
712
712
|
wrapper: '-'
|
|
713
|
-
}),
|
|
713
|
+
}), _dec15$6 = Reflect.metadata("design:type", Function), _dec16$6 = Reflect.metadata("design:paramtypes", []), _dec5$m(_class2$m = _dec6$l(_class2$m = (_class3 = class ServiceAopMethod extends ServiceAopMethodBase {
|
|
714
714
|
constructor(...args) {
|
|
715
715
|
super(...args);
|
|
716
716
|
this._name = '';
|
|
@@ -727,49 +727,49 @@ let ServiceAopMethod = (_dec5$k = Service(), _dec6$j = BeanInfo({
|
|
|
727
727
|
set name(value) {
|
|
728
728
|
this._name = value;
|
|
729
729
|
}
|
|
730
|
-
}, _applyDecoratedDescriptor(_class3.prototype, "testSync", [_dec7$
|
|
730
|
+
}, _applyDecoratedDescriptor(_class3.prototype, "testSync", [_dec7$i, _dec8$e, _dec9$9, _dec0$9], Object.getOwnPropertyDescriptor(_class3.prototype, "testSync"), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, "testAsync", [_dec1$9, _dec10$7, _dec11$7, _dec12$7], Object.getOwnPropertyDescriptor(_class3.prototype, "testAsync"), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, "name", [_dec13$7, _dec14$6, _dec15$6, _dec16$6], Object.getOwnPropertyDescriptor(_class3.prototype, "name"), _class3.prototype), _class3)) || _class2$m) || _class2$m);
|
|
731
731
|
|
|
732
|
-
var _dec$
|
|
732
|
+
var _dec$M, _dec2$M, _dec3$l, _dec4$l, _dec5$l, _dec6$k, _dec7$h, _dec8$d, _dec9$8, _dec0$8, _dec1$8, _dec10$6, _dec11$6, _dec12$6, _dec13$6, _dec14$5, _dec15$5, _dec16$5, _dec17$4, _dec18$4, _dec19$4, _dec20$4, _dec21$4, _dec22$4, _dec23$4, _dec24$4, _dec25$4, _dec26$3, _dec27$3, _class$M, _class2$l;
|
|
733
733
|
function cacheKeyFn(args, prop, options) {
|
|
734
734
|
return `${this.$beanFullName}_${options.cacheProp ?? prop}_${getKeyHash(args)}`;
|
|
735
735
|
}
|
|
736
|
-
let ServiceCaching = (_dec$
|
|
736
|
+
let ServiceCaching = (_dec$M = Service(), _dec2$M = BeanInfo({
|
|
737
737
|
module: "test-vona"
|
|
738
|
-
}), _dec3$
|
|
738
|
+
}), _dec3$l = Caching.get({
|
|
739
739
|
cacheName: 'test-vona:test',
|
|
740
740
|
cacheProp: 'test',
|
|
741
741
|
cacheKeyFn: 'cacheKey'
|
|
742
|
-
}), _dec4$
|
|
742
|
+
}), _dec4$l = Reflect.metadata("design:type", Function), _dec5$l = Reflect.metadata("design:paramtypes", [Number]), _dec6$k = Caching.get({
|
|
743
743
|
cacheName: 'test-vona:test',
|
|
744
744
|
cacheProp: 'test',
|
|
745
745
|
cacheKeyFn
|
|
746
|
-
}), _dec7$
|
|
746
|
+
}), _dec7$h = Reflect.metadata("design:type", Function), _dec8$d = Reflect.metadata("design:paramtypes", [Number]), _dec9$8 = Caching.get({
|
|
747
747
|
cacheName: 'test-vona:test',
|
|
748
748
|
cacheProp: 'test',
|
|
749
749
|
cacheKey: 'cel://join([get(self,"$beanFullName"),options.cacheProp,hashkey(args)],"_")'
|
|
750
|
-
}),
|
|
750
|
+
}), _dec0$8 = Reflect.metadata("design:type", Function), _dec1$8 = Reflect.metadata("design:paramtypes", [Number]), _dec10$6 = Caching.get({
|
|
751
751
|
cacheName: 'test-vona:test',
|
|
752
752
|
cacheProp: 'test'
|
|
753
|
-
}),
|
|
753
|
+
}), _dec11$6 = Reflect.metadata("design:type", Function), _dec12$6 = Reflect.metadata("design:paramtypes", [Number]), _dec13$6 = Caching.set({
|
|
754
754
|
cacheName: 'test-vona:test',
|
|
755
755
|
cacheProp: 'test',
|
|
756
756
|
cacheKeyFn: 'cacheKeySet',
|
|
757
757
|
cacheValueFn: 'cacheValueSet'
|
|
758
|
-
}),
|
|
758
|
+
}), _dec14$5 = Reflect.metadata("design:type", Function), _dec15$5 = Reflect.metadata("design:paramtypes", [Number, typeof TSummerCacheTestData === "undefined" ? Object : TSummerCacheTestData]), _dec16$5 = Caching.set({
|
|
759
759
|
cacheName: 'test-vona:test',
|
|
760
760
|
cacheProp: 'test',
|
|
761
761
|
cacheKey: 'cel://join([get(self,"$beanFullName"),options.cacheProp,hashkey([args[0]])],"_")',
|
|
762
762
|
cacheValue: 'cel://{"id": args[1].id, "name": args[1].name}'
|
|
763
|
-
}),
|
|
763
|
+
}), _dec17$4 = Reflect.metadata("design:type", Function), _dec18$4 = Reflect.metadata("design:paramtypes", [Number, typeof TSummerCacheTestData === "undefined" ? Object : TSummerCacheTestData]), _dec19$4 = Caching.set({
|
|
764
764
|
cacheName: 'test-vona:test',
|
|
765
765
|
cacheProp: 'test',
|
|
766
766
|
cacheKeyFn: 'cacheKeySet'
|
|
767
|
-
}),
|
|
767
|
+
}), _dec20$4 = Reflect.metadata("design:type", Function), _dec21$4 = Reflect.metadata("design:paramtypes", [Number, typeof TSummerCacheTestData === "undefined" ? Object : TSummerCacheTestData]), _dec22$4 = Caching.del({
|
|
768
768
|
cacheName: 'test-vona:test',
|
|
769
769
|
cacheProp: 'test'
|
|
770
|
-
}),
|
|
770
|
+
}), _dec23$4 = Reflect.metadata("design:type", Function), _dec24$4 = Reflect.metadata("design:paramtypes", [Number]), _dec25$4 = Caching.clear({
|
|
771
771
|
cacheName: 'test-vona:test'
|
|
772
|
-
}),
|
|
772
|
+
}), _dec26$3 = Reflect.metadata("design:type", Function), _dec27$3 = Reflect.metadata("design:paramtypes", []), _dec$M(_class$M = _dec2$M(_class$M = (_class2$l = class ServiceCaching extends BeanBase {
|
|
773
773
|
cacheKey(args, prop, options) {
|
|
774
774
|
return `${this.$beanFullName}_${options.cacheProp ?? prop}_${getKeyHash(args)}`;
|
|
775
775
|
}
|
|
@@ -813,12 +813,87 @@ let ServiceCaching = (_dec$J = Service(), _dec2$J = BeanInfo({
|
|
|
813
813
|
async clear() {
|
|
814
814
|
// do nothing
|
|
815
815
|
}
|
|
816
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
816
|
+
}, _applyDecoratedDescriptor(_class2$l.prototype, "get", [_dec3$l, _dec4$l, _dec5$l], Object.getOwnPropertyDescriptor(_class2$l.prototype, "get"), _class2$l.prototype), _applyDecoratedDescriptor(_class2$l.prototype, "get2", [_dec6$k, _dec7$h, _dec8$d], Object.getOwnPropertyDescriptor(_class2$l.prototype, "get2"), _class2$l.prototype), _applyDecoratedDescriptor(_class2$l.prototype, "get3", [_dec9$8, _dec0$8, _dec1$8], Object.getOwnPropertyDescriptor(_class2$l.prototype, "get3"), _class2$l.prototype), _applyDecoratedDescriptor(_class2$l.prototype, "get4", [_dec10$6, _dec11$6, _dec12$6], Object.getOwnPropertyDescriptor(_class2$l.prototype, "get4"), _class2$l.prototype), _applyDecoratedDescriptor(_class2$l.prototype, "set", [_dec13$6, _dec14$5, _dec15$5], Object.getOwnPropertyDescriptor(_class2$l.prototype, "set"), _class2$l.prototype), _applyDecoratedDescriptor(_class2$l.prototype, "set2", [_dec16$5, _dec17$4, _dec18$4], Object.getOwnPropertyDescriptor(_class2$l.prototype, "set2"), _class2$l.prototype), _applyDecoratedDescriptor(_class2$l.prototype, "set3", [_dec19$4, _dec20$4, _dec21$4], Object.getOwnPropertyDescriptor(_class2$l.prototype, "set3"), _class2$l.prototype), _applyDecoratedDescriptor(_class2$l.prototype, "del", [_dec22$4, _dec23$4, _dec24$4], Object.getOwnPropertyDescriptor(_class2$l.prototype, "del"), _class2$l.prototype), _applyDecoratedDescriptor(_class2$l.prototype, "clear", [_dec25$4, _dec26$3, _dec27$3], Object.getOwnPropertyDescriptor(_class2$l.prototype, "clear"), _class2$l.prototype), _class2$l)) || _class$M) || _class$M);
|
|
817
817
|
|
|
818
|
-
var _dec$
|
|
819
|
-
let ServiceCategory = (_dec$
|
|
818
|
+
var _dec$L, _dec2$L, _class$L;
|
|
819
|
+
let ServiceCategory = (_dec$L = Service(), _dec2$L = BeanInfo({
|
|
820
820
|
module: "test-vona"
|
|
821
|
-
}), _dec$
|
|
821
|
+
}), _dec$L(_class$L = _dec2$L(_class$L = class ServiceCategory extends BeanBase {
|
|
822
|
+
async categoryTreeDynamic() {
|
|
823
|
+
// create
|
|
824
|
+
const treeCreate = await this.scope.model.category.insert({
|
|
825
|
+
name: 'Category-1',
|
|
826
|
+
children2: [{
|
|
827
|
+
name: 'Category-1-1',
|
|
828
|
+
children2: [{
|
|
829
|
+
name: 'Category-1-1-1'
|
|
830
|
+
}]
|
|
831
|
+
}, {
|
|
832
|
+
name: 'Category-1-2'
|
|
833
|
+
}]
|
|
834
|
+
}, {
|
|
835
|
+
with: {
|
|
836
|
+
children2: $relationDynamic.hasMany(() => ModelCategory, 'categoryIdParent', {
|
|
837
|
+
with: {
|
|
838
|
+
children2: $relationDynamic.hasMany(() => ModelCategory, 'categoryIdParent', {})
|
|
839
|
+
}
|
|
840
|
+
})
|
|
841
|
+
}
|
|
842
|
+
});
|
|
843
|
+
// get
|
|
844
|
+
const tree = await this.scope.model.category.get({
|
|
845
|
+
id: treeCreate.id
|
|
846
|
+
}, {
|
|
847
|
+
with: {
|
|
848
|
+
children2: $relationDynamic.hasMany(() => ModelCategory, 'categoryIdParent', {
|
|
849
|
+
columns: ['id', 'name'],
|
|
850
|
+
with: {
|
|
851
|
+
children2: $relationDynamic.hasMany(() => ModelCategory, 'categoryIdParent', {
|
|
852
|
+
columns: ['id', 'name']
|
|
853
|
+
})
|
|
854
|
+
}
|
|
855
|
+
})
|
|
856
|
+
}
|
|
857
|
+
});
|
|
858
|
+
assert.equal(tree?.children2.length, 2);
|
|
859
|
+
assert.equal(tree?.children2[0].children2.length, 1);
|
|
860
|
+
// update
|
|
861
|
+
await this.scope.model.category.update({
|
|
862
|
+
id: treeCreate.id,
|
|
863
|
+
name: 'Category-1-Update',
|
|
864
|
+
children2: [
|
|
865
|
+
// create
|
|
866
|
+
{
|
|
867
|
+
name: 'Category-1-3'
|
|
868
|
+
},
|
|
869
|
+
// update
|
|
870
|
+
{
|
|
871
|
+
id: treeCreate.children2?.[0].id,
|
|
872
|
+
name: 'Category-1-1-Update'
|
|
873
|
+
},
|
|
874
|
+
// delete
|
|
875
|
+
{
|
|
876
|
+
id: treeCreate.children2?.[1].id,
|
|
877
|
+
deleted: true
|
|
878
|
+
}]
|
|
879
|
+
}, {
|
|
880
|
+
with: {
|
|
881
|
+
children2: $relationDynamic.hasMany(() => ModelCategory, 'categoryIdParent')
|
|
882
|
+
}
|
|
883
|
+
});
|
|
884
|
+
// delete
|
|
885
|
+
await this.scope.model.category.delete({
|
|
886
|
+
id: treeCreate.id
|
|
887
|
+
}, {
|
|
888
|
+
with: {
|
|
889
|
+
children2: $relationDynamic.hasMany(() => ModelCategory, 'categoryIdParent', {
|
|
890
|
+
with: {
|
|
891
|
+
children2: $relationDynamic.hasMany(() => ModelCategory, 'categoryIdParent', {})
|
|
892
|
+
}
|
|
893
|
+
})
|
|
894
|
+
}
|
|
895
|
+
});
|
|
896
|
+
}
|
|
822
897
|
async categoryTreeReverse() {
|
|
823
898
|
// create
|
|
824
899
|
const treeCreate = await this.scope.model.category.insert({
|
|
@@ -884,39 +959,41 @@ let ServiceCategory = (_dec$I = Service(), _dec2$I = BeanInfo({
|
|
|
884
959
|
id: treeCreate.id
|
|
885
960
|
});
|
|
886
961
|
}
|
|
887
|
-
}) || _class$
|
|
962
|
+
}) || _class$L) || _class$L);
|
|
888
963
|
|
|
889
|
-
var _dec$
|
|
890
|
-
let ServiceOrder = (_dec$
|
|
964
|
+
var _dec$K, _dec2$K, _class$K;
|
|
965
|
+
let ServiceOrder = (_dec$K = Service(), _dec2$K = BeanInfo({
|
|
891
966
|
module: "test-vona"
|
|
892
|
-
}), _dec$
|
|
967
|
+
}), _dec$K(_class$K = _dec2$K(_class$K = class ServiceOrder extends BeanBase {
|
|
893
968
|
async relationHasMany() {
|
|
894
969
|
// insert
|
|
895
970
|
const orderCreate = await this.scope.model.order.insert({
|
|
896
971
|
orderNo: 'Order001',
|
|
897
|
-
|
|
972
|
+
products2: [{
|
|
898
973
|
name: 'Apple'
|
|
899
974
|
}, {
|
|
900
975
|
name: 'Pear'
|
|
901
976
|
}]
|
|
902
977
|
}, {
|
|
903
|
-
|
|
904
|
-
|
|
978
|
+
with: {
|
|
979
|
+
products2: $relationDynamic.hasMany(() => ModelProduct, 'orderId')
|
|
905
980
|
}
|
|
906
981
|
});
|
|
907
982
|
// get
|
|
908
983
|
await this.scope.model.order.get({
|
|
909
984
|
id: orderCreate.id
|
|
910
985
|
}, {
|
|
911
|
-
|
|
912
|
-
|
|
986
|
+
with: {
|
|
987
|
+
products2: $relationDynamic.hasMany(() => ModelProduct, 'orderId', {
|
|
988
|
+
columns: ['id', 'name', 'price', 'quantity', 'amount']
|
|
989
|
+
})
|
|
913
990
|
}
|
|
914
991
|
});
|
|
915
992
|
// update
|
|
916
993
|
await this.scope.model.order.update({
|
|
917
994
|
id: orderCreate.id,
|
|
918
995
|
orderNo: 'Order001-Update',
|
|
919
|
-
|
|
996
|
+
products2: [
|
|
920
997
|
// create product: Peach
|
|
921
998
|
{
|
|
922
999
|
name: 'Peach'
|
|
@@ -932,29 +1009,57 @@ let ServiceOrder = (_dec$H = Service(), _dec2$H = BeanInfo({
|
|
|
932
1009
|
deleted: true
|
|
933
1010
|
}]
|
|
934
1011
|
}, {
|
|
935
|
-
|
|
936
|
-
|
|
1012
|
+
with: {
|
|
1013
|
+
products2: $relationDynamic.hasMany(() => ModelProduct, 'orderId')
|
|
937
1014
|
}
|
|
938
1015
|
});
|
|
939
1016
|
// delete
|
|
940
1017
|
await this.scope.model.order.delete({
|
|
941
1018
|
id: orderCreate.id
|
|
942
1019
|
}, {
|
|
943
|
-
|
|
944
|
-
|
|
1020
|
+
with: {
|
|
1021
|
+
products2: $relationDynamic.hasMany(() => ModelProduct, 'orderId')
|
|
945
1022
|
}
|
|
946
1023
|
});
|
|
947
1024
|
}
|
|
948
|
-
}) || _class$
|
|
1025
|
+
}) || _class$K) || _class$K);
|
|
949
1026
|
|
|
950
|
-
var _dec$
|
|
951
|
-
let ServicePost = (_dec$
|
|
1027
|
+
var _dec$J, _dec2$J, _dec3$k, _dec4$k, _dec5$k, _class$J, _class2$k;
|
|
1028
|
+
let ServicePost = (_dec$J = Service(), _dec2$J = BeanInfo({
|
|
952
1029
|
module: "test-vona"
|
|
953
|
-
}), _dec3$
|
|
1030
|
+
}), _dec3$k = Database.transaction(), _dec4$k = Reflect.metadata("design:type", Function), _dec5$k = Reflect.metadata("design:paramtypes", []), _dec$J(_class$J = _dec2$J(_class$J = (_class2$k = class ServicePost extends BeanBase {
|
|
1031
|
+
async group() {
|
|
1032
|
+
const result = await this.scope.model.post.group({
|
|
1033
|
+
groups: 'userId',
|
|
1034
|
+
aggrs: {
|
|
1035
|
+
count: '*',
|
|
1036
|
+
sum: 'stars'
|
|
1037
|
+
},
|
|
1038
|
+
orders: [['count_all', 'desc']]
|
|
1039
|
+
});
|
|
1040
|
+
return result;
|
|
1041
|
+
}
|
|
1042
|
+
async aggregate() {
|
|
1043
|
+
const result = await this.scope.model.post.aggregate({
|
|
1044
|
+
aggrs: {
|
|
1045
|
+
count: ['*', 'stars'],
|
|
1046
|
+
sum: 'stars',
|
|
1047
|
+
avg: 'stars',
|
|
1048
|
+
min: 'stars',
|
|
1049
|
+
max: 'stars'
|
|
1050
|
+
}
|
|
1051
|
+
});
|
|
1052
|
+
return result;
|
|
1053
|
+
}
|
|
1054
|
+
async count() {
|
|
1055
|
+
return await this.scope.model.post.count();
|
|
1056
|
+
}
|
|
954
1057
|
async relationBelongsTo() {
|
|
955
1058
|
const postContent = await this.scope.model.postContent.select({
|
|
956
|
-
|
|
957
|
-
post:
|
|
1059
|
+
with: {
|
|
1060
|
+
post: $relationDynamic.belongsTo(() => ModelPostContent, () => ModelPost, 'postId', {
|
|
1061
|
+
columns: ['id', 'title']
|
|
1062
|
+
})
|
|
958
1063
|
}
|
|
959
1064
|
});
|
|
960
1065
|
console.log(postContent[0]?.post?.title);
|
|
@@ -967,16 +1072,20 @@ let ServicePost = (_dec$G = Service(), _dec2$G = BeanInfo({
|
|
|
967
1072
|
content: 'This is a post'
|
|
968
1073
|
}
|
|
969
1074
|
}, {
|
|
970
|
-
|
|
971
|
-
postContent:
|
|
1075
|
+
with: {
|
|
1076
|
+
postContent: $relationDynamic.hasOne(() => ModelPostContent, 'postId', {
|
|
1077
|
+
columns: ['id', 'content']
|
|
1078
|
+
})
|
|
972
1079
|
}
|
|
973
1080
|
});
|
|
974
1081
|
// get
|
|
975
1082
|
const post = await this.scope.model.post.get({
|
|
976
1083
|
id: postCreate.id
|
|
977
1084
|
}, {
|
|
978
|
-
|
|
979
|
-
postContent:
|
|
1085
|
+
with: {
|
|
1086
|
+
postContent: $relationDynamic.hasOne(() => ModelPostContent, 'postId', {
|
|
1087
|
+
columns: ['id', 'content']
|
|
1088
|
+
})
|
|
980
1089
|
}
|
|
981
1090
|
});
|
|
982
1091
|
// update
|
|
@@ -987,16 +1096,18 @@ let ServicePost = (_dec$G = Service(), _dec2$G = BeanInfo({
|
|
|
987
1096
|
content: 'This is a post-changed'
|
|
988
1097
|
}
|
|
989
1098
|
}, {
|
|
990
|
-
|
|
991
|
-
postContent:
|
|
1099
|
+
with: {
|
|
1100
|
+
postContent: $relationDynamic.hasOne(() => ModelPostContent, 'postId', {
|
|
1101
|
+
columns: ['id', 'content']
|
|
1102
|
+
})
|
|
992
1103
|
}
|
|
993
1104
|
});
|
|
994
1105
|
// delete
|
|
995
1106
|
await this.scope.model.post.delete({
|
|
996
1107
|
id: postCreate.id
|
|
997
1108
|
}, {
|
|
998
|
-
|
|
999
|
-
postContent:
|
|
1109
|
+
with: {
|
|
1110
|
+
postContent: $relationDynamic.hasOne(() => ModelPostContent, 'postId')
|
|
1000
1111
|
}
|
|
1001
1112
|
});
|
|
1002
1113
|
console.log(post?.postContent?.id);
|
|
@@ -1148,24 +1259,30 @@ let ServicePost = (_dec$G = Service(), _dec2$G = BeanInfo({
|
|
|
1148
1259
|
async mget(ids) {
|
|
1149
1260
|
return await this.scope.model.post.mget(ids);
|
|
1150
1261
|
}
|
|
1151
|
-
async count() {
|
|
1152
|
-
return await this.scope.model.post.count();
|
|
1153
|
-
}
|
|
1154
|
-
}, _applyDecoratedDescriptor(_class2$i.prototype, "transaction", [_dec3$i, _dec4$i, _dec5$i], Object.getOwnPropertyDescriptor(_class2$i.prototype, "transaction"), _class2$i.prototype), _class2$i)) || _class$G) || _class$G);
|
|
1155
1262
|
|
|
1156
|
-
|
|
1157
|
-
|
|
1263
|
+
// async count() {
|
|
1264
|
+
// return await this.scope.model.post.count();
|
|
1265
|
+
// }
|
|
1266
|
+
}, _applyDecoratedDescriptor(_class2$k.prototype, "transaction", [_dec3$k, _dec4$k, _dec5$k], Object.getOwnPropertyDescriptor(_class2$k.prototype, "transaction"), _class2$k.prototype), _class2$k)) || _class$J) || _class$J);
|
|
1267
|
+
|
|
1268
|
+
var _dec$I, _dec2$I, _class$I;
|
|
1269
|
+
let ServiceProduct = (_dec$I = Service(), _dec2$I = BeanInfo({
|
|
1270
|
+
module: "test-vona"
|
|
1271
|
+
}), _dec$I(_class$I = _dec2$I(_class$I = class ServiceProduct extends BeanBase {}) || _class$I) || _class$I);
|
|
1272
|
+
|
|
1273
|
+
var _dec$H, _dec2$H, _class$H;
|
|
1274
|
+
let ServiceTest = (_dec$H = Service(), _dec2$H = BeanInfo({
|
|
1158
1275
|
module: "test-vona"
|
|
1159
|
-
}), _dec$
|
|
1276
|
+
}), _dec$H(_class$H = _dec2$H(_class$H = class ServiceTest extends BeanBase {
|
|
1160
1277
|
get name() {
|
|
1161
1278
|
return 'serviceTest';
|
|
1162
1279
|
}
|
|
1163
|
-
}) || _class$
|
|
1280
|
+
}) || _class$H) || _class$H);
|
|
1164
1281
|
|
|
1165
|
-
var _dec$
|
|
1166
|
-
let ServiceTestApp = (_dec$
|
|
1282
|
+
var _dec$G, _dec2$G, _class$G;
|
|
1283
|
+
let ServiceTestApp = (_dec$G = Service(), _dec2$G = BeanInfo({
|
|
1167
1284
|
module: "test-vona"
|
|
1168
|
-
}), _dec$
|
|
1285
|
+
}), _dec$G(_class$G = _dec2$G(_class$G = class ServiceTestApp extends BeanBase {
|
|
1169
1286
|
actionSync({
|
|
1170
1287
|
a,
|
|
1171
1288
|
b
|
|
@@ -1178,9 +1295,9 @@ let ServiceTestApp = (_dec$E = Service(), _dec2$E = BeanInfo({
|
|
|
1178
1295
|
}) {
|
|
1179
1296
|
return Promise.resolve(a + b);
|
|
1180
1297
|
}
|
|
1181
|
-
}) || _class$
|
|
1298
|
+
}) || _class$G) || _class$G);
|
|
1182
1299
|
|
|
1183
|
-
var _dec$
|
|
1300
|
+
var _dec$F, _dec2$F, _class$F;
|
|
1184
1301
|
class ClassBeanBase extends BeanBase {
|
|
1185
1302
|
actionSync({
|
|
1186
1303
|
a,
|
|
@@ -1189,21 +1306,21 @@ class ClassBeanBase extends BeanBase {
|
|
|
1189
1306
|
return a + b;
|
|
1190
1307
|
}
|
|
1191
1308
|
}
|
|
1192
|
-
let ServiceTestClass = (_dec$
|
|
1309
|
+
let ServiceTestClass = (_dec$F = Service(), _dec2$F = BeanInfo({
|
|
1193
1310
|
module: "test-vona"
|
|
1194
|
-
}), _dec$
|
|
1311
|
+
}), _dec$F(_class$F = _dec2$F(_class$F = class ServiceTestClass extends ClassBeanBase {
|
|
1195
1312
|
async actionAsync({
|
|
1196
1313
|
a,
|
|
1197
1314
|
b
|
|
1198
1315
|
}) {
|
|
1199
1316
|
return Promise.resolve(a + b);
|
|
1200
1317
|
}
|
|
1201
|
-
}) || _class$
|
|
1318
|
+
}) || _class$F) || _class$F);
|
|
1202
1319
|
|
|
1203
|
-
var _dec$
|
|
1204
|
-
let ServiceTestData = (_dec$
|
|
1320
|
+
var _dec$E, _dec2$E, _class$E;
|
|
1321
|
+
let ServiceTestData = (_dec$E = Service(), _dec2$E = BeanInfo({
|
|
1205
1322
|
module: "test-vona"
|
|
1206
|
-
}), _dec$
|
|
1323
|
+
}), _dec$E(_class$E = _dec2$E(_class$E = class ServiceTestData extends BeanBase {
|
|
1207
1324
|
async create(prefix) {
|
|
1208
1325
|
const scopeTest = this.scope;
|
|
1209
1326
|
const userTom = await scopeTest.model.user.insert({
|
|
@@ -1290,14 +1407,14 @@ let ServiceTestData = (_dec$C = Service(), _dec2$C = BeanInfo({
|
|
|
1290
1407
|
id: userJimmy.id
|
|
1291
1408
|
});
|
|
1292
1409
|
}
|
|
1293
|
-
}) || _class$
|
|
1410
|
+
}) || _class$E) || _class$E);
|
|
1294
1411
|
|
|
1295
|
-
var _dec$
|
|
1412
|
+
var _dec$D, _dec2$D, _dec3$j, _dec4$j, _dec5$j, _dec6$j, _dec7$g, _dec8$c, _class$D, _class2$j;
|
|
1296
1413
|
const tableNameFail$1 = '__tempTransactionFail';
|
|
1297
1414
|
const tableNameSuccess$1 = '__tempTransactionSuccess';
|
|
1298
|
-
let ServiceTransaction = (_dec$
|
|
1415
|
+
let ServiceTransaction = (_dec$D = Service(), _dec2$D = BeanInfo({
|
|
1299
1416
|
module: "test-vona"
|
|
1300
|
-
}), _dec3$
|
|
1417
|
+
}), _dec3$j = Database.transaction(), _dec4$j = Reflect.metadata("design:type", Function), _dec5$j = Reflect.metadata("design:paramtypes", [Object]), _dec6$j = Database.transaction(), _dec7$g = Reflect.metadata("design:type", Function), _dec8$c = Reflect.metadata("design:paramtypes", [Object]), _dec$D(_class$D = _dec2$D(_class$D = (_class2$j = class ServiceTransaction extends BeanBase {
|
|
1301
1418
|
async fail(item) {
|
|
1302
1419
|
await this.bean.model.update(`${tableNameFail$1}`, item);
|
|
1303
1420
|
await this.bean.model.update(`${tableNameFail$1}error`, item);
|
|
@@ -1305,12 +1422,38 @@ let ServiceTransaction = (_dec$B = Service(), _dec2$B = BeanInfo({
|
|
|
1305
1422
|
async success(item) {
|
|
1306
1423
|
await this.bean.model.update(tableNameSuccess$1, item);
|
|
1307
1424
|
}
|
|
1308
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
1425
|
+
}, _applyDecoratedDescriptor(_class2$j.prototype, "fail", [_dec3$j, _dec4$j, _dec5$j], Object.getOwnPropertyDescriptor(_class2$j.prototype, "fail"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "success", [_dec6$j, _dec7$g, _dec8$c], Object.getOwnPropertyDescriptor(_class2$j.prototype, "success"), _class2$j.prototype), _class2$j)) || _class$D) || _class$D);
|
|
1309
1426
|
|
|
1310
|
-
var _dec$
|
|
1311
|
-
let ServiceUser = (_dec$
|
|
1427
|
+
var _dec$C, _dec2$C, _class$C;
|
|
1428
|
+
let ServiceUser = (_dec$C = Service(), _dec2$C = BeanInfo({
|
|
1312
1429
|
module: "test-vona"
|
|
1313
|
-
}), _dec$
|
|
1430
|
+
}), _dec$C(_class$C = _dec2$C(_class$C = class ServiceUser extends BeanBase {
|
|
1431
|
+
async userStats() {
|
|
1432
|
+
const userStats = await this.scope.model.user.aggregate({
|
|
1433
|
+
aggrs: {
|
|
1434
|
+
count: '*',
|
|
1435
|
+
sum: 'scores',
|
|
1436
|
+
max: 'age',
|
|
1437
|
+
min: 'age'
|
|
1438
|
+
},
|
|
1439
|
+
where: {
|
|
1440
|
+
scores: {
|
|
1441
|
+
_gt_: 30
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
});
|
|
1445
|
+
return userStats;
|
|
1446
|
+
}
|
|
1447
|
+
async findUsers() {
|
|
1448
|
+
const users = await this.scope.model.user.select({
|
|
1449
|
+
where: {
|
|
1450
|
+
age: {
|
|
1451
|
+
_gt_: 18
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
});
|
|
1455
|
+
return users;
|
|
1456
|
+
}
|
|
1314
1457
|
async relationBelongsToMany() {
|
|
1315
1458
|
// insert: roles
|
|
1316
1459
|
const roles = await this.scope.model.role.insertBulk([{
|
|
@@ -1327,16 +1470,18 @@ let ServiceUser = (_dec$A = Service(), _dec2$A = BeanInfo({
|
|
|
1327
1470
|
id: roleIdFamily
|
|
1328
1471
|
}]
|
|
1329
1472
|
}, {
|
|
1330
|
-
|
|
1331
|
-
roles:
|
|
1473
|
+
with: {
|
|
1474
|
+
roles: $relationDynamic.belongsToMany(() => ModelRoleUser, () => ModelRole, 'userId', 'roleId')
|
|
1332
1475
|
}
|
|
1333
1476
|
});
|
|
1334
1477
|
// get: user
|
|
1335
1478
|
await this.scope.model.user.get({
|
|
1336
1479
|
id: userCreate.id
|
|
1337
1480
|
}, {
|
|
1338
|
-
|
|
1339
|
-
roles:
|
|
1481
|
+
with: {
|
|
1482
|
+
roles: $relationDynamic.belongsToMany(() => ModelRoleUser, () => ModelRole, 'userId', 'roleId', {
|
|
1483
|
+
columns: ['id', 'name']
|
|
1484
|
+
})
|
|
1340
1485
|
}
|
|
1341
1486
|
});
|
|
1342
1487
|
// update: user
|
|
@@ -1353,74 +1498,76 @@ let ServiceUser = (_dec$A = Service(), _dec2$A = BeanInfo({
|
|
|
1353
1498
|
id: roleIdFriend
|
|
1354
1499
|
}]
|
|
1355
1500
|
}, {
|
|
1356
|
-
|
|
1357
|
-
roles:
|
|
1501
|
+
with: {
|
|
1502
|
+
roles: $relationDynamic.belongsToMany(() => ModelRoleUser, () => ModelRole, 'userId', 'roleId', {
|
|
1503
|
+
columns: ['id', 'name']
|
|
1504
|
+
})
|
|
1358
1505
|
}
|
|
1359
1506
|
});
|
|
1360
1507
|
// delete: user
|
|
1361
1508
|
await this.scope.model.user.delete({
|
|
1362
1509
|
id: userCreate.id
|
|
1363
1510
|
}, {
|
|
1364
|
-
|
|
1365
|
-
roles:
|
|
1511
|
+
with: {
|
|
1512
|
+
roles: $relationDynamic.belongsToMany(() => ModelRoleUser, () => ModelRole, 'userId', 'roleId')
|
|
1366
1513
|
}
|
|
1367
1514
|
});
|
|
1368
1515
|
}
|
|
1369
|
-
}) || _class$
|
|
1516
|
+
}) || _class$C) || _class$C);
|
|
1370
1517
|
|
|
1371
|
-
var _dec$
|
|
1372
|
-
let BroadcastTest = (_dec$
|
|
1518
|
+
var _dec$B, _dec2$B, _class$B;
|
|
1519
|
+
let BroadcastTest = (_dec$B = Broadcast(), _dec2$B = BeanInfo({
|
|
1373
1520
|
module: "test-vona"
|
|
1374
|
-
}), _dec$
|
|
1521
|
+
}), _dec$B(_class$B = _dec2$B(_class$B = class BroadcastTest extends BeanBroadcastBase {
|
|
1375
1522
|
async execute(data, isEmitter) {
|
|
1376
1523
|
// locale
|
|
1377
1524
|
assert.equal(this.ctx.locale, 'zh-cn');
|
|
1378
1525
|
// data
|
|
1379
1526
|
assert.equal(data.message, 'hello');
|
|
1380
1527
|
}
|
|
1381
|
-
}) || _class$
|
|
1528
|
+
}) || _class$B) || _class$B);
|
|
1382
1529
|
|
|
1383
|
-
var _dec$
|
|
1384
|
-
let CacheMemTest = (_dec$
|
|
1530
|
+
var _dec$A, _dec2$A, _class$A;
|
|
1531
|
+
let CacheMemTest = (_dec$A = CacheMem({
|
|
1385
1532
|
ttl: 1 * 1000
|
|
1386
|
-
}), _dec2$
|
|
1533
|
+
}), _dec2$A = BeanInfo({
|
|
1387
1534
|
module: "test-vona"
|
|
1388
|
-
}), _dec$
|
|
1535
|
+
}), _dec$A(_class$A = _dec2$A(_class$A = class CacheMemTest extends BeanCacheMemBase {}) || _class$A) || _class$A);
|
|
1389
1536
|
|
|
1390
|
-
var _dec$
|
|
1391
|
-
let CacheRedisPost = (_dec$
|
|
1537
|
+
var _dec$z, _dec2$z, _class$z;
|
|
1538
|
+
let CacheRedisPost = (_dec$z = CacheRedis(), _dec2$z = BeanInfo({
|
|
1392
1539
|
module: "test-vona"
|
|
1393
|
-
}), _dec$
|
|
1540
|
+
}), _dec$z(_class$z = _dec2$z(_class$z = class CacheRedisPost extends BeanCacheRedisBase {}) || _class$z) || _class$z);
|
|
1394
1541
|
|
|
1395
|
-
var _dec$
|
|
1396
|
-
let CacheRedisTest = (_dec$
|
|
1542
|
+
var _dec$y, _dec2$y, _class$y;
|
|
1543
|
+
let CacheRedisTest = (_dec$y = CacheRedis({
|
|
1397
1544
|
ttl: 1 * 1000
|
|
1398
|
-
}), _dec2$
|
|
1545
|
+
}), _dec2$y = BeanInfo({
|
|
1399
1546
|
module: "test-vona"
|
|
1400
|
-
}), _dec$
|
|
1547
|
+
}), _dec$y(_class$y = _dec2$y(_class$y = class CacheRedisTest extends BeanCacheRedisBase {}) || _class$y) || _class$y);
|
|
1401
1548
|
|
|
1402
|
-
var _dec$
|
|
1403
|
-
let EventHelloEcho = (_dec$
|
|
1549
|
+
var _dec$x, _dec2$x, _class$x;
|
|
1550
|
+
let EventHelloEcho = (_dec$x = Event(), _dec2$x = BeanInfo({
|
|
1404
1551
|
module: "test-vona"
|
|
1405
|
-
}), _dec$
|
|
1552
|
+
}), _dec$x(_class$x = _dec2$x(_class$x = class EventHelloEcho extends BeanEventBase {}) || _class$x) || _class$x);
|
|
1406
1553
|
|
|
1407
|
-
var _dec$
|
|
1408
|
-
let EventListenerHelloEcho = (_dec$
|
|
1554
|
+
var _dec$w, _dec2$w, _class$w;
|
|
1555
|
+
let EventListenerHelloEcho = (_dec$w = EventListener({
|
|
1409
1556
|
match: 'test-vona:helloEcho'
|
|
1410
|
-
}), _dec2$
|
|
1557
|
+
}), _dec2$w = BeanInfo({
|
|
1411
1558
|
module: "test-vona"
|
|
1412
|
-
}), _dec$
|
|
1559
|
+
}), _dec$w(_class$w = _dec2$w(_class$w = class EventListenerHelloEcho extends BeanBase {
|
|
1413
1560
|
async execute(data, next) {
|
|
1414
1561
|
// next
|
|
1415
1562
|
const result = await next();
|
|
1416
1563
|
return `${data.text} ${result}`;
|
|
1417
1564
|
}
|
|
1418
|
-
}) || _class$
|
|
1565
|
+
}) || _class$w) || _class$w);
|
|
1419
1566
|
|
|
1420
|
-
var _dec$
|
|
1421
|
-
let MetaVersion = (_dec$
|
|
1567
|
+
var _dec$v, _dec2$v, _class$v;
|
|
1568
|
+
let MetaVersion = (_dec$v = Meta(), _dec2$v = BeanInfo({
|
|
1422
1569
|
module: "test-vona"
|
|
1423
|
-
}), _dec$
|
|
1570
|
+
}), _dec$v(_class$v = _dec2$v(_class$v = class MetaVersion extends BeanBase {
|
|
1424
1571
|
async update(options) {
|
|
1425
1572
|
if (options.version === 1) {
|
|
1426
1573
|
// testVonaTest
|
|
@@ -1495,49 +1642,49 @@ let MetaVersion = (_dec$t = Meta(), _dec2$t = BeanInfo({
|
|
|
1495
1642
|
});
|
|
1496
1643
|
}
|
|
1497
1644
|
}
|
|
1498
|
-
}) || _class$
|
|
1645
|
+
}) || _class$v) || _class$v);
|
|
1499
1646
|
|
|
1500
|
-
var _dec$
|
|
1501
|
-
let QueueTest = (_dec$
|
|
1647
|
+
var _dec$u, _dec2$u, _class$u;
|
|
1648
|
+
let QueueTest = (_dec$u = Queue(), _dec2$u = BeanInfo({
|
|
1502
1649
|
module: "test-vona"
|
|
1503
|
-
}), _dec$
|
|
1650
|
+
}), _dec$u(_class$u = _dec2$u(_class$u = class QueueTest extends BeanQueueBase {
|
|
1504
1651
|
async execute(data, _options) {
|
|
1505
1652
|
const res = data.a + data.b;
|
|
1506
1653
|
this.$logger.silly(`queue test worker done: ${data.a} + ${data.b} = ${res}`);
|
|
1507
1654
|
return res;
|
|
1508
1655
|
}
|
|
1509
|
-
}) || _class$
|
|
1656
|
+
}) || _class$u) || _class$u);
|
|
1510
1657
|
|
|
1511
|
-
var _dec$
|
|
1512
|
-
let ScheduleTest = (_dec$
|
|
1658
|
+
var _dec$t, _dec2$t, _class$t;
|
|
1659
|
+
let ScheduleTest = (_dec$t = Schedule({
|
|
1513
1660
|
enable: false,
|
|
1514
1661
|
repeat: {
|
|
1515
1662
|
every: 3000
|
|
1516
1663
|
}
|
|
1517
|
-
}), _dec2$
|
|
1664
|
+
}), _dec2$t = BeanInfo({
|
|
1518
1665
|
module: "test-vona"
|
|
1519
|
-
}), _dec$
|
|
1666
|
+
}), _dec$t(_class$t = _dec2$t(_class$t = class ScheduleTest extends BeanBase {
|
|
1520
1667
|
async execute(job) {
|
|
1521
1668
|
this.$logger.silly(`Schedule Test: iid=${this.ctx.instance.id}, every=${job?.data.options?.jobOptions?.repeat?.every}, ${new Date()}`);
|
|
1522
1669
|
}
|
|
1523
|
-
}) || _class$
|
|
1670
|
+
}) || _class$t) || _class$t);
|
|
1524
1671
|
|
|
1525
|
-
var _dec$
|
|
1526
|
-
let ScheduleTest3 = (_dec$
|
|
1672
|
+
var _dec$s, _dec2$s, _class$s;
|
|
1673
|
+
let ScheduleTest3 = (_dec$s = Schedule({
|
|
1527
1674
|
enable: false,
|
|
1528
1675
|
repeat: {
|
|
1529
1676
|
every: 5000
|
|
1530
1677
|
}
|
|
1531
|
-
}), _dec2$
|
|
1678
|
+
}), _dec2$s = BeanInfo({
|
|
1532
1679
|
module: "test-vona"
|
|
1533
|
-
}), _dec$
|
|
1680
|
+
}), _dec$s(_class$s = _dec2$s(_class$s = class ScheduleTest3 extends BeanBase {
|
|
1534
1681
|
async execute(job) {
|
|
1535
1682
|
this.$logger.silly(`Schedule Test3: iid=${this.ctx.instance.id}, every=${job?.data.options?.jobOptions?.repeat?.every}, ${new Date()}`);
|
|
1536
1683
|
}
|
|
1537
|
-
}) || _class$
|
|
1684
|
+
}) || _class$s) || _class$s);
|
|
1538
1685
|
|
|
1539
|
-
var _dec$
|
|
1540
|
-
let SummerCacheTest = (_dec$
|
|
1686
|
+
var _dec$r, _dec2$r, _class$r;
|
|
1687
|
+
let SummerCacheTest = (_dec$r = SummerCache({
|
|
1541
1688
|
mode: 'all',
|
|
1542
1689
|
mem: {
|
|
1543
1690
|
max: 2,
|
|
@@ -1546,178 +1693,198 @@ let SummerCacheTest = (_dec$p = SummerCache({
|
|
|
1546
1693
|
redis: {
|
|
1547
1694
|
ttl: 3 * 1000
|
|
1548
1695
|
}
|
|
1549
|
-
}), _dec2$
|
|
1696
|
+
}), _dec2$r = BeanInfo({
|
|
1550
1697
|
module: "test-vona"
|
|
1551
|
-
}), _dec$
|
|
1698
|
+
}), _dec$r(_class$r = _dec2$r(_class$r = class SummerCacheTest extends BeanSummerCacheBase {
|
|
1552
1699
|
async getNative(key, _options) {
|
|
1553
1700
|
return {
|
|
1554
1701
|
id: key.id,
|
|
1555
1702
|
name: `name_${key.id}`
|
|
1556
1703
|
};
|
|
1557
1704
|
}
|
|
1558
|
-
}) || _class$
|
|
1705
|
+
}) || _class$r) || _class$r);
|
|
1559
1706
|
|
|
1560
|
-
var _dec$
|
|
1561
|
-
let DtoCategoryTree = (_dec$
|
|
1707
|
+
var _dec$q, _dec2$q, _class$q;
|
|
1708
|
+
let DtoCategoryTree = (_dec$q = Dto(), _dec2$q = BeanInfo({
|
|
1562
1709
|
module: "test-vona"
|
|
1563
|
-
}), _dec$
|
|
1710
|
+
}), _dec$q(_class$q = _dec2$q(_class$q = class DtoCategoryTree extends $Dto.get('test-vona:category', {
|
|
1564
1711
|
columns: ['id', 'name']
|
|
1565
|
-
}) {}) || _class$
|
|
1712
|
+
}) {}) || _class$q) || _class$q);
|
|
1566
1713
|
|
|
1567
|
-
var _dec$
|
|
1568
|
-
let DtoOrderCreate = (_dec$
|
|
1714
|
+
var _dec$p, _dec2$p, _class$p;
|
|
1715
|
+
let DtoOrderCreate = (_dec$p = Dto(), _dec2$p = BeanInfo({
|
|
1569
1716
|
module: "test-vona"
|
|
1570
|
-
}), _dec$
|
|
1717
|
+
}), _dec$p(_class$p = _dec2$p(_class$p = class DtoOrderCreate extends $Dto.create(() => ModelOrder, {
|
|
1571
1718
|
columns: ['orderNo', 'remark']
|
|
1572
|
-
}) {}) || _class$
|
|
1719
|
+
}) {}) || _class$p) || _class$p);
|
|
1573
1720
|
|
|
1574
|
-
var _dec$
|
|
1575
|
-
let DtoOrderResult = (_dec$
|
|
1721
|
+
var _dec$o, _dec2$o, _class$o;
|
|
1722
|
+
let DtoOrderResult = (_dec$o = Dto(), _dec2$o = BeanInfo({
|
|
1576
1723
|
module: "test-vona"
|
|
1577
|
-
}), _dec$
|
|
1724
|
+
}), _dec$o(_class$o = _dec2$o(_class$o = class DtoOrderResult extends $Dto.get(() => ModelOrder) {}) || _class$o) || _class$o);
|
|
1578
1725
|
|
|
1579
|
-
var _dec$
|
|
1580
|
-
let DtoOrderUpdate = (_dec$
|
|
1726
|
+
var _dec$n, _dec2$n, _class$n;
|
|
1727
|
+
let DtoOrderUpdate = (_dec$n = Dto(), _dec2$n = BeanInfo({
|
|
1581
1728
|
module: "test-vona"
|
|
1582
|
-
}), _dec$
|
|
1729
|
+
}), _dec$n(_class$n = _dec2$n(_class$n = class DtoOrderUpdate extends $Dto.update(() => ModelOrder, {
|
|
1583
1730
|
columns: ['orderNo', 'remark']
|
|
1584
|
-
}) {}) || _class$
|
|
1731
|
+
}) {}) || _class$n) || _class$n);
|
|
1585
1732
|
|
|
1586
|
-
var _dec$
|
|
1587
|
-
let DtoPostCreate = (_dec$
|
|
1733
|
+
var _dec$m, _dec2$m, _class$m;
|
|
1734
|
+
let DtoPostCreate = (_dec$m = Dto({
|
|
1588
1735
|
independent: true
|
|
1589
|
-
}), _dec2$
|
|
1736
|
+
}), _dec2$m = BeanInfo({
|
|
1590
1737
|
module: "test-vona"
|
|
1591
|
-
}), _dec$
|
|
1738
|
+
}), _dec$m(_class$m = _dec2$m(_class$m = class DtoPostCreate extends $Dto.create(() => ModelPost) {}) || _class$m) || _class$m);
|
|
1592
1739
|
|
|
1593
|
-
var _dec$
|
|
1594
|
-
let DtoProfile = (_dec$
|
|
1740
|
+
var _dec$l, _dec2$l, _dec3$i, _dec4$i, _dec5$i, _dec6$i, _class$l, _class2$i, _descriptor$4, _descriptor2$4;
|
|
1741
|
+
let DtoProfile = (_dec$l = Dto(), _dec2$l = BeanInfo({
|
|
1595
1742
|
module: "test-vona"
|
|
1596
|
-
}), _dec3$
|
|
1743
|
+
}), _dec3$i = Api.field(), _dec4$i = Reflect.metadata("design:type", Number), _dec5$i = Api.field(v.email()), _dec6$i = Reflect.metadata("design:type", String), _dec$l(_class$l = _dec2$l(_class$l = (_class2$i = class DtoProfile {
|
|
1597
1744
|
constructor() {
|
|
1598
|
-
_initializerDefineProperty(this, "id", _descriptor$
|
|
1599
|
-
_initializerDefineProperty(this, "email", _descriptor2$
|
|
1745
|
+
_initializerDefineProperty(this, "id", _descriptor$4, this);
|
|
1746
|
+
_initializerDefineProperty(this, "email", _descriptor2$4, this);
|
|
1600
1747
|
}
|
|
1601
|
-
}, _descriptor$
|
|
1748
|
+
}, _descriptor$4 = _applyDecoratedDescriptor(_class2$i.prototype, "id", [_dec3$i, _dec4$i], {
|
|
1602
1749
|
configurable: true,
|
|
1603
1750
|
enumerable: true,
|
|
1604
1751
|
writable: true,
|
|
1605
1752
|
initializer: null
|
|
1606
|
-
}), _descriptor2$
|
|
1753
|
+
}), _descriptor2$4 = _applyDecoratedDescriptor(_class2$i.prototype, "email", [_dec5$i, _dec6$i], {
|
|
1607
1754
|
configurable: true,
|
|
1608
1755
|
enumerable: true,
|
|
1609
1756
|
writable: true,
|
|
1610
1757
|
initializer: null
|
|
1611
|
-
}), _class2$
|
|
1758
|
+
}), _class2$i)) || _class$l) || _class$l);
|
|
1612
1759
|
|
|
1613
|
-
var _dec$
|
|
1614
|
-
let DtoUserLazy = (_dec$
|
|
1760
|
+
var _dec$k, _dec2$k, _dec3$h, _dec4$h, _dec5$h, _dec6$h, _dec7$f, _dec8$b, _class$k, _class2$h, _descriptor$3, _descriptor2$3, _descriptor3$1;
|
|
1761
|
+
let DtoUserLazy = (_dec$k = Dto(), _dec2$k = BeanInfo({
|
|
1615
1762
|
module: "test-vona"
|
|
1616
|
-
}), _dec3$
|
|
1763
|
+
}), _dec3$h = Api.field(), _dec4$h = Reflect.metadata("design:type", String), _dec5$h = Api.field(v.lazy(v.optional(), () => DtoUserLazy)), _dec6$h = Reflect.metadata("design:type", Object), _dec7$f = Api.field(v.optional(), v.array(v.lazy(() => DtoRoleLazy))), _dec8$b = Reflect.metadata("design:type", Array), _dec$k(_class$k = _dec2$k(_class$k = (_class2$h = class DtoUserLazy {
|
|
1617
1764
|
constructor() {
|
|
1618
|
-
_initializerDefineProperty(this, "name", _descriptor$
|
|
1619
|
-
_initializerDefineProperty(this, "user", _descriptor2$
|
|
1765
|
+
_initializerDefineProperty(this, "name", _descriptor$3, this);
|
|
1766
|
+
_initializerDefineProperty(this, "user", _descriptor2$3, this);
|
|
1620
1767
|
_initializerDefineProperty(this, "roles", _descriptor3$1, this);
|
|
1621
1768
|
}
|
|
1622
|
-
}, _descriptor$
|
|
1769
|
+
}, _descriptor$3 = _applyDecoratedDescriptor(_class2$h.prototype, "name", [_dec3$h, _dec4$h], {
|
|
1623
1770
|
configurable: true,
|
|
1624
1771
|
enumerable: true,
|
|
1625
1772
|
writable: true,
|
|
1626
1773
|
initializer: null
|
|
1627
|
-
}), _descriptor2$
|
|
1774
|
+
}), _descriptor2$3 = _applyDecoratedDescriptor(_class2$h.prototype, "user", [_dec5$h, _dec6$h], {
|
|
1628
1775
|
configurable: true,
|
|
1629
1776
|
enumerable: true,
|
|
1630
1777
|
writable: true,
|
|
1631
1778
|
initializer: null
|
|
1632
|
-
}), _descriptor3$1 = _applyDecoratedDescriptor(_class2$
|
|
1779
|
+
}), _descriptor3$1 = _applyDecoratedDescriptor(_class2$h.prototype, "roles", [_dec7$f, _dec8$b], {
|
|
1633
1780
|
configurable: true,
|
|
1634
1781
|
enumerable: true,
|
|
1635
1782
|
writable: true,
|
|
1636
1783
|
initializer: null
|
|
1637
|
-
}), _class2$
|
|
1784
|
+
}), _class2$h)) || _class$k) || _class$k);
|
|
1638
1785
|
|
|
1639
|
-
var _dec$
|
|
1640
|
-
let DtoRoleLazy = (_dec$
|
|
1786
|
+
var _dec$j, _dec2$j, _dec3$g, _dec4$g, _dec5$g, _dec6$g, _class$j, _class2$g, _descriptor$2, _descriptor2$2;
|
|
1787
|
+
let DtoRoleLazy = (_dec$j = Dto(), _dec2$j = BeanInfo({
|
|
1641
1788
|
module: "test-vona"
|
|
1642
|
-
}), _dec3$
|
|
1789
|
+
}), _dec3$g = Api.field(), _dec4$g = Reflect.metadata("design:type", String), _dec5$g = Api.field(v.optional(), v.array(v.lazy(() => DtoUserLazy))), _dec6$g = Reflect.metadata("design:type", Array), _dec$j(_class$j = _dec2$j(_class$j = (_class2$g = class DtoRoleLazy {
|
|
1643
1790
|
constructor() {
|
|
1644
|
-
_initializerDefineProperty(this, "name", _descriptor$
|
|
1645
|
-
_initializerDefineProperty(this, "users", _descriptor2$
|
|
1791
|
+
_initializerDefineProperty(this, "name", _descriptor$2, this);
|
|
1792
|
+
_initializerDefineProperty(this, "users", _descriptor2$2, this);
|
|
1646
1793
|
}
|
|
1647
|
-
}, _descriptor$
|
|
1794
|
+
}, _descriptor$2 = _applyDecoratedDescriptor(_class2$g.prototype, "name", [_dec3$g, _dec4$g], {
|
|
1648
1795
|
configurable: true,
|
|
1649
1796
|
enumerable: true,
|
|
1650
1797
|
writable: true,
|
|
1651
1798
|
initializer: null
|
|
1652
|
-
}), _descriptor2$
|
|
1799
|
+
}), _descriptor2$2 = _applyDecoratedDescriptor(_class2$g.prototype, "users", [_dec5$g, _dec6$g], {
|
|
1653
1800
|
configurable: true,
|
|
1654
1801
|
enumerable: true,
|
|
1655
1802
|
writable: true,
|
|
1656
1803
|
initializer: null
|
|
1657
|
-
}), _class2$
|
|
1804
|
+
}), _class2$g)) || _class$j) || _class$j);
|
|
1805
|
+
|
|
1806
|
+
var _dec$i, _dec2$i, _dec3$f, _dec4$f, _dec5$f, _dec6$f, _class$i, _class2$f, _descriptor$1, _descriptor2$1;
|
|
1807
|
+
let DtoSignin = (_dec$i = Dto(), _dec2$i = BeanInfo({
|
|
1808
|
+
module: "test-vona"
|
|
1809
|
+
}), _dec3$f = Api.field(), _dec4$f = Reflect.metadata("design:type", String), _dec5$f = Api.field(v.min(3)), _dec6$f = Reflect.metadata("design:type", String), _dec$i(_class$i = _dec2$i(_class$i = (_class2$f = class DtoSignin {
|
|
1810
|
+
constructor() {
|
|
1811
|
+
_initializerDefineProperty(this, "username", _descriptor$1, this);
|
|
1812
|
+
_initializerDefineProperty(this, "password", _descriptor2$1, this);
|
|
1813
|
+
}
|
|
1814
|
+
}, _descriptor$1 = _applyDecoratedDescriptor(_class2$f.prototype, "username", [_dec3$f, _dec4$f], {
|
|
1815
|
+
configurable: true,
|
|
1816
|
+
enumerable: true,
|
|
1817
|
+
writable: true,
|
|
1818
|
+
initializer: null
|
|
1819
|
+
}), _descriptor2$1 = _applyDecoratedDescriptor(_class2$f.prototype, "password", [_dec5$f, _dec6$f], {
|
|
1820
|
+
configurable: true,
|
|
1821
|
+
enumerable: true,
|
|
1822
|
+
writable: true,
|
|
1823
|
+
initializer: null
|
|
1824
|
+
}), _class2$f)) || _class$i) || _class$i);
|
|
1658
1825
|
|
|
1659
|
-
var _dec$
|
|
1660
|
-
let DtoUser = (_dec$
|
|
1826
|
+
var _dec$h, _dec2$h, _dec3$e, _dec4$e, _dec5$e, _dec6$e, _dec7$e, _dec8$a, _class$h, _class2$e, _descriptor, _descriptor2, _descriptor3;
|
|
1827
|
+
let DtoUser = (_dec$h = Dto({
|
|
1661
1828
|
openapi: {
|
|
1662
1829
|
title: $locale('User')
|
|
1663
1830
|
}
|
|
1664
|
-
}), _dec2$
|
|
1831
|
+
}), _dec2$h = BeanInfo({
|
|
1665
1832
|
module: "test-vona"
|
|
1666
|
-
}), _dec3$
|
|
1833
|
+
}), _dec3$e = Api.field(v.title($locale('UserId')), v.tableIdentity()), _dec4$e = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec5$e = Api.field(v.min(3)), _dec6$e = Reflect.metadata("design:type", String), _dec7$e = Api.field(), _dec8$a = Reflect.metadata("design:type", Boolean), _dec$h(_class$h = _dec2$h(_class$h = (_class2$e = class DtoUser {
|
|
1667
1834
|
constructor() {
|
|
1668
1835
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
1669
1836
|
_initializerDefineProperty(this, "name", _descriptor2, this);
|
|
1670
1837
|
_initializerDefineProperty(this, "married", _descriptor3, this);
|
|
1671
1838
|
}
|
|
1672
|
-
}, _descriptor = _applyDecoratedDescriptor(_class2$
|
|
1839
|
+
}, _descriptor = _applyDecoratedDescriptor(_class2$e.prototype, "id", [_dec3$e, _dec4$e], {
|
|
1673
1840
|
configurable: true,
|
|
1674
1841
|
enumerable: true,
|
|
1675
1842
|
writable: true,
|
|
1676
1843
|
initializer: null
|
|
1677
|
-
}), _descriptor2 = _applyDecoratedDescriptor(_class2$
|
|
1844
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2$e.prototype, "name", [_dec5$e, _dec6$e], {
|
|
1678
1845
|
configurable: true,
|
|
1679
1846
|
enumerable: true,
|
|
1680
1847
|
writable: true,
|
|
1681
1848
|
initializer: null
|
|
1682
|
-
}), _descriptor3 = _applyDecoratedDescriptor(_class2$
|
|
1849
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2$e.prototype, "married", [_dec7$e, _dec8$a], {
|
|
1683
1850
|
configurable: true,
|
|
1684
1851
|
enumerable: true,
|
|
1685
1852
|
writable: true,
|
|
1686
1853
|
initializer: null
|
|
1687
|
-
}), _class2$
|
|
1854
|
+
}), _class2$e)) || _class$h) || _class$h);
|
|
1688
1855
|
|
|
1689
|
-
var _dec$
|
|
1690
|
-
let DtoUserCreate = (_dec$
|
|
1856
|
+
var _dec$g, _dec2$g, _class$g;
|
|
1857
|
+
let DtoUserCreate = (_dec$g = Dto({
|
|
1691
1858
|
independent: true
|
|
1692
|
-
}), _dec2$
|
|
1859
|
+
}), _dec2$g = BeanInfo({
|
|
1693
1860
|
module: "test-vona"
|
|
1694
|
-
}), _dec$
|
|
1861
|
+
}), _dec$g(_class$g = _dec2$g(_class$g = class DtoUserCreate extends $Dto.create('test-vona:user', {
|
|
1695
1862
|
include: {
|
|
1696
1863
|
roles: true,
|
|
1697
1864
|
posts: true
|
|
1698
1865
|
}
|
|
1699
|
-
}) {}) || _class$
|
|
1866
|
+
}) {}) || _class$g) || _class$g);
|
|
1700
1867
|
|
|
1701
|
-
var _dec$
|
|
1702
|
-
let DtoUserUpdate = (_dec$
|
|
1868
|
+
var _dec$f, _dec2$f, _class$f;
|
|
1869
|
+
let DtoUserUpdate = (_dec$f = Dto(), _dec2$f = BeanInfo({
|
|
1703
1870
|
module: "test-vona"
|
|
1704
|
-
}), _dec$
|
|
1871
|
+
}), _dec$f(_class$f = _dec2$f(_class$f = class DtoUserUpdate extends $Dto.update('test-vona:user', {
|
|
1705
1872
|
include: {
|
|
1706
1873
|
posts: true
|
|
1707
1874
|
}
|
|
1708
|
-
}) {}) || _class$
|
|
1875
|
+
}) {}) || _class$f) || _class$f);
|
|
1709
1876
|
|
|
1710
1877
|
const __ThisModule__ = 'test-vona';
|
|
1711
1878
|
|
|
1712
|
-
var _dec$
|
|
1713
|
-
let ControllerBean = (_dec$
|
|
1879
|
+
var _dec$e, _dec2$e, _dec3$d, _dec4$d, _dec5$d, _dec6$d, _dec7$d, _dec8$9, _dec9$7, _dec0$7, _dec1$7, _class$e, _class2$d;
|
|
1880
|
+
let ControllerBean = (_dec$e = Controller({
|
|
1714
1881
|
path: 'bean',
|
|
1715
1882
|
meta: {
|
|
1716
1883
|
mode: 'test'
|
|
1717
1884
|
}
|
|
1718
|
-
}), _dec2$
|
|
1885
|
+
}), _dec2$e = Api.exclude(), _dec3$d = Passport.public(), _dec4$d = BeanInfo({
|
|
1719
1886
|
module: "test-vona"
|
|
1720
|
-
}), _dec5$
|
|
1887
|
+
}), _dec5$d = Web.get('test'), _dec6$d = Reflect.metadata("design:type", Function), _dec7$d = Reflect.metadata("design:paramtypes", []), _dec8$9 = Web.get('service'), _dec9$7 = Passport.public(), _dec0$7 = Reflect.metadata("design:type", Function), _dec1$7 = Reflect.metadata("design:paramtypes", []), _dec$e(_class$e = _dec2$e(_class$e = _dec3$d(_class$e = _dec4$d(_class$e = (_class2$d = class ControllerBean extends BeanBase {
|
|
1721
1888
|
async test() {
|
|
1722
1889
|
const a = 3;
|
|
1723
1890
|
const b = 4;
|
|
@@ -1807,17 +1974,17 @@ let ControllerBean = (_dec$d = Controller({
|
|
|
1807
1974
|
res = this.$scope.testVona.service.test.name;
|
|
1808
1975
|
assert.equal(res, 'serviceTest');
|
|
1809
1976
|
}
|
|
1810
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
1977
|
+
}, _applyDecoratedDescriptor(_class2$d.prototype, "test", [_dec5$d, _dec6$d, _dec7$d], Object.getOwnPropertyDescriptor(_class2$d.prototype, "test"), _class2$d.prototype), _applyDecoratedDescriptor(_class2$d.prototype, "service", [_dec8$9, _dec9$7, _dec0$7, _dec1$7], Object.getOwnPropertyDescriptor(_class2$d.prototype, "service"), _class2$d.prototype), _class2$d)) || _class$e) || _class$e) || _class$e) || _class$e);
|
|
1811
1978
|
|
|
1812
|
-
var _dec$
|
|
1813
|
-
let ControllerCacheMem = (_dec$
|
|
1979
|
+
var _dec$d, _dec2$d, _dec3$c, _dec4$c, _dec5$c, _dec6$c, _dec7$c, _class$d, _class2$c;
|
|
1980
|
+
let ControllerCacheMem = (_dec$d = Controller({
|
|
1814
1981
|
path: 'cacheMem',
|
|
1815
1982
|
meta: {
|
|
1816
1983
|
mode: 'test'
|
|
1817
1984
|
}
|
|
1818
|
-
}), _dec2$
|
|
1985
|
+
}), _dec2$d = Api.exclude(), _dec3$c = Passport.public(), _dec4$c = BeanInfo({
|
|
1819
1986
|
module: "test-vona"
|
|
1820
|
-
}), _dec5$
|
|
1987
|
+
}), _dec5$c = Web.post(), _dec6$c = Reflect.metadata("design:type", Function), _dec7$c = Reflect.metadata("design:paramtypes", []), _dec$d(_class$d = _dec2$d(_class$d = _dec3$c(_class$d = _dec4$c(_class$d = (_class2$c = class ControllerCacheMem extends BeanBase {
|
|
1821
1988
|
async mem() {
|
|
1822
1989
|
let res;
|
|
1823
1990
|
let value;
|
|
@@ -1872,17 +2039,17 @@ let ControllerCacheMem = (_dec$c = Controller({
|
|
|
1872
2039
|
assert.equal(value, undefined);
|
|
1873
2040
|
});
|
|
1874
2041
|
}
|
|
1875
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
2042
|
+
}, _applyDecoratedDescriptor(_class2$c.prototype, "mem", [_dec5$c, _dec6$c, _dec7$c], Object.getOwnPropertyDescriptor(_class2$c.prototype, "mem"), _class2$c.prototype), _class2$c)) || _class$d) || _class$d) || _class$d) || _class$d);
|
|
1876
2043
|
|
|
1877
|
-
var _dec$
|
|
1878
|
-
let ControllerCacheRedis = (_dec$
|
|
2044
|
+
var _dec$c, _dec2$c, _dec3$b, _dec4$b, _dec5$b, _dec6$b, _dec7$b, _class$c, _class2$b;
|
|
2045
|
+
let ControllerCacheRedis = (_dec$c = Controller({
|
|
1879
2046
|
path: 'cacheRedis',
|
|
1880
2047
|
meta: {
|
|
1881
2048
|
mode: 'test'
|
|
1882
2049
|
}
|
|
1883
|
-
}), _dec2$
|
|
2050
|
+
}), _dec2$c = Api.exclude(), _dec3$b = Passport.public(), _dec4$b = BeanInfo({
|
|
1884
2051
|
module: "test-vona"
|
|
1885
|
-
}), _dec5$
|
|
2052
|
+
}), _dec5$b = Web.post(), _dec6$b = Reflect.metadata("design:type", Function), _dec7$b = Reflect.metadata("design:paramtypes", []), _dec$c(_class$c = _dec2$c(_class$c = _dec3$b(_class$c = _dec4$b(_class$c = (_class2$b = class ControllerCacheRedis extends BeanBase {
|
|
1886
2053
|
async redis() {
|
|
1887
2054
|
let res;
|
|
1888
2055
|
let value;
|
|
@@ -1923,24 +2090,40 @@ let ControllerCacheRedis = (_dec$b = Controller({
|
|
|
1923
2090
|
assert.equal(value, undefined);
|
|
1924
2091
|
});
|
|
1925
2092
|
}
|
|
1926
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
2093
|
+
}, _applyDecoratedDescriptor(_class2$b.prototype, "redis", [_dec5$b, _dec6$b, _dec7$b], Object.getOwnPropertyDescriptor(_class2$b.prototype, "redis"), _class2$b.prototype), _class2$b)) || _class$c) || _class$c) || _class$c) || _class$c);
|
|
1927
2094
|
|
|
1928
|
-
var _dec$
|
|
2095
|
+
var _dec$b, _dec2$b, _dec3$a, _dec4$a, _dec5$a, _dec6$a, _dec7$a, _dec8$8, _class$b, _class2$a;
|
|
2096
|
+
let ControllerCaptcha = (_dec$b = Controller({
|
|
2097
|
+
path: 'captcha',
|
|
2098
|
+
meta: {
|
|
2099
|
+
mode: ['test', 'dev']
|
|
2100
|
+
}
|
|
2101
|
+
}), _dec2$b = BeanInfo({
|
|
2102
|
+
module: "test-vona"
|
|
2103
|
+
}), _dec3$a = Web.post('signin'), _dec4$a = Passport.public(), _dec5$a = Aspect.middleware('a-captcha:captcha', {
|
|
2104
|
+
scene: 'a-captchasimple:simple'
|
|
2105
|
+
}), _dec6$a = function (target, key) {
|
|
2106
|
+
return Arg.body()(target, key, 0);
|
|
2107
|
+
}, _dec7$a = Reflect.metadata("design:type", Function), _dec8$8 = Reflect.metadata("design:paramtypes", [typeof DtoSignin === "undefined" ? Object : DtoSignin]), _dec$b(_class$b = _dec2$b(_class$b = (_class2$a = class ControllerCaptcha extends BeanBase {
|
|
2108
|
+
async signin(_user) {}
|
|
2109
|
+
}, _applyDecoratedDescriptor(_class2$a.prototype, "signin", [_dec3$a, _dec4$a, _dec5$a, _dec6$a, _dec7$a, _dec8$8], Object.getOwnPropertyDescriptor(_class2$a.prototype, "signin"), _class2$a.prototype), _class2$a)) || _class$b) || _class$b);
|
|
2110
|
+
|
|
2111
|
+
var _dec$a, _dec2$a, _dec3$9, _dec4$9, _dec5$9, _dec6$9, _dec7$9, _dec8$7, _dec9$6, _dec0$6, _dec1$6, _dec10$5, _dec11$5, _dec12$5, _dec13$5, _dec14$4, _dec15$4, _dec16$4, _dec17$3, _dec18$3, _dec19$3, _dec20$3, _dec21$3, _dec22$3, _dec23$3, _dec24$3, _dec25$3, _dec26$2, _dec27$2, _dec28$1, _dec29$1, _dec30$1, _dec31$1, _dec32$1, _class$a, _class2$9;
|
|
1929
2112
|
let ControllerDtoTest = (_dec$a = Controller('dtoTest', {
|
|
1930
2113
|
meta: {
|
|
1931
2114
|
mode: ['test', 'dev']
|
|
1932
2115
|
}
|
|
1933
2116
|
}), _dec2$a = BeanInfo({
|
|
1934
2117
|
module: "test-vona"
|
|
1935
|
-
}), _dec3$9 = Web.get('getUserLazy'), _dec4$9 = Reflect.metadata("design:type", Function), _dec5$9 = Reflect.metadata("design:paramtypes", []), _dec6$9 = Web.get('getUserDynamic'), _dec7$9 = Api.body($Dto.get('test-vona:post')), _dec8$7 = Reflect.metadata("design:type", Function), _dec9$6 = Reflect.metadata("design:paramtypes", []),
|
|
2118
|
+
}), _dec3$9 = Web.get('getUserLazy'), _dec4$9 = Reflect.metadata("design:type", Function), _dec5$9 = Reflect.metadata("design:paramtypes", []), _dec6$9 = Web.get('getUserDynamic'), _dec7$9 = Api.body($Dto.get('test-vona:post')), _dec8$7 = Reflect.metadata("design:type", Function), _dec9$6 = Reflect.metadata("design:paramtypes", []), _dec0$6 = Web.get('getUserStats'), _dec1$6 = Api.body($Dto.get('test-vona:userStats')), _dec10$5 = Reflect.metadata("design:type", Function), _dec11$5 = Reflect.metadata("design:paramtypes", []), _dec12$5 = Web.get('getUserStatsGroup'), _dec13$5 = Api.body($Dto.get('test-vona:userStatsGroup')), _dec14$4 = Reflect.metadata("design:type", Function), _dec15$4 = Reflect.metadata("design:paramtypes", []), _dec16$4 = Web.post('createUser'), _dec17$3 = function (target, key) {
|
|
1936
2119
|
return Arg.body(v.object(DtoUserCreate))(target, key, 0);
|
|
1937
|
-
},
|
|
2120
|
+
}, _dec18$3 = Reflect.metadata("design:type", Function), _dec19$3 = Reflect.metadata("design:paramtypes", [typeof DtoUserCreate === "undefined" ? Object : DtoUserCreate]), _dec20$3 = Web.patch('updateUser/:id'), _dec21$3 = function (target, key) {
|
|
1938
2121
|
return Arg.param('id')(target, key, 0);
|
|
1939
|
-
},
|
|
2122
|
+
}, _dec22$3 = function (target, key) {
|
|
1940
2123
|
return Arg.body(v.object(DtoUserUpdate))(target, key, 1);
|
|
1941
|
-
},
|
|
2124
|
+
}, _dec23$3 = Reflect.metadata("design:type", Function), _dec24$3 = Reflect.metadata("design:paramtypes", [typeof TableIdentity$1 === "undefined" ? Object : TableIdentity$1, typeof DtoUserUpdate === "undefined" ? Object : DtoUserUpdate]), _dec25$3 = Web.get('getCategoryTree'), _dec26$2 = Api.body(v.array($Dto.get('test-vona:category', {
|
|
1942
2125
|
columns: ['id', 'name']
|
|
1943
|
-
}))),
|
|
2126
|
+
}))), _dec27$2 = Reflect.metadata("design:type", Function), _dec28$1 = Reflect.metadata("design:paramtypes", []), _dec29$1 = Web.get('getCategoryTree2'), _dec30$1 = Api.body(v.array(DtoCategoryTree)), _dec31$1 = Reflect.metadata("design:type", Function), _dec32$1 = Reflect.metadata("design:paramtypes", []), _dec$a(_class$a = _dec2$a(_class$a = (_class2$9 = class ControllerDtoTest extends BeanBase {
|
|
1944
2127
|
getUserLazy() {
|
|
1945
2128
|
return {};
|
|
1946
2129
|
}
|
|
@@ -1969,27 +2152,27 @@ let ControllerDtoTest = (_dec$a = Controller('dtoTest', {
|
|
|
1969
2152
|
});
|
|
1970
2153
|
return items;
|
|
1971
2154
|
}
|
|
1972
|
-
}, _applyDecoratedDescriptor(_class2$9.prototype, "getUserLazy", [_dec3$9, _dec4$9, _dec5$9], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getUserLazy"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getPostDynamic", [_dec6$9, _dec7$9, _dec8$7, _dec9$6], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getPostDynamic"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getUserStats", [
|
|
2155
|
+
}, _applyDecoratedDescriptor(_class2$9.prototype, "getUserLazy", [_dec3$9, _dec4$9, _dec5$9], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getUserLazy"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getPostDynamic", [_dec6$9, _dec7$9, _dec8$7, _dec9$6], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getPostDynamic"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getUserStats", [_dec0$6, _dec1$6, _dec10$5, _dec11$5], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getUserStats"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getUserStatsGroup", [_dec12$5, _dec13$5, _dec14$4, _dec15$4], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getUserStatsGroup"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "createUser", [_dec16$4, _dec17$3, _dec18$3, _dec19$3], Object.getOwnPropertyDescriptor(_class2$9.prototype, "createUser"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "updateUser", [_dec20$3, _dec21$3, _dec22$3, _dec23$3, _dec24$3], Object.getOwnPropertyDescriptor(_class2$9.prototype, "updateUser"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getCategoryTree", [_dec25$3, _dec26$2, _dec27$2, _dec28$1], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getCategoryTree"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getCategoryTree2", [_dec29$1, _dec30$1, _dec31$1, _dec32$1], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getCategoryTree2"), _class2$9.prototype), _class2$9)) || _class$a) || _class$a);
|
|
1973
2156
|
|
|
1974
|
-
var _dec$9, _dec2$9, _dec3$8, _dec4$8, _dec5$8, _dec6$8, _dec7$8, _dec8$6, _dec9$5,
|
|
2157
|
+
var _dec$9, _dec2$9, _dec3$8, _dec4$8, _dec5$8, _dec6$8, _dec7$8, _dec8$6, _dec9$5, _dec0$5, _dec1$5, _dec10$4, _dec11$4, _dec12$4, _dec13$4, _dec14$3, _dec15$3, _dec16$3, _class$9, _class2$8;
|
|
1975
2158
|
let ControllerGuardPassport = (_dec$9 = Controller('guardPassport'), _dec2$9 = BeanInfo({
|
|
1976
2159
|
module: "test-vona"
|
|
1977
2160
|
}), _dec3$8 = Web.get('testUserName'), _dec4$8 = Passport.userName({
|
|
1978
2161
|
name: 'admin'
|
|
1979
2162
|
}), _dec5$8 = Reflect.metadata("design:type", Function), _dec6$8 = Reflect.metadata("design:paramtypes", []), _dec7$8 = Web.get('testUserNameFail'), _dec8$6 = Passport.userName({
|
|
1980
2163
|
name: 'admin-none'
|
|
1981
|
-
}), _dec9$5 = Reflect.metadata("design:type", Function),
|
|
2164
|
+
}), _dec9$5 = Reflect.metadata("design:type", Function), _dec0$5 = Reflect.metadata("design:paramtypes", []), _dec1$5 = Web.get('testRoleName'), _dec10$4 = Passport.roleName({
|
|
1982
2165
|
name: 'admin'
|
|
1983
|
-
}),
|
|
2166
|
+
}), _dec11$4 = Reflect.metadata("design:type", Function), _dec12$4 = Reflect.metadata("design:paramtypes", []), _dec13$4 = Web.get('testRoleNameFail'), _dec14$3 = Passport.roleName({
|
|
1984
2167
|
name: 'admin-none'
|
|
1985
|
-
}),
|
|
2168
|
+
}), _dec15$3 = Reflect.metadata("design:type", Function), _dec16$3 = Reflect.metadata("design:paramtypes", []), _dec$9(_class$9 = _dec2$9(_class$9 = (_class2$8 = class ControllerGuardPassport extends BeanBase {
|
|
1986
2169
|
testUserName() {}
|
|
1987
2170
|
testUserNameFail() {}
|
|
1988
2171
|
testRoleName() {}
|
|
1989
2172
|
testRoleNameFail() {}
|
|
1990
|
-
}, _applyDecoratedDescriptor(_class2$8.prototype, "testUserName", [_dec3$8, _dec4$8, _dec5$8, _dec6$8], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testUserName"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "testUserNameFail", [_dec7$8, _dec8$6, _dec9$5,
|
|
2173
|
+
}, _applyDecoratedDescriptor(_class2$8.prototype, "testUserName", [_dec3$8, _dec4$8, _dec5$8, _dec6$8], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testUserName"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "testUserNameFail", [_dec7$8, _dec8$6, _dec9$5, _dec0$5], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testUserNameFail"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "testRoleName", [_dec1$5, _dec10$4, _dec11$4, _dec12$4], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testRoleName"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "testRoleNameFail", [_dec13$4, _dec14$3, _dec15$3, _dec16$3], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testRoleNameFail"), _class2$8.prototype), _class2$8)) || _class$9) || _class$9);
|
|
1991
2174
|
|
|
1992
|
-
var _dec$8, _dec2$8, _dec3$7, _dec4$7, _dec5$7, _dec6$7, _dec7$7, _dec8$5, _dec9$4,
|
|
2175
|
+
var _dec$8, _dec2$8, _dec3$7, _dec4$7, _dec5$7, _dec6$7, _dec7$7, _dec8$5, _dec9$4, _dec0$4, _dec1$4, _dec10$3, _dec11$3, _dec12$3, _dec13$3, _dec14$2, _dec15$2, _dec16$2, _dec17$2, _dec18$2, _dec19$2, _dec20$2, _dec21$2, _dec22$2, _dec23$2, _dec24$2, _dec25$2, _dec26$1, _dec27$1, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _class$8, _class2$7;
|
|
1993
2176
|
let ControllerOnion = (_dec$8 = Controller({
|
|
1994
2177
|
path: 'onion',
|
|
1995
2178
|
tags: ['Onion'],
|
|
@@ -2007,66 +2190,66 @@ let ControllerOnion = (_dec$8 = Controller({
|
|
|
2007
2190
|
public: true
|
|
2008
2191
|
}), _dec6$7 = Reflect.metadata("design:type", Function), _dec7$7 = Reflect.metadata("design:paramtypes", []), _dec8$5 = Web.post('//echo'), _dec9$4 = Aspect.guardGlobal('a-user:passport', {
|
|
2009
2192
|
public: true
|
|
2010
|
-
}),
|
|
2193
|
+
}), _dec0$4 = Aspect.middlewareGlobal('a-core:gate', {
|
|
2011
2194
|
gate: {
|
|
2012
2195
|
mode: 'dev'
|
|
2013
2196
|
}
|
|
2014
|
-
}),
|
|
2197
|
+
}), _dec1$4 = Core.gate({
|
|
2015
2198
|
gate: {
|
|
2016
2199
|
mode: 'dev'
|
|
2017
2200
|
}
|
|
2018
|
-
}),
|
|
2201
|
+
}), _dec10$3 = Aspect.aopMethod('a-orm:transaction', {
|
|
2019
2202
|
isolationLevel: 'SERIALIZABLE',
|
|
2020
2203
|
readOnly: true
|
|
2021
|
-
}),
|
|
2204
|
+
}), _dec11$3 = Database.transaction({
|
|
2022
2205
|
isolationLevel: 'READ_COMMITTED',
|
|
2023
2206
|
readOnly: false
|
|
2024
|
-
}),
|
|
2207
|
+
}), _dec12$3 = Api.body(v.optional(), z.string()), _dec13$3 = function (target, key) {
|
|
2025
2208
|
return Arg.query('id', v.default(0), z.number())(target, key, 0);
|
|
2026
|
-
},
|
|
2209
|
+
}, _dec14$2 = function (target, key) {
|
|
2027
2210
|
return Arg.query('name', z.number().optional())(target, key, 2);
|
|
2028
|
-
},
|
|
2211
|
+
}, _dec15$2 = function (target, key) {
|
|
2029
2212
|
return Arg.body(v.title($locale('User')), z.object({
|
|
2030
2213
|
id: z.number().openapi({
|
|
2031
2214
|
title: $locale('UserId')
|
|
2032
2215
|
})
|
|
2033
2216
|
}))(target, key, 3);
|
|
2034
|
-
},
|
|
2217
|
+
}, _dec16$2 = Reflect.metadata("design:type", Function), _dec17$2 = Reflect.metadata("design:paramtypes", [Number, String, String, typeof DtoUser === "undefined" ? Object : DtoUser]), _dec18$2 = Web.post('echo2/:userId/:userName'), _dec19$2 = Aspect.guardGlobal('a-user:passport', {
|
|
2035
2218
|
public: true
|
|
2036
|
-
}),
|
|
2219
|
+
}), _dec20$2 = function (target, key) {
|
|
2037
2220
|
return Arg.param('userId', v.title($locale('UserId')), v.example('example:1'))(target, key, 0);
|
|
2038
|
-
},
|
|
2221
|
+
}, _dec21$2 = function (target, key) {
|
|
2039
2222
|
return Arg.param('userName', v.title($locale('UserId')), v.example('example:1'))(target, key, 1);
|
|
2040
|
-
},
|
|
2223
|
+
}, _dec22$2 = function (target, key) {
|
|
2041
2224
|
return Arg.query(DtoUser)(target, key, 2);
|
|
2042
|
-
},
|
|
2225
|
+
}, _dec23$2 = function (target, key) {
|
|
2043
2226
|
return Arg.body(v.title($locale('User')), z.object({
|
|
2044
2227
|
id: z.number().openapi({
|
|
2045
2228
|
title: $locale('UserId')
|
|
2046
2229
|
})
|
|
2047
2230
|
}))(target, key, 3);
|
|
2048
|
-
},
|
|
2231
|
+
}, _dec24$2 = Reflect.metadata("design:type", Function), _dec25$2 = Reflect.metadata("design:paramtypes", [Number, String, typeof DtoUser === "undefined" ? Object : DtoUser, typeof DtoUser === "undefined" ? Object : DtoUser]), _dec26$1 = Web.get('echo3/:userId'), _dec27$1 = Aspect.guardGlobal('a-user:passport', {
|
|
2049
2232
|
public: true
|
|
2050
|
-
}),
|
|
2233
|
+
}), _dec28 = function (target, key) {
|
|
2051
2234
|
return Arg.param('userId')(target, key, 0);
|
|
2052
|
-
},
|
|
2235
|
+
}, _dec29 = function (target, key) {
|
|
2053
2236
|
return Arg.query('id', v.optional())(target, key, 1);
|
|
2054
|
-
},
|
|
2237
|
+
}, _dec30 = function (target, key) {
|
|
2055
2238
|
return Arg.headers('Accept', v.title($locale('UserId')))(target, key, 2);
|
|
2056
|
-
},
|
|
2239
|
+
}, _dec31 = Reflect.metadata("design:type", Function), _dec32 = Reflect.metadata("design:paramtypes", [Number, Number, String]), _dec33 = Web.post('echo4'), _dec34 = Aspect.guardGlobal('a-user:passport', {
|
|
2057
2240
|
public: true
|
|
2058
|
-
}),
|
|
2241
|
+
}), _dec35 = Aspect.filterGlobal('a-error:error', {
|
|
2059
2242
|
enable: true,
|
|
2060
2243
|
logs: {
|
|
2061
2244
|
422: true
|
|
2062
2245
|
}
|
|
2063
|
-
}),
|
|
2246
|
+
}), _dec36 = Api.body(v.array(DtoUser)), _dec37 = function (target, key) {
|
|
2064
2247
|
return Arg.body(v.optional(), v.array(), v.object(DtoUser))(target, key, 0);
|
|
2065
|
-
},
|
|
2248
|
+
}, _dec38 = Reflect.metadata("design:type", Function), _dec39 = Reflect.metadata("design:paramtypes", [Array]), _dec40 = Web.get('echo5'), _dec41 = Passport.public(), _dec42 = function (target, key) {
|
|
2066
2249
|
return Arg.query('ids', v.default([1]), v.array(Number, {
|
|
2067
2250
|
separator: '-'
|
|
2068
2251
|
}))(target, key, 0);
|
|
2069
|
-
},
|
|
2252
|
+
}, _dec43 = Reflect.metadata("design:type", Function), _dec44 = Reflect.metadata("design:paramtypes", [Array]), _dec45 = Web.get('echo6'), _dec46 = Passport.admin(), _dec47 = Reflect.metadata("design:type", Function), _dec48 = Reflect.metadata("design:paramtypes", []), _dec$8(_class$8 = _dec2$8(_class$8 = (_class2$7 = class ControllerOnion extends BeanBase {
|
|
2070
2253
|
index() {
|
|
2071
2254
|
return this.ctx.db.inTransaction;
|
|
2072
2255
|
// return 'Hello Vona';
|
|
@@ -2097,9 +2280,9 @@ let ControllerOnion = (_dec$8 = Controller({
|
|
|
2097
2280
|
echo6() {
|
|
2098
2281
|
return this.bean.passport.isAuthenticated;
|
|
2099
2282
|
}
|
|
2100
|
-
}, _applyDecoratedDescriptor(_class2$7.prototype, "index", [_dec3$7, _dec4$7, _dec5$7, _dec6$7, _dec7$7], Object.getOwnPropertyDescriptor(_class2$7.prototype, "index"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo", [_dec8$5, _dec9$4,
|
|
2283
|
+
}, _applyDecoratedDescriptor(_class2$7.prototype, "index", [_dec3$7, _dec4$7, _dec5$7, _dec6$7, _dec7$7], Object.getOwnPropertyDescriptor(_class2$7.prototype, "index"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo", [_dec8$5, _dec9$4, _dec0$4, _dec1$4, _dec10$3, _dec11$3, _dec12$3, _dec13$3, _dec14$2, _dec15$2, _dec16$2, _dec17$2], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo2", [_dec18$2, _dec19$2, _dec20$2, _dec21$2, _dec22$2, _dec23$2, _dec24$2, _dec25$2], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo2"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo3", [_dec26$1, _dec27$1, _dec28, _dec29, _dec30, _dec31, _dec32], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo3"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo4", [_dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo4"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo5", [_dec40, _dec41, _dec42, _dec43, _dec44], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo5"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo6", [_dec45, _dec46, _dec47, _dec48], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo6"), _class2$7.prototype), _class2$7)) || _class$8) || _class$8);
|
|
2101
2284
|
|
|
2102
|
-
var _dec$7, _dec2$7, _dec3$6, _dec4$6, _dec5$6, _dec6$6, _dec7$6, _dec8$4, _dec9$3,
|
|
2285
|
+
var _dec$7, _dec2$7, _dec3$6, _dec4$6, _dec5$6, _dec6$6, _dec7$6, _dec8$4, _dec9$3, _dec0$3, _dec1$3, _dec10$2, _dec11$2, _dec12$2, _dec13$2, _dec14$1, _dec15$1, _dec16$1, _dec17$1, _dec18$1, _dec19$1, _dec20$1, _dec21$1, _dec22$1, _dec23$1, _dec24$1, _dec25$1, _class$7, _class2$6;
|
|
2103
2286
|
let ControllerPassport = (_dec$7 = Controller({
|
|
2104
2287
|
path: 'passport',
|
|
2105
2288
|
meta: {
|
|
@@ -2111,11 +2294,11 @@ let ControllerPassport = (_dec$7 = Controller({
|
|
|
2111
2294
|
return Arg.param('name')(target, key, 0);
|
|
2112
2295
|
}, _dec7$6 = function (target, key) {
|
|
2113
2296
|
return Arg.user()(target, key, 1);
|
|
2114
|
-
}, _dec8$4 = Reflect.metadata("design:type", Function), _dec9$3 = Reflect.metadata("design:paramtypes", [String, typeof IUserBase === "undefined" ? Object : IUserBase]),
|
|
2297
|
+
}, _dec8$4 = Reflect.metadata("design:type", Function), _dec9$3 = Reflect.metadata("design:paramtypes", [String, typeof IUserBase === "undefined" ? Object : IUserBase]), _dec0$3 = Web.post('login'), _dec1$3 = Api.body(v.object(DtoJwtToken)), _dec10$2 = Passport.public(), _dec11$2 = function (target, key) {
|
|
2115
2298
|
return Arg.body('name')(target, key, 0);
|
|
2116
|
-
},
|
|
2299
|
+
}, _dec12$2 = Reflect.metadata("design:type", Function), _dec13$2 = Reflect.metadata("design:paramtypes", [String]), _dec14$1 = Web.get('isAuthenticated'), _dec15$1 = Reflect.metadata("design:type", Function), _dec16$1 = Reflect.metadata("design:paramtypes", []), _dec17$1 = Web.post('refresh'), _dec18$1 = Api.body(v.object(DtoJwtToken)), _dec19$1 = Passport.public(), _dec20$1 = function (target, key) {
|
|
2117
2300
|
return Arg.body('refreshToken')(target, key, 0);
|
|
2118
|
-
},
|
|
2301
|
+
}, _dec21$1 = Reflect.metadata("design:type", Function), _dec22$1 = Reflect.metadata("design:paramtypes", [String]), _dec23$1 = Web.post('logout'), _dec24$1 = Reflect.metadata("design:type", Function), _dec25$1 = Reflect.metadata("design:paramtypes", []), _dec$7(_class$7 = _dec2$7(_class$7 = _dec3$6(_class$7 = (_class2$6 = class ControllerPassport extends BeanBase {
|
|
2119
2302
|
echo(name, user) {
|
|
2120
2303
|
assert.equal(name, 'admin');
|
|
2121
2304
|
assert.equal($getUserName(user), 'admin');
|
|
@@ -2137,7 +2320,7 @@ let ControllerPassport = (_dec$7 = Controller({
|
|
|
2137
2320
|
async logout() {
|
|
2138
2321
|
return await this.bean.passport.signout();
|
|
2139
2322
|
}
|
|
2140
|
-
}, _applyDecoratedDescriptor(_class2$6.prototype, "echo", [_dec4$6, _dec5$6, _dec6$6, _dec7$6, _dec8$4, _dec9$3], Object.getOwnPropertyDescriptor(_class2$6.prototype, "echo"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "login", [
|
|
2323
|
+
}, _applyDecoratedDescriptor(_class2$6.prototype, "echo", [_dec4$6, _dec5$6, _dec6$6, _dec7$6, _dec8$4, _dec9$3], Object.getOwnPropertyDescriptor(_class2$6.prototype, "echo"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "login", [_dec0$3, _dec1$3, _dec10$2, _dec11$2, _dec12$2, _dec13$2], Object.getOwnPropertyDescriptor(_class2$6.prototype, "login"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "isAuthenticated", [_dec14$1, _dec15$1, _dec16$1], Object.getOwnPropertyDescriptor(_class2$6.prototype, "isAuthenticated"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "refresh", [_dec17$1, _dec18$1, _dec19$1, _dec20$1, _dec21$1, _dec22$1], Object.getOwnPropertyDescriptor(_class2$6.prototype, "refresh"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "logout", [_dec23$1, _dec24$1, _dec25$1], Object.getOwnPropertyDescriptor(_class2$6.prototype, "logout"), _class2$6.prototype), _class2$6)) || _class$7) || _class$7) || _class$7);
|
|
2141
2324
|
|
|
2142
2325
|
var _dec$6, _dec2$6, _dec3$5, _dec4$5, _dec5$5, _dec6$5, _dec7$5, _dec8$3, _class$6, _class2$5;
|
|
2143
2326
|
let ControllerPerformAction = (_dec$6 = Controller({
|
|
@@ -2159,7 +2342,7 @@ let ControllerPerformAction = (_dec$6 = Controller({
|
|
|
2159
2342
|
}
|
|
2160
2343
|
}, _applyDecoratedDescriptor(_class2$5.prototype, "echo", [_dec4$5, _dec5$5, _dec6$5, _dec7$5, _dec8$3], Object.getOwnPropertyDescriptor(_class2$5.prototype, "echo"), _class2$5.prototype), _class2$5)) || _class$6) || _class$6) || _class$6);
|
|
2161
2344
|
|
|
2162
|
-
var _dec$5, _dec2$5, _dec3$4, _dec4$4, _dec5$4, _dec6$4, _dec7$4, _dec8$2, _dec9$2,
|
|
2345
|
+
var _dec$5, _dec2$5, _dec3$4, _dec4$4, _dec5$4, _dec6$4, _dec7$4, _dec8$2, _dec9$2, _dec0$2, _dec1$2, _class$5, _class2$4;
|
|
2163
2346
|
let ControllerQueue = (_dec$5 = Controller({
|
|
2164
2347
|
path: 'queue',
|
|
2165
2348
|
meta: {
|
|
@@ -2167,7 +2350,7 @@ let ControllerQueue = (_dec$5 = Controller({
|
|
|
2167
2350
|
}
|
|
2168
2351
|
}), _dec2$5 = Api.exclude(), _dec3$4 = BeanInfo({
|
|
2169
2352
|
module: "test-vona"
|
|
2170
|
-
}), _dec4$4 = Web.post('pushAsync'), _dec5$4 = Passport.public(), _dec6$4 = Reflect.metadata("design:type", Function), _dec7$4 = Reflect.metadata("design:paramtypes", []), _dec8$2 = Web.post('push'), _dec9$2 = Passport.public(),
|
|
2353
|
+
}), _dec4$4 = Web.post('pushAsync'), _dec5$4 = Passport.public(), _dec6$4 = Reflect.metadata("design:type", Function), _dec7$4 = Reflect.metadata("design:paramtypes", []), _dec8$2 = Web.post('push'), _dec9$2 = Passport.public(), _dec0$2 = Reflect.metadata("design:type", Function), _dec1$2 = Reflect.metadata("design:paramtypes", []), _dec$5(_class$5 = _dec2$5(_class$5 = _dec3$4(_class$5 = (_class2$4 = class ControllerQueue extends BeanBase {
|
|
2171
2354
|
async pushAsync() {
|
|
2172
2355
|
const res = await this.scope.queue.test.pushAsync({
|
|
2173
2356
|
a: 1,
|
|
@@ -2182,7 +2365,7 @@ let ControllerQueue = (_dec$5 = Controller({
|
|
|
2182
2365
|
b: 3
|
|
2183
2366
|
});
|
|
2184
2367
|
}
|
|
2185
|
-
}, _applyDecoratedDescriptor(_class2$4.prototype, "pushAsync", [_dec4$4, _dec5$4, _dec6$4, _dec7$4], Object.getOwnPropertyDescriptor(_class2$4.prototype, "pushAsync"), _class2$4.prototype), _applyDecoratedDescriptor(_class2$4.prototype, "push", [_dec8$2, _dec9$2,
|
|
2368
|
+
}, _applyDecoratedDescriptor(_class2$4.prototype, "pushAsync", [_dec4$4, _dec5$4, _dec6$4, _dec7$4], Object.getOwnPropertyDescriptor(_class2$4.prototype, "pushAsync"), _class2$4.prototype), _applyDecoratedDescriptor(_class2$4.prototype, "push", [_dec8$2, _dec9$2, _dec0$2, _dec1$2], Object.getOwnPropertyDescriptor(_class2$4.prototype, "push"), _class2$4.prototype), _class2$4)) || _class$5) || _class$5) || _class$5);
|
|
2186
2369
|
|
|
2187
2370
|
var _dec$4, _dec2$4, _dec3$3, _dec4$3, _dec5$3, _dec6$3, _dec7$3, _class$4, _class2$3;
|
|
2188
2371
|
let ControllerSummer = (_dec$4 = Controller({
|
|
@@ -2365,7 +2548,7 @@ let ControllerTail = (_dec$3 = Controller({
|
|
|
2365
2548
|
}
|
|
2366
2549
|
}, _applyDecoratedDescriptor(_class2$2.prototype, "tail", [_dec4$2, _dec5$2, _dec6$2, _dec7$2], Object.getOwnPropertyDescriptor(_class2$2.prototype, "tail"), _class2$2.prototype), _class2$2)) || _class$3) || _class$3) || _class$3);
|
|
2367
2550
|
|
|
2368
|
-
var _dec$2, _dec2$2, _dec3$1, _dec4$1, _dec5$1, _dec6$1, _dec7$1, _dec8$1, _dec9$1,
|
|
2551
|
+
var _dec$2, _dec2$2, _dec3$1, _dec4$1, _dec5$1, _dec6$1, _dec7$1, _dec8$1, _dec9$1, _dec0$1, _dec1$1, _dec10$1, _dec11$1, _dec12$1, _dec13$1, _class$2, _class2$1;
|
|
2369
2552
|
const tableNameFail = '__tempTransactionFail';
|
|
2370
2553
|
const tableNameSuccess = '__tempTransactionSuccess';
|
|
2371
2554
|
let ControllerTransaction = (_dec$2 = Controller({
|
|
@@ -2377,9 +2560,9 @@ let ControllerTransaction = (_dec$2 = Controller({
|
|
|
2377
2560
|
module: "test-vona"
|
|
2378
2561
|
}), _dec4$1 = Web.post('fail'), _dec5$1 = Database.transaction(), _dec6$1 = Passport.public(), _dec7$1 = function (target, key) {
|
|
2379
2562
|
return Arg.body()(target, key, 0);
|
|
2380
|
-
}, _dec8$1 = Reflect.metadata("design:type", Function), _dec9$1 = Reflect.metadata("design:paramtypes", [Object]),
|
|
2563
|
+
}, _dec8$1 = Reflect.metadata("design:type", Function), _dec9$1 = Reflect.metadata("design:paramtypes", [Object]), _dec0$1 = Web.post('success'), _dec1$1 = Database.transaction(), _dec10$1 = Passport.public(), _dec11$1 = function (target, key) {
|
|
2381
2564
|
return Arg.body()(target, key, 0);
|
|
2382
|
-
},
|
|
2565
|
+
}, _dec12$1 = Reflect.metadata("design:type", Function), _dec13$1 = Reflect.metadata("design:paramtypes", [Object]), _dec$2(_class$2 = _dec2$2(_class$2 = _dec3$1(_class$2 = (_class2$1 = class ControllerTransaction extends BeanBase {
|
|
2383
2566
|
async fail(item) {
|
|
2384
2567
|
await this.bean.model.update(`${tableNameFail}`, item);
|
|
2385
2568
|
await this.bean.model.update(`${tableNameFail}error`, item);
|
|
@@ -2387,9 +2570,9 @@ let ControllerTransaction = (_dec$2 = Controller({
|
|
|
2387
2570
|
async success(item) {
|
|
2388
2571
|
await this.bean.model.update(tableNameSuccess, item);
|
|
2389
2572
|
}
|
|
2390
|
-
}, _applyDecoratedDescriptor(_class2$1.prototype, "fail", [_dec4$1, _dec5$1, _dec6$1, _dec7$1, _dec8$1, _dec9$1], Object.getOwnPropertyDescriptor(_class2$1.prototype, "fail"), _class2$1.prototype), _applyDecoratedDescriptor(_class2$1.prototype, "success", [
|
|
2573
|
+
}, _applyDecoratedDescriptor(_class2$1.prototype, "fail", [_dec4$1, _dec5$1, _dec6$1, _dec7$1, _dec8$1, _dec9$1], Object.getOwnPropertyDescriptor(_class2$1.prototype, "fail"), _class2$1.prototype), _applyDecoratedDescriptor(_class2$1.prototype, "success", [_dec0$1, _dec1$1, _dec10$1, _dec11$1, _dec12$1, _dec13$1], Object.getOwnPropertyDescriptor(_class2$1.prototype, "success"), _class2$1.prototype), _class2$1)) || _class$2) || _class$2) || _class$2);
|
|
2391
2574
|
|
|
2392
|
-
var _dec$1, _dec2$1, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27,
|
|
2575
|
+
var _dec$1, _dec2$1, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec0, _dec1, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _class$1, _class2;
|
|
2393
2576
|
let ControllerUpload = (_dec$1 = Controller({
|
|
2394
2577
|
path: 'upload',
|
|
2395
2578
|
meta: {
|
|
@@ -2403,19 +2586,19 @@ let ControllerUpload = (_dec$1 = Controller({
|
|
|
2403
2586
|
return Arg.fields('checkes', v.array(z.string()))(target, key, 1);
|
|
2404
2587
|
}, _dec9 = function (target, key) {
|
|
2405
2588
|
return Arg.field('name', v.default('zhennann'), v.title('your name'))(target, key, 2);
|
|
2406
|
-
},
|
|
2589
|
+
}, _dec0 = Reflect.metadata("design:type", Function), _dec1 = Reflect.metadata("design:paramtypes", [Array, Array, String]), _dec10 = Web.post('file'), _dec11 = Passport.public(), _dec12 = Aspect.interceptor('a-upload:upload'), _dec13 = Api.contentType('application/json'), _dec14 = function (target, key) {
|
|
2407
2590
|
return Arg.field('name', v.default('zhennann'))(target, key, 0);
|
|
2408
|
-
},
|
|
2591
|
+
}, _dec15 = function (target, key) {
|
|
2409
2592
|
return Arg.file('welcome')(target, key, 1);
|
|
2410
|
-
},
|
|
2593
|
+
}, _dec16 = Reflect.metadata("design:type", Function), _dec17 = Reflect.metadata("design:paramtypes", [String, typeof IUploadFile === "undefined" ? Object : IUploadFile]), _dec18 = Web.post('files'), _dec19 = Passport.public(), _dec20 = Aspect.interceptor('a-upload:upload'), _dec21 = Api.contentType('application/json'), _dec22 = function (target, key) {
|
|
2411
2594
|
return Arg.files(v.title('more files'))(target, key, 0);
|
|
2412
|
-
},
|
|
2595
|
+
}, _dec23 = function (target, key) {
|
|
2413
2596
|
return Arg.files('images', v.title('images'))(target, key, 1);
|
|
2414
|
-
},
|
|
2597
|
+
}, _dec24 = function (target, key) {
|
|
2415
2598
|
return Arg.file('welcome1', v.title('single file'))(target, key, 2);
|
|
2416
|
-
},
|
|
2599
|
+
}, _dec25 = function (target, key) {
|
|
2417
2600
|
return Arg.file('welcome2')(target, key, 3);
|
|
2418
|
-
},
|
|
2601
|
+
}, _dec26 = Reflect.metadata("design:type", Function), _dec27 = Reflect.metadata("design:paramtypes", [Array, Array, typeof IUploadFile === "undefined" ? Object : IUploadFile, typeof IUploadFile === "undefined" ? Object : IUploadFile]), _dec$1(_class$1 = _dec2$1(_class$1 = (_class2 = class ControllerUpload extends BeanBase {
|
|
2419
2602
|
fields(fields, checkes, name) {
|
|
2420
2603
|
assert.equal(fields.find(item => item.name === 'name')?.value, 'zhennann');
|
|
2421
2604
|
assert.equal(checkes.length > 0, true);
|
|
@@ -2434,7 +2617,7 @@ let ControllerUpload = (_dec$1 = Controller({
|
|
|
2434
2617
|
assert.equal(file2.name, 'welcome2');
|
|
2435
2618
|
return this.ctx[SymbolUploadValue];
|
|
2436
2619
|
}
|
|
2437
|
-
}, _applyDecoratedDescriptor(_class2.prototype, "fields", [_dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9,
|
|
2620
|
+
}, _applyDecoratedDescriptor(_class2.prototype, "fields", [_dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec0, _dec1], Object.getOwnPropertyDescriptor(_class2.prototype, "fields"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "file", [_dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17], Object.getOwnPropertyDescriptor(_class2.prototype, "file"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "files", [_dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27], Object.getOwnPropertyDescriptor(_class2.prototype, "files"), _class2.prototype), _class2)) || _class$1) || _class$1);
|
|
2438
2621
|
|
|
2439
2622
|
function config(_app) {
|
|
2440
2623
|
return {};
|
|
@@ -2491,4 +2674,4 @@ function $locale(key) {
|
|
|
2491
2674
|
}
|
|
2492
2675
|
/** scope: end */
|
|
2493
2676
|
|
|
2494
|
-
export { $locale, AopMethodTest, AopRegExp, AopSimple, BeanTestCtx, BroadcastTest, CacheMemTest, CacheRedisPost, CacheRedisTest, ControllerBean, ControllerCacheMem, ControllerCacheRedis, ControllerDtoTest, ControllerGuardPassport, ControllerOnion, ControllerPassport, ControllerPerformAction, ControllerQueue, ControllerSummer, ControllerTail, ControllerTransaction, ControllerUpload, DtoCategoryTree, DtoOrderCreate, DtoOrderResult, DtoOrderUpdate, DtoPostCreate, DtoProfile, DtoRoleLazy, DtoUser, DtoUserCreate, DtoUserLazy, DtoUserUpdate, EntityCategory, EntityOrder, EntityPost, EntityPostContent, EntityProduct, EntityRole, EntityRoleUser, EntityTest, EntityUser, EventHelloEcho, EventListenerHelloEcho, MetaVersion, ModelCategory, ModelCategoryChain, ModelOrder, ModelOrderStats, ModelPost, ModelPostContent, ModelProduct, ModelRole, ModelRoleUser, ModelTest, ModelTestDynamicTable, ModelUser, ModelUserStats, ModelUserStatsGroup, QueueTest, ScheduleTest, ScheduleTest3, ScopeModuleTestVona, ServiceAopMethod, ServiceCaching, ServiceCategory, ServiceOrder, ServicePost, ServiceTest, ServiceTestApp, ServiceTestClass, ServiceTestData, ServiceTransaction, ServiceUser, SummerCacheTest, config, locales };
|
|
2677
|
+
export { $locale, AopMethodTest, AopRegExp, AopSimple, BeanTestCtx, BroadcastTest, CacheMemTest, CacheRedisPost, CacheRedisTest, ControllerBean, ControllerCacheMem, ControllerCacheRedis, ControllerCaptcha, ControllerDtoTest, ControllerGuardPassport, ControllerOnion, ControllerPassport, ControllerPerformAction, ControllerQueue, ControllerSummer, ControllerTail, ControllerTransaction, ControllerUpload, DtoCategoryTree, DtoOrderCreate, DtoOrderResult, DtoOrderUpdate, DtoPostCreate, DtoProfile, DtoRoleLazy, DtoSignin, DtoUser, DtoUserCreate, DtoUserLazy, DtoUserUpdate, EntityCategory, EntityOrder, EntityPost, EntityPostContent, EntityProduct, EntityRole, EntityRoleUser, EntityTest, EntityUser, EventHelloEcho, EventListenerHelloEcho, MetaVersion, ModelCategory, ModelCategoryChain, ModelOrder, ModelOrderStats, ModelPost, ModelPostContent, ModelProduct, ModelRole, ModelRoleUser, ModelTest, ModelTestDynamicTable, ModelUser, ModelUserStats, ModelUserStatsGroup, QueueTest, ScheduleTest, ScheduleTest3, ScopeModuleTestVona, ServiceAopMethod, ServiceCaching, ServiceCategory, ServiceOrder, ServicePost, ServiceProduct, ServiceTest, ServiceTestApp, ServiceTestClass, ServiceTestData, ServiceTransaction, ServiceUser, SummerCacheTest, config, locales };
|