vona-module-test-vona 5.0.42 → 5.0.44
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 +595 -435
- 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/package.json +1 -1
- package/src/.metadata/index.ts +43 -0
- package/src/bean/queue.test.ts +3 -1
- package/src/controller/captcha.ts +18 -0
- package/src/controller/queue.ts +2 -1
- 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 +15 -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,12 @@ 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 {
|
|
1314
1431
|
async relationBelongsToMany() {
|
|
1315
1432
|
// insert: roles
|
|
1316
1433
|
const roles = await this.scope.model.role.insertBulk([{
|
|
@@ -1327,16 +1444,18 @@ let ServiceUser = (_dec$A = Service(), _dec2$A = BeanInfo({
|
|
|
1327
1444
|
id: roleIdFamily
|
|
1328
1445
|
}]
|
|
1329
1446
|
}, {
|
|
1330
|
-
|
|
1331
|
-
roles:
|
|
1447
|
+
with: {
|
|
1448
|
+
roles: $relationDynamic.belongsToMany(() => ModelRoleUser, () => ModelRole, 'userId', 'roleId')
|
|
1332
1449
|
}
|
|
1333
1450
|
});
|
|
1334
1451
|
// get: user
|
|
1335
1452
|
await this.scope.model.user.get({
|
|
1336
1453
|
id: userCreate.id
|
|
1337
1454
|
}, {
|
|
1338
|
-
|
|
1339
|
-
roles:
|
|
1455
|
+
with: {
|
|
1456
|
+
roles: $relationDynamic.belongsToMany(() => ModelRoleUser, () => ModelRole, 'userId', 'roleId', {
|
|
1457
|
+
columns: ['id', 'name']
|
|
1458
|
+
})
|
|
1340
1459
|
}
|
|
1341
1460
|
});
|
|
1342
1461
|
// update: user
|
|
@@ -1353,74 +1472,76 @@ let ServiceUser = (_dec$A = Service(), _dec2$A = BeanInfo({
|
|
|
1353
1472
|
id: roleIdFriend
|
|
1354
1473
|
}]
|
|
1355
1474
|
}, {
|
|
1356
|
-
|
|
1357
|
-
roles:
|
|
1475
|
+
with: {
|
|
1476
|
+
roles: $relationDynamic.belongsToMany(() => ModelRoleUser, () => ModelRole, 'userId', 'roleId', {
|
|
1477
|
+
columns: ['id', 'name']
|
|
1478
|
+
})
|
|
1358
1479
|
}
|
|
1359
1480
|
});
|
|
1360
1481
|
// delete: user
|
|
1361
1482
|
await this.scope.model.user.delete({
|
|
1362
1483
|
id: userCreate.id
|
|
1363
1484
|
}, {
|
|
1364
|
-
|
|
1365
|
-
roles:
|
|
1485
|
+
with: {
|
|
1486
|
+
roles: $relationDynamic.belongsToMany(() => ModelRoleUser, () => ModelRole, 'userId', 'roleId')
|
|
1366
1487
|
}
|
|
1367
1488
|
});
|
|
1368
1489
|
}
|
|
1369
|
-
}) || _class$
|
|
1490
|
+
}) || _class$C) || _class$C);
|
|
1370
1491
|
|
|
1371
|
-
var _dec$
|
|
1372
|
-
let BroadcastTest = (_dec$
|
|
1492
|
+
var _dec$B, _dec2$B, _class$B;
|
|
1493
|
+
let BroadcastTest = (_dec$B = Broadcast(), _dec2$B = BeanInfo({
|
|
1373
1494
|
module: "test-vona"
|
|
1374
|
-
}), _dec$
|
|
1495
|
+
}), _dec$B(_class$B = _dec2$B(_class$B = class BroadcastTest extends BeanBroadcastBase {
|
|
1375
1496
|
async execute(data, isEmitter) {
|
|
1376
1497
|
// locale
|
|
1377
1498
|
assert.equal(this.ctx.locale, 'zh-cn');
|
|
1378
1499
|
// data
|
|
1379
1500
|
assert.equal(data.message, 'hello');
|
|
1380
1501
|
}
|
|
1381
|
-
}) || _class$
|
|
1502
|
+
}) || _class$B) || _class$B);
|
|
1382
1503
|
|
|
1383
|
-
var _dec$
|
|
1384
|
-
let CacheMemTest = (_dec$
|
|
1504
|
+
var _dec$A, _dec2$A, _class$A;
|
|
1505
|
+
let CacheMemTest = (_dec$A = CacheMem({
|
|
1385
1506
|
ttl: 1 * 1000
|
|
1386
|
-
}), _dec2$
|
|
1507
|
+
}), _dec2$A = BeanInfo({
|
|
1387
1508
|
module: "test-vona"
|
|
1388
|
-
}), _dec$
|
|
1509
|
+
}), _dec$A(_class$A = _dec2$A(_class$A = class CacheMemTest extends BeanCacheMemBase {}) || _class$A) || _class$A);
|
|
1389
1510
|
|
|
1390
|
-
var _dec$
|
|
1391
|
-
let CacheRedisPost = (_dec$
|
|
1511
|
+
var _dec$z, _dec2$z, _class$z;
|
|
1512
|
+
let CacheRedisPost = (_dec$z = CacheRedis(), _dec2$z = BeanInfo({
|
|
1392
1513
|
module: "test-vona"
|
|
1393
|
-
}), _dec$
|
|
1514
|
+
}), _dec$z(_class$z = _dec2$z(_class$z = class CacheRedisPost extends BeanCacheRedisBase {}) || _class$z) || _class$z);
|
|
1394
1515
|
|
|
1395
|
-
var _dec$
|
|
1396
|
-
let CacheRedisTest = (_dec$
|
|
1516
|
+
var _dec$y, _dec2$y, _class$y;
|
|
1517
|
+
let CacheRedisTest = (_dec$y = CacheRedis({
|
|
1397
1518
|
ttl: 1 * 1000
|
|
1398
|
-
}), _dec2$
|
|
1519
|
+
}), _dec2$y = BeanInfo({
|
|
1399
1520
|
module: "test-vona"
|
|
1400
|
-
}), _dec$
|
|
1521
|
+
}), _dec$y(_class$y = _dec2$y(_class$y = class CacheRedisTest extends BeanCacheRedisBase {}) || _class$y) || _class$y);
|
|
1401
1522
|
|
|
1402
|
-
var _dec$
|
|
1403
|
-
let EventHelloEcho = (_dec$
|
|
1523
|
+
var _dec$x, _dec2$x, _class$x;
|
|
1524
|
+
let EventHelloEcho = (_dec$x = Event(), _dec2$x = BeanInfo({
|
|
1404
1525
|
module: "test-vona"
|
|
1405
|
-
}), _dec$
|
|
1526
|
+
}), _dec$x(_class$x = _dec2$x(_class$x = class EventHelloEcho extends BeanEventBase {}) || _class$x) || _class$x);
|
|
1406
1527
|
|
|
1407
|
-
var _dec$
|
|
1408
|
-
let EventListenerHelloEcho = (_dec$
|
|
1528
|
+
var _dec$w, _dec2$w, _class$w;
|
|
1529
|
+
let EventListenerHelloEcho = (_dec$w = EventListener({
|
|
1409
1530
|
match: 'test-vona:helloEcho'
|
|
1410
|
-
}), _dec2$
|
|
1531
|
+
}), _dec2$w = BeanInfo({
|
|
1411
1532
|
module: "test-vona"
|
|
1412
|
-
}), _dec$
|
|
1533
|
+
}), _dec$w(_class$w = _dec2$w(_class$w = class EventListenerHelloEcho extends BeanBase {
|
|
1413
1534
|
async execute(data, next) {
|
|
1414
1535
|
// next
|
|
1415
1536
|
const result = await next();
|
|
1416
1537
|
return `${data.text} ${result}`;
|
|
1417
1538
|
}
|
|
1418
|
-
}) || _class$
|
|
1539
|
+
}) || _class$w) || _class$w);
|
|
1419
1540
|
|
|
1420
|
-
var _dec$
|
|
1421
|
-
let MetaVersion = (_dec$
|
|
1541
|
+
var _dec$v, _dec2$v, _class$v;
|
|
1542
|
+
let MetaVersion = (_dec$v = Meta(), _dec2$v = BeanInfo({
|
|
1422
1543
|
module: "test-vona"
|
|
1423
|
-
}), _dec$
|
|
1544
|
+
}), _dec$v(_class$v = _dec2$v(_class$v = class MetaVersion extends BeanBase {
|
|
1424
1545
|
async update(options) {
|
|
1425
1546
|
if (options.version === 1) {
|
|
1426
1547
|
// testVonaTest
|
|
@@ -1495,47 +1616,49 @@ let MetaVersion = (_dec$t = Meta(), _dec2$t = BeanInfo({
|
|
|
1495
1616
|
});
|
|
1496
1617
|
}
|
|
1497
1618
|
}
|
|
1498
|
-
}) || _class$
|
|
1619
|
+
}) || _class$v) || _class$v);
|
|
1499
1620
|
|
|
1500
|
-
var _dec$
|
|
1501
|
-
let QueueTest = (_dec$
|
|
1621
|
+
var _dec$u, _dec2$u, _class$u;
|
|
1622
|
+
let QueueTest = (_dec$u = Queue(), _dec2$u = BeanInfo({
|
|
1502
1623
|
module: "test-vona"
|
|
1503
|
-
}), _dec$
|
|
1624
|
+
}), _dec$u(_class$u = _dec2$u(_class$u = class QueueTest extends BeanQueueBase {
|
|
1504
1625
|
async execute(data, _options) {
|
|
1505
|
-
|
|
1626
|
+
const res = data.a + data.b;
|
|
1627
|
+
this.$logger.silly(`queue test worker done: ${data.a} + ${data.b} = ${res}`);
|
|
1628
|
+
return res;
|
|
1506
1629
|
}
|
|
1507
|
-
}) || _class$
|
|
1630
|
+
}) || _class$u) || _class$u);
|
|
1508
1631
|
|
|
1509
|
-
var _dec$
|
|
1510
|
-
let ScheduleTest = (_dec$
|
|
1632
|
+
var _dec$t, _dec2$t, _class$t;
|
|
1633
|
+
let ScheduleTest = (_dec$t = Schedule({
|
|
1511
1634
|
enable: false,
|
|
1512
1635
|
repeat: {
|
|
1513
1636
|
every: 3000
|
|
1514
1637
|
}
|
|
1515
|
-
}), _dec2$
|
|
1638
|
+
}), _dec2$t = BeanInfo({
|
|
1516
1639
|
module: "test-vona"
|
|
1517
|
-
}), _dec$
|
|
1640
|
+
}), _dec$t(_class$t = _dec2$t(_class$t = class ScheduleTest extends BeanBase {
|
|
1518
1641
|
async execute(job) {
|
|
1519
1642
|
this.$logger.silly(`Schedule Test: iid=${this.ctx.instance.id}, every=${job?.data.options?.jobOptions?.repeat?.every}, ${new Date()}`);
|
|
1520
1643
|
}
|
|
1521
|
-
}) || _class$
|
|
1644
|
+
}) || _class$t) || _class$t);
|
|
1522
1645
|
|
|
1523
|
-
var _dec$
|
|
1524
|
-
let ScheduleTest3 = (_dec$
|
|
1646
|
+
var _dec$s, _dec2$s, _class$s;
|
|
1647
|
+
let ScheduleTest3 = (_dec$s = Schedule({
|
|
1525
1648
|
enable: false,
|
|
1526
1649
|
repeat: {
|
|
1527
1650
|
every: 5000
|
|
1528
1651
|
}
|
|
1529
|
-
}), _dec2$
|
|
1652
|
+
}), _dec2$s = BeanInfo({
|
|
1530
1653
|
module: "test-vona"
|
|
1531
|
-
}), _dec$
|
|
1654
|
+
}), _dec$s(_class$s = _dec2$s(_class$s = class ScheduleTest3 extends BeanBase {
|
|
1532
1655
|
async execute(job) {
|
|
1533
1656
|
this.$logger.silly(`Schedule Test3: iid=${this.ctx.instance.id}, every=${job?.data.options?.jobOptions?.repeat?.every}, ${new Date()}`);
|
|
1534
1657
|
}
|
|
1535
|
-
}) || _class$
|
|
1658
|
+
}) || _class$s) || _class$s);
|
|
1536
1659
|
|
|
1537
|
-
var _dec$
|
|
1538
|
-
let SummerCacheTest = (_dec$
|
|
1660
|
+
var _dec$r, _dec2$r, _class$r;
|
|
1661
|
+
let SummerCacheTest = (_dec$r = SummerCache({
|
|
1539
1662
|
mode: 'all',
|
|
1540
1663
|
mem: {
|
|
1541
1664
|
max: 2,
|
|
@@ -1544,178 +1667,198 @@ let SummerCacheTest = (_dec$p = SummerCache({
|
|
|
1544
1667
|
redis: {
|
|
1545
1668
|
ttl: 3 * 1000
|
|
1546
1669
|
}
|
|
1547
|
-
}), _dec2$
|
|
1670
|
+
}), _dec2$r = BeanInfo({
|
|
1548
1671
|
module: "test-vona"
|
|
1549
|
-
}), _dec$
|
|
1672
|
+
}), _dec$r(_class$r = _dec2$r(_class$r = class SummerCacheTest extends BeanSummerCacheBase {
|
|
1550
1673
|
async getNative(key, _options) {
|
|
1551
1674
|
return {
|
|
1552
1675
|
id: key.id,
|
|
1553
1676
|
name: `name_${key.id}`
|
|
1554
1677
|
};
|
|
1555
1678
|
}
|
|
1556
|
-
}) || _class$
|
|
1679
|
+
}) || _class$r) || _class$r);
|
|
1557
1680
|
|
|
1558
|
-
var _dec$
|
|
1559
|
-
let DtoCategoryTree = (_dec$
|
|
1681
|
+
var _dec$q, _dec2$q, _class$q;
|
|
1682
|
+
let DtoCategoryTree = (_dec$q = Dto(), _dec2$q = BeanInfo({
|
|
1560
1683
|
module: "test-vona"
|
|
1561
|
-
}), _dec$
|
|
1684
|
+
}), _dec$q(_class$q = _dec2$q(_class$q = class DtoCategoryTree extends $Dto.get('test-vona:category', {
|
|
1562
1685
|
columns: ['id', 'name']
|
|
1563
|
-
}) {}) || _class$
|
|
1686
|
+
}) {}) || _class$q) || _class$q);
|
|
1564
1687
|
|
|
1565
|
-
var _dec$
|
|
1566
|
-
let DtoOrderCreate = (_dec$
|
|
1688
|
+
var _dec$p, _dec2$p, _class$p;
|
|
1689
|
+
let DtoOrderCreate = (_dec$p = Dto(), _dec2$p = BeanInfo({
|
|
1567
1690
|
module: "test-vona"
|
|
1568
|
-
}), _dec$
|
|
1691
|
+
}), _dec$p(_class$p = _dec2$p(_class$p = class DtoOrderCreate extends $Dto.create(() => ModelOrder, {
|
|
1569
1692
|
columns: ['orderNo', 'remark']
|
|
1570
|
-
}) {}) || _class$
|
|
1693
|
+
}) {}) || _class$p) || _class$p);
|
|
1571
1694
|
|
|
1572
|
-
var _dec$
|
|
1573
|
-
let DtoOrderResult = (_dec$
|
|
1695
|
+
var _dec$o, _dec2$o, _class$o;
|
|
1696
|
+
let DtoOrderResult = (_dec$o = Dto(), _dec2$o = BeanInfo({
|
|
1574
1697
|
module: "test-vona"
|
|
1575
|
-
}), _dec$
|
|
1698
|
+
}), _dec$o(_class$o = _dec2$o(_class$o = class DtoOrderResult extends $Dto.get(() => ModelOrder) {}) || _class$o) || _class$o);
|
|
1576
1699
|
|
|
1577
|
-
var _dec$
|
|
1578
|
-
let DtoOrderUpdate = (_dec$
|
|
1700
|
+
var _dec$n, _dec2$n, _class$n;
|
|
1701
|
+
let DtoOrderUpdate = (_dec$n = Dto(), _dec2$n = BeanInfo({
|
|
1579
1702
|
module: "test-vona"
|
|
1580
|
-
}), _dec$
|
|
1703
|
+
}), _dec$n(_class$n = _dec2$n(_class$n = class DtoOrderUpdate extends $Dto.update(() => ModelOrder, {
|
|
1581
1704
|
columns: ['orderNo', 'remark']
|
|
1582
|
-
}) {}) || _class$
|
|
1705
|
+
}) {}) || _class$n) || _class$n);
|
|
1583
1706
|
|
|
1584
|
-
var _dec$
|
|
1585
|
-
let DtoPostCreate = (_dec$
|
|
1707
|
+
var _dec$m, _dec2$m, _class$m;
|
|
1708
|
+
let DtoPostCreate = (_dec$m = Dto({
|
|
1586
1709
|
independent: true
|
|
1587
|
-
}), _dec2$
|
|
1710
|
+
}), _dec2$m = BeanInfo({
|
|
1588
1711
|
module: "test-vona"
|
|
1589
|
-
}), _dec$
|
|
1712
|
+
}), _dec$m(_class$m = _dec2$m(_class$m = class DtoPostCreate extends $Dto.create(() => ModelPost) {}) || _class$m) || _class$m);
|
|
1590
1713
|
|
|
1591
|
-
var _dec$
|
|
1592
|
-
let DtoProfile = (_dec$
|
|
1714
|
+
var _dec$l, _dec2$l, _dec3$i, _dec4$i, _dec5$i, _dec6$i, _class$l, _class2$i, _descriptor$4, _descriptor2$4;
|
|
1715
|
+
let DtoProfile = (_dec$l = Dto(), _dec2$l = BeanInfo({
|
|
1593
1716
|
module: "test-vona"
|
|
1594
|
-
}), _dec3$
|
|
1717
|
+
}), _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 {
|
|
1595
1718
|
constructor() {
|
|
1596
|
-
_initializerDefineProperty(this, "id", _descriptor$
|
|
1597
|
-
_initializerDefineProperty(this, "email", _descriptor2$
|
|
1719
|
+
_initializerDefineProperty(this, "id", _descriptor$4, this);
|
|
1720
|
+
_initializerDefineProperty(this, "email", _descriptor2$4, this);
|
|
1598
1721
|
}
|
|
1599
|
-
}, _descriptor$
|
|
1722
|
+
}, _descriptor$4 = _applyDecoratedDescriptor(_class2$i.prototype, "id", [_dec3$i, _dec4$i], {
|
|
1600
1723
|
configurable: true,
|
|
1601
1724
|
enumerable: true,
|
|
1602
1725
|
writable: true,
|
|
1603
1726
|
initializer: null
|
|
1604
|
-
}), _descriptor2$
|
|
1727
|
+
}), _descriptor2$4 = _applyDecoratedDescriptor(_class2$i.prototype, "email", [_dec5$i, _dec6$i], {
|
|
1605
1728
|
configurable: true,
|
|
1606
1729
|
enumerable: true,
|
|
1607
1730
|
writable: true,
|
|
1608
1731
|
initializer: null
|
|
1609
|
-
}), _class2$
|
|
1732
|
+
}), _class2$i)) || _class$l) || _class$l);
|
|
1610
1733
|
|
|
1611
|
-
var _dec$
|
|
1612
|
-
let DtoUserLazy = (_dec$
|
|
1734
|
+
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;
|
|
1735
|
+
let DtoUserLazy = (_dec$k = Dto(), _dec2$k = BeanInfo({
|
|
1613
1736
|
module: "test-vona"
|
|
1614
|
-
}), _dec3$
|
|
1737
|
+
}), _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 {
|
|
1615
1738
|
constructor() {
|
|
1616
|
-
_initializerDefineProperty(this, "name", _descriptor$
|
|
1617
|
-
_initializerDefineProperty(this, "user", _descriptor2$
|
|
1739
|
+
_initializerDefineProperty(this, "name", _descriptor$3, this);
|
|
1740
|
+
_initializerDefineProperty(this, "user", _descriptor2$3, this);
|
|
1618
1741
|
_initializerDefineProperty(this, "roles", _descriptor3$1, this);
|
|
1619
1742
|
}
|
|
1620
|
-
}, _descriptor$
|
|
1743
|
+
}, _descriptor$3 = _applyDecoratedDescriptor(_class2$h.prototype, "name", [_dec3$h, _dec4$h], {
|
|
1621
1744
|
configurable: true,
|
|
1622
1745
|
enumerable: true,
|
|
1623
1746
|
writable: true,
|
|
1624
1747
|
initializer: null
|
|
1625
|
-
}), _descriptor2$
|
|
1748
|
+
}), _descriptor2$3 = _applyDecoratedDescriptor(_class2$h.prototype, "user", [_dec5$h, _dec6$h], {
|
|
1626
1749
|
configurable: true,
|
|
1627
1750
|
enumerable: true,
|
|
1628
1751
|
writable: true,
|
|
1629
1752
|
initializer: null
|
|
1630
|
-
}), _descriptor3$1 = _applyDecoratedDescriptor(_class2$
|
|
1753
|
+
}), _descriptor3$1 = _applyDecoratedDescriptor(_class2$h.prototype, "roles", [_dec7$f, _dec8$b], {
|
|
1631
1754
|
configurable: true,
|
|
1632
1755
|
enumerable: true,
|
|
1633
1756
|
writable: true,
|
|
1634
1757
|
initializer: null
|
|
1635
|
-
}), _class2$
|
|
1758
|
+
}), _class2$h)) || _class$k) || _class$k);
|
|
1636
1759
|
|
|
1637
|
-
var _dec$
|
|
1638
|
-
let DtoRoleLazy = (_dec$
|
|
1760
|
+
var _dec$j, _dec2$j, _dec3$g, _dec4$g, _dec5$g, _dec6$g, _class$j, _class2$g, _descriptor$2, _descriptor2$2;
|
|
1761
|
+
let DtoRoleLazy = (_dec$j = Dto(), _dec2$j = BeanInfo({
|
|
1639
1762
|
module: "test-vona"
|
|
1640
|
-
}), _dec3$
|
|
1763
|
+
}), _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 {
|
|
1641
1764
|
constructor() {
|
|
1642
|
-
_initializerDefineProperty(this, "name", _descriptor$
|
|
1643
|
-
_initializerDefineProperty(this, "users", _descriptor2$
|
|
1765
|
+
_initializerDefineProperty(this, "name", _descriptor$2, this);
|
|
1766
|
+
_initializerDefineProperty(this, "users", _descriptor2$2, this);
|
|
1644
1767
|
}
|
|
1645
|
-
}, _descriptor$
|
|
1768
|
+
}, _descriptor$2 = _applyDecoratedDescriptor(_class2$g.prototype, "name", [_dec3$g, _dec4$g], {
|
|
1646
1769
|
configurable: true,
|
|
1647
1770
|
enumerable: true,
|
|
1648
1771
|
writable: true,
|
|
1649
1772
|
initializer: null
|
|
1650
|
-
}), _descriptor2$
|
|
1773
|
+
}), _descriptor2$2 = _applyDecoratedDescriptor(_class2$g.prototype, "users", [_dec5$g, _dec6$g], {
|
|
1651
1774
|
configurable: true,
|
|
1652
1775
|
enumerable: true,
|
|
1653
1776
|
writable: true,
|
|
1654
1777
|
initializer: null
|
|
1655
|
-
}), _class2$
|
|
1778
|
+
}), _class2$g)) || _class$j) || _class$j);
|
|
1656
1779
|
|
|
1657
|
-
var _dec$
|
|
1658
|
-
let
|
|
1780
|
+
var _dec$i, _dec2$i, _dec3$f, _dec4$f, _dec5$f, _dec6$f, _class$i, _class2$f, _descriptor$1, _descriptor2$1;
|
|
1781
|
+
let DtoSignin = (_dec$i = Dto(), _dec2$i = BeanInfo({
|
|
1782
|
+
module: "test-vona"
|
|
1783
|
+
}), _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 {
|
|
1784
|
+
constructor() {
|
|
1785
|
+
_initializerDefineProperty(this, "username", _descriptor$1, this);
|
|
1786
|
+
_initializerDefineProperty(this, "password", _descriptor2$1, this);
|
|
1787
|
+
}
|
|
1788
|
+
}, _descriptor$1 = _applyDecoratedDescriptor(_class2$f.prototype, "username", [_dec3$f, _dec4$f], {
|
|
1789
|
+
configurable: true,
|
|
1790
|
+
enumerable: true,
|
|
1791
|
+
writable: true,
|
|
1792
|
+
initializer: null
|
|
1793
|
+
}), _descriptor2$1 = _applyDecoratedDescriptor(_class2$f.prototype, "password", [_dec5$f, _dec6$f], {
|
|
1794
|
+
configurable: true,
|
|
1795
|
+
enumerable: true,
|
|
1796
|
+
writable: true,
|
|
1797
|
+
initializer: null
|
|
1798
|
+
}), _class2$f)) || _class$i) || _class$i);
|
|
1799
|
+
|
|
1800
|
+
var _dec$h, _dec2$h, _dec3$e, _dec4$e, _dec5$e, _dec6$e, _dec7$e, _dec8$a, _class$h, _class2$e, _descriptor, _descriptor2, _descriptor3;
|
|
1801
|
+
let DtoUser = (_dec$h = Dto({
|
|
1659
1802
|
openapi: {
|
|
1660
1803
|
title: $locale('User')
|
|
1661
1804
|
}
|
|
1662
|
-
}), _dec2$
|
|
1805
|
+
}), _dec2$h = BeanInfo({
|
|
1663
1806
|
module: "test-vona"
|
|
1664
|
-
}), _dec3$
|
|
1807
|
+
}), _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 {
|
|
1665
1808
|
constructor() {
|
|
1666
1809
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
1667
1810
|
_initializerDefineProperty(this, "name", _descriptor2, this);
|
|
1668
1811
|
_initializerDefineProperty(this, "married", _descriptor3, this);
|
|
1669
1812
|
}
|
|
1670
|
-
}, _descriptor = _applyDecoratedDescriptor(_class2$
|
|
1813
|
+
}, _descriptor = _applyDecoratedDescriptor(_class2$e.prototype, "id", [_dec3$e, _dec4$e], {
|
|
1671
1814
|
configurable: true,
|
|
1672
1815
|
enumerable: true,
|
|
1673
1816
|
writable: true,
|
|
1674
1817
|
initializer: null
|
|
1675
|
-
}), _descriptor2 = _applyDecoratedDescriptor(_class2$
|
|
1818
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2$e.prototype, "name", [_dec5$e, _dec6$e], {
|
|
1676
1819
|
configurable: true,
|
|
1677
1820
|
enumerable: true,
|
|
1678
1821
|
writable: true,
|
|
1679
1822
|
initializer: null
|
|
1680
|
-
}), _descriptor3 = _applyDecoratedDescriptor(_class2$
|
|
1823
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2$e.prototype, "married", [_dec7$e, _dec8$a], {
|
|
1681
1824
|
configurable: true,
|
|
1682
1825
|
enumerable: true,
|
|
1683
1826
|
writable: true,
|
|
1684
1827
|
initializer: null
|
|
1685
|
-
}), _class2$
|
|
1828
|
+
}), _class2$e)) || _class$h) || _class$h);
|
|
1686
1829
|
|
|
1687
|
-
var _dec$
|
|
1688
|
-
let DtoUserCreate = (_dec$
|
|
1830
|
+
var _dec$g, _dec2$g, _class$g;
|
|
1831
|
+
let DtoUserCreate = (_dec$g = Dto({
|
|
1689
1832
|
independent: true
|
|
1690
|
-
}), _dec2$
|
|
1833
|
+
}), _dec2$g = BeanInfo({
|
|
1691
1834
|
module: "test-vona"
|
|
1692
|
-
}), _dec$
|
|
1835
|
+
}), _dec$g(_class$g = _dec2$g(_class$g = class DtoUserCreate extends $Dto.create('test-vona:user', {
|
|
1693
1836
|
include: {
|
|
1694
1837
|
roles: true,
|
|
1695
1838
|
posts: true
|
|
1696
1839
|
}
|
|
1697
|
-
}) {}) || _class$
|
|
1840
|
+
}) {}) || _class$g) || _class$g);
|
|
1698
1841
|
|
|
1699
|
-
var _dec$
|
|
1700
|
-
let DtoUserUpdate = (_dec$
|
|
1842
|
+
var _dec$f, _dec2$f, _class$f;
|
|
1843
|
+
let DtoUserUpdate = (_dec$f = Dto(), _dec2$f = BeanInfo({
|
|
1701
1844
|
module: "test-vona"
|
|
1702
|
-
}), _dec$
|
|
1845
|
+
}), _dec$f(_class$f = _dec2$f(_class$f = class DtoUserUpdate extends $Dto.update('test-vona:user', {
|
|
1703
1846
|
include: {
|
|
1704
1847
|
posts: true
|
|
1705
1848
|
}
|
|
1706
|
-
}) {}) || _class$
|
|
1849
|
+
}) {}) || _class$f) || _class$f);
|
|
1707
1850
|
|
|
1708
1851
|
const __ThisModule__ = 'test-vona';
|
|
1709
1852
|
|
|
1710
|
-
var _dec$
|
|
1711
|
-
let ControllerBean = (_dec$
|
|
1853
|
+
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;
|
|
1854
|
+
let ControllerBean = (_dec$e = Controller({
|
|
1712
1855
|
path: 'bean',
|
|
1713
1856
|
meta: {
|
|
1714
1857
|
mode: 'test'
|
|
1715
1858
|
}
|
|
1716
|
-
}), _dec2$
|
|
1859
|
+
}), _dec2$e = Api.exclude(), _dec3$d = Passport.public(), _dec4$d = BeanInfo({
|
|
1717
1860
|
module: "test-vona"
|
|
1718
|
-
}), _dec5$
|
|
1861
|
+
}), _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 {
|
|
1719
1862
|
async test() {
|
|
1720
1863
|
const a = 3;
|
|
1721
1864
|
const b = 4;
|
|
@@ -1805,17 +1948,17 @@ let ControllerBean = (_dec$d = Controller({
|
|
|
1805
1948
|
res = this.$scope.testVona.service.test.name;
|
|
1806
1949
|
assert.equal(res, 'serviceTest');
|
|
1807
1950
|
}
|
|
1808
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
1951
|
+
}, _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);
|
|
1809
1952
|
|
|
1810
|
-
var _dec$
|
|
1811
|
-
let ControllerCacheMem = (_dec$
|
|
1953
|
+
var _dec$d, _dec2$d, _dec3$c, _dec4$c, _dec5$c, _dec6$c, _dec7$c, _class$d, _class2$c;
|
|
1954
|
+
let ControllerCacheMem = (_dec$d = Controller({
|
|
1812
1955
|
path: 'cacheMem',
|
|
1813
1956
|
meta: {
|
|
1814
1957
|
mode: 'test'
|
|
1815
1958
|
}
|
|
1816
|
-
}), _dec2$
|
|
1959
|
+
}), _dec2$d = Api.exclude(), _dec3$c = Passport.public(), _dec4$c = BeanInfo({
|
|
1817
1960
|
module: "test-vona"
|
|
1818
|
-
}), _dec5$
|
|
1961
|
+
}), _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 {
|
|
1819
1962
|
async mem() {
|
|
1820
1963
|
let res;
|
|
1821
1964
|
let value;
|
|
@@ -1870,17 +2013,17 @@ let ControllerCacheMem = (_dec$c = Controller({
|
|
|
1870
2013
|
assert.equal(value, undefined);
|
|
1871
2014
|
});
|
|
1872
2015
|
}
|
|
1873
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
2016
|
+
}, _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);
|
|
1874
2017
|
|
|
1875
|
-
var _dec$
|
|
1876
|
-
let ControllerCacheRedis = (_dec$
|
|
2018
|
+
var _dec$c, _dec2$c, _dec3$b, _dec4$b, _dec5$b, _dec6$b, _dec7$b, _class$c, _class2$b;
|
|
2019
|
+
let ControllerCacheRedis = (_dec$c = Controller({
|
|
1877
2020
|
path: 'cacheRedis',
|
|
1878
2021
|
meta: {
|
|
1879
2022
|
mode: 'test'
|
|
1880
2023
|
}
|
|
1881
|
-
}), _dec2$
|
|
2024
|
+
}), _dec2$c = Api.exclude(), _dec3$b = Passport.public(), _dec4$b = BeanInfo({
|
|
1882
2025
|
module: "test-vona"
|
|
1883
|
-
}), _dec5$
|
|
2026
|
+
}), _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 {
|
|
1884
2027
|
async redis() {
|
|
1885
2028
|
let res;
|
|
1886
2029
|
let value;
|
|
@@ -1921,24 +2064,40 @@ let ControllerCacheRedis = (_dec$b = Controller({
|
|
|
1921
2064
|
assert.equal(value, undefined);
|
|
1922
2065
|
});
|
|
1923
2066
|
}
|
|
1924
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
2067
|
+
}, _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);
|
|
2068
|
+
|
|
2069
|
+
var _dec$b, _dec2$b, _dec3$a, _dec4$a, _dec5$a, _dec6$a, _dec7$a, _dec8$8, _class$b, _class2$a;
|
|
2070
|
+
let ControllerCaptcha = (_dec$b = Controller({
|
|
2071
|
+
path: 'captcha',
|
|
2072
|
+
meta: {
|
|
2073
|
+
mode: ['test', 'dev']
|
|
2074
|
+
}
|
|
2075
|
+
}), _dec2$b = BeanInfo({
|
|
2076
|
+
module: "test-vona"
|
|
2077
|
+
}), _dec3$a = Web.post('signin'), _dec4$a = Passport.public(), _dec5$a = Aspect.middleware('a-captcha:captcha', {
|
|
2078
|
+
scene: 'a-captchasimple:simple'
|
|
2079
|
+
}), _dec6$a = function (target, key) {
|
|
2080
|
+
return Arg.body()(target, key, 0);
|
|
2081
|
+
}, _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 {
|
|
2082
|
+
async signin(_user) {}
|
|
2083
|
+
}, _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);
|
|
1925
2084
|
|
|
1926
|
-
var _dec$a, _dec2$a, _dec3$9, _dec4$9, _dec5$9, _dec6$9, _dec7$9, _dec8$7, _dec9$6,
|
|
2085
|
+
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;
|
|
1927
2086
|
let ControllerDtoTest = (_dec$a = Controller('dtoTest', {
|
|
1928
2087
|
meta: {
|
|
1929
2088
|
mode: ['test', 'dev']
|
|
1930
2089
|
}
|
|
1931
2090
|
}), _dec2$a = BeanInfo({
|
|
1932
2091
|
module: "test-vona"
|
|
1933
|
-
}), _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", []),
|
|
2092
|
+
}), _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) {
|
|
1934
2093
|
return Arg.body(v.object(DtoUserCreate))(target, key, 0);
|
|
1935
|
-
},
|
|
2094
|
+
}, _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) {
|
|
1936
2095
|
return Arg.param('id')(target, key, 0);
|
|
1937
|
-
},
|
|
2096
|
+
}, _dec22$3 = function (target, key) {
|
|
1938
2097
|
return Arg.body(v.object(DtoUserUpdate))(target, key, 1);
|
|
1939
|
-
},
|
|
2098
|
+
}, _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', {
|
|
1940
2099
|
columns: ['id', 'name']
|
|
1941
|
-
}))),
|
|
2100
|
+
}))), _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 {
|
|
1942
2101
|
getUserLazy() {
|
|
1943
2102
|
return {};
|
|
1944
2103
|
}
|
|
@@ -1967,27 +2126,27 @@ let ControllerDtoTest = (_dec$a = Controller('dtoTest', {
|
|
|
1967
2126
|
});
|
|
1968
2127
|
return items;
|
|
1969
2128
|
}
|
|
1970
|
-
}, _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", [
|
|
2129
|
+
}, _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);
|
|
1971
2130
|
|
|
1972
|
-
var _dec$9, _dec2$9, _dec3$8, _dec4$8, _dec5$8, _dec6$8, _dec7$8, _dec8$6, _dec9$5,
|
|
2131
|
+
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;
|
|
1973
2132
|
let ControllerGuardPassport = (_dec$9 = Controller('guardPassport'), _dec2$9 = BeanInfo({
|
|
1974
2133
|
module: "test-vona"
|
|
1975
2134
|
}), _dec3$8 = Web.get('testUserName'), _dec4$8 = Passport.userName({
|
|
1976
2135
|
name: 'admin'
|
|
1977
2136
|
}), _dec5$8 = Reflect.metadata("design:type", Function), _dec6$8 = Reflect.metadata("design:paramtypes", []), _dec7$8 = Web.get('testUserNameFail'), _dec8$6 = Passport.userName({
|
|
1978
2137
|
name: 'admin-none'
|
|
1979
|
-
}), _dec9$5 = Reflect.metadata("design:type", Function),
|
|
2138
|
+
}), _dec9$5 = Reflect.metadata("design:type", Function), _dec0$5 = Reflect.metadata("design:paramtypes", []), _dec1$5 = Web.get('testRoleName'), _dec10$4 = Passport.roleName({
|
|
1980
2139
|
name: 'admin'
|
|
1981
|
-
}),
|
|
2140
|
+
}), _dec11$4 = Reflect.metadata("design:type", Function), _dec12$4 = Reflect.metadata("design:paramtypes", []), _dec13$4 = Web.get('testRoleNameFail'), _dec14$3 = Passport.roleName({
|
|
1982
2141
|
name: 'admin-none'
|
|
1983
|
-
}),
|
|
2142
|
+
}), _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 {
|
|
1984
2143
|
testUserName() {}
|
|
1985
2144
|
testUserNameFail() {}
|
|
1986
2145
|
testRoleName() {}
|
|
1987
2146
|
testRoleNameFail() {}
|
|
1988
|
-
}, _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,
|
|
2147
|
+
}, _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);
|
|
1989
2148
|
|
|
1990
|
-
var _dec$8, _dec2$8, _dec3$7, _dec4$7, _dec5$7, _dec6$7, _dec7$7, _dec8$5, _dec9$4,
|
|
2149
|
+
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;
|
|
1991
2150
|
let ControllerOnion = (_dec$8 = Controller({
|
|
1992
2151
|
path: 'onion',
|
|
1993
2152
|
tags: ['Onion'],
|
|
@@ -2005,66 +2164,66 @@ let ControllerOnion = (_dec$8 = Controller({
|
|
|
2005
2164
|
public: true
|
|
2006
2165
|
}), _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', {
|
|
2007
2166
|
public: true
|
|
2008
|
-
}),
|
|
2167
|
+
}), _dec0$4 = Aspect.middlewareGlobal('a-core:gate', {
|
|
2009
2168
|
gate: {
|
|
2010
2169
|
mode: 'dev'
|
|
2011
2170
|
}
|
|
2012
|
-
}),
|
|
2171
|
+
}), _dec1$4 = Core.gate({
|
|
2013
2172
|
gate: {
|
|
2014
2173
|
mode: 'dev'
|
|
2015
2174
|
}
|
|
2016
|
-
}),
|
|
2175
|
+
}), _dec10$3 = Aspect.aopMethod('a-orm:transaction', {
|
|
2017
2176
|
isolationLevel: 'SERIALIZABLE',
|
|
2018
2177
|
readOnly: true
|
|
2019
|
-
}),
|
|
2178
|
+
}), _dec11$3 = Database.transaction({
|
|
2020
2179
|
isolationLevel: 'READ_COMMITTED',
|
|
2021
2180
|
readOnly: false
|
|
2022
|
-
}),
|
|
2181
|
+
}), _dec12$3 = Api.body(v.optional(), z.string()), _dec13$3 = function (target, key) {
|
|
2023
2182
|
return Arg.query('id', v.default(0), z.number())(target, key, 0);
|
|
2024
|
-
},
|
|
2183
|
+
}, _dec14$2 = function (target, key) {
|
|
2025
2184
|
return Arg.query('name', z.number().optional())(target, key, 2);
|
|
2026
|
-
},
|
|
2185
|
+
}, _dec15$2 = function (target, key) {
|
|
2027
2186
|
return Arg.body(v.title($locale('User')), z.object({
|
|
2028
2187
|
id: z.number().openapi({
|
|
2029
2188
|
title: $locale('UserId')
|
|
2030
2189
|
})
|
|
2031
2190
|
}))(target, key, 3);
|
|
2032
|
-
},
|
|
2191
|
+
}, _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', {
|
|
2033
2192
|
public: true
|
|
2034
|
-
}),
|
|
2193
|
+
}), _dec20$2 = function (target, key) {
|
|
2035
2194
|
return Arg.param('userId', v.title($locale('UserId')), v.example('example:1'))(target, key, 0);
|
|
2036
|
-
},
|
|
2195
|
+
}, _dec21$2 = function (target, key) {
|
|
2037
2196
|
return Arg.param('userName', v.title($locale('UserId')), v.example('example:1'))(target, key, 1);
|
|
2038
|
-
},
|
|
2197
|
+
}, _dec22$2 = function (target, key) {
|
|
2039
2198
|
return Arg.query(DtoUser)(target, key, 2);
|
|
2040
|
-
},
|
|
2199
|
+
}, _dec23$2 = function (target, key) {
|
|
2041
2200
|
return Arg.body(v.title($locale('User')), z.object({
|
|
2042
2201
|
id: z.number().openapi({
|
|
2043
2202
|
title: $locale('UserId')
|
|
2044
2203
|
})
|
|
2045
2204
|
}))(target, key, 3);
|
|
2046
|
-
},
|
|
2205
|
+
}, _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', {
|
|
2047
2206
|
public: true
|
|
2048
|
-
}),
|
|
2207
|
+
}), _dec28 = function (target, key) {
|
|
2049
2208
|
return Arg.param('userId')(target, key, 0);
|
|
2050
|
-
},
|
|
2209
|
+
}, _dec29 = function (target, key) {
|
|
2051
2210
|
return Arg.query('id', v.optional())(target, key, 1);
|
|
2052
|
-
},
|
|
2211
|
+
}, _dec30 = function (target, key) {
|
|
2053
2212
|
return Arg.headers('Accept', v.title($locale('UserId')))(target, key, 2);
|
|
2054
|
-
},
|
|
2213
|
+
}, _dec31 = Reflect.metadata("design:type", Function), _dec32 = Reflect.metadata("design:paramtypes", [Number, Number, String]), _dec33 = Web.post('echo4'), _dec34 = Aspect.guardGlobal('a-user:passport', {
|
|
2055
2214
|
public: true
|
|
2056
|
-
}),
|
|
2215
|
+
}), _dec35 = Aspect.filterGlobal('a-error:error', {
|
|
2057
2216
|
enable: true,
|
|
2058
2217
|
logs: {
|
|
2059
2218
|
422: true
|
|
2060
2219
|
}
|
|
2061
|
-
}),
|
|
2220
|
+
}), _dec36 = Api.body(v.array(DtoUser)), _dec37 = function (target, key) {
|
|
2062
2221
|
return Arg.body(v.optional(), v.array(), v.object(DtoUser))(target, key, 0);
|
|
2063
|
-
},
|
|
2222
|
+
}, _dec38 = Reflect.metadata("design:type", Function), _dec39 = Reflect.metadata("design:paramtypes", [Array]), _dec40 = Web.get('echo5'), _dec41 = Passport.public(), _dec42 = function (target, key) {
|
|
2064
2223
|
return Arg.query('ids', v.default([1]), v.array(Number, {
|
|
2065
2224
|
separator: '-'
|
|
2066
2225
|
}))(target, key, 0);
|
|
2067
|
-
},
|
|
2226
|
+
}, _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 {
|
|
2068
2227
|
index() {
|
|
2069
2228
|
return this.ctx.db.inTransaction;
|
|
2070
2229
|
// return 'Hello Vona';
|
|
@@ -2095,9 +2254,9 @@ let ControllerOnion = (_dec$8 = Controller({
|
|
|
2095
2254
|
echo6() {
|
|
2096
2255
|
return this.bean.passport.isAuthenticated;
|
|
2097
2256
|
}
|
|
2098
|
-
}, _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,
|
|
2257
|
+
}, _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);
|
|
2099
2258
|
|
|
2100
|
-
var _dec$7, _dec2$7, _dec3$6, _dec4$6, _dec5$6, _dec6$6, _dec7$6, _dec8$4, _dec9$3,
|
|
2259
|
+
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;
|
|
2101
2260
|
let ControllerPassport = (_dec$7 = Controller({
|
|
2102
2261
|
path: 'passport',
|
|
2103
2262
|
meta: {
|
|
@@ -2109,11 +2268,11 @@ let ControllerPassport = (_dec$7 = Controller({
|
|
|
2109
2268
|
return Arg.param('name')(target, key, 0);
|
|
2110
2269
|
}, _dec7$6 = function (target, key) {
|
|
2111
2270
|
return Arg.user()(target, key, 1);
|
|
2112
|
-
}, _dec8$4 = Reflect.metadata("design:type", Function), _dec9$3 = Reflect.metadata("design:paramtypes", [String, typeof IUserBase === "undefined" ? Object : IUserBase]),
|
|
2271
|
+
}, _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) {
|
|
2113
2272
|
return Arg.body('name')(target, key, 0);
|
|
2114
|
-
},
|
|
2273
|
+
}, _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) {
|
|
2115
2274
|
return Arg.body('refreshToken')(target, key, 0);
|
|
2116
|
-
},
|
|
2275
|
+
}, _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 {
|
|
2117
2276
|
echo(name, user) {
|
|
2118
2277
|
assert.equal(name, 'admin');
|
|
2119
2278
|
assert.equal($getUserName(user), 'admin');
|
|
@@ -2135,7 +2294,7 @@ let ControllerPassport = (_dec$7 = Controller({
|
|
|
2135
2294
|
async logout() {
|
|
2136
2295
|
return await this.bean.passport.signout();
|
|
2137
2296
|
}
|
|
2138
|
-
}, _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", [
|
|
2297
|
+
}, _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);
|
|
2139
2298
|
|
|
2140
2299
|
var _dec$6, _dec2$6, _dec3$5, _dec4$5, _dec5$5, _dec6$5, _dec7$5, _dec8$3, _class$6, _class2$5;
|
|
2141
2300
|
let ControllerPerformAction = (_dec$6 = Controller({
|
|
@@ -2157,7 +2316,7 @@ let ControllerPerformAction = (_dec$6 = Controller({
|
|
|
2157
2316
|
}
|
|
2158
2317
|
}, _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);
|
|
2159
2318
|
|
|
2160
|
-
var _dec$5, _dec2$5, _dec3$4, _dec4$4, _dec5$4, _dec6$4, _dec7$4, _dec8$2, _dec9$2,
|
|
2319
|
+
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;
|
|
2161
2320
|
let ControllerQueue = (_dec$5 = Controller({
|
|
2162
2321
|
path: 'queue',
|
|
2163
2322
|
meta: {
|
|
@@ -2165,21 +2324,22 @@ let ControllerQueue = (_dec$5 = Controller({
|
|
|
2165
2324
|
}
|
|
2166
2325
|
}), _dec2$5 = Api.exclude(), _dec3$4 = BeanInfo({
|
|
2167
2326
|
module: "test-vona"
|
|
2168
|
-
}), _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(),
|
|
2327
|
+
}), _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 {
|
|
2169
2328
|
async pushAsync() {
|
|
2170
2329
|
const res = await this.scope.queue.test.pushAsync({
|
|
2171
2330
|
a: 1,
|
|
2172
2331
|
b: 2
|
|
2173
2332
|
});
|
|
2333
|
+
this.$logger.silly(`queue test await done: 1 + 2 = ${res}`);
|
|
2174
2334
|
assert.equal(res, 3);
|
|
2175
2335
|
}
|
|
2176
2336
|
push() {
|
|
2177
2337
|
this.scope.queue.test.push({
|
|
2178
|
-
a:
|
|
2179
|
-
b:
|
|
2338
|
+
a: 2,
|
|
2339
|
+
b: 3
|
|
2180
2340
|
});
|
|
2181
2341
|
}
|
|
2182
|
-
}, _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,
|
|
2342
|
+
}, _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);
|
|
2183
2343
|
|
|
2184
2344
|
var _dec$4, _dec2$4, _dec3$3, _dec4$3, _dec5$3, _dec6$3, _dec7$3, _class$4, _class2$3;
|
|
2185
2345
|
let ControllerSummer = (_dec$4 = Controller({
|
|
@@ -2362,7 +2522,7 @@ let ControllerTail = (_dec$3 = Controller({
|
|
|
2362
2522
|
}
|
|
2363
2523
|
}, _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);
|
|
2364
2524
|
|
|
2365
|
-
var _dec$2, _dec2$2, _dec3$1, _dec4$1, _dec5$1, _dec6$1, _dec7$1, _dec8$1, _dec9$1,
|
|
2525
|
+
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;
|
|
2366
2526
|
const tableNameFail = '__tempTransactionFail';
|
|
2367
2527
|
const tableNameSuccess = '__tempTransactionSuccess';
|
|
2368
2528
|
let ControllerTransaction = (_dec$2 = Controller({
|
|
@@ -2374,9 +2534,9 @@ let ControllerTransaction = (_dec$2 = Controller({
|
|
|
2374
2534
|
module: "test-vona"
|
|
2375
2535
|
}), _dec4$1 = Web.post('fail'), _dec5$1 = Database.transaction(), _dec6$1 = Passport.public(), _dec7$1 = function (target, key) {
|
|
2376
2536
|
return Arg.body()(target, key, 0);
|
|
2377
|
-
}, _dec8$1 = Reflect.metadata("design:type", Function), _dec9$1 = Reflect.metadata("design:paramtypes", [Object]),
|
|
2537
|
+
}, _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) {
|
|
2378
2538
|
return Arg.body()(target, key, 0);
|
|
2379
|
-
},
|
|
2539
|
+
}, _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 {
|
|
2380
2540
|
async fail(item) {
|
|
2381
2541
|
await this.bean.model.update(`${tableNameFail}`, item);
|
|
2382
2542
|
await this.bean.model.update(`${tableNameFail}error`, item);
|
|
@@ -2384,9 +2544,9 @@ let ControllerTransaction = (_dec$2 = Controller({
|
|
|
2384
2544
|
async success(item) {
|
|
2385
2545
|
await this.bean.model.update(tableNameSuccess, item);
|
|
2386
2546
|
}
|
|
2387
|
-
}, _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", [
|
|
2547
|
+
}, _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);
|
|
2388
2548
|
|
|
2389
|
-
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,
|
|
2549
|
+
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;
|
|
2390
2550
|
let ControllerUpload = (_dec$1 = Controller({
|
|
2391
2551
|
path: 'upload',
|
|
2392
2552
|
meta: {
|
|
@@ -2400,19 +2560,19 @@ let ControllerUpload = (_dec$1 = Controller({
|
|
|
2400
2560
|
return Arg.fields('checkes', v.array(z.string()))(target, key, 1);
|
|
2401
2561
|
}, _dec9 = function (target, key) {
|
|
2402
2562
|
return Arg.field('name', v.default('zhennann'), v.title('your name'))(target, key, 2);
|
|
2403
|
-
},
|
|
2563
|
+
}, _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) {
|
|
2404
2564
|
return Arg.field('name', v.default('zhennann'))(target, key, 0);
|
|
2405
|
-
},
|
|
2565
|
+
}, _dec15 = function (target, key) {
|
|
2406
2566
|
return Arg.file('welcome')(target, key, 1);
|
|
2407
|
-
},
|
|
2567
|
+
}, _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) {
|
|
2408
2568
|
return Arg.files(v.title('more files'))(target, key, 0);
|
|
2409
|
-
},
|
|
2569
|
+
}, _dec23 = function (target, key) {
|
|
2410
2570
|
return Arg.files('images', v.title('images'))(target, key, 1);
|
|
2411
|
-
},
|
|
2571
|
+
}, _dec24 = function (target, key) {
|
|
2412
2572
|
return Arg.file('welcome1', v.title('single file'))(target, key, 2);
|
|
2413
|
-
},
|
|
2573
|
+
}, _dec25 = function (target, key) {
|
|
2414
2574
|
return Arg.file('welcome2')(target, key, 3);
|
|
2415
|
-
},
|
|
2575
|
+
}, _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 {
|
|
2416
2576
|
fields(fields, checkes, name) {
|
|
2417
2577
|
assert.equal(fields.find(item => item.name === 'name')?.value, 'zhennann');
|
|
2418
2578
|
assert.equal(checkes.length > 0, true);
|
|
@@ -2431,7 +2591,7 @@ let ControllerUpload = (_dec$1 = Controller({
|
|
|
2431
2591
|
assert.equal(file2.name, 'welcome2');
|
|
2432
2592
|
return this.ctx[SymbolUploadValue];
|
|
2433
2593
|
}
|
|
2434
|
-
}, _applyDecoratedDescriptor(_class2.prototype, "fields", [_dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9,
|
|
2594
|
+
}, _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);
|
|
2435
2595
|
|
|
2436
2596
|
function config(_app) {
|
|
2437
2597
|
return {};
|
|
@@ -2488,4 +2648,4 @@ function $locale(key) {
|
|
|
2488
2648
|
}
|
|
2489
2649
|
/** scope: end */
|
|
2490
2650
|
|
|
2491
|
-
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 };
|
|
2651
|
+
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 };
|