vona-module-test-vona 5.0.38 → 5.0.39
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 +10 -0
- package/dist/bean/cacheRedis.post.d.ts +7 -0
- package/dist/index.js +377 -257
- package/dist/service/post.d.ts +18 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -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$16, _dec2$16, _class$16;
|
|
26
|
+
let AopRegExp = (_dec$16 = Aop({
|
|
27
27
|
match: [/^test-vona\.service\.test\w+$/, 'testCtx'],
|
|
28
28
|
meta: {
|
|
29
29
|
mode: 'test'
|
|
30
30
|
}
|
|
31
|
-
}), _dec2$
|
|
31
|
+
}), _dec2$16 = BeanInfo({
|
|
32
32
|
module: "test-vona"
|
|
33
|
-
}), _dec$
|
|
33
|
+
}), _dec$16(_class$16 = _dec2$16(_class$16 = 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$15 = Aop({
|
|
|
52
52
|
const result = await next();
|
|
53
53
|
return `${result}:regexpaop`;
|
|
54
54
|
}
|
|
55
|
-
}) || _class$
|
|
55
|
+
}) || _class$16) || _class$16);
|
|
56
56
|
|
|
57
|
-
var _dec$
|
|
57
|
+
var _dec$15, _dec2$15, _class$15;
|
|
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$15 = Aop({
|
|
65
65
|
match: 'testCtx',
|
|
66
66
|
dependencies: 'test-vona:regExp',
|
|
67
67
|
meta: {
|
|
68
68
|
mode: 'test'
|
|
69
69
|
}
|
|
70
|
-
}), _dec2$
|
|
70
|
+
}), _dec2$15 = BeanInfo({
|
|
71
71
|
module: "test-vona"
|
|
72
|
-
}), _dec$
|
|
72
|
+
}), _dec$15(_class$15 = _dec2$15(_class$15 = class AopSimple extends AopSimpleBase {
|
|
73
73
|
// magic
|
|
74
74
|
__get__(prop, next) {
|
|
75
75
|
const value = next();
|
|
@@ -109,14 +109,14 @@ let AopSimple = (_dec$14 = Aop({
|
|
|
109
109
|
const result = await next();
|
|
110
110
|
return `${result}:simpleaop`;
|
|
111
111
|
}
|
|
112
|
-
}) || _class$
|
|
112
|
+
}) || _class$15) || _class$15);
|
|
113
113
|
|
|
114
|
-
var _dec$
|
|
115
|
-
let AopMethodTest = (_dec$
|
|
114
|
+
var _dec$14, _dec2$14, _class$14;
|
|
115
|
+
let AopMethodTest = (_dec$14 = AopMethod({
|
|
116
116
|
wrapper: ''
|
|
117
|
-
}), _dec2$
|
|
117
|
+
}), _dec2$14 = BeanInfo({
|
|
118
118
|
module: "test-vona"
|
|
119
|
-
}), _dec$
|
|
119
|
+
}), _dec$14(_class$14 = _dec2$14(_class$14 = 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$13 = AopMethod({
|
|
|
143
143
|
if (index === data.length - wrapper.length) data = data.substring(0, index);
|
|
144
144
|
return data;
|
|
145
145
|
}
|
|
146
|
-
}) || _class$
|
|
146
|
+
}) || _class$14) || _class$14);
|
|
147
147
|
|
|
148
148
|
function _applyDecoratedDescriptor(i, e, r, n, l) {
|
|
149
149
|
var a = {};
|
|
@@ -162,118 +162,118 @@ function _initializerDefineProperty(e, i, r, l) {
|
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
var _dec$
|
|
166
|
-
let EntityCategory = (_dec$
|
|
165
|
+
var _dec$13, _dec2$13, _dec3$t, _dec4$t, _dec5$s, _dec6$r, _class$13, _class2$t, _descriptor$c, _descriptor2$b;
|
|
166
|
+
let EntityCategory = (_dec$13 = Entity('testVonaCategory'), _dec2$13 = BeanInfo({
|
|
167
167
|
module: "test-vona"
|
|
168
|
-
}), _dec3$
|
|
168
|
+
}), _dec3$t = Api.field(), _dec4$t = Reflect.metadata("design:type", String), _dec5$s = Api.field(v.optional(), v.tableIdentity()), _dec6$r = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$13(_class$13 = _dec2$13(_class$13 = (_class2$t = class EntityCategory extends EntityBase {
|
|
169
169
|
constructor(...args) {
|
|
170
170
|
super(...args);
|
|
171
171
|
_initializerDefineProperty(this, "name", _descriptor$c, this);
|
|
172
172
|
_initializerDefineProperty(this, "categoryIdParent", _descriptor2$b, this);
|
|
173
173
|
}
|
|
174
|
-
}, _descriptor$c = _applyDecoratedDescriptor(_class2$
|
|
174
|
+
}, _descriptor$c = _applyDecoratedDescriptor(_class2$t.prototype, "name", [_dec3$t, _dec4$t], {
|
|
175
175
|
configurable: true,
|
|
176
176
|
enumerable: true,
|
|
177
177
|
writable: true,
|
|
178
178
|
initializer: null
|
|
179
|
-
}), _descriptor2$b = _applyDecoratedDescriptor(_class2$
|
|
179
|
+
}), _descriptor2$b = _applyDecoratedDescriptor(_class2$t.prototype, "categoryIdParent", [_dec5$s, _dec6$r], {
|
|
180
180
|
configurable: true,
|
|
181
181
|
enumerable: true,
|
|
182
182
|
writable: true,
|
|
183
183
|
initializer: null
|
|
184
|
-
}), _class2$
|
|
184
|
+
}), _class2$t)) || _class$13) || _class$13);
|
|
185
185
|
|
|
186
|
-
var _dec$
|
|
187
|
-
let EntityOrder = (_dec$
|
|
186
|
+
var _dec$12, _dec2$12, _dec3$s, _dec4$s, _dec5$r, _dec6$q, _dec7$m, _dec8$i, _class$12, _class2$s, _descriptor$b, _descriptor2$a, _descriptor3$6;
|
|
187
|
+
let EntityOrder = (_dec$12 = Entity('testVonaOrder', {
|
|
188
188
|
openapi: {
|
|
189
189
|
title: $locale('Order')
|
|
190
190
|
}
|
|
191
|
-
}), _dec2$
|
|
191
|
+
}), _dec2$12 = BeanInfo({
|
|
192
192
|
module: "test-vona"
|
|
193
|
-
}), _dec3$
|
|
193
|
+
}), _dec3$s = Api.field(v.openapi({
|
|
194
194
|
title: $locale('OrderNo')
|
|
195
|
-
}), v.default(''), v.min(3)), _dec4$
|
|
195
|
+
}), v.default(''), v.min(3)), _dec4$s = Reflect.metadata("design:type", String), _dec5$r = Api.field(v.openapi({
|
|
196
196
|
title: $locale('Remark')
|
|
197
|
-
}), v.optional()), _dec6$q = Reflect.metadata("design:type", String), _dec7$m = Api.field(v.tableIdentity()), _dec8$i = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$
|
|
197
|
+
}), v.optional()), _dec6$q = Reflect.metadata("design:type", String), _dec7$m = Api.field(v.tableIdentity()), _dec8$i = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$12(_class$12 = _dec2$12(_class$12 = (_class2$s = class EntityOrder extends EntityBase {
|
|
198
198
|
constructor(...args) {
|
|
199
199
|
super(...args);
|
|
200
200
|
_initializerDefineProperty(this, "orderNo", _descriptor$b, this);
|
|
201
201
|
_initializerDefineProperty(this, "remark", _descriptor2$a, this);
|
|
202
202
|
_initializerDefineProperty(this, "userId", _descriptor3$6, this);
|
|
203
203
|
}
|
|
204
|
-
}, _descriptor$b = _applyDecoratedDescriptor(_class2$
|
|
204
|
+
}, _descriptor$b = _applyDecoratedDescriptor(_class2$s.prototype, "orderNo", [_dec3$s, _dec4$s], {
|
|
205
205
|
configurable: true,
|
|
206
206
|
enumerable: true,
|
|
207
207
|
writable: true,
|
|
208
208
|
initializer: null
|
|
209
|
-
}), _descriptor2$a = _applyDecoratedDescriptor(_class2$
|
|
209
|
+
}), _descriptor2$a = _applyDecoratedDescriptor(_class2$s.prototype, "remark", [_dec5$r, _dec6$q], {
|
|
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$s.prototype, "userId", [_dec7$m, _dec8$i], {
|
|
215
215
|
configurable: true,
|
|
216
216
|
enumerable: true,
|
|
217
217
|
writable: true,
|
|
218
218
|
initializer: null
|
|
219
|
-
}), _class2$
|
|
219
|
+
}), _class2$s)) || _class$12) || _class$12);
|
|
220
220
|
|
|
221
|
-
var _dec$
|
|
222
|
-
let EntityPost = (_dec$
|
|
221
|
+
var _dec$11, _dec2$11, _dec3$r, _dec4$r, _dec5$q, _dec6$p, _dec7$l, _dec8$h, _class$11, _class2$r, _descriptor$a, _descriptor2$9, _descriptor3$5;
|
|
222
|
+
let EntityPost = (_dec$11 = Entity('testVonaPost'), _dec2$11 = BeanInfo({
|
|
223
223
|
module: "test-vona"
|
|
224
|
-
}), _dec3$
|
|
224
|
+
}), _dec3$r = Api.field(), _dec4$r = Reflect.metadata("design:type", String), _dec5$q = Api.field(v.tableIdentity()), _dec6$p = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec7$l = Api.field(v.optional()), _dec8$h = Reflect.metadata("design:type", Number), _dec$11(_class$11 = _dec2$11(_class$11 = (_class2$r = class EntityPost extends EntityBase {
|
|
225
225
|
constructor(...args) {
|
|
226
226
|
super(...args);
|
|
227
227
|
_initializerDefineProperty(this, "title", _descriptor$a, this);
|
|
228
228
|
_initializerDefineProperty(this, "userId", _descriptor2$9, this);
|
|
229
229
|
_initializerDefineProperty(this, "stars", _descriptor3$5, this);
|
|
230
230
|
}
|
|
231
|
-
}, _descriptor$a = _applyDecoratedDescriptor(_class2$
|
|
231
|
+
}, _descriptor$a = _applyDecoratedDescriptor(_class2$r.prototype, "title", [_dec3$r, _dec4$r], {
|
|
232
232
|
configurable: true,
|
|
233
233
|
enumerable: true,
|
|
234
234
|
writable: true,
|
|
235
235
|
initializer: null
|
|
236
|
-
}), _descriptor2$9 = _applyDecoratedDescriptor(_class2$
|
|
236
|
+
}), _descriptor2$9 = _applyDecoratedDescriptor(_class2$r.prototype, "userId", [_dec5$q, _dec6$p], {
|
|
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$r.prototype, "stars", [_dec7$l, _dec8$h], {
|
|
242
242
|
configurable: true,
|
|
243
243
|
enumerable: true,
|
|
244
244
|
writable: true,
|
|
245
245
|
initializer: null
|
|
246
|
-
}), _class2$
|
|
246
|
+
}), _class2$r)) || _class$11) || _class$11);
|
|
247
247
|
|
|
248
|
-
var _dec
|
|
249
|
-
let EntityPostContent = (_dec
|
|
248
|
+
var _dec$10, _dec2$10, _dec3$q, _dec4$q, _dec5$p, _dec6$o, _class$10, _class2$q, _descriptor$9, _descriptor2$8;
|
|
249
|
+
let EntityPostContent = (_dec$10 = Entity('testVonaPostContent'), _dec2$10 = BeanInfo({
|
|
250
250
|
module: "test-vona"
|
|
251
|
-
}), _dec3$
|
|
251
|
+
}), _dec3$q = Api.field(), _dec4$q = Reflect.metadata("design:type", String), _dec5$p = Api.field(v.tableIdentity()), _dec6$o = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$10(_class$10 = _dec2$10(_class$10 = (_class2$q = class EntityPostContent extends EntityBase {
|
|
252
252
|
constructor(...args) {
|
|
253
253
|
super(...args);
|
|
254
254
|
_initializerDefineProperty(this, "content", _descriptor$9, this);
|
|
255
255
|
_initializerDefineProperty(this, "postId", _descriptor2$8, this);
|
|
256
256
|
}
|
|
257
|
-
}, _descriptor$9 = _applyDecoratedDescriptor(_class2$
|
|
257
|
+
}, _descriptor$9 = _applyDecoratedDescriptor(_class2$q.prototype, "content", [_dec3$q, _dec4$q], {
|
|
258
258
|
configurable: true,
|
|
259
259
|
enumerable: true,
|
|
260
260
|
writable: true,
|
|
261
261
|
initializer: null
|
|
262
|
-
}), _descriptor2$8 = _applyDecoratedDescriptor(_class2$
|
|
262
|
+
}), _descriptor2$8 = _applyDecoratedDescriptor(_class2$q.prototype, "postId", [_dec5$p, _dec6$o], {
|
|
263
263
|
configurable: true,
|
|
264
264
|
enumerable: true,
|
|
265
265
|
writable: true,
|
|
266
266
|
initializer: null
|
|
267
|
-
}), _class2$
|
|
267
|
+
}), _class2$q)) || _class$10) || _class$10);
|
|
268
268
|
|
|
269
|
-
var _dec
|
|
270
|
-
let EntityProduct = (_dec
|
|
269
|
+
var _dec$$, _dec2$$, _dec3$p, _dec4$p, _dec5$o, _dec6$n, _dec7$k, _dec8$g, _dec9$a, _dec10$a, _dec11$a, _dec12$8, _class$$, _class2$p, _descriptor$8, _descriptor2$7, _descriptor3$4, _descriptor4, _descriptor5;
|
|
270
|
+
let EntityProduct = (_dec$$ = Entity('testVonaProduct', {
|
|
271
271
|
independent: true
|
|
272
|
-
}), _dec2
|
|
272
|
+
}), _dec2$$ = BeanInfo({
|
|
273
273
|
module: "test-vona"
|
|
274
|
-
}), _dec3$
|
|
274
|
+
}), _dec3$p = Api.field(v.openapi({
|
|
275
275
|
title: $locale('Name')
|
|
276
|
-
})), _dec4$
|
|
276
|
+
})), _dec4$p = Reflect.metadata("design:type", String), _dec5$o = Api.field(v.title($locale('Price'))), _dec6$n = Reflect.metadata("design:type", Number), _dec7$k = Api.field(v.title($locale('Quantity'))), _dec8$g = Reflect.metadata("design:type", Number), _dec9$a = Api.field(v.title($locale('Amount'))), _dec10$a = Reflect.metadata("design:type", Number), _dec11$a = Api.field(v.tableIdentity()), _dec12$8 = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$$(_class$$ = _dec2$$(_class$$ = (_class2$p = class EntityProduct extends EntityBase {
|
|
277
277
|
constructor(...args) {
|
|
278
278
|
super(...args);
|
|
279
279
|
_initializerDefineProperty(this, "name", _descriptor$8, this);
|
|
@@ -282,131 +282,131 @@ let EntityProduct = (_dec$_ = Entity('testVonaProduct', {
|
|
|
282
282
|
_initializerDefineProperty(this, "amount", _descriptor4, this);
|
|
283
283
|
_initializerDefineProperty(this, "orderId", _descriptor5, this);
|
|
284
284
|
}
|
|
285
|
-
}, _descriptor$8 = _applyDecoratedDescriptor(_class2$
|
|
285
|
+
}, _descriptor$8 = _applyDecoratedDescriptor(_class2$p.prototype, "name", [_dec3$p, _dec4$p], {
|
|
286
286
|
configurable: true,
|
|
287
287
|
enumerable: true,
|
|
288
288
|
writable: true,
|
|
289
289
|
initializer: null
|
|
290
|
-
}), _descriptor2$7 = _applyDecoratedDescriptor(_class2$
|
|
290
|
+
}), _descriptor2$7 = _applyDecoratedDescriptor(_class2$p.prototype, "price", [_dec5$o, _dec6$n], {
|
|
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$p.prototype, "quantity", [_dec7$k, _dec8$g], {
|
|
296
296
|
configurable: true,
|
|
297
297
|
enumerable: true,
|
|
298
298
|
writable: true,
|
|
299
299
|
initializer: null
|
|
300
|
-
}), _descriptor4 = _applyDecoratedDescriptor(_class2$
|
|
300
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2$p.prototype, "amount", [_dec9$a, _dec10$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$p.prototype, "orderId", [_dec11$a, _dec12$8], {
|
|
306
306
|
configurable: true,
|
|
307
307
|
enumerable: true,
|
|
308
308
|
writable: true,
|
|
309
309
|
initializer: null
|
|
310
|
-
}), _class2$
|
|
310
|
+
}), _class2$p)) || _class$$) || _class$$);
|
|
311
311
|
|
|
312
|
-
var _dec$
|
|
313
|
-
let EntityRole = (_dec$
|
|
312
|
+
var _dec$_, _dec2$_, _dec3$o, _dec4$o, _class$_, _class2$o, _descriptor$7;
|
|
313
|
+
let EntityRole = (_dec$_ = Entity('testVonaRole'), _dec2$_ = BeanInfo({
|
|
314
314
|
module: "test-vona"
|
|
315
|
-
}), _dec3$
|
|
315
|
+
}), _dec3$o = Api.field(), _dec4$o = Reflect.metadata("design:type", String), _dec$_(_class$_ = _dec2$_(_class$_ = (_class2$o = class EntityRole extends EntityBase {
|
|
316
316
|
constructor(...args) {
|
|
317
317
|
super(...args);
|
|
318
318
|
_initializerDefineProperty(this, "name", _descriptor$7, this);
|
|
319
319
|
}
|
|
320
|
-
}, _descriptor$7 = _applyDecoratedDescriptor(_class2$
|
|
320
|
+
}, _descriptor$7 = _applyDecoratedDescriptor(_class2$o.prototype, "name", [_dec3$o, _dec4$o], {
|
|
321
321
|
configurable: true,
|
|
322
322
|
enumerable: true,
|
|
323
323
|
writable: true,
|
|
324
324
|
initializer: null
|
|
325
|
-
}), _class2$
|
|
325
|
+
}), _class2$o)) || _class$_) || _class$_);
|
|
326
326
|
|
|
327
|
-
var _dec$
|
|
328
|
-
let EntityRoleUser = (_dec$
|
|
327
|
+
var _dec$Z, _dec2$Z, _dec3$n, _dec4$n, _dec5$n, _dec6$m, _class$Z, _class2$n, _descriptor$6, _descriptor2$6;
|
|
328
|
+
let EntityRoleUser = (_dec$Z = Entity('testVonaRoleUser'), _dec2$Z = BeanInfo({
|
|
329
329
|
module: "test-vona"
|
|
330
|
-
}), _dec3$
|
|
330
|
+
}), _dec3$n = Api.field(v.tableIdentity()), _dec4$n = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec5$n = Api.field(v.tableIdentity()), _dec6$m = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$Z(_class$Z = _dec2$Z(_class$Z = (_class2$n = class EntityRoleUser extends EntityBase {
|
|
331
331
|
constructor(...args) {
|
|
332
332
|
super(...args);
|
|
333
333
|
_initializerDefineProperty(this, "userId", _descriptor$6, this);
|
|
334
334
|
_initializerDefineProperty(this, "roleId", _descriptor2$6, this);
|
|
335
335
|
}
|
|
336
|
-
}, _descriptor$6 = _applyDecoratedDescriptor(_class2$
|
|
336
|
+
}, _descriptor$6 = _applyDecoratedDescriptor(_class2$n.prototype, "userId", [_dec3$n, _dec4$n], {
|
|
337
337
|
configurable: true,
|
|
338
338
|
enumerable: true,
|
|
339
339
|
writable: true,
|
|
340
340
|
initializer: null
|
|
341
|
-
}), _descriptor2$6 = _applyDecoratedDescriptor(_class2$
|
|
341
|
+
}), _descriptor2$6 = _applyDecoratedDescriptor(_class2$n.prototype, "roleId", [_dec5$n, _dec6$m], {
|
|
342
342
|
configurable: true,
|
|
343
343
|
enumerable: true,
|
|
344
344
|
writable: true,
|
|
345
345
|
initializer: null
|
|
346
|
-
}), _class2$
|
|
346
|
+
}), _class2$n)) || _class$Z) || _class$Z);
|
|
347
347
|
|
|
348
|
-
var _dec$
|
|
349
|
-
let EntityTest = (_dec$
|
|
348
|
+
var _dec$Y, _dec2$Y, _dec3$m, _dec4$m, _dec5$m, _dec6$l, _dec7$j, _dec8$f, _class$Y, _class2$m, _descriptor$5, _descriptor2$5, _descriptor3$3;
|
|
349
|
+
let EntityTest = (_dec$Y = Entity('testVonaTest', {
|
|
350
350
|
openapi: {
|
|
351
351
|
title: $locale('Test')
|
|
352
352
|
}
|
|
353
|
-
}), _dec2$
|
|
353
|
+
}), _dec2$Y = BeanInfo({
|
|
354
354
|
module: "test-vona"
|
|
355
|
-
}), _dec3$
|
|
355
|
+
}), _dec3$m = Api.field(v.title($locale('Test'))), _dec4$m = Reflect.metadata("design:type", String), _dec5$m = Api.field(), _dec6$l = Reflect.metadata("design:type", String), _dec7$j = Api.field(v.default(() => {
|
|
356
356
|
return new Date();
|
|
357
|
-
})), _dec8$f = Reflect.metadata("design:type", typeof Date === "undefined" ? Object : Date), _dec$
|
|
357
|
+
})), _dec8$f = Reflect.metadata("design:type", typeof Date === "undefined" ? Object : Date), _dec$Y(_class$Y = _dec2$Y(_class$Y = (_class2$m = class EntityTest extends EntityBase {
|
|
358
358
|
constructor(...args) {
|
|
359
359
|
super(...args);
|
|
360
360
|
_initializerDefineProperty(this, "title", _descriptor$5, this);
|
|
361
361
|
_initializerDefineProperty(this, "description", _descriptor2$5, this);
|
|
362
362
|
_initializerDefineProperty(this, "testDate", _descriptor3$3, this);
|
|
363
363
|
}
|
|
364
|
-
}, _descriptor$5 = _applyDecoratedDescriptor(_class2$
|
|
364
|
+
}, _descriptor$5 = _applyDecoratedDescriptor(_class2$m.prototype, "title", [_dec3$m, _dec4$m], {
|
|
365
365
|
configurable: true,
|
|
366
366
|
enumerable: true,
|
|
367
367
|
writable: true,
|
|
368
368
|
initializer: null
|
|
369
|
-
}), _descriptor2$5 = _applyDecoratedDescriptor(_class2$
|
|
369
|
+
}), _descriptor2$5 = _applyDecoratedDescriptor(_class2$m.prototype, "description", [_dec5$m, _dec6$l], {
|
|
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$m.prototype, "testDate", [_dec7$j, _dec8$f], {
|
|
375
375
|
configurable: true,
|
|
376
376
|
enumerable: true,
|
|
377
377
|
writable: true,
|
|
378
378
|
initializer: null
|
|
379
|
-
}), _class2$
|
|
379
|
+
}), _class2$m)) || _class$Y) || _class$Y);
|
|
380
380
|
|
|
381
|
-
var _dec$
|
|
382
|
-
let EntityUser = (_dec$
|
|
381
|
+
var _dec$X, _dec2$X, _dec3$l, _dec4$l, _dec5$l, _dec6$k, _dec7$i, _dec8$e, _class$X, _class2$l, _descriptor$4, _descriptor2$4, _descriptor3$2;
|
|
382
|
+
let EntityUser = (_dec$X = Entity('testVonaUser'), _dec2$X = BeanInfo({
|
|
383
383
|
module: "test-vona"
|
|
384
|
-
}), _dec3$
|
|
384
|
+
}), _dec3$l = Api.field(), _dec4$l = Reflect.metadata("design:type", String), _dec5$l = Api.field(v.optional()), _dec6$k = Reflect.metadata("design:type", Number), _dec7$i = Api.field(v.optional()), _dec8$e = Reflect.metadata("design:type", Number), _dec$X(_class$X = _dec2$X(_class$X = (_class2$l = class EntityUser extends EntityBase {
|
|
385
385
|
constructor(...args) {
|
|
386
386
|
super(...args);
|
|
387
387
|
_initializerDefineProperty(this, "name", _descriptor$4, this);
|
|
388
388
|
_initializerDefineProperty(this, "age", _descriptor2$4, this);
|
|
389
389
|
_initializerDefineProperty(this, "scores", _descriptor3$2, this);
|
|
390
390
|
}
|
|
391
|
-
}, _descriptor$4 = _applyDecoratedDescriptor(_class2$
|
|
391
|
+
}, _descriptor$4 = _applyDecoratedDescriptor(_class2$l.prototype, "name", [_dec3$l, _dec4$l], {
|
|
392
392
|
configurable: true,
|
|
393
393
|
enumerable: true,
|
|
394
394
|
writable: true,
|
|
395
395
|
initializer: null
|
|
396
|
-
}), _descriptor2$4 = _applyDecoratedDescriptor(_class2$
|
|
396
|
+
}), _descriptor2$4 = _applyDecoratedDescriptor(_class2$l.prototype, "age", [_dec5$l, _dec6$k], {
|
|
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$l.prototype, "scores", [_dec7$i, _dec8$e], {
|
|
402
402
|
configurable: true,
|
|
403
403
|
enumerable: true,
|
|
404
404
|
writable: true,
|
|
405
405
|
initializer: null
|
|
406
|
-
}), _class2$
|
|
406
|
+
}), _class2$l)) || _class$X) || _class$X);
|
|
407
407
|
|
|
408
|
-
var _dec$
|
|
409
|
-
let ModelCategory = (_dec$
|
|
408
|
+
var _dec$W, _dec2$W, _class$W;
|
|
409
|
+
let ModelCategory = (_dec$W = Model({
|
|
410
410
|
entity: EntityCategory,
|
|
411
411
|
relations: {
|
|
412
412
|
children: $relation.hasMany(() => ModelCategory, 'categoryIdParent', {
|
|
@@ -417,12 +417,12 @@ let ModelCategory = (_dec$V = Model({
|
|
|
417
417
|
cache: {
|
|
418
418
|
modelsClear: () => ModelCategoryChain$1
|
|
419
419
|
}
|
|
420
|
-
}), _dec2$
|
|
420
|
+
}), _dec2$W = BeanInfo({
|
|
421
421
|
module: "test-vona"
|
|
422
|
-
}), _dec$
|
|
422
|
+
}), _dec$W(_class$W = _dec2$W(_class$W = class ModelCategory extends BeanModelBase {}) || _class$W) || _class$W);
|
|
423
423
|
|
|
424
|
-
var _dec$
|
|
425
|
-
let ModelCategoryChain = (_dec$
|
|
424
|
+
var _dec$V, _dec2$V, _class$V;
|
|
425
|
+
let ModelCategoryChain = (_dec$V = Model({
|
|
426
426
|
entity: EntityCategory,
|
|
427
427
|
relations: {
|
|
428
428
|
parent: $relation.belongsTo(() => ModelCategoryChain, () => ModelCategoryChain, 'categoryIdParent', {
|
|
@@ -430,19 +430,19 @@ let ModelCategoryChain = (_dec$U = Model({
|
|
|
430
430
|
columns: ['id', 'name', 'categoryIdParent']
|
|
431
431
|
})
|
|
432
432
|
}
|
|
433
|
-
}), _dec2$
|
|
433
|
+
}), _dec2$V = BeanInfo({
|
|
434
434
|
module: "test-vona"
|
|
435
|
-
}), _dec$
|
|
435
|
+
}), _dec$V(_class$V = _dec2$V(_class$V = class ModelCategoryChain extends BeanModelBase {}) || _class$V) || _class$V);
|
|
436
436
|
|
|
437
|
-
var _dec$
|
|
438
|
-
let ModelProduct = (_dec$
|
|
437
|
+
var _dec$U, _dec2$U, _class$U;
|
|
438
|
+
let ModelProduct = (_dec$U = Model({
|
|
439
439
|
entity: EntityProduct
|
|
440
|
-
}), _dec2$
|
|
440
|
+
}), _dec2$U = BeanInfo({
|
|
441
441
|
module: "test-vona"
|
|
442
|
-
}), _dec$
|
|
442
|
+
}), _dec$U(_class$U = _dec2$U(_class$U = class ModelProduct extends BeanModelBase {}) || _class$U) || _class$U);
|
|
443
443
|
|
|
444
|
-
var _dec$
|
|
445
|
-
let ModelOrderStats = (_dec$
|
|
444
|
+
var _dec$T, _dec2$T, _class$T;
|
|
445
|
+
let ModelOrderStats = (_dec$T = Model({
|
|
446
446
|
entity: EntityOrder,
|
|
447
447
|
relations: {
|
|
448
448
|
productStats: $relation.hasMany(() => ModelProduct, 'orderId', {
|
|
@@ -460,12 +460,12 @@ let ModelOrderStats = (_dec$S = Model({
|
|
|
460
460
|
}
|
|
461
461
|
})
|
|
462
462
|
}
|
|
463
|
-
}), _dec2$
|
|
463
|
+
}), _dec2$T = BeanInfo({
|
|
464
464
|
module: "test-vona"
|
|
465
|
-
}), _dec$
|
|
465
|
+
}), _dec$T(_class$T = _dec2$T(_class$T = class ModelOrderStats extends BeanModelBase {}) || _class$T) || _class$T);
|
|
466
466
|
|
|
467
|
-
var _dec$
|
|
468
|
-
let ModelPost = (_dec$
|
|
467
|
+
var _dec$S, _dec2$S, _class$S;
|
|
468
|
+
let ModelPost = (_dec$S = Model({
|
|
469
469
|
entity: EntityPost,
|
|
470
470
|
relations: {
|
|
471
471
|
postContent: $relation.hasOne('test-vona:postContent', 'postId', {
|
|
@@ -476,12 +476,12 @@ let ModelPost = (_dec$R = Model({
|
|
|
476
476
|
columns: ['id', 'name']
|
|
477
477
|
})
|
|
478
478
|
}
|
|
479
|
-
}), _dec2$
|
|
479
|
+
}), _dec2$S = BeanInfo({
|
|
480
480
|
module: "test-vona"
|
|
481
|
-
}), _dec$
|
|
481
|
+
}), _dec$S(_class$S = _dec2$S(_class$S = class ModelPost extends BeanModelBase {}) || _class$S) || _class$S);
|
|
482
482
|
|
|
483
|
-
var _dec$
|
|
484
|
-
let ModelPostContent = (_dec$
|
|
483
|
+
var _dec$R, _dec2$R, _class$R;
|
|
484
|
+
let ModelPostContent = (_dec$R = Model({
|
|
485
485
|
entity: EntityPostContent,
|
|
486
486
|
relations: {
|
|
487
487
|
post: $relation.belongsTo(ModelPostContent, () => ModelPost, 'postId')
|
|
@@ -489,12 +489,12 @@ let ModelPostContent = (_dec$Q = Model({
|
|
|
489
489
|
cache: {
|
|
490
490
|
modelsClear: () => ModelPost
|
|
491
491
|
}
|
|
492
|
-
}), _dec2$
|
|
492
|
+
}), _dec2$R = BeanInfo({
|
|
493
493
|
module: "test-vona"
|
|
494
|
-
}), _dec$
|
|
494
|
+
}), _dec$R(_class$R = _dec2$R(_class$R = class ModelPostContent extends BeanModelBase {}) || _class$R) || _class$R);
|
|
495
495
|
|
|
496
|
-
var _dec$
|
|
497
|
-
let ModelUserStats = (_dec$
|
|
496
|
+
var _dec$Q, _dec2$Q, _class$Q;
|
|
497
|
+
let ModelUserStats = (_dec$Q = Model({
|
|
498
498
|
entity: EntityUser,
|
|
499
499
|
relations: {
|
|
500
500
|
posts: $relation.hasMany(() => ModelPost, 'userId', {
|
|
@@ -510,12 +510,12 @@ let ModelUserStats = (_dec$P = Model({
|
|
|
510
510
|
}
|
|
511
511
|
})
|
|
512
512
|
}
|
|
513
|
-
}), _dec2$
|
|
513
|
+
}), _dec2$Q = BeanInfo({
|
|
514
514
|
module: "test-vona"
|
|
515
|
-
}), _dec$
|
|
515
|
+
}), _dec$Q(_class$Q = _dec2$Q(_class$Q = class ModelUserStats extends BeanModelBase {}) || _class$Q) || _class$Q);
|
|
516
516
|
|
|
517
|
-
var _dec$
|
|
518
|
-
let ModelUserStatsGroup = (_dec$
|
|
517
|
+
var _dec$P, _dec2$P, _class$P;
|
|
518
|
+
let ModelUserStatsGroup = (_dec$P = Model({
|
|
519
519
|
entity: EntityUser,
|
|
520
520
|
relations: {
|
|
521
521
|
posts: $relation.hasMany(() => ModelPost, 'userId', {
|
|
@@ -535,12 +535,12 @@ let ModelUserStatsGroup = (_dec$O = Model({
|
|
|
535
535
|
orders: [['name', 'asc']]
|
|
536
536
|
}, undefined, true)
|
|
537
537
|
}
|
|
538
|
-
}), _dec2$
|
|
538
|
+
}), _dec2$P = BeanInfo({
|
|
539
539
|
module: "test-vona"
|
|
540
|
-
}), _dec$
|
|
540
|
+
}), _dec$P(_class$P = _dec2$P(_class$P = class ModelUserStatsGroup extends BeanModelBase {}) || _class$P) || _class$P);
|
|
541
541
|
|
|
542
|
-
var _dec$
|
|
543
|
-
let ModelUser = (_dec$
|
|
542
|
+
var _dec$O, _dec2$O, _class$O;
|
|
543
|
+
let ModelUser = (_dec$O = Model({
|
|
544
544
|
entity: EntityUser,
|
|
545
545
|
relations: {
|
|
546
546
|
posts: $relation.hasMany(() => ModelPost, 'userId', {
|
|
@@ -553,12 +553,12 @@ let ModelUser = (_dec$N = Model({
|
|
|
553
553
|
cache: {
|
|
554
554
|
modelsClear: [() => ModelUserStats, () => ModelUserStatsGroup]
|
|
555
555
|
}
|
|
556
|
-
}), _dec2$
|
|
556
|
+
}), _dec2$O = BeanInfo({
|
|
557
557
|
module: "test-vona"
|
|
558
|
-
}), _dec$
|
|
558
|
+
}), _dec$O(_class$O = _dec2$O(_class$O = class ModelUser extends BeanModelBase {}) || _class$O) || _class$O);
|
|
559
559
|
|
|
560
|
-
var _dec$
|
|
561
|
-
let ModelOrder = (_dec$
|
|
560
|
+
var _dec$N, _dec2$N, _class$N;
|
|
561
|
+
let ModelOrder = (_dec$N = Model({
|
|
562
562
|
entity: EntityOrder,
|
|
563
563
|
relations: {
|
|
564
564
|
user: $relation.belongsTo(() => ModelOrder, () => ModelUser, 'userId', {
|
|
@@ -573,39 +573,39 @@ let ModelOrder = (_dec$M = Model({
|
|
|
573
573
|
cache: {
|
|
574
574
|
modelsClear: () => ModelOrderStats
|
|
575
575
|
}
|
|
576
|
-
}), _dec2$
|
|
576
|
+
}), _dec2$N = BeanInfo({
|
|
577
577
|
module: "test-vona"
|
|
578
|
-
}), _dec$
|
|
578
|
+
}), _dec$N(_class$N = _dec2$N(_class$N = class ModelOrder extends BeanModelBase {}) || _class$N) || _class$N);
|
|
579
579
|
|
|
580
|
-
var _dec$
|
|
581
|
-
let ModelRoleUser = (_dec$
|
|
580
|
+
var _dec$M, _dec2$M, _class$M;
|
|
581
|
+
let ModelRoleUser = (_dec$M = Model({
|
|
582
582
|
entity: EntityRoleUser
|
|
583
|
-
}), _dec2$
|
|
583
|
+
}), _dec2$M = BeanInfo({
|
|
584
584
|
module: "test-vona"
|
|
585
|
-
}), _dec$
|
|
585
|
+
}), _dec$M(_class$M = _dec2$M(_class$M = class ModelRoleUser extends BeanModelBase {}) || _class$M) || _class$M);
|
|
586
586
|
|
|
587
|
-
var _dec$
|
|
588
|
-
let ModelRole = (_dec$
|
|
587
|
+
var _dec$L, _dec2$L, _class$L;
|
|
588
|
+
let ModelRole = (_dec$L = 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$L = BeanInfo({
|
|
596
596
|
module: "test-vona"
|
|
597
|
-
}), _dec$
|
|
597
|
+
}), _dec$L(_class$L = _dec2$L(_class$L = class ModelRole extends BeanModelBase {}) || _class$L) || _class$L);
|
|
598
598
|
|
|
599
|
-
var _dec$
|
|
600
|
-
let ModelTest = (_dec$
|
|
599
|
+
var _dec$K, _dec2$K, _class$K;
|
|
600
|
+
let ModelTest = (_dec$K = Model({
|
|
601
601
|
entity: EntityTest,
|
|
602
602
|
client: 'default'
|
|
603
|
-
}), _dec2$
|
|
603
|
+
}), _dec2$K = BeanInfo({
|
|
604
604
|
module: "test-vona"
|
|
605
|
-
}), _dec$
|
|
605
|
+
}), _dec$K(_class$K = _dec2$K(_class$K = class ModelTest extends BeanModelBase {}) || _class$K) || _class$K);
|
|
606
606
|
|
|
607
|
-
var _dec$
|
|
608
|
-
let ModelTestDynamicTable = (_dec$
|
|
607
|
+
var _dec$J, _dec2$J, _class$J;
|
|
608
|
+
let ModelTestDynamicTable = (_dec$J = Model({
|
|
609
609
|
entity: EntityTest,
|
|
610
610
|
table(ctx, defaultTable) {
|
|
611
611
|
if (ctx.instanceName !== '') return defaultTable;
|
|
@@ -616,11 +616,11 @@ let ModelTestDynamicTable = (_dec$I = Model({
|
|
|
616
616
|
// do nothing
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
}), _dec2$
|
|
619
|
+
}), _dec2$J = BeanInfo({
|
|
620
620
|
module: "test-vona"
|
|
621
|
-
}), _dec$
|
|
621
|
+
}), _dec$J(_class$J = _dec2$J(_class$J = class ModelTestDynamicTable extends BeanModelBase {}) || _class$J) || _class$J);
|
|
622
622
|
|
|
623
|
-
var _dec$
|
|
623
|
+
var _dec$I, _dec2$I, _class$I;
|
|
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$I = Bean(), _dec2$I = BeanInfo({
|
|
686
686
|
module: "test-vona"
|
|
687
|
-
}), _dec$
|
|
687
|
+
}), _dec$I(_class$I = _dec2$I(_class$I = class BeanTestCtx extends TestCtx1 {}) || _class$I) || _class$I);
|
|
688
688
|
|
|
689
|
-
var _dec$
|
|
690
|
-
let ServiceAopMethodBase = (_dec$
|
|
689
|
+
var _dec$H, _dec2$H, _dec3$k, _dec4$k, _class$H, _dec5$k, _dec6$j, _dec7$h, _dec8$d, _dec9$9, _dec10$9, _dec11$9, _dec12$7, _dec13$7, _dec14$7, _dec15$7, _dec16$6, _dec17$6, _dec18$6, _class2$k, _class3;
|
|
690
|
+
let ServiceAopMethodBase = (_dec$H = Aspect.aopMethod('test-vona:test', {
|
|
691
691
|
wrapper: '+'
|
|
692
|
-
}), _dec2$
|
|
692
|
+
}), _dec2$H = Aspect.aopMethod('test-vona:test', {
|
|
693
693
|
wrapper: '-'
|
|
694
|
-
}), _dec3$
|
|
694
|
+
}), _dec3$k = Reflect.metadata("design:type", Function), _dec4$k = Reflect.metadata("design:paramtypes", []), _class$H = class ServiceAopMethodBase extends BeanBase {
|
|
695
695
|
testSyncBase() {
|
|
696
696
|
return 'hello';
|
|
697
697
|
}
|
|
698
|
-
}, _applyDecoratedDescriptor(_class$
|
|
699
|
-
let ServiceAopMethod = (_dec5$
|
|
698
|
+
}, _applyDecoratedDescriptor(_class$H.prototype, "testSyncBase", [_dec$H, _dec2$H, _dec3$k, _dec4$k], Object.getOwnPropertyDescriptor(_class$H.prototype, "testSyncBase"), _class$H.prototype), _class$H);
|
|
699
|
+
let ServiceAopMethod = (_dec5$k = Service(), _dec6$j = BeanInfo({
|
|
700
700
|
module: "test-vona"
|
|
701
701
|
}), _dec7$h = Aspect.aopMethod('test-vona:test', {
|
|
702
702
|
wrapper: '+'
|
|
703
703
|
}), _dec8$d = Aspect.aopMethod('test-vona:test', {
|
|
704
704
|
wrapper: '-'
|
|
705
|
-
}), _dec9$9 = Reflect.metadata("design:type", Function),
|
|
705
|
+
}), _dec9$9 = Reflect.metadata("design:type", Function), _dec10$9 = Reflect.metadata("design:paramtypes", []), _dec11$9 = Aspect.aopMethod('test-vona:test', {
|
|
706
706
|
wrapper: '+'
|
|
707
|
-
}),
|
|
707
|
+
}), _dec12$7 = Aspect.aopMethod('test-vona:test', {
|
|
708
708
|
wrapper: '-'
|
|
709
|
-
}),
|
|
709
|
+
}), _dec13$7 = Reflect.metadata("design:type", Function), _dec14$7 = Reflect.metadata("design:paramtypes", []), _dec15$7 = Aspect.aopMethod('test-vona:test', {
|
|
710
710
|
wrapper: '+'
|
|
711
|
-
}),
|
|
711
|
+
}), _dec16$6 = Aspect.aopMethod('test-vona:test', {
|
|
712
712
|
wrapper: '-'
|
|
713
|
-
}),
|
|
713
|
+
}), _dec17$6 = Reflect.metadata("design:type", Function), _dec18$6 = Reflect.metadata("design:paramtypes", []), _dec5$k(_class2$k = _dec6$j(_class2$k = (_class3 = class ServiceAopMethod extends ServiceAopMethodBase {
|
|
714
714
|
constructor(...args) {
|
|
715
715
|
super(...args);
|
|
716
716
|
this._name = '';
|
|
@@ -727,19 +727,19 @@ let ServiceAopMethod = (_dec5$j = Service(), _dec6$j = BeanInfo({
|
|
|
727
727
|
set name(value) {
|
|
728
728
|
this._name = value;
|
|
729
729
|
}
|
|
730
|
-
}, _applyDecoratedDescriptor(_class3.prototype, "testSync", [_dec7$h, _dec8$d, _dec9$9,
|
|
730
|
+
}, _applyDecoratedDescriptor(_class3.prototype, "testSync", [_dec7$h, _dec8$d, _dec9$9, _dec10$9], Object.getOwnPropertyDescriptor(_class3.prototype, "testSync"), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, "testAsync", [_dec11$9, _dec12$7, _dec13$7, _dec14$7], Object.getOwnPropertyDescriptor(_class3.prototype, "testAsync"), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, "name", [_dec15$7, _dec16$6, _dec17$6, _dec18$6], Object.getOwnPropertyDescriptor(_class3.prototype, "name"), _class3.prototype), _class3)) || _class2$k) || _class2$k);
|
|
731
731
|
|
|
732
|
-
var _dec$
|
|
732
|
+
var _dec$G, _dec2$G, _dec3$j, _dec4$j, _dec5$j, _dec6$i, _dec7$g, _dec8$c, _dec9$8, _dec10$8, _dec11$8, _dec12$6, _dec13$6, _dec14$6, _dec15$6, _dec16$5, _dec17$5, _dec18$5, _dec19$4, _dec20$4, _dec21$4, _dec22$4, _dec23$4, _dec24$4, _dec25$4, _dec26$4, _dec27$4, _dec28$3, _dec29$3, _class$G, _class2$j;
|
|
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$G = Service(), _dec2$G = BeanInfo({
|
|
737
737
|
module: "test-vona"
|
|
738
|
-
}), _dec3$
|
|
738
|
+
}), _dec3$j = Caching.get({
|
|
739
739
|
cacheName: 'test-vona:test',
|
|
740
740
|
cacheProp: 'test',
|
|
741
741
|
cacheKeyFn: 'cacheKey'
|
|
742
|
-
}), _dec4$
|
|
742
|
+
}), _dec4$j = Reflect.metadata("design:type", Function), _dec5$j = Reflect.metadata("design:paramtypes", [Number]), _dec6$i = Caching.get({
|
|
743
743
|
cacheName: 'test-vona:test',
|
|
744
744
|
cacheProp: 'test',
|
|
745
745
|
cacheKeyFn
|
|
@@ -747,29 +747,29 @@ let ServiceCaching = (_dec$F = Service(), _dec2$F = BeanInfo({
|
|
|
747
747
|
cacheName: 'test-vona:test',
|
|
748
748
|
cacheProp: 'test',
|
|
749
749
|
cacheKey: 'cel://join([get(self,"$beanFullName"),options.cacheProp,hashkey(args)],"_")'
|
|
750
|
-
}),
|
|
750
|
+
}), _dec10$8 = Reflect.metadata("design:type", Function), _dec11$8 = Reflect.metadata("design:paramtypes", [Number]), _dec12$6 = Caching.get({
|
|
751
751
|
cacheName: 'test-vona:test',
|
|
752
752
|
cacheProp: 'test'
|
|
753
|
-
}),
|
|
753
|
+
}), _dec13$6 = Reflect.metadata("design:type", Function), _dec14$6 = Reflect.metadata("design:paramtypes", [Number]), _dec15$6 = Caching.set({
|
|
754
754
|
cacheName: 'test-vona:test',
|
|
755
755
|
cacheProp: 'test',
|
|
756
756
|
cacheKeyFn: 'cacheKeySet',
|
|
757
757
|
cacheValueFn: 'cacheValueSet'
|
|
758
|
-
}),
|
|
758
|
+
}), _dec16$5 = Reflect.metadata("design:type", Function), _dec17$5 = Reflect.metadata("design:paramtypes", [Number, typeof TSummerCacheTestData === "undefined" ? Object : TSummerCacheTestData]), _dec18$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
|
+
}), _dec19$4 = Reflect.metadata("design:type", Function), _dec20$4 = Reflect.metadata("design:paramtypes", [Number, typeof TSummerCacheTestData === "undefined" ? Object : TSummerCacheTestData]), _dec21$4 = Caching.set({
|
|
764
764
|
cacheName: 'test-vona:test',
|
|
765
765
|
cacheProp: 'test',
|
|
766
766
|
cacheKeyFn: 'cacheKeySet'
|
|
767
|
-
}),
|
|
767
|
+
}), _dec22$4 = Reflect.metadata("design:type", Function), _dec23$4 = Reflect.metadata("design:paramtypes", [Number, typeof TSummerCacheTestData === "undefined" ? Object : TSummerCacheTestData]), _dec24$4 = Caching.del({
|
|
768
768
|
cacheName: 'test-vona:test',
|
|
769
769
|
cacheProp: 'test'
|
|
770
|
-
}),
|
|
770
|
+
}), _dec25$4 = Reflect.metadata("design:type", Function), _dec26$4 = Reflect.metadata("design:paramtypes", [Number]), _dec27$4 = Caching.clear({
|
|
771
771
|
cacheName: 'test-vona:test'
|
|
772
|
-
}),
|
|
772
|
+
}), _dec28$3 = Reflect.metadata("design:type", Function), _dec29$3 = Reflect.metadata("design:paramtypes", []), _dec$G(_class$G = _dec2$G(_class$G = (_class2$j = 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,127 @@ let ServiceCaching = (_dec$F = Service(), _dec2$F = BeanInfo({
|
|
|
813
813
|
async clear() {
|
|
814
814
|
// do nothing
|
|
815
815
|
}
|
|
816
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
816
|
+
}, _applyDecoratedDescriptor(_class2$j.prototype, "get", [_dec3$j, _dec4$j, _dec5$j], Object.getOwnPropertyDescriptor(_class2$j.prototype, "get"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "get2", [_dec6$i, _dec7$g, _dec8$c], Object.getOwnPropertyDescriptor(_class2$j.prototype, "get2"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "get3", [_dec9$8, _dec10$8, _dec11$8], Object.getOwnPropertyDescriptor(_class2$j.prototype, "get3"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "get4", [_dec12$6, _dec13$6, _dec14$6], Object.getOwnPropertyDescriptor(_class2$j.prototype, "get4"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "set", [_dec15$6, _dec16$5, _dec17$5], Object.getOwnPropertyDescriptor(_class2$j.prototype, "set"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "set2", [_dec18$5, _dec19$4, _dec20$4], Object.getOwnPropertyDescriptor(_class2$j.prototype, "set2"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "set3", [_dec21$4, _dec22$4, _dec23$4], Object.getOwnPropertyDescriptor(_class2$j.prototype, "set3"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "del", [_dec24$4, _dec25$4, _dec26$4], Object.getOwnPropertyDescriptor(_class2$j.prototype, "del"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "clear", [_dec27$4, _dec28$3, _dec29$3], Object.getOwnPropertyDescriptor(_class2$j.prototype, "clear"), _class2$j.prototype), _class2$j)) || _class$G) || _class$G);
|
|
817
817
|
|
|
818
|
-
var _dec$
|
|
819
|
-
let ServicePost = (_dec$
|
|
818
|
+
var _dec$F, _dec2$F, _dec3$i, _dec4$i, _dec5$i, _class$F, _class2$i;
|
|
819
|
+
let ServicePost = (_dec$F = Service(), _dec2$F = BeanInfo({
|
|
820
820
|
module: "test-vona"
|
|
821
|
-
}), _dec$
|
|
821
|
+
}), _dec3$i = Database.transaction(), _dec4$i = Reflect.metadata("design:type", Function), _dec5$i = Reflect.metadata("design:paramtypes", []), _dec$F(_class$F = _dec2$F(_class$F = (_class2$i = class ServicePost extends BeanBase {
|
|
822
|
+
async transaction() {
|
|
823
|
+
// insert
|
|
824
|
+
const post = await this.scope.model.post.insert({
|
|
825
|
+
title: 'Post001'
|
|
826
|
+
});
|
|
827
|
+
// cache
|
|
828
|
+
await this.scope.cacheRedis.post.set(post, post.id);
|
|
829
|
+
}
|
|
830
|
+
async transactionManually() {
|
|
831
|
+
const db = this.bean.database.getDb({
|
|
832
|
+
clientName: 'default'
|
|
833
|
+
});
|
|
834
|
+
await db.transaction.begin(async () => {
|
|
835
|
+
const modelPost = this.scope.model.post.newInstance(db);
|
|
836
|
+
const post = await modelPost.insert({
|
|
837
|
+
title: 'Post001'
|
|
838
|
+
});
|
|
839
|
+
await this.scope.cacheRedis.post.set(post, post.id, {
|
|
840
|
+
db
|
|
841
|
+
});
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
async create() {
|
|
845
|
+
const post = await this.scope.model.post.insert({
|
|
846
|
+
title: 'Post001'
|
|
847
|
+
});
|
|
848
|
+
// console.log(post.id);
|
|
849
|
+
return post;
|
|
850
|
+
}
|
|
851
|
+
async createBulk() {
|
|
852
|
+
const posts = await this.scope.model.post.insertBulk([{
|
|
853
|
+
title: 'Post001'
|
|
854
|
+
}, {
|
|
855
|
+
title: 'Post002'
|
|
856
|
+
}]);
|
|
857
|
+
// console.log(posts[0].id, posts[1].id);
|
|
858
|
+
return posts;
|
|
859
|
+
}
|
|
860
|
+
async update() {
|
|
861
|
+
const post = await this.scope.model.post.update({
|
|
862
|
+
id: 1,
|
|
863
|
+
title: 'Post001-Update'
|
|
864
|
+
});
|
|
865
|
+
return post;
|
|
866
|
+
}
|
|
867
|
+
async update2() {
|
|
868
|
+
const post = await this.scope.model.post.update({
|
|
869
|
+
title: 'Post001-Update'
|
|
870
|
+
}, {
|
|
871
|
+
where: {
|
|
872
|
+
title: {
|
|
873
|
+
_startsWith_: 'Post001'
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
});
|
|
877
|
+
return post;
|
|
878
|
+
}
|
|
879
|
+
async updateBulk() {
|
|
880
|
+
const posts = await this.scope.model.post.updateBulk([{
|
|
881
|
+
id: 1,
|
|
882
|
+
title: 'Post001-Update'
|
|
883
|
+
}, {
|
|
884
|
+
id: 2,
|
|
885
|
+
title: 'Post002-Update'
|
|
886
|
+
}]);
|
|
887
|
+
return posts;
|
|
888
|
+
}
|
|
889
|
+
async delete() {
|
|
890
|
+
await this.scope.model.post.delete({
|
|
891
|
+
id: 1
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
async delete2() {
|
|
895
|
+
await this.scope.model.post.delete({
|
|
896
|
+
title: {
|
|
897
|
+
_startsWith_: 'Post'
|
|
898
|
+
}
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
async deleteBulk() {
|
|
902
|
+
await this.scope.model.post.deleteBulk([1, 2]);
|
|
903
|
+
}
|
|
904
|
+
async mutate() {
|
|
905
|
+
// insert
|
|
906
|
+
const post = await this.scope.model.post.mutate({
|
|
907
|
+
title: 'Post001'
|
|
908
|
+
});
|
|
909
|
+
// update
|
|
910
|
+
await this.scope.model.post.mutate({
|
|
911
|
+
id: post.id,
|
|
912
|
+
title: 'Post001-Update'
|
|
913
|
+
});
|
|
914
|
+
// delete
|
|
915
|
+
await this.scope.model.post.mutate({
|
|
916
|
+
id: post.id,
|
|
917
|
+
deleted: true
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
async mutateBulk() {
|
|
921
|
+
await this.scope.model.post.mutateBulk([
|
|
922
|
+
// insert
|
|
923
|
+
{
|
|
924
|
+
title: 'Post003'
|
|
925
|
+
},
|
|
926
|
+
// update
|
|
927
|
+
{
|
|
928
|
+
id: 1,
|
|
929
|
+
title: 'Post001-Update'
|
|
930
|
+
},
|
|
931
|
+
// delete
|
|
932
|
+
{
|
|
933
|
+
id: 2,
|
|
934
|
+
deleted: true
|
|
935
|
+
}]);
|
|
936
|
+
}
|
|
822
937
|
async select() {
|
|
823
938
|
return await this.scope.model.post.select({
|
|
824
939
|
where: {
|
|
@@ -854,21 +969,21 @@ let ServicePost = (_dec$E = Service(), _dec2$E = BeanInfo({
|
|
|
854
969
|
async count() {
|
|
855
970
|
return await this.scope.model.post.count();
|
|
856
971
|
}
|
|
857
|
-
}) || _class$
|
|
972
|
+
}, _applyDecoratedDescriptor(_class2$i.prototype, "transaction", [_dec3$i, _dec4$i, _dec5$i], Object.getOwnPropertyDescriptor(_class2$i.prototype, "transaction"), _class2$i.prototype), _class2$i)) || _class$F) || _class$F);
|
|
858
973
|
|
|
859
|
-
var _dec$
|
|
860
|
-
let ServiceTest = (_dec$
|
|
974
|
+
var _dec$E, _dec2$E, _class$E;
|
|
975
|
+
let ServiceTest = (_dec$E = Service(), _dec2$E = BeanInfo({
|
|
861
976
|
module: "test-vona"
|
|
862
|
-
}), _dec$
|
|
977
|
+
}), _dec$E(_class$E = _dec2$E(_class$E = class ServiceTest extends BeanBase {
|
|
863
978
|
get name() {
|
|
864
979
|
return 'serviceTest';
|
|
865
980
|
}
|
|
866
|
-
}) || _class$
|
|
981
|
+
}) || _class$E) || _class$E);
|
|
867
982
|
|
|
868
|
-
var _dec$
|
|
869
|
-
let ServiceTestApp = (_dec$
|
|
983
|
+
var _dec$D, _dec2$D, _class$D;
|
|
984
|
+
let ServiceTestApp = (_dec$D = Service(), _dec2$D = BeanInfo({
|
|
870
985
|
module: "test-vona"
|
|
871
|
-
}), _dec$
|
|
986
|
+
}), _dec$D(_class$D = _dec2$D(_class$D = class ServiceTestApp extends BeanBase {
|
|
872
987
|
actionSync({
|
|
873
988
|
a,
|
|
874
989
|
b
|
|
@@ -881,9 +996,9 @@ let ServiceTestApp = (_dec$C = Service(), _dec2$C = BeanInfo({
|
|
|
881
996
|
}) {
|
|
882
997
|
return Promise.resolve(a + b);
|
|
883
998
|
}
|
|
884
|
-
}) || _class$
|
|
999
|
+
}) || _class$D) || _class$D);
|
|
885
1000
|
|
|
886
|
-
var _dec$
|
|
1001
|
+
var _dec$C, _dec2$C, _class$C;
|
|
887
1002
|
class ClassBeanBase extends BeanBase {
|
|
888
1003
|
actionSync({
|
|
889
1004
|
a,
|
|
@@ -892,21 +1007,21 @@ class ClassBeanBase extends BeanBase {
|
|
|
892
1007
|
return a + b;
|
|
893
1008
|
}
|
|
894
1009
|
}
|
|
895
|
-
let ServiceTestClass = (_dec$
|
|
1010
|
+
let ServiceTestClass = (_dec$C = Service(), _dec2$C = BeanInfo({
|
|
896
1011
|
module: "test-vona"
|
|
897
|
-
}), _dec$
|
|
1012
|
+
}), _dec$C(_class$C = _dec2$C(_class$C = class ServiceTestClass extends ClassBeanBase {
|
|
898
1013
|
async actionAsync({
|
|
899
1014
|
a,
|
|
900
1015
|
b
|
|
901
1016
|
}) {
|
|
902
1017
|
return Promise.resolve(a + b);
|
|
903
1018
|
}
|
|
904
|
-
}) || _class$
|
|
1019
|
+
}) || _class$C) || _class$C);
|
|
905
1020
|
|
|
906
|
-
var _dec$
|
|
907
|
-
let ServiceTestData = (_dec$
|
|
1021
|
+
var _dec$B, _dec2$B, _class$B;
|
|
1022
|
+
let ServiceTestData = (_dec$B = Service(), _dec2$B = BeanInfo({
|
|
908
1023
|
module: "test-vona"
|
|
909
|
-
}), _dec$
|
|
1024
|
+
}), _dec$B(_class$B = _dec2$B(_class$B = class ServiceTestData extends BeanBase {
|
|
910
1025
|
async create(prefix) {
|
|
911
1026
|
const scopeTest = this.scope;
|
|
912
1027
|
const userTom = await scopeTest.model.user.insert({
|
|
@@ -993,14 +1108,14 @@ let ServiceTestData = (_dec$A = Service(), _dec2$A = BeanInfo({
|
|
|
993
1108
|
id: userJimmy.id
|
|
994
1109
|
});
|
|
995
1110
|
}
|
|
996
|
-
}) || _class$
|
|
1111
|
+
}) || _class$B) || _class$B);
|
|
997
1112
|
|
|
998
|
-
var _dec$
|
|
1113
|
+
var _dec$A, _dec2$A, _dec3$h, _dec4$h, _dec5$h, _dec6$h, _dec7$f, _dec8$b, _class$A, _class2$h;
|
|
999
1114
|
const tableNameFail$1 = '__tempTransactionFail';
|
|
1000
1115
|
const tableNameSuccess$1 = '__tempTransactionSuccess';
|
|
1001
|
-
let ServiceTransaction = (_dec$
|
|
1116
|
+
let ServiceTransaction = (_dec$A = Service(), _dec2$A = BeanInfo({
|
|
1002
1117
|
module: "test-vona"
|
|
1003
|
-
}), _dec3$h = Database.transaction(), _dec4$h = Reflect.metadata("design:type", Function), _dec5$h = Reflect.metadata("design:paramtypes", [Object]), _dec6$h = Database.transaction(), _dec7$f = Reflect.metadata("design:type", Function), _dec8$b = Reflect.metadata("design:paramtypes", [Object]), _dec$
|
|
1118
|
+
}), _dec3$h = Database.transaction(), _dec4$h = Reflect.metadata("design:type", Function), _dec5$h = Reflect.metadata("design:paramtypes", [Object]), _dec6$h = Database.transaction(), _dec7$f = Reflect.metadata("design:type", Function), _dec8$b = Reflect.metadata("design:paramtypes", [Object]), _dec$A(_class$A = _dec2$A(_class$A = (_class2$h = class ServiceTransaction extends BeanBase {
|
|
1004
1119
|
async fail(item) {
|
|
1005
1120
|
await this.bean.model.update(`${tableNameFail$1}`, item);
|
|
1006
1121
|
await this.bean.model.update(`${tableNameFail$1}error`, item);
|
|
@@ -1008,26 +1123,31 @@ let ServiceTransaction = (_dec$z = Service(), _dec2$z = BeanInfo({
|
|
|
1008
1123
|
async success(item) {
|
|
1009
1124
|
await this.bean.model.update(tableNameSuccess$1, item);
|
|
1010
1125
|
}
|
|
1011
|
-
}, _applyDecoratedDescriptor(_class2$h.prototype, "fail", [_dec3$h, _dec4$h, _dec5$h], Object.getOwnPropertyDescriptor(_class2$h.prototype, "fail"), _class2$h.prototype), _applyDecoratedDescriptor(_class2$h.prototype, "success", [_dec6$h, _dec7$f, _dec8$b], Object.getOwnPropertyDescriptor(_class2$h.prototype, "success"), _class2$h.prototype), _class2$h)) || _class$
|
|
1126
|
+
}, _applyDecoratedDescriptor(_class2$h.prototype, "fail", [_dec3$h, _dec4$h, _dec5$h], Object.getOwnPropertyDescriptor(_class2$h.prototype, "fail"), _class2$h.prototype), _applyDecoratedDescriptor(_class2$h.prototype, "success", [_dec6$h, _dec7$f, _dec8$b], Object.getOwnPropertyDescriptor(_class2$h.prototype, "success"), _class2$h.prototype), _class2$h)) || _class$A) || _class$A);
|
|
1012
1127
|
|
|
1013
|
-
var _dec$
|
|
1014
|
-
let BroadcastTest = (_dec$
|
|
1128
|
+
var _dec$z, _dec2$z, _class$z;
|
|
1129
|
+
let BroadcastTest = (_dec$z = Broadcast(), _dec2$z = BeanInfo({
|
|
1015
1130
|
module: "test-vona"
|
|
1016
|
-
}), _dec$
|
|
1131
|
+
}), _dec$z(_class$z = _dec2$z(_class$z = class BroadcastTest extends BeanBroadcastBase {
|
|
1017
1132
|
async execute(data, isEmitter) {
|
|
1018
1133
|
// locale
|
|
1019
1134
|
assert.equal(this.ctx.locale, 'zh-cn');
|
|
1020
1135
|
// data
|
|
1021
1136
|
assert.equal(data.message, 'hello');
|
|
1022
1137
|
}
|
|
1023
|
-
}) || _class$
|
|
1138
|
+
}) || _class$z) || _class$z);
|
|
1024
1139
|
|
|
1025
|
-
var _dec$
|
|
1026
|
-
let CacheMemTest = (_dec$
|
|
1140
|
+
var _dec$y, _dec2$y, _class$y;
|
|
1141
|
+
let CacheMemTest = (_dec$y = CacheMem({
|
|
1027
1142
|
ttl: 1 * 1000
|
|
1028
|
-
}), _dec2$
|
|
1143
|
+
}), _dec2$y = BeanInfo({
|
|
1144
|
+
module: "test-vona"
|
|
1145
|
+
}), _dec$y(_class$y = _dec2$y(_class$y = class CacheMemTest extends BeanCacheMemBase {}) || _class$y) || _class$y);
|
|
1146
|
+
|
|
1147
|
+
var _dec$x, _dec2$x, _class$x;
|
|
1148
|
+
let CacheRedisPost = (_dec$x = CacheRedis(), _dec2$x = BeanInfo({
|
|
1029
1149
|
module: "test-vona"
|
|
1030
|
-
}), _dec$x(_class$x = _dec2$x(_class$x = class
|
|
1150
|
+
}), _dec$x(_class$x = _dec2$x(_class$x = class CacheRedisPost extends BeanCacheRedisBase {}) || _class$x) || _class$x);
|
|
1031
1151
|
|
|
1032
1152
|
var _dec$w, _dec2$w, _class$w;
|
|
1033
1153
|
let CacheRedisTest = (_dec$w = CacheRedis({
|
|
@@ -1344,7 +1464,7 @@ let DtoUserUpdate = (_dec$e = Dto(), _dec2$e = BeanInfo({
|
|
|
1344
1464
|
|
|
1345
1465
|
const __ThisModule__ = 'test-vona';
|
|
1346
1466
|
|
|
1347
|
-
var _dec$d, _dec2$d, _dec3$c, _dec4$c, _dec5$c, _dec6$c, _dec7$c, _dec8$8, _dec9$7,
|
|
1467
|
+
var _dec$d, _dec2$d, _dec3$c, _dec4$c, _dec5$c, _dec6$c, _dec7$c, _dec8$8, _dec9$7, _dec10$7, _dec11$7, _class$d, _class2$c;
|
|
1348
1468
|
let ControllerBean = (_dec$d = Controller({
|
|
1349
1469
|
path: 'bean',
|
|
1350
1470
|
meta: {
|
|
@@ -1352,7 +1472,7 @@ let ControllerBean = (_dec$d = Controller({
|
|
|
1352
1472
|
}
|
|
1353
1473
|
}), _dec2$d = Api.exclude(), _dec3$c = Passport.public(), _dec4$c = BeanInfo({
|
|
1354
1474
|
module: "test-vona"
|
|
1355
|
-
}), _dec5$c = Web.get('test'), _dec6$c = Reflect.metadata("design:type", Function), _dec7$c = Reflect.metadata("design:paramtypes", []), _dec8$8 = Web.get('service'), _dec9$7 = Passport.public(),
|
|
1475
|
+
}), _dec5$c = Web.get('test'), _dec6$c = Reflect.metadata("design:type", Function), _dec7$c = Reflect.metadata("design:paramtypes", []), _dec8$8 = Web.get('service'), _dec9$7 = Passport.public(), _dec10$7 = Reflect.metadata("design:type", Function), _dec11$7 = Reflect.metadata("design:paramtypes", []), _dec$d(_class$d = _dec2$d(_class$d = _dec3$c(_class$d = _dec4$c(_class$d = (_class2$c = class ControllerBean extends BeanBase {
|
|
1356
1476
|
async test() {
|
|
1357
1477
|
const a = 3;
|
|
1358
1478
|
const b = 4;
|
|
@@ -1442,7 +1562,7 @@ let ControllerBean = (_dec$d = Controller({
|
|
|
1442
1562
|
res = this.$scope.testVona.service.test.name;
|
|
1443
1563
|
assert.equal(res, 'serviceTest');
|
|
1444
1564
|
}
|
|
1445
|
-
}, _applyDecoratedDescriptor(_class2$c.prototype, "test", [_dec5$c, _dec6$c, _dec7$c], Object.getOwnPropertyDescriptor(_class2$c.prototype, "test"), _class2$c.prototype), _applyDecoratedDescriptor(_class2$c.prototype, "service", [_dec8$8, _dec9$7,
|
|
1565
|
+
}, _applyDecoratedDescriptor(_class2$c.prototype, "test", [_dec5$c, _dec6$c, _dec7$c], Object.getOwnPropertyDescriptor(_class2$c.prototype, "test"), _class2$c.prototype), _applyDecoratedDescriptor(_class2$c.prototype, "service", [_dec8$8, _dec9$7, _dec10$7, _dec11$7], Object.getOwnPropertyDescriptor(_class2$c.prototype, "service"), _class2$c.prototype), _class2$c)) || _class$d) || _class$d) || _class$d) || _class$d);
|
|
1446
1566
|
|
|
1447
1567
|
var _dec$c, _dec2$c, _dec3$b, _dec4$b, _dec5$b, _dec6$b, _dec7$b, _class$c, _class2$b;
|
|
1448
1568
|
let ControllerCacheMem = (_dec$c = Controller({
|
|
@@ -1560,22 +1680,22 @@ let ControllerCacheRedis = (_dec$b = Controller({
|
|
|
1560
1680
|
}
|
|
1561
1681
|
}, _applyDecoratedDescriptor(_class2$a.prototype, "redis", [_dec5$a, _dec6$a, _dec7$a], Object.getOwnPropertyDescriptor(_class2$a.prototype, "redis"), _class2$a.prototype), _class2$a)) || _class$b) || _class$b) || _class$b) || _class$b);
|
|
1562
1682
|
|
|
1563
|
-
var _dec$a, _dec2$a, _dec3$9, _dec4$9, _dec5$9, _dec6$9, _dec7$9, _dec8$7, _dec9$6,
|
|
1683
|
+
var _dec$a, _dec2$a, _dec3$9, _dec4$9, _dec5$9, _dec6$9, _dec7$9, _dec8$7, _dec9$6, _dec10$6, _dec11$6, _dec12$5, _dec13$5, _dec14$5, _dec15$5, _dec16$4, _dec17$4, _dec18$4, _dec19$3, _dec20$3, _dec21$3, _dec22$3, _dec23$3, _dec24$3, _dec25$3, _dec26$3, _dec27$3, _dec28$2, _dec29$2, _dec30$1, _dec31$1, _dec32$1, _dec33$1, _dec34$1, _class$a, _class2$9;
|
|
1564
1684
|
let ControllerDtoTest = (_dec$a = Controller('dtoTest', {
|
|
1565
1685
|
meta: {
|
|
1566
1686
|
mode: ['test', 'dev']
|
|
1567
1687
|
}
|
|
1568
1688
|
}), _dec2$a = BeanInfo({
|
|
1569
1689
|
module: "test-vona"
|
|
1570
|
-
}), _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", []),
|
|
1690
|
+
}), _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", []), _dec10$6 = Web.get('getUserStats'), _dec11$6 = Api.body($Dto.get('test-vona:userStats')), _dec12$5 = Reflect.metadata("design:type", Function), _dec13$5 = Reflect.metadata("design:paramtypes", []), _dec14$5 = Web.get('getUserStatsGroup'), _dec15$5 = Api.body($Dto.get('test-vona:userStatsGroup')), _dec16$4 = Reflect.metadata("design:type", Function), _dec17$4 = Reflect.metadata("design:paramtypes", []), _dec18$4 = Web.post('createUser'), _dec19$3 = function (target, key) {
|
|
1571
1691
|
return Arg.body(v.object(DtoUserCreate))(target, key, 0);
|
|
1572
|
-
},
|
|
1692
|
+
}, _dec20$3 = Reflect.metadata("design:type", Function), _dec21$3 = Reflect.metadata("design:paramtypes", [typeof DtoUserCreate === "undefined" ? Object : DtoUserCreate]), _dec22$3 = Web.patch('updateUser/:id'), _dec23$3 = function (target, key) {
|
|
1573
1693
|
return Arg.param('id')(target, key, 0);
|
|
1574
|
-
},
|
|
1694
|
+
}, _dec24$3 = function (target, key) {
|
|
1575
1695
|
return Arg.body(v.object(DtoUserUpdate))(target, key, 1);
|
|
1576
|
-
},
|
|
1696
|
+
}, _dec25$3 = Reflect.metadata("design:type", Function), _dec26$3 = Reflect.metadata("design:paramtypes", [typeof TableIdentity$1 === "undefined" ? Object : TableIdentity$1, typeof DtoUserUpdate === "undefined" ? Object : DtoUserUpdate]), _dec27$3 = Web.get('getCategoryTree'), _dec28$2 = Api.body(v.array($Dto.get('test-vona:category', {
|
|
1577
1697
|
columns: ['id', 'name']
|
|
1578
|
-
}))),
|
|
1698
|
+
}))), _dec29$2 = Reflect.metadata("design:type", Function), _dec30$1 = Reflect.metadata("design:paramtypes", []), _dec31$1 = Web.get('getCategoryTree2'), _dec32$1 = Api.body(v.array(DtoCategoryTree)), _dec33$1 = Reflect.metadata("design:type", Function), _dec34$1 = Reflect.metadata("design:paramtypes", []), _dec$a(_class$a = _dec2$a(_class$a = (_class2$9 = class ControllerDtoTest extends BeanBase {
|
|
1579
1699
|
getUserLazy() {
|
|
1580
1700
|
return {};
|
|
1581
1701
|
}
|
|
@@ -1604,27 +1724,27 @@ let ControllerDtoTest = (_dec$a = Controller('dtoTest', {
|
|
|
1604
1724
|
});
|
|
1605
1725
|
return items;
|
|
1606
1726
|
}
|
|
1607
|
-
}, _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", [
|
|
1727
|
+
}, _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", [_dec10$6, _dec11$6, _dec12$5, _dec13$5], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getUserStats"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getUserStatsGroup", [_dec14$5, _dec15$5, _dec16$4, _dec17$4], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getUserStatsGroup"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "createUser", [_dec18$4, _dec19$3, _dec20$3, _dec21$3], Object.getOwnPropertyDescriptor(_class2$9.prototype, "createUser"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "updateUser", [_dec22$3, _dec23$3, _dec24$3, _dec25$3, _dec26$3], Object.getOwnPropertyDescriptor(_class2$9.prototype, "updateUser"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getCategoryTree", [_dec27$3, _dec28$2, _dec29$2, _dec30$1], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getCategoryTree"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getCategoryTree2", [_dec31$1, _dec32$1, _dec33$1, _dec34$1], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getCategoryTree2"), _class2$9.prototype), _class2$9)) || _class$a) || _class$a);
|
|
1608
1728
|
|
|
1609
|
-
var _dec$9, _dec2$9, _dec3$8, _dec4$8, _dec5$8, _dec6$8, _dec7$8, _dec8$6, _dec9$5,
|
|
1729
|
+
var _dec$9, _dec2$9, _dec3$8, _dec4$8, _dec5$8, _dec6$8, _dec7$8, _dec8$6, _dec9$5, _dec10$5, _dec11$5, _dec12$4, _dec13$4, _dec14$4, _dec15$4, _dec16$3, _dec17$3, _dec18$3, _class$9, _class2$8;
|
|
1610
1730
|
let ControllerGuardPassport = (_dec$9 = Controller('guardPassport'), _dec2$9 = BeanInfo({
|
|
1611
1731
|
module: "test-vona"
|
|
1612
1732
|
}), _dec3$8 = Web.get('testUserName'), _dec4$8 = Passport.userName({
|
|
1613
1733
|
name: 'admin'
|
|
1614
1734
|
}), _dec5$8 = Reflect.metadata("design:type", Function), _dec6$8 = Reflect.metadata("design:paramtypes", []), _dec7$8 = Web.get('testUserNameFail'), _dec8$6 = Passport.userName({
|
|
1615
1735
|
name: 'admin-none'
|
|
1616
|
-
}), _dec9$5 = Reflect.metadata("design:type", Function),
|
|
1736
|
+
}), _dec9$5 = Reflect.metadata("design:type", Function), _dec10$5 = Reflect.metadata("design:paramtypes", []), _dec11$5 = Web.get('testRoleName'), _dec12$4 = Passport.roleName({
|
|
1617
1737
|
name: 'admin'
|
|
1618
|
-
}),
|
|
1738
|
+
}), _dec13$4 = Reflect.metadata("design:type", Function), _dec14$4 = Reflect.metadata("design:paramtypes", []), _dec15$4 = Web.get('testRoleNameFail'), _dec16$3 = Passport.roleName({
|
|
1619
1739
|
name: 'admin-none'
|
|
1620
|
-
}),
|
|
1740
|
+
}), _dec17$3 = Reflect.metadata("design:type", Function), _dec18$3 = Reflect.metadata("design:paramtypes", []), _dec$9(_class$9 = _dec2$9(_class$9 = (_class2$8 = class ControllerGuardPassport extends BeanBase {
|
|
1621
1741
|
testUserName() {}
|
|
1622
1742
|
testUserNameFail() {}
|
|
1623
1743
|
testRoleName() {}
|
|
1624
1744
|
testRoleNameFail() {}
|
|
1625
|
-
}, _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,
|
|
1745
|
+
}, _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, _dec10$5], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testUserNameFail"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "testRoleName", [_dec11$5, _dec12$4, _dec13$4, _dec14$4], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testRoleName"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "testRoleNameFail", [_dec15$4, _dec16$3, _dec17$3, _dec18$3], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testRoleNameFail"), _class2$8.prototype), _class2$8)) || _class$9) || _class$9);
|
|
1626
1746
|
|
|
1627
|
-
var _dec$8, _dec2$8, _dec3$7, _dec4$7, _dec5$7, _dec6$7, _dec7$7, _dec8$5, _dec9$4,
|
|
1747
|
+
var _dec$8, _dec2$8, _dec3$7, _dec4$7, _dec5$7, _dec6$7, _dec7$7, _dec8$5, _dec9$4, _dec10$4, _dec11$4, _dec12$3, _dec13$3, _dec14$3, _dec15$3, _dec16$2, _dec17$2, _dec18$2, _dec19$2, _dec20$2, _dec21$2, _dec22$2, _dec23$2, _dec24$2, _dec25$2, _dec26$2, _dec27$2, _dec28$1, _dec29$1, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _dec49, _dec50, _class$8, _class2$7;
|
|
1628
1748
|
let ControllerOnion = (_dec$8 = Controller({
|
|
1629
1749
|
path: 'onion',
|
|
1630
1750
|
tags: ['Onion'],
|
|
@@ -1642,66 +1762,66 @@ let ControllerOnion = (_dec$8 = Controller({
|
|
|
1642
1762
|
public: true
|
|
1643
1763
|
}), _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', {
|
|
1644
1764
|
public: true
|
|
1645
|
-
}),
|
|
1765
|
+
}), _dec10$4 = Aspect.middlewareGlobal('a-core:gate', {
|
|
1646
1766
|
gate: {
|
|
1647
1767
|
mode: 'dev'
|
|
1648
1768
|
}
|
|
1649
|
-
}),
|
|
1769
|
+
}), _dec11$4 = Core.gate({
|
|
1650
1770
|
gate: {
|
|
1651
1771
|
mode: 'dev'
|
|
1652
1772
|
}
|
|
1653
|
-
}),
|
|
1773
|
+
}), _dec12$3 = Aspect.aopMethod('a-orm:transaction', {
|
|
1654
1774
|
isolationLevel: 'SERIALIZABLE',
|
|
1655
1775
|
readOnly: true
|
|
1656
|
-
}),
|
|
1776
|
+
}), _dec13$3 = Database.transaction({
|
|
1657
1777
|
isolationLevel: 'READ_COMMITTED',
|
|
1658
1778
|
readOnly: false
|
|
1659
|
-
}),
|
|
1779
|
+
}), _dec14$3 = Api.body(v.optional(), z.string()), _dec15$3 = function (target, key) {
|
|
1660
1780
|
return Arg.query('id', v.default(0), z.number())(target, key, 0);
|
|
1661
|
-
},
|
|
1781
|
+
}, _dec16$2 = function (target, key) {
|
|
1662
1782
|
return Arg.query('name', z.number().optional())(target, key, 2);
|
|
1663
|
-
},
|
|
1783
|
+
}, _dec17$2 = function (target, key) {
|
|
1664
1784
|
return Arg.body(v.title($locale('User')), z.object({
|
|
1665
1785
|
id: z.number().openapi({
|
|
1666
1786
|
title: $locale('UserId')
|
|
1667
1787
|
})
|
|
1668
1788
|
}))(target, key, 3);
|
|
1669
|
-
},
|
|
1789
|
+
}, _dec18$2 = Reflect.metadata("design:type", Function), _dec19$2 = Reflect.metadata("design:paramtypes", [Number, String, String, typeof DtoUser === "undefined" ? Object : DtoUser]), _dec20$2 = Web.post('echo2/:userId/:userName'), _dec21$2 = Aspect.guardGlobal('a-user:passport', {
|
|
1670
1790
|
public: true
|
|
1671
|
-
}),
|
|
1791
|
+
}), _dec22$2 = function (target, key) {
|
|
1672
1792
|
return Arg.param('userId', v.title($locale('UserId')), v.example('example:1'))(target, key, 0);
|
|
1673
|
-
},
|
|
1793
|
+
}, _dec23$2 = function (target, key) {
|
|
1674
1794
|
return Arg.param('userName', v.title($locale('UserId')), v.example('example:1'))(target, key, 1);
|
|
1675
|
-
},
|
|
1795
|
+
}, _dec24$2 = function (target, key) {
|
|
1676
1796
|
return Arg.query(DtoUser)(target, key, 2);
|
|
1677
|
-
},
|
|
1797
|
+
}, _dec25$2 = function (target, key) {
|
|
1678
1798
|
return Arg.body(v.title($locale('User')), z.object({
|
|
1679
1799
|
id: z.number().openapi({
|
|
1680
1800
|
title: $locale('UserId')
|
|
1681
1801
|
})
|
|
1682
1802
|
}))(target, key, 3);
|
|
1683
|
-
},
|
|
1803
|
+
}, _dec26$2 = Reflect.metadata("design:type", Function), _dec27$2 = Reflect.metadata("design:paramtypes", [Number, String, typeof DtoUser === "undefined" ? Object : DtoUser, typeof DtoUser === "undefined" ? Object : DtoUser]), _dec28$1 = Web.get('echo3/:userId'), _dec29$1 = Aspect.guardGlobal('a-user:passport', {
|
|
1684
1804
|
public: true
|
|
1685
|
-
}),
|
|
1805
|
+
}), _dec30 = function (target, key) {
|
|
1686
1806
|
return Arg.param('userId')(target, key, 0);
|
|
1687
|
-
},
|
|
1807
|
+
}, _dec31 = function (target, key) {
|
|
1688
1808
|
return Arg.query('id', v.optional())(target, key, 1);
|
|
1689
|
-
},
|
|
1809
|
+
}, _dec32 = function (target, key) {
|
|
1690
1810
|
return Arg.headers('Accept', v.title($locale('UserId')))(target, key, 2);
|
|
1691
|
-
},
|
|
1811
|
+
}, _dec33 = Reflect.metadata("design:type", Function), _dec34 = Reflect.metadata("design:paramtypes", [Number, Number, String]), _dec35 = Web.post('echo4'), _dec36 = Aspect.guardGlobal('a-user:passport', {
|
|
1692
1812
|
public: true
|
|
1693
|
-
}),
|
|
1813
|
+
}), _dec37 = Aspect.filterGlobal('a-error:error', {
|
|
1694
1814
|
enable: true,
|
|
1695
1815
|
logs: {
|
|
1696
1816
|
422: true
|
|
1697
1817
|
}
|
|
1698
|
-
}),
|
|
1818
|
+
}), _dec38 = Api.body(v.array(DtoUser)), _dec39 = function (target, key) {
|
|
1699
1819
|
return Arg.body(v.optional(), v.array(), v.object(DtoUser))(target, key, 0);
|
|
1700
|
-
},
|
|
1820
|
+
}, _dec40 = Reflect.metadata("design:type", Function), _dec41 = Reflect.metadata("design:paramtypes", [Array]), _dec42 = Web.get('echo5'), _dec43 = Passport.public(), _dec44 = function (target, key) {
|
|
1701
1821
|
return Arg.query('ids', v.default([1]), v.array(Number, {
|
|
1702
1822
|
separator: '-'
|
|
1703
1823
|
}))(target, key, 0);
|
|
1704
|
-
},
|
|
1824
|
+
}, _dec45 = Reflect.metadata("design:type", Function), _dec46 = Reflect.metadata("design:paramtypes", [Array]), _dec47 = Web.get('echo6'), _dec48 = Passport.admin(), _dec49 = Reflect.metadata("design:type", Function), _dec50 = Reflect.metadata("design:paramtypes", []), _dec$8(_class$8 = _dec2$8(_class$8 = (_class2$7 = class ControllerOnion extends BeanBase {
|
|
1705
1825
|
index() {
|
|
1706
1826
|
return this.ctx.db.inTransaction;
|
|
1707
1827
|
// return 'Hello Vona';
|
|
@@ -1732,9 +1852,9 @@ let ControllerOnion = (_dec$8 = Controller({
|
|
|
1732
1852
|
echo6() {
|
|
1733
1853
|
return this.bean.passport.isAuthenticated;
|
|
1734
1854
|
}
|
|
1735
|
-
}, _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,
|
|
1855
|
+
}, _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, _dec10$4, _dec11$4, _dec12$3, _dec13$3, _dec14$3, _dec15$3, _dec16$2, _dec17$2, _dec18$2, _dec19$2], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo2", [_dec20$2, _dec21$2, _dec22$2, _dec23$2, _dec24$2, _dec25$2, _dec26$2, _dec27$2], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo2"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo3", [_dec28$1, _dec29$1, _dec30, _dec31, _dec32, _dec33, _dec34], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo3"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo4", [_dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo4"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo5", [_dec42, _dec43, _dec44, _dec45, _dec46], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo5"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo6", [_dec47, _dec48, _dec49, _dec50], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo6"), _class2$7.prototype), _class2$7)) || _class$8) || _class$8);
|
|
1736
1856
|
|
|
1737
|
-
var _dec$7, _dec2$7, _dec3$6, _dec4$6, _dec5$6, _dec6$6, _dec7$6, _dec8$4, _dec9$3,
|
|
1857
|
+
var _dec$7, _dec2$7, _dec3$6, _dec4$6, _dec5$6, _dec6$6, _dec7$6, _dec8$4, _dec9$3, _dec10$3, _dec11$3, _dec12$2, _dec13$2, _dec14$2, _dec15$2, _dec16$1, _dec17$1, _dec18$1, _dec19$1, _dec20$1, _dec21$1, _dec22$1, _dec23$1, _dec24$1, _dec25$1, _dec26$1, _dec27$1, _class$7, _class2$6;
|
|
1738
1858
|
let ControllerPassport = (_dec$7 = Controller({
|
|
1739
1859
|
path: 'passport',
|
|
1740
1860
|
meta: {
|
|
@@ -1746,11 +1866,11 @@ let ControllerPassport = (_dec$7 = Controller({
|
|
|
1746
1866
|
return Arg.param('name')(target, key, 0);
|
|
1747
1867
|
}, _dec7$6 = function (target, key) {
|
|
1748
1868
|
return Arg.user()(target, key, 1);
|
|
1749
|
-
}, _dec8$4 = Reflect.metadata("design:type", Function), _dec9$3 = Reflect.metadata("design:paramtypes", [String, typeof IUserBase === "undefined" ? Object : IUserBase]),
|
|
1869
|
+
}, _dec8$4 = Reflect.metadata("design:type", Function), _dec9$3 = Reflect.metadata("design:paramtypes", [String, typeof IUserBase === "undefined" ? Object : IUserBase]), _dec10$3 = Web.post('login'), _dec11$3 = Api.body(v.object(DtoJwtToken)), _dec12$2 = Passport.public(), _dec13$2 = function (target, key) {
|
|
1750
1870
|
return Arg.body('name')(target, key, 0);
|
|
1751
|
-
},
|
|
1871
|
+
}, _dec14$2 = Reflect.metadata("design:type", Function), _dec15$2 = Reflect.metadata("design:paramtypes", [String]), _dec16$1 = Web.get('isAuthenticated'), _dec17$1 = Reflect.metadata("design:type", Function), _dec18$1 = Reflect.metadata("design:paramtypes", []), _dec19$1 = Web.post('refresh'), _dec20$1 = Api.body(v.object(DtoJwtToken)), _dec21$1 = Passport.public(), _dec22$1 = function (target, key) {
|
|
1752
1872
|
return Arg.body('refreshToken')(target, key, 0);
|
|
1753
|
-
},
|
|
1873
|
+
}, _dec23$1 = Reflect.metadata("design:type", Function), _dec24$1 = Reflect.metadata("design:paramtypes", [String]), _dec25$1 = Web.post('logout'), _dec26$1 = Reflect.metadata("design:type", Function), _dec27$1 = Reflect.metadata("design:paramtypes", []), _dec$7(_class$7 = _dec2$7(_class$7 = _dec3$6(_class$7 = (_class2$6 = class ControllerPassport extends BeanBase {
|
|
1754
1874
|
echo(name, user) {
|
|
1755
1875
|
assert.equal(name, 'admin');
|
|
1756
1876
|
assert.equal($getUserName(user), 'admin');
|
|
@@ -1772,7 +1892,7 @@ let ControllerPassport = (_dec$7 = Controller({
|
|
|
1772
1892
|
async logout() {
|
|
1773
1893
|
return await this.bean.passport.signout();
|
|
1774
1894
|
}
|
|
1775
|
-
}, _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", [
|
|
1895
|
+
}, _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", [_dec10$3, _dec11$3, _dec12$2, _dec13$2, _dec14$2, _dec15$2], Object.getOwnPropertyDescriptor(_class2$6.prototype, "login"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "isAuthenticated", [_dec16$1, _dec17$1, _dec18$1], Object.getOwnPropertyDescriptor(_class2$6.prototype, "isAuthenticated"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "refresh", [_dec19$1, _dec20$1, _dec21$1, _dec22$1, _dec23$1, _dec24$1], Object.getOwnPropertyDescriptor(_class2$6.prototype, "refresh"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "logout", [_dec25$1, _dec26$1, _dec27$1], Object.getOwnPropertyDescriptor(_class2$6.prototype, "logout"), _class2$6.prototype), _class2$6)) || _class$7) || _class$7) || _class$7);
|
|
1776
1896
|
|
|
1777
1897
|
var _dec$6, _dec2$6, _dec3$5, _dec4$5, _dec5$5, _dec6$5, _dec7$5, _dec8$3, _class$6, _class2$5;
|
|
1778
1898
|
let ControllerPerformAction = (_dec$6 = Controller({
|
|
@@ -1794,7 +1914,7 @@ let ControllerPerformAction = (_dec$6 = Controller({
|
|
|
1794
1914
|
}
|
|
1795
1915
|
}, _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);
|
|
1796
1916
|
|
|
1797
|
-
var _dec$5, _dec2$5, _dec3$4, _dec4$4, _dec5$4, _dec6$4, _dec7$4, _dec8$2, _dec9$2,
|
|
1917
|
+
var _dec$5, _dec2$5, _dec3$4, _dec4$4, _dec5$4, _dec6$4, _dec7$4, _dec8$2, _dec9$2, _dec10$2, _dec11$2, _class$5, _class2$4;
|
|
1798
1918
|
let ControllerQueue = (_dec$5 = Controller({
|
|
1799
1919
|
path: 'queue',
|
|
1800
1920
|
meta: {
|
|
@@ -1802,7 +1922,7 @@ let ControllerQueue = (_dec$5 = Controller({
|
|
|
1802
1922
|
}
|
|
1803
1923
|
}), _dec2$5 = Api.exclude(), _dec3$4 = BeanInfo({
|
|
1804
1924
|
module: "test-vona"
|
|
1805
|
-
}), _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(),
|
|
1925
|
+
}), _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(), _dec10$2 = Reflect.metadata("design:type", Function), _dec11$2 = Reflect.metadata("design:paramtypes", []), _dec$5(_class$5 = _dec2$5(_class$5 = _dec3$4(_class$5 = (_class2$4 = class ControllerQueue extends BeanBase {
|
|
1806
1926
|
async pushAsync() {
|
|
1807
1927
|
const res = await this.scope.queue.test.pushAsync({
|
|
1808
1928
|
a: 1,
|
|
@@ -1816,7 +1936,7 @@ let ControllerQueue = (_dec$5 = Controller({
|
|
|
1816
1936
|
b: 2
|
|
1817
1937
|
});
|
|
1818
1938
|
}
|
|
1819
|
-
}, _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,
|
|
1939
|
+
}, _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, _dec10$2, _dec11$2], Object.getOwnPropertyDescriptor(_class2$4.prototype, "push"), _class2$4.prototype), _class2$4)) || _class$5) || _class$5) || _class$5);
|
|
1820
1940
|
|
|
1821
1941
|
var _dec$4, _dec2$4, _dec3$3, _dec4$3, _dec5$3, _dec6$3, _dec7$3, _class$4, _class2$3;
|
|
1822
1942
|
let ControllerSummer = (_dec$4 = Controller({
|
|
@@ -1999,7 +2119,7 @@ let ControllerTail = (_dec$3 = Controller({
|
|
|
1999
2119
|
}
|
|
2000
2120
|
}, _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);
|
|
2001
2121
|
|
|
2002
|
-
var _dec$2, _dec2$2, _dec3$1, _dec4$1, _dec5$1, _dec6$1, _dec7$1, _dec8$1, _dec9$1,
|
|
2122
|
+
var _dec$2, _dec2$2, _dec3$1, _dec4$1, _dec5$1, _dec6$1, _dec7$1, _dec8$1, _dec9$1, _dec10$1, _dec11$1, _dec12$1, _dec13$1, _dec14$1, _dec15$1, _class$2, _class2$1;
|
|
2003
2123
|
const tableNameFail = '__tempTransactionFail';
|
|
2004
2124
|
const tableNameSuccess = '__tempTransactionSuccess';
|
|
2005
2125
|
let ControllerTransaction = (_dec$2 = Controller({
|
|
@@ -2011,9 +2131,9 @@ let ControllerTransaction = (_dec$2 = Controller({
|
|
|
2011
2131
|
module: "test-vona"
|
|
2012
2132
|
}), _dec4$1 = Web.post('fail'), _dec5$1 = Database.transaction(), _dec6$1 = Passport.public(), _dec7$1 = function (target, key) {
|
|
2013
2133
|
return Arg.body()(target, key, 0);
|
|
2014
|
-
}, _dec8$1 = Reflect.metadata("design:type", Function), _dec9$1 = Reflect.metadata("design:paramtypes", [Object]),
|
|
2134
|
+
}, _dec8$1 = Reflect.metadata("design:type", Function), _dec9$1 = Reflect.metadata("design:paramtypes", [Object]), _dec10$1 = Web.post('success'), _dec11$1 = Database.transaction(), _dec12$1 = Passport.public(), _dec13$1 = function (target, key) {
|
|
2015
2135
|
return Arg.body()(target, key, 0);
|
|
2016
|
-
},
|
|
2136
|
+
}, _dec14$1 = Reflect.metadata("design:type", Function), _dec15$1 = Reflect.metadata("design:paramtypes", [Object]), _dec$2(_class$2 = _dec2$2(_class$2 = _dec3$1(_class$2 = (_class2$1 = class ControllerTransaction extends BeanBase {
|
|
2017
2137
|
async fail(item) {
|
|
2018
2138
|
await this.bean.model.update(`${tableNameFail}`, item);
|
|
2019
2139
|
await this.bean.model.update(`${tableNameFail}error`, item);
|
|
@@ -2021,9 +2141,9 @@ let ControllerTransaction = (_dec$2 = Controller({
|
|
|
2021
2141
|
async success(item) {
|
|
2022
2142
|
await this.bean.model.update(tableNameSuccess, item);
|
|
2023
2143
|
}
|
|
2024
|
-
}, _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", [
|
|
2144
|
+
}, _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", [_dec10$1, _dec11$1, _dec12$1, _dec13$1, _dec14$1, _dec15$1], Object.getOwnPropertyDescriptor(_class2$1.prototype, "success"), _class2$1.prototype), _class2$1)) || _class$2) || _class$2) || _class$2);
|
|
2025
2145
|
|
|
2026
|
-
var _dec$1, _dec2$1, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9,
|
|
2146
|
+
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, _dec28, _dec29, _class$1, _class2;
|
|
2027
2147
|
let ControllerUpload = (_dec$1 = Controller({
|
|
2028
2148
|
path: 'upload',
|
|
2029
2149
|
meta: {
|
|
@@ -2037,19 +2157,19 @@ let ControllerUpload = (_dec$1 = Controller({
|
|
|
2037
2157
|
return Arg.fields('checkes', v.array(z.string()))(target, key, 1);
|
|
2038
2158
|
}, _dec9 = function (target, key) {
|
|
2039
2159
|
return Arg.field('name', v.default('zhennann'), v.title('your name'))(target, key, 2);
|
|
2040
|
-
},
|
|
2160
|
+
}, _dec10 = Reflect.metadata("design:type", Function), _dec11 = Reflect.metadata("design:paramtypes", [Array, Array, String]), _dec12 = Web.post('file'), _dec13 = Passport.public(), _dec14 = Aspect.interceptor('a-upload:upload'), _dec15 = Api.contentType('application/json'), _dec16 = function (target, key) {
|
|
2041
2161
|
return Arg.field('name', v.default('zhennann'))(target, key, 0);
|
|
2042
|
-
},
|
|
2162
|
+
}, _dec17 = function (target, key) {
|
|
2043
2163
|
return Arg.file('welcome')(target, key, 1);
|
|
2044
|
-
},
|
|
2164
|
+
}, _dec18 = Reflect.metadata("design:type", Function), _dec19 = Reflect.metadata("design:paramtypes", [String, typeof IUploadFile === "undefined" ? Object : IUploadFile]), _dec20 = Web.post('files'), _dec21 = Passport.public(), _dec22 = Aspect.interceptor('a-upload:upload'), _dec23 = Api.contentType('application/json'), _dec24 = function (target, key) {
|
|
2045
2165
|
return Arg.files(v.title('more files'))(target, key, 0);
|
|
2046
|
-
},
|
|
2166
|
+
}, _dec25 = function (target, key) {
|
|
2047
2167
|
return Arg.files('images', v.title('images'))(target, key, 1);
|
|
2048
|
-
},
|
|
2168
|
+
}, _dec26 = function (target, key) {
|
|
2049
2169
|
return Arg.file('welcome1', v.title('single file'))(target, key, 2);
|
|
2050
|
-
},
|
|
2170
|
+
}, _dec27 = function (target, key) {
|
|
2051
2171
|
return Arg.file('welcome2')(target, key, 3);
|
|
2052
|
-
},
|
|
2172
|
+
}, _dec28 = Reflect.metadata("design:type", Function), _dec29 = 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 {
|
|
2053
2173
|
fields(fields, checkes, name) {
|
|
2054
2174
|
assert.equal(fields.find(item => item.name === 'name')?.value, 'zhennann');
|
|
2055
2175
|
assert.equal(checkes.length > 0, true);
|
|
@@ -2068,7 +2188,7 @@ let ControllerUpload = (_dec$1 = Controller({
|
|
|
2068
2188
|
assert.equal(file2.name, 'welcome2');
|
|
2069
2189
|
return this.ctx[SymbolUploadValue];
|
|
2070
2190
|
}
|
|
2071
|
-
}, _applyDecoratedDescriptor(_class2.prototype, "fields", [_dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9,
|
|
2191
|
+
}, _applyDecoratedDescriptor(_class2.prototype, "fields", [_dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11], Object.getOwnPropertyDescriptor(_class2.prototype, "fields"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "file", [_dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19], Object.getOwnPropertyDescriptor(_class2.prototype, "file"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "files", [_dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29], Object.getOwnPropertyDescriptor(_class2.prototype, "files"), _class2.prototype), _class2)) || _class$1) || _class$1);
|
|
2072
2192
|
|
|
2073
2193
|
function config(_app) {
|
|
2074
2194
|
return {};
|
|
@@ -2125,4 +2245,4 @@ function $locale(key) {
|
|
|
2125
2245
|
}
|
|
2126
2246
|
/** scope: end */
|
|
2127
2247
|
|
|
2128
|
-
export { $locale, AopMethodTest, AopRegExp, AopSimple, BeanTestCtx, BroadcastTest, CacheMemTest, 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, ServicePost, ServiceTest, ServiceTestApp, ServiceTestClass, ServiceTestData, ServiceTransaction, SummerCacheTest, config, locales };
|
|
2248
|
+
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, ServicePost, ServiceTest, ServiceTestApp, ServiceTestClass, ServiceTestData, ServiceTransaction, SummerCacheTest, config, locales };
|