vona-module-test-vona 5.0.45 → 5.0.47
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 +44 -1
- package/dist/bean/meta.version.d.ts +3 -2
- package/dist/controller/post.d.ts +66 -0
- package/dist/dto/postQuery.d.ts +9 -0
- package/dist/dto/postQueryRes.d.ts +12 -0
- package/dist/index.js +468 -385
- package/dist/service/post.d.ts +58 -0
- package/package.json +1 -1
- package/src/.metadata/index.ts +52 -1
- package/src/bean/meta.version.ts +17 -2
- package/src/controller/captcha.ts +1 -2
- package/src/controller/dtoTest.ts +2 -2
- package/src/controller/onion.ts +2 -2
- package/src/controller/passport.ts +2 -2
- package/src/controller/performAction.ts +2 -2
- package/src/controller/post.ts +31 -0
- package/src/controller/transaction.ts +2 -2
- package/src/controller/upload.ts +2 -2
- package/src/dto/postQuery.ts +23 -0
- package/src/dto/postQueryRes.ts +9 -0
- package/src/service/post.ts +10 -0
- package/test/captcha.test.ts +1 -1
- package/test/database/dtoAggregate.test.ts +28 -30
- package/test/database/dtoGet.test.ts +37 -41
- package/test/database/dtoGroup.test.ts +28 -30
- package/test/database/dtoMutate.test.ts +40 -42
- package/test/database/dtoQuery.test.ts +55 -0
- package/test/database/modelRelationsJoins.test.ts +11 -0
- package/test/utils/performAction.test.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BeanInfo, BeanAopBase, BeanAopMethodBase, BeanBase, cast, retry, BeanScopeBase } from 'vona';
|
|
2
2
|
import { Aop, AopMethod, Aspect } from 'vona-module-a-aspect';
|
|
3
|
-
import { Api, v
|
|
3
|
+
import { Api, v } from 'vona-module-a-openapi';
|
|
4
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';
|
|
@@ -14,7 +14,7 @@ import { Meta } from 'vona-module-a-meta';
|
|
|
14
14
|
import { Queue, BeanQueueBase } from 'vona-module-a-queue';
|
|
15
15
|
import { Schedule } from 'vona-module-a-schedule';
|
|
16
16
|
import { SummerCache, BeanSummerCacheBase } from 'vona-module-a-summer';
|
|
17
|
-
import { Dto, Controller, Web } from 'vona-module-a-web';
|
|
17
|
+
import { Dto, Controller, Web, Arg } from 'vona-module-a-web';
|
|
18
18
|
import { Passport, $getUserName } from 'vona-module-a-user';
|
|
19
19
|
import { sleep } from '@cabloy/utils';
|
|
20
20
|
import { Core } from 'vona-module-a-core';
|
|
@@ -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$1f, _dec2$1f, _class$1f;
|
|
26
|
+
let AopRegExp = (_dec$1f = Aop({
|
|
27
27
|
match: [/^test-vona\.service\.test\w+$/, 'testCtx'],
|
|
28
28
|
meta: {
|
|
29
29
|
mode: 'test'
|
|
30
30
|
}
|
|
31
|
-
}), _dec2$
|
|
31
|
+
}), _dec2$1f = BeanInfo({
|
|
32
32
|
module: "test-vona"
|
|
33
|
-
}), _dec$
|
|
33
|
+
}), _dec$1f(_class$1f = _dec2$1f(_class$1f = 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$1c = Aop({
|
|
|
52
52
|
const result = await next();
|
|
53
53
|
return `${result}:regexpaop`;
|
|
54
54
|
}
|
|
55
|
-
}) || _class$
|
|
55
|
+
}) || _class$1f) || _class$1f);
|
|
56
56
|
|
|
57
|
-
var _dec$
|
|
57
|
+
var _dec$1e, _dec2$1e, _class$1e;
|
|
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$1e = Aop({
|
|
65
65
|
match: 'testCtx',
|
|
66
66
|
dependencies: 'test-vona:regExp',
|
|
67
67
|
meta: {
|
|
68
68
|
mode: 'test'
|
|
69
69
|
}
|
|
70
|
-
}), _dec2$
|
|
70
|
+
}), _dec2$1e = BeanInfo({
|
|
71
71
|
module: "test-vona"
|
|
72
|
-
}), _dec$
|
|
72
|
+
}), _dec$1e(_class$1e = _dec2$1e(_class$1e = class AopSimple extends AopSimpleBase {
|
|
73
73
|
// magic
|
|
74
74
|
__get__(prop, next) {
|
|
75
75
|
const value = next();
|
|
@@ -109,14 +109,14 @@ let AopSimple = (_dec$1b = Aop({
|
|
|
109
109
|
const result = await next();
|
|
110
110
|
return `${result}:simpleaop`;
|
|
111
111
|
}
|
|
112
|
-
}) || _class$
|
|
112
|
+
}) || _class$1e) || _class$1e);
|
|
113
113
|
|
|
114
|
-
var _dec$
|
|
115
|
-
let AopMethodTest = (_dec$
|
|
114
|
+
var _dec$1d, _dec2$1d, _class$1d;
|
|
115
|
+
let AopMethodTest = (_dec$1d = AopMethod({
|
|
116
116
|
wrapper: ''
|
|
117
|
-
}), _dec2$
|
|
117
|
+
}), _dec2$1d = BeanInfo({
|
|
118
118
|
module: "test-vona"
|
|
119
|
-
}), _dec$
|
|
119
|
+
}), _dec$1d(_class$1d = _dec2$1d(_class$1d = 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$1a = AopMethod({
|
|
|
143
143
|
if (index === data.length - wrapper.length) data = data.substring(0, index);
|
|
144
144
|
return data;
|
|
145
145
|
}
|
|
146
|
-
}) || _class$
|
|
146
|
+
}) || _class$1d) || _class$1d);
|
|
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$1c, _dec2$1c, _dec3$x, _dec4$x, _dec5$v, _dec6$u, _class$1c, _class2$x, _descriptor$e, _descriptor2$c;
|
|
166
|
+
let EntityCategory = (_dec$1c = Entity('testVonaCategory'), _dec2$1c = BeanInfo({
|
|
167
167
|
module: "test-vona"
|
|
168
|
-
}), _dec3$
|
|
168
|
+
}), _dec3$x = Api.field(), _dec4$x = Reflect.metadata("design:type", String), _dec5$v = Api.field(v.optional(), v.tableIdentity()), _dec6$u = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$1c(_class$1c = _dec2$1c(_class$1c = (_class2$x = class EntityCategory extends EntityBase {
|
|
169
169
|
constructor(...args) {
|
|
170
170
|
super(...args);
|
|
171
|
-
_initializerDefineProperty(this, "name", _descriptor$
|
|
171
|
+
_initializerDefineProperty(this, "name", _descriptor$e, this);
|
|
172
172
|
_initializerDefineProperty(this, "categoryIdParent", _descriptor2$c, this);
|
|
173
173
|
}
|
|
174
|
-
}, _descriptor$
|
|
174
|
+
}, _descriptor$e = _applyDecoratedDescriptor(_class2$x.prototype, "name", [_dec3$x, _dec4$x], {
|
|
175
175
|
configurable: true,
|
|
176
176
|
enumerable: true,
|
|
177
177
|
writable: true,
|
|
178
178
|
initializer: null
|
|
179
|
-
}), _descriptor2$c = _applyDecoratedDescriptor(_class2$
|
|
179
|
+
}), _descriptor2$c = _applyDecoratedDescriptor(_class2$x.prototype, "categoryIdParent", [_dec5$v, _dec6$u], {
|
|
180
180
|
configurable: true,
|
|
181
181
|
enumerable: true,
|
|
182
182
|
writable: true,
|
|
183
183
|
initializer: null
|
|
184
|
-
}), _class2$
|
|
184
|
+
}), _class2$x)) || _class$1c) || _class$1c);
|
|
185
185
|
|
|
186
|
-
var _dec$
|
|
187
|
-
let EntityOrder = (_dec$
|
|
186
|
+
var _dec$1b, _dec2$1b, _dec3$w, _dec4$w, _dec5$u, _dec6$t, _dec7$o, _dec8$k, _class$1b, _class2$w, _descriptor$d, _descriptor2$b, _descriptor3$6;
|
|
187
|
+
let EntityOrder = (_dec$1b = Entity('testVonaOrder', {
|
|
188
188
|
openapi: {
|
|
189
189
|
title: $locale('Order')
|
|
190
190
|
}
|
|
191
|
-
}), _dec2$
|
|
191
|
+
}), _dec2$1b = BeanInfo({
|
|
192
192
|
module: "test-vona"
|
|
193
|
-
}), _dec3$
|
|
193
|
+
}), _dec3$w = Api.field(v.openapi({
|
|
194
194
|
title: $locale('OrderNo')
|
|
195
|
-
}), v.default(''), v.min(3)), _dec4$
|
|
195
|
+
}), v.default(''), v.min(3)), _dec4$w = Reflect.metadata("design:type", String), _dec5$u = Api.field(v.openapi({
|
|
196
196
|
title: $locale('Remark')
|
|
197
|
-
}), v.optional()), _dec6$
|
|
197
|
+
}), v.optional()), _dec6$t = Reflect.metadata("design:type", String), _dec7$o = Api.field(v.tableIdentity()), _dec8$k = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$1b(_class$1b = _dec2$1b(_class$1b = (_class2$w = class EntityOrder extends EntityBase {
|
|
198
198
|
constructor(...args) {
|
|
199
199
|
super(...args);
|
|
200
|
-
_initializerDefineProperty(this, "orderNo", _descriptor$
|
|
200
|
+
_initializerDefineProperty(this, "orderNo", _descriptor$d, this);
|
|
201
201
|
_initializerDefineProperty(this, "remark", _descriptor2$b, this);
|
|
202
202
|
_initializerDefineProperty(this, "userId", _descriptor3$6, this);
|
|
203
203
|
}
|
|
204
|
-
}, _descriptor$
|
|
204
|
+
}, _descriptor$d = _applyDecoratedDescriptor(_class2$w.prototype, "orderNo", [_dec3$w, _dec4$w], {
|
|
205
205
|
configurable: true,
|
|
206
206
|
enumerable: true,
|
|
207
207
|
writable: true,
|
|
208
208
|
initializer: null
|
|
209
|
-
}), _descriptor2$b = _applyDecoratedDescriptor(_class2$
|
|
209
|
+
}), _descriptor2$b = _applyDecoratedDescriptor(_class2$w.prototype, "remark", [_dec5$u, _dec6$t], {
|
|
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$w.prototype, "userId", [_dec7$o, _dec8$k], {
|
|
215
215
|
configurable: true,
|
|
216
216
|
enumerable: true,
|
|
217
217
|
writable: true,
|
|
218
218
|
initializer: null
|
|
219
|
-
}), _class2$
|
|
219
|
+
}), _class2$w)) || _class$1b) || _class$1b);
|
|
220
220
|
|
|
221
|
-
var _dec$
|
|
222
|
-
let EntityPost = (_dec$
|
|
221
|
+
var _dec$1a, _dec2$1a, _dec3$v, _dec4$v, _dec5$t, _dec6$s, _dec7$n, _dec8$j, _class$1a, _class2$v, _descriptor$c, _descriptor2$a, _descriptor3$5;
|
|
222
|
+
let EntityPost = (_dec$1a = Entity('testVonaPost'), _dec2$1a = BeanInfo({
|
|
223
223
|
module: "test-vona"
|
|
224
|
-
}), _dec3$
|
|
224
|
+
}), _dec3$v = Api.field(), _dec4$v = Reflect.metadata("design:type", String), _dec5$t = Api.field(v.tableIdentity()), _dec6$s = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec7$n = Api.field(v.optional()), _dec8$j = Reflect.metadata("design:type", Number), _dec$1a(_class$1a = _dec2$1a(_class$1a = (_class2$v = class EntityPost extends EntityBase {
|
|
225
225
|
constructor(...args) {
|
|
226
226
|
super(...args);
|
|
227
|
-
_initializerDefineProperty(this, "title", _descriptor$
|
|
227
|
+
_initializerDefineProperty(this, "title", _descriptor$c, this);
|
|
228
228
|
_initializerDefineProperty(this, "userId", _descriptor2$a, this);
|
|
229
229
|
_initializerDefineProperty(this, "stars", _descriptor3$5, this);
|
|
230
230
|
}
|
|
231
|
-
}, _descriptor$
|
|
231
|
+
}, _descriptor$c = _applyDecoratedDescriptor(_class2$v.prototype, "title", [_dec3$v, _dec4$v], {
|
|
232
232
|
configurable: true,
|
|
233
233
|
enumerable: true,
|
|
234
234
|
writable: true,
|
|
235
235
|
initializer: null
|
|
236
|
-
}), _descriptor2$a = _applyDecoratedDescriptor(_class2$
|
|
236
|
+
}), _descriptor2$a = _applyDecoratedDescriptor(_class2$v.prototype, "userId", [_dec5$t, _dec6$s], {
|
|
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$v.prototype, "stars", [_dec7$n, _dec8$j], {
|
|
242
242
|
configurable: true,
|
|
243
243
|
enumerable: true,
|
|
244
244
|
writable: true,
|
|
245
245
|
initializer: null
|
|
246
|
-
}), _class2$
|
|
246
|
+
}), _class2$v)) || _class$1a) || _class$1a);
|
|
247
247
|
|
|
248
|
-
var _dec$
|
|
249
|
-
let EntityPostContent = (_dec$
|
|
248
|
+
var _dec$19, _dec2$19, _dec3$u, _dec4$u, _dec5$s, _dec6$r, _class$19, _class2$u, _descriptor$b, _descriptor2$9;
|
|
249
|
+
let EntityPostContent = (_dec$19 = Entity('testVonaPostContent'), _dec2$19 = BeanInfo({
|
|
250
250
|
module: "test-vona"
|
|
251
|
-
}), _dec3$
|
|
251
|
+
}), _dec3$u = Api.field(), _dec4$u = Reflect.metadata("design:type", String), _dec5$s = Api.field(v.tableIdentity()), _dec6$r = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$19(_class$19 = _dec2$19(_class$19 = (_class2$u = class EntityPostContent extends EntityBase {
|
|
252
252
|
constructor(...args) {
|
|
253
253
|
super(...args);
|
|
254
|
-
_initializerDefineProperty(this, "content", _descriptor$
|
|
254
|
+
_initializerDefineProperty(this, "content", _descriptor$b, this);
|
|
255
255
|
_initializerDefineProperty(this, "postId", _descriptor2$9, this);
|
|
256
256
|
}
|
|
257
|
-
}, _descriptor$
|
|
257
|
+
}, _descriptor$b = _applyDecoratedDescriptor(_class2$u.prototype, "content", [_dec3$u, _dec4$u], {
|
|
258
258
|
configurable: true,
|
|
259
259
|
enumerable: true,
|
|
260
260
|
writable: true,
|
|
261
261
|
initializer: null
|
|
262
|
-
}), _descriptor2$9 = _applyDecoratedDescriptor(_class2$
|
|
262
|
+
}), _descriptor2$9 = _applyDecoratedDescriptor(_class2$u.prototype, "postId", [_dec5$s, _dec6$r], {
|
|
263
263
|
configurable: true,
|
|
264
264
|
enumerable: true,
|
|
265
265
|
writable: true,
|
|
266
266
|
initializer: null
|
|
267
|
-
}), _class2$
|
|
267
|
+
}), _class2$u)) || _class$19) || _class$19);
|
|
268
268
|
|
|
269
|
-
var _dec$
|
|
270
|
-
let EntityProduct = (_dec$
|
|
269
|
+
var _dec$18, _dec2$18, _dec3$t, _dec4$t, _dec5$r, _dec6$q, _dec7$m, _dec8$i, _dec9$b, _dec0$b, _dec1$b, _dec10$9, _class$18, _class2$t, _descriptor$a, _descriptor2$8, _descriptor3$4, _descriptor4, _descriptor5;
|
|
270
|
+
let EntityProduct = (_dec$18 = Entity('testVonaProduct', {
|
|
271
271
|
independent: true
|
|
272
|
-
}), _dec2$
|
|
272
|
+
}), _dec2$18 = BeanInfo({
|
|
273
273
|
module: "test-vona"
|
|
274
|
-
}), _dec3$
|
|
274
|
+
}), _dec3$t = Api.field(v.openapi({
|
|
275
275
|
title: $locale('Name')
|
|
276
|
-
})), _dec4$
|
|
276
|
+
})), _dec4$t = Reflect.metadata("design:type", String), _dec5$r = Api.field(v.title($locale('Price'))), _dec6$q = Reflect.metadata("design:type", Number), _dec7$m = Api.field(v.title($locale('Quantity'))), _dec8$i = Reflect.metadata("design:type", Number), _dec9$b = Api.field(v.title($locale('Amount'))), _dec0$b = Reflect.metadata("design:type", Number), _dec1$b = Api.field(v.tableIdentity()), _dec10$9 = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$18(_class$18 = _dec2$18(_class$18 = (_class2$t = class EntityProduct extends EntityBase {
|
|
277
277
|
constructor(...args) {
|
|
278
278
|
super(...args);
|
|
279
|
-
_initializerDefineProperty(this, "name", _descriptor$
|
|
279
|
+
_initializerDefineProperty(this, "name", _descriptor$a, this);
|
|
280
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$a = _applyDecoratedDescriptor(_class2$t.prototype, "name", [_dec3$t, _dec4$t], {
|
|
286
286
|
configurable: true,
|
|
287
287
|
enumerable: true,
|
|
288
288
|
writable: true,
|
|
289
289
|
initializer: null
|
|
290
|
-
}), _descriptor2$8 = _applyDecoratedDescriptor(_class2$
|
|
290
|
+
}), _descriptor2$8 = _applyDecoratedDescriptor(_class2$t.prototype, "price", [_dec5$r, _dec6$q], {
|
|
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$t.prototype, "quantity", [_dec7$m, _dec8$i], {
|
|
296
296
|
configurable: true,
|
|
297
297
|
enumerable: true,
|
|
298
298
|
writable: true,
|
|
299
299
|
initializer: null
|
|
300
|
-
}), _descriptor4 = _applyDecoratedDescriptor(_class2$
|
|
300
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2$t.prototype, "amount", [_dec9$b, _dec0$b], {
|
|
301
301
|
configurable: true,
|
|
302
302
|
enumerable: true,
|
|
303
303
|
writable: true,
|
|
304
304
|
initializer: null
|
|
305
|
-
}), _descriptor5 = _applyDecoratedDescriptor(_class2$
|
|
305
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2$t.prototype, "orderId", [_dec1$b, _dec10$9], {
|
|
306
306
|
configurable: true,
|
|
307
307
|
enumerable: true,
|
|
308
308
|
writable: true,
|
|
309
309
|
initializer: null
|
|
310
|
-
}), _class2$
|
|
310
|
+
}), _class2$t)) || _class$18) || _class$18);
|
|
311
311
|
|
|
312
|
-
var _dec$
|
|
313
|
-
let EntityRole = (_dec$
|
|
312
|
+
var _dec$17, _dec2$17, _dec3$s, _dec4$s, _class$17, _class2$s, _descriptor$9;
|
|
313
|
+
let EntityRole = (_dec$17 = Entity('testVonaRole'), _dec2$17 = BeanInfo({
|
|
314
314
|
module: "test-vona"
|
|
315
|
-
}), _dec3$
|
|
315
|
+
}), _dec3$s = Api.field(), _dec4$s = Reflect.metadata("design:type", String), _dec$17(_class$17 = _dec2$17(_class$17 = (_class2$s = class EntityRole extends EntityBase {
|
|
316
316
|
constructor(...args) {
|
|
317
317
|
super(...args);
|
|
318
|
-
_initializerDefineProperty(this, "name", _descriptor$
|
|
318
|
+
_initializerDefineProperty(this, "name", _descriptor$9, this);
|
|
319
319
|
}
|
|
320
|
-
}, _descriptor$
|
|
320
|
+
}, _descriptor$9 = _applyDecoratedDescriptor(_class2$s.prototype, "name", [_dec3$s, _dec4$s], {
|
|
321
321
|
configurable: true,
|
|
322
322
|
enumerable: true,
|
|
323
323
|
writable: true,
|
|
324
324
|
initializer: null
|
|
325
|
-
}), _class2$
|
|
325
|
+
}), _class2$s)) || _class$17) || _class$17);
|
|
326
326
|
|
|
327
|
-
var _dec$
|
|
328
|
-
let EntityRoleUser = (_dec$
|
|
327
|
+
var _dec$16, _dec2$16, _dec3$r, _dec4$r, _dec5$q, _dec6$p, _class$16, _class2$r, _descriptor$8, _descriptor2$7;
|
|
328
|
+
let EntityRoleUser = (_dec$16 = Entity('testVonaRoleUser'), _dec2$16 = BeanInfo({
|
|
329
329
|
module: "test-vona"
|
|
330
|
-
}), _dec3$
|
|
330
|
+
}), _dec3$r = Api.field(v.tableIdentity()), _dec4$r = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec5$q = Api.field(v.tableIdentity()), _dec6$p = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$16(_class$16 = _dec2$16(_class$16 = (_class2$r = class EntityRoleUser extends EntityBase {
|
|
331
331
|
constructor(...args) {
|
|
332
332
|
super(...args);
|
|
333
|
-
_initializerDefineProperty(this, "userId", _descriptor$
|
|
333
|
+
_initializerDefineProperty(this, "userId", _descriptor$8, this);
|
|
334
334
|
_initializerDefineProperty(this, "roleId", _descriptor2$7, this);
|
|
335
335
|
}
|
|
336
|
-
}, _descriptor$
|
|
336
|
+
}, _descriptor$8 = _applyDecoratedDescriptor(_class2$r.prototype, "userId", [_dec3$r, _dec4$r], {
|
|
337
337
|
configurable: true,
|
|
338
338
|
enumerable: true,
|
|
339
339
|
writable: true,
|
|
340
340
|
initializer: null
|
|
341
|
-
}), _descriptor2$7 = _applyDecoratedDescriptor(_class2$
|
|
341
|
+
}), _descriptor2$7 = _applyDecoratedDescriptor(_class2$r.prototype, "roleId", [_dec5$q, _dec6$p], {
|
|
342
342
|
configurable: true,
|
|
343
343
|
enumerable: true,
|
|
344
344
|
writable: true,
|
|
345
345
|
initializer: null
|
|
346
|
-
}), _class2$
|
|
346
|
+
}), _class2$r)) || _class$16) || _class$16);
|
|
347
347
|
|
|
348
|
-
var _dec$
|
|
349
|
-
let EntityTest = (_dec$
|
|
348
|
+
var _dec$15, _dec2$15, _dec3$q, _dec4$q, _dec5$p, _dec6$o, _dec7$l, _dec8$h, _class$15, _class2$q, _descriptor$7, _descriptor2$6, _descriptor3$3;
|
|
349
|
+
let EntityTest = (_dec$15 = Entity('testVonaTest', {
|
|
350
350
|
openapi: {
|
|
351
351
|
title: $locale('Test')
|
|
352
352
|
}
|
|
353
|
-
}), _dec2$
|
|
353
|
+
}), _dec2$15 = BeanInfo({
|
|
354
354
|
module: "test-vona"
|
|
355
|
-
}), _dec3$
|
|
355
|
+
}), _dec3$q = Api.field(v.title($locale('Test'))), _dec4$q = Reflect.metadata("design:type", String), _dec5$p = Api.field(), _dec6$o = Reflect.metadata("design:type", String), _dec7$l = Api.field(v.default(() => {
|
|
356
356
|
return new Date();
|
|
357
|
-
})), _dec8$
|
|
357
|
+
})), _dec8$h = Reflect.metadata("design:type", typeof Date === "undefined" ? Object : Date), _dec$15(_class$15 = _dec2$15(_class$15 = (_class2$q = class EntityTest extends EntityBase {
|
|
358
358
|
constructor(...args) {
|
|
359
359
|
super(...args);
|
|
360
|
-
_initializerDefineProperty(this, "title", _descriptor$
|
|
360
|
+
_initializerDefineProperty(this, "title", _descriptor$7, this);
|
|
361
361
|
_initializerDefineProperty(this, "description", _descriptor2$6, this);
|
|
362
362
|
_initializerDefineProperty(this, "testDate", _descriptor3$3, this);
|
|
363
363
|
}
|
|
364
|
-
}, _descriptor$
|
|
364
|
+
}, _descriptor$7 = _applyDecoratedDescriptor(_class2$q.prototype, "title", [_dec3$q, _dec4$q], {
|
|
365
365
|
configurable: true,
|
|
366
366
|
enumerable: true,
|
|
367
367
|
writable: true,
|
|
368
368
|
initializer: null
|
|
369
|
-
}), _descriptor2$6 = _applyDecoratedDescriptor(_class2$
|
|
369
|
+
}), _descriptor2$6 = _applyDecoratedDescriptor(_class2$q.prototype, "description", [_dec5$p, _dec6$o], {
|
|
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$q.prototype, "testDate", [_dec7$l, _dec8$h], {
|
|
375
375
|
configurable: true,
|
|
376
376
|
enumerable: true,
|
|
377
377
|
writable: true,
|
|
378
378
|
initializer: null
|
|
379
|
-
}), _class2$
|
|
379
|
+
}), _class2$q)) || _class$15) || _class$15);
|
|
380
380
|
|
|
381
|
-
var _dec$
|
|
382
|
-
let EntityUser = (_dec$
|
|
381
|
+
var _dec$14, _dec2$14, _dec3$p, _dec4$p, _dec5$o, _dec6$n, _dec7$k, _dec8$g, _class$14, _class2$p, _descriptor$6, _descriptor2$5, _descriptor3$2;
|
|
382
|
+
let EntityUser = (_dec$14 = Entity('testVonaUser'), _dec2$14 = BeanInfo({
|
|
383
383
|
module: "test-vona"
|
|
384
|
-
}), _dec3$
|
|
384
|
+
}), _dec3$p = Api.field(), _dec4$p = Reflect.metadata("design:type", String), _dec5$o = Api.field(v.optional()), _dec6$n = Reflect.metadata("design:type", Number), _dec7$k = Api.field(v.optional()), _dec8$g = Reflect.metadata("design:type", Number), _dec$14(_class$14 = _dec2$14(_class$14 = (_class2$p = class EntityUser extends EntityBase {
|
|
385
385
|
constructor(...args) {
|
|
386
386
|
super(...args);
|
|
387
|
-
_initializerDefineProperty(this, "name", _descriptor$
|
|
387
|
+
_initializerDefineProperty(this, "name", _descriptor$6, this);
|
|
388
388
|
_initializerDefineProperty(this, "age", _descriptor2$5, this);
|
|
389
389
|
_initializerDefineProperty(this, "scores", _descriptor3$2, this);
|
|
390
390
|
}
|
|
391
|
-
}, _descriptor$
|
|
391
|
+
}, _descriptor$6 = _applyDecoratedDescriptor(_class2$p.prototype, "name", [_dec3$p, _dec4$p], {
|
|
392
392
|
configurable: true,
|
|
393
393
|
enumerable: true,
|
|
394
394
|
writable: true,
|
|
395
395
|
initializer: null
|
|
396
|
-
}), _descriptor2$5 = _applyDecoratedDescriptor(_class2$
|
|
396
|
+
}), _descriptor2$5 = _applyDecoratedDescriptor(_class2$p.prototype, "age", [_dec5$o, _dec6$n], {
|
|
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$p.prototype, "scores", [_dec7$k, _dec8$g], {
|
|
402
402
|
configurable: true,
|
|
403
403
|
enumerable: true,
|
|
404
404
|
writable: true,
|
|
405
405
|
initializer: null
|
|
406
|
-
}), _class2$
|
|
406
|
+
}), _class2$p)) || _class$14) || _class$14);
|
|
407
407
|
|
|
408
|
-
var _dec$
|
|
409
|
-
let ModelCategory = (_dec$
|
|
408
|
+
var _dec$13, _dec2$13, _class$13;
|
|
409
|
+
let ModelCategory = (_dec$13 = Model({
|
|
410
410
|
entity: EntityCategory,
|
|
411
411
|
relations: {
|
|
412
412
|
children: $relation.hasMany(() => ModelCategory, 'categoryIdParent', {
|
|
@@ -417,12 +417,12 @@ let ModelCategory = (_dec$10 = Model({
|
|
|
417
417
|
cache: {
|
|
418
418
|
modelsClear: () => ModelCategoryChain$1
|
|
419
419
|
}
|
|
420
|
-
}), _dec2$
|
|
420
|
+
}), _dec2$13 = BeanInfo({
|
|
421
421
|
module: "test-vona"
|
|
422
|
-
}), _dec$
|
|
422
|
+
}), _dec$13(_class$13 = _dec2$13(_class$13 = class ModelCategory extends BeanModelBase {}) || _class$13) || _class$13);
|
|
423
423
|
|
|
424
|
-
var _dec
|
|
425
|
-
let ModelCategoryChain = (_dec
|
|
424
|
+
var _dec$12, _dec2$12, _class$12;
|
|
425
|
+
let ModelCategoryChain = (_dec$12 = Model({
|
|
426
426
|
entity: EntityCategory,
|
|
427
427
|
relations: {
|
|
428
428
|
parent: $relation.belongsTo(() => ModelCategoryChain, () => ModelCategoryChain, 'categoryIdParent', {
|
|
@@ -430,19 +430,19 @@ let ModelCategoryChain = (_dec$$ = Model({
|
|
|
430
430
|
columns: ['id', 'name', 'categoryIdParent']
|
|
431
431
|
})
|
|
432
432
|
}
|
|
433
|
-
}), _dec2
|
|
433
|
+
}), _dec2$12 = BeanInfo({
|
|
434
434
|
module: "test-vona"
|
|
435
|
-
}), _dec
|
|
435
|
+
}), _dec$12(_class$12 = _dec2$12(_class$12 = class ModelCategoryChain extends BeanModelBase {}) || _class$12) || _class$12);
|
|
436
436
|
|
|
437
|
-
var _dec$
|
|
438
|
-
let ModelProduct = (_dec$
|
|
437
|
+
var _dec$11, _dec2$11, _class$11;
|
|
438
|
+
let ModelProduct = (_dec$11 = Model({
|
|
439
439
|
entity: EntityProduct
|
|
440
|
-
}), _dec2$
|
|
440
|
+
}), _dec2$11 = BeanInfo({
|
|
441
441
|
module: "test-vona"
|
|
442
|
-
}), _dec$
|
|
442
|
+
}), _dec$11(_class$11 = _dec2$11(_class$11 = class ModelProduct extends BeanModelBase {}) || _class$11) || _class$11);
|
|
443
443
|
|
|
444
|
-
var _dec$
|
|
445
|
-
let ModelOrderStats = (_dec$
|
|
444
|
+
var _dec$10, _dec2$10, _class$10;
|
|
445
|
+
let ModelOrderStats = (_dec$10 = Model({
|
|
446
446
|
entity: EntityOrder,
|
|
447
447
|
relations: {
|
|
448
448
|
productStats: $relation.hasMany(() => ModelProduct, 'orderId', {
|
|
@@ -460,12 +460,12 @@ let ModelOrderStats = (_dec$Z = Model({
|
|
|
460
460
|
}
|
|
461
461
|
})
|
|
462
462
|
}
|
|
463
|
-
}), _dec2$
|
|
463
|
+
}), _dec2$10 = BeanInfo({
|
|
464
464
|
module: "test-vona"
|
|
465
|
-
}), _dec$
|
|
465
|
+
}), _dec$10(_class$10 = _dec2$10(_class$10 = class ModelOrderStats extends BeanModelBase {}) || _class$10) || _class$10);
|
|
466
466
|
|
|
467
|
-
var _dec
|
|
468
|
-
let ModelPostContent = (_dec
|
|
467
|
+
var _dec$$, _dec2$$, _class$$;
|
|
468
|
+
let ModelPostContent = (_dec$$ = Model({
|
|
469
469
|
entity: EntityPostContent,
|
|
470
470
|
relations: {
|
|
471
471
|
post: $relation.belongsTo(() => ModelPostContent, () => ModelPost, 'postId')
|
|
@@ -473,12 +473,12 @@ let ModelPostContent = (_dec$Y = Model({
|
|
|
473
473
|
cache: {
|
|
474
474
|
modelsClear: () => ModelPost
|
|
475
475
|
}
|
|
476
|
-
}), _dec2
|
|
476
|
+
}), _dec2$$ = BeanInfo({
|
|
477
477
|
module: "test-vona"
|
|
478
|
-
}), _dec
|
|
478
|
+
}), _dec$$(_class$$ = _dec2$$(_class$$ = class ModelPostContent extends BeanModelBase {}) || _class$$) || _class$$);
|
|
479
479
|
|
|
480
|
-
var _dec$
|
|
481
|
-
let ModelPost = (_dec$
|
|
480
|
+
var _dec$_, _dec2$_, _class$_;
|
|
481
|
+
let ModelPost = (_dec$_ = Model({
|
|
482
482
|
entity: EntityPost,
|
|
483
483
|
relations: {
|
|
484
484
|
postContent: $relation.hasOne(ModelPostContent, 'postId', {
|
|
@@ -489,12 +489,12 @@ let ModelPost = (_dec$X = Model({
|
|
|
489
489
|
columns: ['id', 'name']
|
|
490
490
|
})
|
|
491
491
|
}
|
|
492
|
-
}), _dec2$
|
|
492
|
+
}), _dec2$_ = BeanInfo({
|
|
493
493
|
module: "test-vona"
|
|
494
|
-
}), _dec$
|
|
494
|
+
}), _dec$_(_class$_ = _dec2$_(_class$_ = class ModelPost extends BeanModelBase {}) || _class$_) || _class$_);
|
|
495
495
|
|
|
496
|
-
var _dec$
|
|
497
|
-
let ModelUserStats = (_dec$
|
|
496
|
+
var _dec$Z, _dec2$Z, _class$Z;
|
|
497
|
+
let ModelUserStats = (_dec$Z = Model({
|
|
498
498
|
entity: EntityUser,
|
|
499
499
|
relations: {
|
|
500
500
|
posts: $relation.hasMany(() => ModelPost, 'userId', {
|
|
@@ -510,12 +510,12 @@ let ModelUserStats = (_dec$W = Model({
|
|
|
510
510
|
}
|
|
511
511
|
})
|
|
512
512
|
}
|
|
513
|
-
}), _dec2$
|
|
513
|
+
}), _dec2$Z = BeanInfo({
|
|
514
514
|
module: "test-vona"
|
|
515
|
-
}), _dec$
|
|
515
|
+
}), _dec$Z(_class$Z = _dec2$Z(_class$Z = class ModelUserStats extends BeanModelBase {}) || _class$Z) || _class$Z);
|
|
516
516
|
|
|
517
|
-
var _dec$
|
|
518
|
-
let ModelUserStatsGroup = (_dec$
|
|
517
|
+
var _dec$Y, _dec2$Y, _class$Y;
|
|
518
|
+
let ModelUserStatsGroup = (_dec$Y = Model({
|
|
519
519
|
entity: EntityUser,
|
|
520
520
|
relations: {
|
|
521
521
|
posts: $relation.hasMany(() => ModelPost, 'userId', {
|
|
@@ -535,12 +535,12 @@ let ModelUserStatsGroup = (_dec$V = Model({
|
|
|
535
535
|
orders: [['name', 'asc']]
|
|
536
536
|
}, undefined, true)
|
|
537
537
|
}
|
|
538
|
-
}), _dec2$
|
|
538
|
+
}), _dec2$Y = BeanInfo({
|
|
539
539
|
module: "test-vona"
|
|
540
|
-
}), _dec$
|
|
540
|
+
}), _dec$Y(_class$Y = _dec2$Y(_class$Y = class ModelUserStatsGroup extends BeanModelBase {}) || _class$Y) || _class$Y);
|
|
541
541
|
|
|
542
|
-
var _dec$
|
|
543
|
-
let ModelUser = (_dec$
|
|
542
|
+
var _dec$X, _dec2$X, _class$X;
|
|
543
|
+
let ModelUser = (_dec$X = Model({
|
|
544
544
|
entity: EntityUser,
|
|
545
545
|
relations: {
|
|
546
546
|
posts: $relation.hasMany(() => ModelPost, 'userId', {
|
|
@@ -553,12 +553,12 @@ let ModelUser = (_dec$U = Model({
|
|
|
553
553
|
cache: {
|
|
554
554
|
modelsClear: [() => ModelUserStats, () => ModelUserStatsGroup]
|
|
555
555
|
}
|
|
556
|
-
}), _dec2$
|
|
556
|
+
}), _dec2$X = BeanInfo({
|
|
557
557
|
module: "test-vona"
|
|
558
|
-
}), _dec$
|
|
558
|
+
}), _dec$X(_class$X = _dec2$X(_class$X = class ModelUser extends BeanModelBase {}) || _class$X) || _class$X);
|
|
559
559
|
|
|
560
|
-
var _dec$
|
|
561
|
-
let ModelOrder = (_dec$
|
|
560
|
+
var _dec$W, _dec2$W, _class$W;
|
|
561
|
+
let ModelOrder = (_dec$W = Model({
|
|
562
562
|
entity: EntityOrder,
|
|
563
563
|
relations: {
|
|
564
564
|
user: $relation.belongsTo(() => ModelOrder, () => ModelUser, 'userId', {
|
|
@@ -573,39 +573,39 @@ let ModelOrder = (_dec$T = Model({
|
|
|
573
573
|
cache: {
|
|
574
574
|
modelsClear: () => ModelOrderStats
|
|
575
575
|
}
|
|
576
|
-
}), _dec2$
|
|
576
|
+
}), _dec2$W = BeanInfo({
|
|
577
577
|
module: "test-vona"
|
|
578
|
-
}), _dec$
|
|
578
|
+
}), _dec$W(_class$W = _dec2$W(_class$W = class ModelOrder extends BeanModelBase {}) || _class$W) || _class$W);
|
|
579
579
|
|
|
580
|
-
var _dec$
|
|
581
|
-
let ModelRoleUser = (_dec$
|
|
580
|
+
var _dec$V, _dec2$V, _class$V;
|
|
581
|
+
let ModelRoleUser = (_dec$V = Model({
|
|
582
582
|
entity: EntityRoleUser
|
|
583
|
-
}), _dec2$
|
|
583
|
+
}), _dec2$V = BeanInfo({
|
|
584
584
|
module: "test-vona"
|
|
585
|
-
}), _dec$
|
|
585
|
+
}), _dec$V(_class$V = _dec2$V(_class$V = class ModelRoleUser extends BeanModelBase {}) || _class$V) || _class$V);
|
|
586
586
|
|
|
587
|
-
var _dec$
|
|
588
|
-
let ModelRole = (_dec$
|
|
587
|
+
var _dec$U, _dec2$U, _class$U;
|
|
588
|
+
let ModelRole = (_dec$U = 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$U = BeanInfo({
|
|
596
596
|
module: "test-vona"
|
|
597
|
-
}), _dec$
|
|
597
|
+
}), _dec$U(_class$U = _dec2$U(_class$U = class ModelRole extends BeanModelBase {}) || _class$U) || _class$U);
|
|
598
598
|
|
|
599
|
-
var _dec$
|
|
600
|
-
let ModelTest = (_dec$
|
|
599
|
+
var _dec$T, _dec2$T, _class$T;
|
|
600
|
+
let ModelTest = (_dec$T = Model({
|
|
601
601
|
entity: EntityTest,
|
|
602
602
|
client: 'default'
|
|
603
|
-
}), _dec2$
|
|
603
|
+
}), _dec2$T = BeanInfo({
|
|
604
604
|
module: "test-vona"
|
|
605
|
-
}), _dec$
|
|
605
|
+
}), _dec$T(_class$T = _dec2$T(_class$T = class ModelTest extends BeanModelBase {}) || _class$T) || _class$T);
|
|
606
606
|
|
|
607
|
-
var _dec$
|
|
608
|
-
let ModelTestDynamicTable = (_dec$
|
|
607
|
+
var _dec$S, _dec2$S, _class$S;
|
|
608
|
+
let ModelTestDynamicTable = (_dec$S = Model({
|
|
609
609
|
entity: EntityTest,
|
|
610
610
|
table(ctx, defaultTable) {
|
|
611
611
|
if (ctx.instanceName !== '') return defaultTable;
|
|
@@ -616,11 +616,11 @@ let ModelTestDynamicTable = (_dec$P = Model({
|
|
|
616
616
|
// do nothing
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
}), _dec2$
|
|
619
|
+
}), _dec2$S = BeanInfo({
|
|
620
620
|
module: "test-vona"
|
|
621
|
-
}), _dec$
|
|
621
|
+
}), _dec$S(_class$S = _dec2$S(_class$S = class ModelTestDynamicTable extends BeanModelBase {}) || _class$S) || _class$S);
|
|
622
622
|
|
|
623
|
-
var _dec$
|
|
623
|
+
var _dec$R, _dec2$R, _class$R;
|
|
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$R = Bean(), _dec2$R = BeanInfo({
|
|
686
686
|
module: "test-vona"
|
|
687
|
-
}), _dec$
|
|
687
|
+
}), _dec$R(_class$R = _dec2$R(_class$R = class BeanTestCtx extends TestCtx1 {}) || _class$R) || _class$R);
|
|
688
688
|
|
|
689
|
-
var _dec$
|
|
690
|
-
let ServiceAopMethodBase = (_dec$
|
|
689
|
+
var _dec$Q, _dec2$Q, _dec3$o, _dec4$o, _class$Q, _dec5$n, _dec6$m, _dec7$j, _dec8$f, _dec9$a, _dec0$a, _dec1$a, _dec10$8, _dec11$8, _dec12$8, _dec13$7, _dec14$6, _dec15$6, _dec16$6, _class2$o, _class3;
|
|
690
|
+
let ServiceAopMethodBase = (_dec$Q = Aspect.aopMethod('test-vona:test', {
|
|
691
691
|
wrapper: '+'
|
|
692
|
-
}), _dec2$
|
|
692
|
+
}), _dec2$Q = Aspect.aopMethod('test-vona:test', {
|
|
693
693
|
wrapper: '-'
|
|
694
|
-
}), _dec3$
|
|
694
|
+
}), _dec3$o = Reflect.metadata("design:type", Function), _dec4$o = Reflect.metadata("design:paramtypes", []), _class$Q = class ServiceAopMethodBase extends BeanBase {
|
|
695
695
|
testSyncBase() {
|
|
696
696
|
return 'hello';
|
|
697
697
|
}
|
|
698
|
-
}, _applyDecoratedDescriptor(_class$
|
|
699
|
-
let ServiceAopMethod = (_dec5$
|
|
698
|
+
}, _applyDecoratedDescriptor(_class$Q.prototype, "testSyncBase", [_dec$Q, _dec2$Q, _dec3$o, _dec4$o], Object.getOwnPropertyDescriptor(_class$Q.prototype, "testSyncBase"), _class$Q.prototype), _class$Q);
|
|
699
|
+
let ServiceAopMethod = (_dec5$n = Service(), _dec6$m = BeanInfo({
|
|
700
700
|
module: "test-vona"
|
|
701
|
-
}), _dec7$
|
|
701
|
+
}), _dec7$j = Aspect.aopMethod('test-vona:test', {
|
|
702
702
|
wrapper: '+'
|
|
703
|
-
}), _dec8$
|
|
703
|
+
}), _dec8$f = Aspect.aopMethod('test-vona:test', {
|
|
704
704
|
wrapper: '-'
|
|
705
|
-
}), _dec9$
|
|
705
|
+
}), _dec9$a = Reflect.metadata("design:type", Function), _dec0$a = Reflect.metadata("design:paramtypes", []), _dec1$a = Aspect.aopMethod('test-vona:test', {
|
|
706
706
|
wrapper: '+'
|
|
707
|
-
}), _dec10$
|
|
707
|
+
}), _dec10$8 = Aspect.aopMethod('test-vona:test', {
|
|
708
708
|
wrapper: '-'
|
|
709
|
-
}), _dec11$
|
|
709
|
+
}), _dec11$8 = Reflect.metadata("design:type", Function), _dec12$8 = 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
|
-
}), _dec15$6 = Reflect.metadata("design:type", Function), _dec16$6 = Reflect.metadata("design:paramtypes", []), _dec5$
|
|
713
|
+
}), _dec15$6 = Reflect.metadata("design:type", Function), _dec16$6 = Reflect.metadata("design:paramtypes", []), _dec5$n(_class2$o = _dec6$m(_class2$o = (_class3 = class ServiceAopMethod extends ServiceAopMethodBase {
|
|
714
714
|
constructor(...args) {
|
|
715
715
|
super(...args);
|
|
716
716
|
this._name = '';
|
|
@@ -727,30 +727,30 @@ let ServiceAopMethod = (_dec5$m = Service(), _dec6$l = 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$j, _dec8$f, _dec9$a, _dec0$a], Object.getOwnPropertyDescriptor(_class3.prototype, "testSync"), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, "testAsync", [_dec1$a, _dec10$8, _dec11$8, _dec12$8], 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$o) || _class2$o);
|
|
731
731
|
|
|
732
|
-
var _dec$
|
|
732
|
+
var _dec$P, _dec2$P, _dec3$n, _dec4$n, _dec5$m, _dec6$l, _dec7$i, _dec8$e, _dec9$9, _dec0$9, _dec1$9, _dec10$7, _dec11$7, _dec12$7, _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$P, _class2$n;
|
|
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$P = Service(), _dec2$P = BeanInfo({
|
|
737
737
|
module: "test-vona"
|
|
738
|
-
}), _dec3$
|
|
738
|
+
}), _dec3$n = Caching.get({
|
|
739
739
|
cacheName: 'test-vona:test',
|
|
740
740
|
cacheProp: 'test',
|
|
741
741
|
cacheKeyFn: 'cacheKey'
|
|
742
|
-
}), _dec4$
|
|
742
|
+
}), _dec4$n = Reflect.metadata("design:type", Function), _dec5$m = Reflect.metadata("design:paramtypes", [Number]), _dec6$l = Caching.get({
|
|
743
743
|
cacheName: 'test-vona:test',
|
|
744
744
|
cacheProp: 'test',
|
|
745
745
|
cacheKeyFn
|
|
746
|
-
}), _dec7$
|
|
746
|
+
}), _dec7$i = Reflect.metadata("design:type", Function), _dec8$e = Reflect.metadata("design:paramtypes", [Number]), _dec9$9 = 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
|
-
}), _dec0$
|
|
750
|
+
}), _dec0$9 = Reflect.metadata("design:type", Function), _dec1$9 = Reflect.metadata("design:paramtypes", [Number]), _dec10$7 = Caching.get({
|
|
751
751
|
cacheName: 'test-vona:test',
|
|
752
752
|
cacheProp: 'test'
|
|
753
|
-
}), _dec11$
|
|
753
|
+
}), _dec11$7 = Reflect.metadata("design:type", Function), _dec12$7 = Reflect.metadata("design:paramtypes", [Number]), _dec13$6 = Caching.set({
|
|
754
754
|
cacheName: 'test-vona:test',
|
|
755
755
|
cacheProp: 'test',
|
|
756
756
|
cacheKeyFn: 'cacheKeySet',
|
|
@@ -769,7 +769,7 @@ let ServiceCaching = (_dec$M = Service(), _dec2$M = BeanInfo({
|
|
|
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
|
-
}), _dec26$3 = Reflect.metadata("design:type", Function), _dec27$3 = Reflect.metadata("design:paramtypes", []), _dec$
|
|
772
|
+
}), _dec26$3 = Reflect.metadata("design:type", Function), _dec27$3 = Reflect.metadata("design:paramtypes", []), _dec$P(_class$P = _dec2$P(_class$P = (_class2$n = 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,12 @@ let ServiceCaching = (_dec$M = Service(), _dec2$M = BeanInfo({
|
|
|
813
813
|
async clear() {
|
|
814
814
|
// do nothing
|
|
815
815
|
}
|
|
816
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
816
|
+
}, _applyDecoratedDescriptor(_class2$n.prototype, "get", [_dec3$n, _dec4$n, _dec5$m], Object.getOwnPropertyDescriptor(_class2$n.prototype, "get"), _class2$n.prototype), _applyDecoratedDescriptor(_class2$n.prototype, "get2", [_dec6$l, _dec7$i, _dec8$e], Object.getOwnPropertyDescriptor(_class2$n.prototype, "get2"), _class2$n.prototype), _applyDecoratedDescriptor(_class2$n.prototype, "get3", [_dec9$9, _dec0$9, _dec1$9], Object.getOwnPropertyDescriptor(_class2$n.prototype, "get3"), _class2$n.prototype), _applyDecoratedDescriptor(_class2$n.prototype, "get4", [_dec10$7, _dec11$7, _dec12$7], Object.getOwnPropertyDescriptor(_class2$n.prototype, "get4"), _class2$n.prototype), _applyDecoratedDescriptor(_class2$n.prototype, "set", [_dec13$6, _dec14$5, _dec15$5], Object.getOwnPropertyDescriptor(_class2$n.prototype, "set"), _class2$n.prototype), _applyDecoratedDescriptor(_class2$n.prototype, "set2", [_dec16$5, _dec17$4, _dec18$4], Object.getOwnPropertyDescriptor(_class2$n.prototype, "set2"), _class2$n.prototype), _applyDecoratedDescriptor(_class2$n.prototype, "set3", [_dec19$4, _dec20$4, _dec21$4], Object.getOwnPropertyDescriptor(_class2$n.prototype, "set3"), _class2$n.prototype), _applyDecoratedDescriptor(_class2$n.prototype, "del", [_dec22$4, _dec23$4, _dec24$4], Object.getOwnPropertyDescriptor(_class2$n.prototype, "del"), _class2$n.prototype), _applyDecoratedDescriptor(_class2$n.prototype, "clear", [_dec25$4, _dec26$3, _dec27$3], Object.getOwnPropertyDescriptor(_class2$n.prototype, "clear"), _class2$n.prototype), _class2$n)) || _class$P) || _class$P);
|
|
817
817
|
|
|
818
|
-
var _dec$
|
|
819
|
-
let ServiceCategory = (_dec$
|
|
818
|
+
var _dec$O, _dec2$O, _class$O;
|
|
819
|
+
let ServiceCategory = (_dec$O = Service(), _dec2$O = BeanInfo({
|
|
820
820
|
module: "test-vona"
|
|
821
|
-
}), _dec$
|
|
821
|
+
}), _dec$O(_class$O = _dec2$O(_class$O = class ServiceCategory extends BeanBase {
|
|
822
822
|
async categoryTreeDynamic() {
|
|
823
823
|
// create
|
|
824
824
|
const treeCreate = await this.scope.model.category.insert({
|
|
@@ -959,12 +959,12 @@ let ServiceCategory = (_dec$L = Service(), _dec2$L = BeanInfo({
|
|
|
959
959
|
id: treeCreate.id
|
|
960
960
|
});
|
|
961
961
|
}
|
|
962
|
-
}) || _class$
|
|
962
|
+
}) || _class$O) || _class$O);
|
|
963
963
|
|
|
964
|
-
var _dec$
|
|
965
|
-
let ServiceOrder = (_dec$
|
|
964
|
+
var _dec$N, _dec2$N, _class$N;
|
|
965
|
+
let ServiceOrder = (_dec$N = Service(), _dec2$N = BeanInfo({
|
|
966
966
|
module: "test-vona"
|
|
967
|
-
}), _dec$
|
|
967
|
+
}), _dec$N(_class$N = _dec2$N(_class$N = class ServiceOrder extends BeanBase {
|
|
968
968
|
async relationHasMany() {
|
|
969
969
|
// insert
|
|
970
970
|
const orderCreate = await this.scope.model.order.insert({
|
|
@@ -1022,12 +1022,20 @@ let ServiceOrder = (_dec$K = Service(), _dec2$K = BeanInfo({
|
|
|
1022
1022
|
}
|
|
1023
1023
|
});
|
|
1024
1024
|
}
|
|
1025
|
-
}) || _class$
|
|
1025
|
+
}) || _class$N) || _class$N);
|
|
1026
1026
|
|
|
1027
|
-
var _dec$
|
|
1028
|
-
let ServicePost = (_dec$
|
|
1027
|
+
var _dec$M, _dec2$M, _dec3$m, _dec4$m, _dec5$l, _class$M, _class2$m;
|
|
1028
|
+
let ServicePost = (_dec$M = Service(), _dec2$M = BeanInfo({
|
|
1029
1029
|
module: "test-vona"
|
|
1030
|
-
}), _dec3$
|
|
1030
|
+
}), _dec3$m = Database.transaction(), _dec4$m = Reflect.metadata("design:type", Function), _dec5$l = Reflect.metadata("design:paramtypes", []), _dec$M(_class$M = _dec2$M(_class$M = (_class2$m = class ServicePost extends BeanBase {
|
|
1031
|
+
async findMany(params) {
|
|
1032
|
+
return await this.scope.model.post.selectAndCount({
|
|
1033
|
+
...params,
|
|
1034
|
+
include: {
|
|
1035
|
+
postContent: true
|
|
1036
|
+
}
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
1031
1039
|
async group() {
|
|
1032
1040
|
const result = await this.scope.model.post.group({
|
|
1033
1041
|
groups: 'userId',
|
|
@@ -1263,26 +1271,26 @@ let ServicePost = (_dec$J = Service(), _dec2$J = BeanInfo({
|
|
|
1263
1271
|
// async count() {
|
|
1264
1272
|
// return await this.scope.model.post.count();
|
|
1265
1273
|
// }
|
|
1266
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
1274
|
+
}, _applyDecoratedDescriptor(_class2$m.prototype, "transaction", [_dec3$m, _dec4$m, _dec5$l], Object.getOwnPropertyDescriptor(_class2$m.prototype, "transaction"), _class2$m.prototype), _class2$m)) || _class$M) || _class$M);
|
|
1267
1275
|
|
|
1268
|
-
var _dec$
|
|
1269
|
-
let ServiceProduct = (_dec$
|
|
1276
|
+
var _dec$L, _dec2$L, _class$L;
|
|
1277
|
+
let ServiceProduct = (_dec$L = Service(), _dec2$L = BeanInfo({
|
|
1270
1278
|
module: "test-vona"
|
|
1271
|
-
}), _dec$
|
|
1279
|
+
}), _dec$L(_class$L = _dec2$L(_class$L = class ServiceProduct extends BeanBase {}) || _class$L) || _class$L);
|
|
1272
1280
|
|
|
1273
|
-
var _dec$
|
|
1274
|
-
let ServiceTest = (_dec$
|
|
1281
|
+
var _dec$K, _dec2$K, _class$K;
|
|
1282
|
+
let ServiceTest = (_dec$K = Service(), _dec2$K = BeanInfo({
|
|
1275
1283
|
module: "test-vona"
|
|
1276
|
-
}), _dec$
|
|
1284
|
+
}), _dec$K(_class$K = _dec2$K(_class$K = class ServiceTest extends BeanBase {
|
|
1277
1285
|
get name() {
|
|
1278
1286
|
return 'serviceTest';
|
|
1279
1287
|
}
|
|
1280
|
-
}) || _class$
|
|
1288
|
+
}) || _class$K) || _class$K);
|
|
1281
1289
|
|
|
1282
|
-
var _dec$
|
|
1283
|
-
let ServiceTestApp = (_dec$
|
|
1290
|
+
var _dec$J, _dec2$J, _class$J;
|
|
1291
|
+
let ServiceTestApp = (_dec$J = Service(), _dec2$J = BeanInfo({
|
|
1284
1292
|
module: "test-vona"
|
|
1285
|
-
}), _dec$
|
|
1293
|
+
}), _dec$J(_class$J = _dec2$J(_class$J = class ServiceTestApp extends BeanBase {
|
|
1286
1294
|
actionSync({
|
|
1287
1295
|
a,
|
|
1288
1296
|
b
|
|
@@ -1295,9 +1303,9 @@ let ServiceTestApp = (_dec$G = Service(), _dec2$G = BeanInfo({
|
|
|
1295
1303
|
}) {
|
|
1296
1304
|
return Promise.resolve(a + b);
|
|
1297
1305
|
}
|
|
1298
|
-
}) || _class$
|
|
1306
|
+
}) || _class$J) || _class$J);
|
|
1299
1307
|
|
|
1300
|
-
var _dec$
|
|
1308
|
+
var _dec$I, _dec2$I, _class$I;
|
|
1301
1309
|
class ClassBeanBase extends BeanBase {
|
|
1302
1310
|
actionSync({
|
|
1303
1311
|
a,
|
|
@@ -1306,21 +1314,21 @@ class ClassBeanBase extends BeanBase {
|
|
|
1306
1314
|
return a + b;
|
|
1307
1315
|
}
|
|
1308
1316
|
}
|
|
1309
|
-
let ServiceTestClass = (_dec$
|
|
1317
|
+
let ServiceTestClass = (_dec$I = Service(), _dec2$I = BeanInfo({
|
|
1310
1318
|
module: "test-vona"
|
|
1311
|
-
}), _dec$
|
|
1319
|
+
}), _dec$I(_class$I = _dec2$I(_class$I = class ServiceTestClass extends ClassBeanBase {
|
|
1312
1320
|
async actionAsync({
|
|
1313
1321
|
a,
|
|
1314
1322
|
b
|
|
1315
1323
|
}) {
|
|
1316
1324
|
return Promise.resolve(a + b);
|
|
1317
1325
|
}
|
|
1318
|
-
}) || _class$
|
|
1326
|
+
}) || _class$I) || _class$I);
|
|
1319
1327
|
|
|
1320
|
-
var _dec$
|
|
1321
|
-
let ServiceTestData = (_dec$
|
|
1328
|
+
var _dec$H, _dec2$H, _class$H;
|
|
1329
|
+
let ServiceTestData = (_dec$H = Service(), _dec2$H = BeanInfo({
|
|
1322
1330
|
module: "test-vona"
|
|
1323
|
-
}), _dec$
|
|
1331
|
+
}), _dec$H(_class$H = _dec2$H(_class$H = class ServiceTestData extends BeanBase {
|
|
1324
1332
|
async create(prefix) {
|
|
1325
1333
|
const scopeTest = this.scope;
|
|
1326
1334
|
const userTom = await scopeTest.model.user.insert({
|
|
@@ -1407,14 +1415,14 @@ let ServiceTestData = (_dec$E = Service(), _dec2$E = BeanInfo({
|
|
|
1407
1415
|
id: userJimmy.id
|
|
1408
1416
|
});
|
|
1409
1417
|
}
|
|
1410
|
-
}) || _class$
|
|
1418
|
+
}) || _class$H) || _class$H);
|
|
1411
1419
|
|
|
1412
|
-
var _dec$
|
|
1420
|
+
var _dec$G, _dec2$G, _dec3$l, _dec4$l, _dec5$k, _dec6$k, _dec7$h, _dec8$d, _class$G, _class2$l;
|
|
1413
1421
|
const tableNameFail$1 = '__tempTransactionFail';
|
|
1414
1422
|
const tableNameSuccess$1 = '__tempTransactionSuccess';
|
|
1415
|
-
let ServiceTransaction = (_dec$
|
|
1423
|
+
let ServiceTransaction = (_dec$G = Service(), _dec2$G = BeanInfo({
|
|
1416
1424
|
module: "test-vona"
|
|
1417
|
-
}), _dec3$
|
|
1425
|
+
}), _dec3$l = Database.transaction(), _dec4$l = Reflect.metadata("design:type", Function), _dec5$k = Reflect.metadata("design:paramtypes", [Object]), _dec6$k = Database.transaction(), _dec7$h = Reflect.metadata("design:type", Function), _dec8$d = Reflect.metadata("design:paramtypes", [Object]), _dec$G(_class$G = _dec2$G(_class$G = (_class2$l = class ServiceTransaction extends BeanBase {
|
|
1418
1426
|
async fail(item) {
|
|
1419
1427
|
await this.bean.model.update(`${tableNameFail$1}`, item);
|
|
1420
1428
|
await this.bean.model.update(`${tableNameFail$1}error`, item);
|
|
@@ -1422,12 +1430,12 @@ let ServiceTransaction = (_dec$D = Service(), _dec2$D = BeanInfo({
|
|
|
1422
1430
|
async success(item) {
|
|
1423
1431
|
await this.bean.model.update(tableNameSuccess$1, item);
|
|
1424
1432
|
}
|
|
1425
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
1433
|
+
}, _applyDecoratedDescriptor(_class2$l.prototype, "fail", [_dec3$l, _dec4$l, _dec5$k], Object.getOwnPropertyDescriptor(_class2$l.prototype, "fail"), _class2$l.prototype), _applyDecoratedDescriptor(_class2$l.prototype, "success", [_dec6$k, _dec7$h, _dec8$d], Object.getOwnPropertyDescriptor(_class2$l.prototype, "success"), _class2$l.prototype), _class2$l)) || _class$G) || _class$G);
|
|
1426
1434
|
|
|
1427
|
-
var _dec$
|
|
1428
|
-
let ServiceUser = (_dec$
|
|
1435
|
+
var _dec$F, _dec2$F, _class$F;
|
|
1436
|
+
let ServiceUser = (_dec$F = Service(), _dec2$F = BeanInfo({
|
|
1429
1437
|
module: "test-vona"
|
|
1430
|
-
}), _dec$
|
|
1438
|
+
}), _dec$F(_class$F = _dec2$F(_class$F = class ServiceUser extends BeanBase {
|
|
1431
1439
|
async userStats() {
|
|
1432
1440
|
const userStats = await this.scope.model.user.aggregate({
|
|
1433
1441
|
aggrs: {
|
|
@@ -1513,61 +1521,61 @@ let ServiceUser = (_dec$C = Service(), _dec2$C = BeanInfo({
|
|
|
1513
1521
|
}
|
|
1514
1522
|
});
|
|
1515
1523
|
}
|
|
1516
|
-
}) || _class$
|
|
1524
|
+
}) || _class$F) || _class$F);
|
|
1517
1525
|
|
|
1518
|
-
var _dec$
|
|
1519
|
-
let BroadcastTest = (_dec$
|
|
1526
|
+
var _dec$E, _dec2$E, _class$E;
|
|
1527
|
+
let BroadcastTest = (_dec$E = Broadcast(), _dec2$E = BeanInfo({
|
|
1520
1528
|
module: "test-vona"
|
|
1521
|
-
}), _dec$
|
|
1529
|
+
}), _dec$E(_class$E = _dec2$E(_class$E = class BroadcastTest extends BeanBroadcastBase {
|
|
1522
1530
|
async execute(data, isEmitter) {
|
|
1523
1531
|
// locale
|
|
1524
1532
|
assert.equal(this.ctx.locale, 'zh-cn');
|
|
1525
1533
|
// data
|
|
1526
1534
|
assert.equal(data.message, 'hello');
|
|
1527
1535
|
}
|
|
1528
|
-
}) || _class$
|
|
1536
|
+
}) || _class$E) || _class$E);
|
|
1529
1537
|
|
|
1530
|
-
var _dec$
|
|
1531
|
-
let CacheMemTest = (_dec$
|
|
1538
|
+
var _dec$D, _dec2$D, _class$D;
|
|
1539
|
+
let CacheMemTest = (_dec$D = CacheMem({
|
|
1532
1540
|
ttl: 1 * 1000
|
|
1533
|
-
}), _dec2$
|
|
1541
|
+
}), _dec2$D = BeanInfo({
|
|
1534
1542
|
module: "test-vona"
|
|
1535
|
-
}), _dec$
|
|
1543
|
+
}), _dec$D(_class$D = _dec2$D(_class$D = class CacheMemTest extends BeanCacheMemBase {}) || _class$D) || _class$D);
|
|
1536
1544
|
|
|
1537
|
-
var _dec$
|
|
1538
|
-
let CacheRedisPost = (_dec$
|
|
1545
|
+
var _dec$C, _dec2$C, _class$C;
|
|
1546
|
+
let CacheRedisPost = (_dec$C = CacheRedis(), _dec2$C = BeanInfo({
|
|
1539
1547
|
module: "test-vona"
|
|
1540
|
-
}), _dec$
|
|
1548
|
+
}), _dec$C(_class$C = _dec2$C(_class$C = class CacheRedisPost extends BeanCacheRedisBase {}) || _class$C) || _class$C);
|
|
1541
1549
|
|
|
1542
|
-
var _dec$
|
|
1543
|
-
let CacheRedisTest = (_dec$
|
|
1550
|
+
var _dec$B, _dec2$B, _class$B;
|
|
1551
|
+
let CacheRedisTest = (_dec$B = CacheRedis({
|
|
1544
1552
|
ttl: 1 * 1000
|
|
1545
|
-
}), _dec2$
|
|
1553
|
+
}), _dec2$B = BeanInfo({
|
|
1546
1554
|
module: "test-vona"
|
|
1547
|
-
}), _dec$
|
|
1555
|
+
}), _dec$B(_class$B = _dec2$B(_class$B = class CacheRedisTest extends BeanCacheRedisBase {}) || _class$B) || _class$B);
|
|
1548
1556
|
|
|
1549
|
-
var _dec$
|
|
1550
|
-
let EventHelloEcho = (_dec$
|
|
1557
|
+
var _dec$A, _dec2$A, _class$A;
|
|
1558
|
+
let EventHelloEcho = (_dec$A = Event(), _dec2$A = BeanInfo({
|
|
1551
1559
|
module: "test-vona"
|
|
1552
|
-
}), _dec$
|
|
1560
|
+
}), _dec$A(_class$A = _dec2$A(_class$A = class EventHelloEcho extends BeanEventBase {}) || _class$A) || _class$A);
|
|
1553
1561
|
|
|
1554
|
-
var _dec$
|
|
1555
|
-
let EventListenerHelloEcho = (_dec$
|
|
1562
|
+
var _dec$z, _dec2$z, _class$z;
|
|
1563
|
+
let EventListenerHelloEcho = (_dec$z = EventListener({
|
|
1556
1564
|
match: 'test-vona:helloEcho'
|
|
1557
|
-
}), _dec2$
|
|
1565
|
+
}), _dec2$z = BeanInfo({
|
|
1558
1566
|
module: "test-vona"
|
|
1559
|
-
}), _dec$
|
|
1567
|
+
}), _dec$z(_class$z = _dec2$z(_class$z = class EventListenerHelloEcho extends BeanBase {
|
|
1560
1568
|
async execute(data, next) {
|
|
1561
1569
|
// next
|
|
1562
1570
|
const result = await next();
|
|
1563
1571
|
return `${data.text} ${result}`;
|
|
1564
1572
|
}
|
|
1565
|
-
}) || _class$
|
|
1573
|
+
}) || _class$z) || _class$z);
|
|
1566
1574
|
|
|
1567
|
-
var _dec$
|
|
1568
|
-
let MetaVersion = (_dec$
|
|
1575
|
+
var _dec$y, _dec2$y, _class$y;
|
|
1576
|
+
let MetaVersion = (_dec$y = Meta(), _dec2$y = BeanInfo({
|
|
1569
1577
|
module: "test-vona"
|
|
1570
|
-
}), _dec$
|
|
1578
|
+
}), _dec$y(_class$y = _dec2$y(_class$y = class MetaVersion extends BeanBase {
|
|
1571
1579
|
async update(options) {
|
|
1572
1580
|
if (options.version === 1) {
|
|
1573
1581
|
// testVonaTest
|
|
@@ -1642,49 +1650,67 @@ let MetaVersion = (_dec$v = Meta(), _dec2$v = BeanInfo({
|
|
|
1642
1650
|
});
|
|
1643
1651
|
}
|
|
1644
1652
|
}
|
|
1645
|
-
|
|
1653
|
+
async test(_options) {
|
|
1654
|
+
// user: Kevin
|
|
1655
|
+
const userKevin = await this.scope.model.user.insert({
|
|
1656
|
+
name: 'Kevin'
|
|
1657
|
+
});
|
|
1658
|
+
// create: post/postContent
|
|
1659
|
+
await this.scope.model.post.insert({
|
|
1660
|
+
title: 'test:post001',
|
|
1661
|
+
postContent: {
|
|
1662
|
+
content: 'this is a test post!'
|
|
1663
|
+
},
|
|
1664
|
+
userId: userKevin?.id
|
|
1665
|
+
}, {
|
|
1666
|
+
include: {
|
|
1667
|
+
postContent: true
|
|
1668
|
+
}
|
|
1669
|
+
});
|
|
1670
|
+
}
|
|
1671
|
+
}) || _class$y) || _class$y);
|
|
1646
1672
|
|
|
1647
|
-
var _dec$
|
|
1648
|
-
let QueueTest = (_dec$
|
|
1673
|
+
var _dec$x, _dec2$x, _class$x;
|
|
1674
|
+
let QueueTest = (_dec$x = Queue(), _dec2$x = BeanInfo({
|
|
1649
1675
|
module: "test-vona"
|
|
1650
|
-
}), _dec$
|
|
1676
|
+
}), _dec$x(_class$x = _dec2$x(_class$x = class QueueTest extends BeanQueueBase {
|
|
1651
1677
|
async execute(data, _options) {
|
|
1652
1678
|
const res = data.a + data.b;
|
|
1653
1679
|
this.$logger.silly(`queue test worker done: ${data.a} + ${data.b} = ${res}`);
|
|
1654
1680
|
return res;
|
|
1655
1681
|
}
|
|
1656
|
-
}) || _class$
|
|
1682
|
+
}) || _class$x) || _class$x);
|
|
1657
1683
|
|
|
1658
|
-
var _dec$
|
|
1659
|
-
let ScheduleTest = (_dec$
|
|
1684
|
+
var _dec$w, _dec2$w, _class$w;
|
|
1685
|
+
let ScheduleTest = (_dec$w = Schedule({
|
|
1660
1686
|
enable: false,
|
|
1661
1687
|
repeat: {
|
|
1662
1688
|
every: 3000
|
|
1663
1689
|
}
|
|
1664
|
-
}), _dec2$
|
|
1690
|
+
}), _dec2$w = BeanInfo({
|
|
1665
1691
|
module: "test-vona"
|
|
1666
|
-
}), _dec$
|
|
1692
|
+
}), _dec$w(_class$w = _dec2$w(_class$w = class ScheduleTest extends BeanBase {
|
|
1667
1693
|
async execute(job) {
|
|
1668
1694
|
this.$logger.silly(`Schedule Test: iid=${this.ctx.instance.id}, every=${job?.data.options?.jobOptions?.repeat?.every}, ${new Date()}`);
|
|
1669
1695
|
}
|
|
1670
|
-
}) || _class$
|
|
1696
|
+
}) || _class$w) || _class$w);
|
|
1671
1697
|
|
|
1672
|
-
var _dec$
|
|
1673
|
-
let ScheduleTest3 = (_dec$
|
|
1698
|
+
var _dec$v, _dec2$v, _class$v;
|
|
1699
|
+
let ScheduleTest3 = (_dec$v = Schedule({
|
|
1674
1700
|
enable: false,
|
|
1675
1701
|
repeat: {
|
|
1676
1702
|
every: 5000
|
|
1677
1703
|
}
|
|
1678
|
-
}), _dec2$
|
|
1704
|
+
}), _dec2$v = BeanInfo({
|
|
1679
1705
|
module: "test-vona"
|
|
1680
|
-
}), _dec$
|
|
1706
|
+
}), _dec$v(_class$v = _dec2$v(_class$v = class ScheduleTest3 extends BeanBase {
|
|
1681
1707
|
async execute(job) {
|
|
1682
1708
|
this.$logger.silly(`Schedule Test3: iid=${this.ctx.instance.id}, every=${job?.data.options?.jobOptions?.repeat?.every}, ${new Date()}`);
|
|
1683
1709
|
}
|
|
1684
|
-
}) || _class$
|
|
1710
|
+
}) || _class$v) || _class$v);
|
|
1685
1711
|
|
|
1686
|
-
var _dec$
|
|
1687
|
-
let SummerCacheTest = (_dec$
|
|
1712
|
+
var _dec$u, _dec2$u, _class$u;
|
|
1713
|
+
let SummerCacheTest = (_dec$u = SummerCache({
|
|
1688
1714
|
mode: 'all',
|
|
1689
1715
|
mem: {
|
|
1690
1716
|
max: 2,
|
|
@@ -1693,198 +1719,232 @@ let SummerCacheTest = (_dec$r = SummerCache({
|
|
|
1693
1719
|
redis: {
|
|
1694
1720
|
ttl: 3 * 1000
|
|
1695
1721
|
}
|
|
1696
|
-
}), _dec2$
|
|
1722
|
+
}), _dec2$u = BeanInfo({
|
|
1697
1723
|
module: "test-vona"
|
|
1698
|
-
}), _dec$
|
|
1724
|
+
}), _dec$u(_class$u = _dec2$u(_class$u = class SummerCacheTest extends BeanSummerCacheBase {
|
|
1699
1725
|
async getNative(key, _options) {
|
|
1700
1726
|
return {
|
|
1701
1727
|
id: key.id,
|
|
1702
1728
|
name: `name_${key.id}`
|
|
1703
1729
|
};
|
|
1704
1730
|
}
|
|
1705
|
-
}) || _class$
|
|
1731
|
+
}) || _class$u) || _class$u);
|
|
1706
1732
|
|
|
1707
|
-
var _dec$
|
|
1708
|
-
let DtoCategoryTree = (_dec$
|
|
1733
|
+
var _dec$t, _dec2$t, _class$t;
|
|
1734
|
+
let DtoCategoryTree = (_dec$t = Dto(), _dec2$t = BeanInfo({
|
|
1709
1735
|
module: "test-vona"
|
|
1710
|
-
}), _dec$
|
|
1736
|
+
}), _dec$t(_class$t = _dec2$t(_class$t = class DtoCategoryTree extends $Dto.get('test-vona:category', {
|
|
1711
1737
|
columns: ['id', 'name']
|
|
1712
|
-
}) {}) || _class$
|
|
1738
|
+
}) {}) || _class$t) || _class$t);
|
|
1713
1739
|
|
|
1714
|
-
var _dec$
|
|
1715
|
-
let DtoOrderCreate = (_dec$
|
|
1740
|
+
var _dec$s, _dec2$s, _class$s;
|
|
1741
|
+
let DtoOrderCreate = (_dec$s = Dto(), _dec2$s = BeanInfo({
|
|
1716
1742
|
module: "test-vona"
|
|
1717
|
-
}), _dec$
|
|
1743
|
+
}), _dec$s(_class$s = _dec2$s(_class$s = class DtoOrderCreate extends $Dto.create(() => ModelOrder, {
|
|
1718
1744
|
columns: ['orderNo', 'remark']
|
|
1719
|
-
}) {}) || _class$
|
|
1745
|
+
}) {}) || _class$s) || _class$s);
|
|
1720
1746
|
|
|
1721
|
-
var _dec$
|
|
1722
|
-
let DtoOrderResult = (_dec$
|
|
1747
|
+
var _dec$r, _dec2$r, _class$r;
|
|
1748
|
+
let DtoOrderResult = (_dec$r = Dto(), _dec2$r = BeanInfo({
|
|
1723
1749
|
module: "test-vona"
|
|
1724
|
-
}), _dec$
|
|
1750
|
+
}), _dec$r(_class$r = _dec2$r(_class$r = class DtoOrderResult extends $Dto.get(() => ModelOrder) {}) || _class$r) || _class$r);
|
|
1725
1751
|
|
|
1726
|
-
var _dec$
|
|
1727
|
-
let DtoOrderUpdate = (_dec$
|
|
1752
|
+
var _dec$q, _dec2$q, _class$q;
|
|
1753
|
+
let DtoOrderUpdate = (_dec$q = Dto(), _dec2$q = BeanInfo({
|
|
1728
1754
|
module: "test-vona"
|
|
1729
|
-
}), _dec$
|
|
1755
|
+
}), _dec$q(_class$q = _dec2$q(_class$q = class DtoOrderUpdate extends $Dto.update(() => ModelOrder, {
|
|
1730
1756
|
columns: ['orderNo', 'remark']
|
|
1731
|
-
}) {}) || _class$
|
|
1757
|
+
}) {}) || _class$q) || _class$q);
|
|
1732
1758
|
|
|
1733
|
-
var _dec$
|
|
1734
|
-
let DtoPostCreate = (_dec$
|
|
1759
|
+
var _dec$p, _dec2$p, _class$p;
|
|
1760
|
+
let DtoPostCreate = (_dec$p = Dto({
|
|
1735
1761
|
independent: true
|
|
1736
|
-
}), _dec2$
|
|
1762
|
+
}), _dec2$p = BeanInfo({
|
|
1763
|
+
module: "test-vona"
|
|
1764
|
+
}), _dec$p(_class$p = _dec2$p(_class$p = class DtoPostCreate extends $Dto.create(() => ModelPost) {}) || _class$p) || _class$p);
|
|
1765
|
+
|
|
1766
|
+
var _dec$o, _dec2$o, _dec3$k, _dec4$k, _class$o, _class2$k, _descriptor$5;
|
|
1767
|
+
let DtoPostQuery = (_dec$o = Dto(), _dec2$o = BeanInfo({
|
|
1768
|
+
module: "test-vona"
|
|
1769
|
+
}), _dec3$k = Api.field(v.optional(), v.openapi({
|
|
1770
|
+
query: {
|
|
1771
|
+
join: {
|
|
1772
|
+
type: 'innerJoin',
|
|
1773
|
+
table: 'testVonaUser',
|
|
1774
|
+
on: ['userId', 'testVonaUser.id']
|
|
1775
|
+
},
|
|
1776
|
+
originalName: 'name',
|
|
1777
|
+
op: '_eq_'
|
|
1778
|
+
}
|
|
1779
|
+
})), _dec4$k = Reflect.metadata("design:type", String), _dec$o(_class$o = _dec2$o(_class$o = (_class2$k = class DtoPostQuery extends $Dto.queryPage(EntityPost, ['title']) {
|
|
1780
|
+
constructor(...args) {
|
|
1781
|
+
super(...args);
|
|
1782
|
+
_initializerDefineProperty(this, "userName", _descriptor$5, this);
|
|
1783
|
+
}
|
|
1784
|
+
}, _descriptor$5 = _applyDecoratedDescriptor(_class2$k.prototype, "userName", [_dec3$k, _dec4$k], {
|
|
1785
|
+
configurable: true,
|
|
1786
|
+
enumerable: true,
|
|
1787
|
+
writable: true,
|
|
1788
|
+
initializer: null
|
|
1789
|
+
}), _class2$k)) || _class$o) || _class$o);
|
|
1790
|
+
|
|
1791
|
+
var _dec$n, _dec2$n, _class$n;
|
|
1792
|
+
let DtoPostQueryRes = (_dec$n = Dto(), _dec2$n = BeanInfo({
|
|
1737
1793
|
module: "test-vona"
|
|
1738
|
-
}), _dec$
|
|
1794
|
+
}), _dec$n(_class$n = _dec2$n(_class$n = class DtoPostQueryRes extends $Dto.selectAndCount(() => ModelPost, {
|
|
1795
|
+
include: {
|
|
1796
|
+
postContent: true
|
|
1797
|
+
}
|
|
1798
|
+
}) {}) || _class$n) || _class$n);
|
|
1739
1799
|
|
|
1740
|
-
var _dec$
|
|
1741
|
-
let DtoProfile = (_dec$
|
|
1800
|
+
var _dec$m, _dec2$m, _dec3$j, _dec4$j, _dec5$j, _dec6$j, _class$m, _class2$j, _descriptor$4, _descriptor2$4;
|
|
1801
|
+
let DtoProfile = (_dec$m = Dto(), _dec2$m = BeanInfo({
|
|
1742
1802
|
module: "test-vona"
|
|
1743
|
-
}), _dec3$
|
|
1803
|
+
}), _dec3$j = Api.field(), _dec4$j = Reflect.metadata("design:type", Number), _dec5$j = Api.field(v.email()), _dec6$j = Reflect.metadata("design:type", String), _dec$m(_class$m = _dec2$m(_class$m = (_class2$j = class DtoProfile {
|
|
1744
1804
|
constructor() {
|
|
1745
1805
|
_initializerDefineProperty(this, "id", _descriptor$4, this);
|
|
1746
1806
|
_initializerDefineProperty(this, "email", _descriptor2$4, this);
|
|
1747
1807
|
}
|
|
1748
|
-
}, _descriptor$4 = _applyDecoratedDescriptor(_class2$
|
|
1808
|
+
}, _descriptor$4 = _applyDecoratedDescriptor(_class2$j.prototype, "id", [_dec3$j, _dec4$j], {
|
|
1749
1809
|
configurable: true,
|
|
1750
1810
|
enumerable: true,
|
|
1751
1811
|
writable: true,
|
|
1752
1812
|
initializer: null
|
|
1753
|
-
}), _descriptor2$4 = _applyDecoratedDescriptor(_class2$
|
|
1813
|
+
}), _descriptor2$4 = _applyDecoratedDescriptor(_class2$j.prototype, "email", [_dec5$j, _dec6$j], {
|
|
1754
1814
|
configurable: true,
|
|
1755
1815
|
enumerable: true,
|
|
1756
1816
|
writable: true,
|
|
1757
1817
|
initializer: null
|
|
1758
|
-
}), _class2$
|
|
1818
|
+
}), _class2$j)) || _class$m) || _class$m);
|
|
1759
1819
|
|
|
1760
|
-
var _dec$
|
|
1761
|
-
let DtoUserLazy = (_dec$
|
|
1820
|
+
var _dec$l, _dec2$l, _dec3$i, _dec4$i, _dec5$i, _dec6$i, _dec7$g, _dec8$c, _class$l, _class2$i, _descriptor$3, _descriptor2$3, _descriptor3$1;
|
|
1821
|
+
let DtoUserLazy = (_dec$l = Dto(), _dec2$l = BeanInfo({
|
|
1762
1822
|
module: "test-vona"
|
|
1763
|
-
}), _dec3$
|
|
1823
|
+
}), _dec3$i = Api.field(), _dec4$i = Reflect.metadata("design:type", String), _dec5$i = Api.field(v.lazy(v.optional(), () => DtoUserLazy)), _dec6$i = Reflect.metadata("design:type", Object), _dec7$g = Api.field(v.optional(), v.array(v.lazy(() => DtoRoleLazy))), _dec8$c = Reflect.metadata("design:type", Array), _dec$l(_class$l = _dec2$l(_class$l = (_class2$i = class DtoUserLazy {
|
|
1764
1824
|
constructor() {
|
|
1765
1825
|
_initializerDefineProperty(this, "name", _descriptor$3, this);
|
|
1766
1826
|
_initializerDefineProperty(this, "user", _descriptor2$3, this);
|
|
1767
1827
|
_initializerDefineProperty(this, "roles", _descriptor3$1, this);
|
|
1768
1828
|
}
|
|
1769
|
-
}, _descriptor$3 = _applyDecoratedDescriptor(_class2$
|
|
1829
|
+
}, _descriptor$3 = _applyDecoratedDescriptor(_class2$i.prototype, "name", [_dec3$i, _dec4$i], {
|
|
1770
1830
|
configurable: true,
|
|
1771
1831
|
enumerable: true,
|
|
1772
1832
|
writable: true,
|
|
1773
1833
|
initializer: null
|
|
1774
|
-
}), _descriptor2$3 = _applyDecoratedDescriptor(_class2$
|
|
1834
|
+
}), _descriptor2$3 = _applyDecoratedDescriptor(_class2$i.prototype, "user", [_dec5$i, _dec6$i], {
|
|
1775
1835
|
configurable: true,
|
|
1776
1836
|
enumerable: true,
|
|
1777
1837
|
writable: true,
|
|
1778
1838
|
initializer: null
|
|
1779
|
-
}), _descriptor3$1 = _applyDecoratedDescriptor(_class2$
|
|
1839
|
+
}), _descriptor3$1 = _applyDecoratedDescriptor(_class2$i.prototype, "roles", [_dec7$g, _dec8$c], {
|
|
1780
1840
|
configurable: true,
|
|
1781
1841
|
enumerable: true,
|
|
1782
1842
|
writable: true,
|
|
1783
1843
|
initializer: null
|
|
1784
|
-
}), _class2$
|
|
1844
|
+
}), _class2$i)) || _class$l) || _class$l);
|
|
1785
1845
|
|
|
1786
|
-
var _dec$
|
|
1787
|
-
let DtoRoleLazy = (_dec$
|
|
1846
|
+
var _dec$k, _dec2$k, _dec3$h, _dec4$h, _dec5$h, _dec6$h, _class$k, _class2$h, _descriptor$2, _descriptor2$2;
|
|
1847
|
+
let DtoRoleLazy = (_dec$k = Dto(), _dec2$k = BeanInfo({
|
|
1788
1848
|
module: "test-vona"
|
|
1789
|
-
}), _dec3$
|
|
1849
|
+
}), _dec3$h = Api.field(), _dec4$h = Reflect.metadata("design:type", String), _dec5$h = Api.field(v.optional(), v.array(v.lazy(() => DtoUserLazy))), _dec6$h = Reflect.metadata("design:type", Array), _dec$k(_class$k = _dec2$k(_class$k = (_class2$h = class DtoRoleLazy {
|
|
1790
1850
|
constructor() {
|
|
1791
1851
|
_initializerDefineProperty(this, "name", _descriptor$2, this);
|
|
1792
1852
|
_initializerDefineProperty(this, "users", _descriptor2$2, this);
|
|
1793
1853
|
}
|
|
1794
|
-
}, _descriptor$2 = _applyDecoratedDescriptor(_class2$
|
|
1854
|
+
}, _descriptor$2 = _applyDecoratedDescriptor(_class2$h.prototype, "name", [_dec3$h, _dec4$h], {
|
|
1795
1855
|
configurable: true,
|
|
1796
1856
|
enumerable: true,
|
|
1797
1857
|
writable: true,
|
|
1798
1858
|
initializer: null
|
|
1799
|
-
}), _descriptor2$2 = _applyDecoratedDescriptor(_class2$
|
|
1859
|
+
}), _descriptor2$2 = _applyDecoratedDescriptor(_class2$h.prototype, "users", [_dec5$h, _dec6$h], {
|
|
1800
1860
|
configurable: true,
|
|
1801
1861
|
enumerable: true,
|
|
1802
1862
|
writable: true,
|
|
1803
1863
|
initializer: null
|
|
1804
|
-
}), _class2$
|
|
1864
|
+
}), _class2$h)) || _class$k) || _class$k);
|
|
1805
1865
|
|
|
1806
|
-
var _dec$
|
|
1807
|
-
let DtoSignin = (_dec$
|
|
1866
|
+
var _dec$j, _dec2$j, _dec3$g, _dec4$g, _dec5$g, _dec6$g, _class$j, _class2$g, _descriptor$1, _descriptor2$1;
|
|
1867
|
+
let DtoSignin = (_dec$j = Dto(), _dec2$j = BeanInfo({
|
|
1808
1868
|
module: "test-vona"
|
|
1809
|
-
}), _dec3$
|
|
1869
|
+
}), _dec3$g = Api.field(), _dec4$g = Reflect.metadata("design:type", String), _dec5$g = Api.field(v.min(3)), _dec6$g = Reflect.metadata("design:type", String), _dec$j(_class$j = _dec2$j(_class$j = (_class2$g = class DtoSignin {
|
|
1810
1870
|
constructor() {
|
|
1811
1871
|
_initializerDefineProperty(this, "username", _descriptor$1, this);
|
|
1812
1872
|
_initializerDefineProperty(this, "password", _descriptor2$1, this);
|
|
1813
1873
|
}
|
|
1814
|
-
}, _descriptor$1 = _applyDecoratedDescriptor(_class2$
|
|
1874
|
+
}, _descriptor$1 = _applyDecoratedDescriptor(_class2$g.prototype, "username", [_dec3$g, _dec4$g], {
|
|
1815
1875
|
configurable: true,
|
|
1816
1876
|
enumerable: true,
|
|
1817
1877
|
writable: true,
|
|
1818
1878
|
initializer: null
|
|
1819
|
-
}), _descriptor2$1 = _applyDecoratedDescriptor(_class2$
|
|
1879
|
+
}), _descriptor2$1 = _applyDecoratedDescriptor(_class2$g.prototype, "password", [_dec5$g, _dec6$g], {
|
|
1820
1880
|
configurable: true,
|
|
1821
1881
|
enumerable: true,
|
|
1822
1882
|
writable: true,
|
|
1823
1883
|
initializer: null
|
|
1824
|
-
}), _class2$
|
|
1884
|
+
}), _class2$g)) || _class$j) || _class$j);
|
|
1825
1885
|
|
|
1826
|
-
var _dec$
|
|
1827
|
-
let DtoUser = (_dec$
|
|
1886
|
+
var _dec$i, _dec2$i, _dec3$f, _dec4$f, _dec5$f, _dec6$f, _dec7$f, _dec8$b, _class$i, _class2$f, _descriptor, _descriptor2, _descriptor3;
|
|
1887
|
+
let DtoUser = (_dec$i = Dto({
|
|
1828
1888
|
openapi: {
|
|
1829
1889
|
title: $locale('User')
|
|
1830
1890
|
}
|
|
1831
|
-
}), _dec2$
|
|
1891
|
+
}), _dec2$i = BeanInfo({
|
|
1832
1892
|
module: "test-vona"
|
|
1833
|
-
}), _dec3$
|
|
1893
|
+
}), _dec3$f = Api.field(v.title($locale('UserId')), v.tableIdentity()), _dec4$f = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec5$f = Api.field(v.min(3)), _dec6$f = Reflect.metadata("design:type", String), _dec7$f = Api.field(), _dec8$b = Reflect.metadata("design:type", Boolean), _dec$i(_class$i = _dec2$i(_class$i = (_class2$f = class DtoUser {
|
|
1834
1894
|
constructor() {
|
|
1835
1895
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
1836
1896
|
_initializerDefineProperty(this, "name", _descriptor2, this);
|
|
1837
1897
|
_initializerDefineProperty(this, "married", _descriptor3, this);
|
|
1838
1898
|
}
|
|
1839
|
-
}, _descriptor = _applyDecoratedDescriptor(_class2$
|
|
1899
|
+
}, _descriptor = _applyDecoratedDescriptor(_class2$f.prototype, "id", [_dec3$f, _dec4$f], {
|
|
1840
1900
|
configurable: true,
|
|
1841
1901
|
enumerable: true,
|
|
1842
1902
|
writable: true,
|
|
1843
1903
|
initializer: null
|
|
1844
|
-
}), _descriptor2 = _applyDecoratedDescriptor(_class2$
|
|
1904
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2$f.prototype, "name", [_dec5$f, _dec6$f], {
|
|
1845
1905
|
configurable: true,
|
|
1846
1906
|
enumerable: true,
|
|
1847
1907
|
writable: true,
|
|
1848
1908
|
initializer: null
|
|
1849
|
-
}), _descriptor3 = _applyDecoratedDescriptor(_class2$
|
|
1909
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2$f.prototype, "married", [_dec7$f, _dec8$b], {
|
|
1850
1910
|
configurable: true,
|
|
1851
1911
|
enumerable: true,
|
|
1852
1912
|
writable: true,
|
|
1853
1913
|
initializer: null
|
|
1854
|
-
}), _class2$
|
|
1914
|
+
}), _class2$f)) || _class$i) || _class$i);
|
|
1855
1915
|
|
|
1856
|
-
var _dec$
|
|
1857
|
-
let DtoUserCreate = (_dec$
|
|
1916
|
+
var _dec$h, _dec2$h, _class$h;
|
|
1917
|
+
let DtoUserCreate = (_dec$h = Dto({
|
|
1858
1918
|
independent: true
|
|
1859
|
-
}), _dec2$
|
|
1919
|
+
}), _dec2$h = BeanInfo({
|
|
1860
1920
|
module: "test-vona"
|
|
1861
|
-
}), _dec$
|
|
1921
|
+
}), _dec$h(_class$h = _dec2$h(_class$h = class DtoUserCreate extends $Dto.create('test-vona:user', {
|
|
1862
1922
|
include: {
|
|
1863
1923
|
roles: true,
|
|
1864
1924
|
posts: true
|
|
1865
1925
|
}
|
|
1866
|
-
}) {}) || _class$
|
|
1926
|
+
}) {}) || _class$h) || _class$h);
|
|
1867
1927
|
|
|
1868
|
-
var _dec$
|
|
1869
|
-
let DtoUserUpdate = (_dec$
|
|
1928
|
+
var _dec$g, _dec2$g, _class$g;
|
|
1929
|
+
let DtoUserUpdate = (_dec$g = Dto(), _dec2$g = BeanInfo({
|
|
1870
1930
|
module: "test-vona"
|
|
1871
|
-
}), _dec$
|
|
1931
|
+
}), _dec$g(_class$g = _dec2$g(_class$g = class DtoUserUpdate extends $Dto.update('test-vona:user', {
|
|
1872
1932
|
include: {
|
|
1873
1933
|
posts: true
|
|
1874
1934
|
}
|
|
1875
|
-
}) {}) || _class$
|
|
1935
|
+
}) {}) || _class$g) || _class$g);
|
|
1876
1936
|
|
|
1877
1937
|
const __ThisModule__ = 'test-vona';
|
|
1878
1938
|
|
|
1879
|
-
var _dec$
|
|
1880
|
-
let ControllerBean = (_dec$
|
|
1939
|
+
var _dec$f, _dec2$f, _dec3$e, _dec4$e, _dec5$e, _dec6$e, _dec7$e, _dec8$a, _dec9$8, _dec0$8, _dec1$8, _class$f, _class2$e;
|
|
1940
|
+
let ControllerBean = (_dec$f = Controller({
|
|
1881
1941
|
path: 'bean',
|
|
1882
1942
|
meta: {
|
|
1883
1943
|
mode: 'test'
|
|
1884
1944
|
}
|
|
1885
|
-
}), _dec2$
|
|
1945
|
+
}), _dec2$f = Api.exclude(), _dec3$e = Passport.public(), _dec4$e = BeanInfo({
|
|
1886
1946
|
module: "test-vona"
|
|
1887
|
-
}), _dec5$
|
|
1947
|
+
}), _dec5$e = Web.get('test'), _dec6$e = Reflect.metadata("design:type", Function), _dec7$e = Reflect.metadata("design:paramtypes", []), _dec8$a = Web.get('service'), _dec9$8 = Passport.public(), _dec0$8 = Reflect.metadata("design:type", Function), _dec1$8 = Reflect.metadata("design:paramtypes", []), _dec$f(_class$f = _dec2$f(_class$f = _dec3$e(_class$f = _dec4$e(_class$f = (_class2$e = class ControllerBean extends BeanBase {
|
|
1888
1948
|
async test() {
|
|
1889
1949
|
const a = 3;
|
|
1890
1950
|
const b = 4;
|
|
@@ -1974,17 +2034,17 @@ let ControllerBean = (_dec$e = Controller({
|
|
|
1974
2034
|
res = this.$scope.testVona.service.test.name;
|
|
1975
2035
|
assert.equal(res, 'serviceTest');
|
|
1976
2036
|
}
|
|
1977
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
2037
|
+
}, _applyDecoratedDescriptor(_class2$e.prototype, "test", [_dec5$e, _dec6$e, _dec7$e], Object.getOwnPropertyDescriptor(_class2$e.prototype, "test"), _class2$e.prototype), _applyDecoratedDescriptor(_class2$e.prototype, "service", [_dec8$a, _dec9$8, _dec0$8, _dec1$8], Object.getOwnPropertyDescriptor(_class2$e.prototype, "service"), _class2$e.prototype), _class2$e)) || _class$f) || _class$f) || _class$f) || _class$f);
|
|
1978
2038
|
|
|
1979
|
-
var _dec$
|
|
1980
|
-
let ControllerCacheMem = (_dec$
|
|
2039
|
+
var _dec$e, _dec2$e, _dec3$d, _dec4$d, _dec5$d, _dec6$d, _dec7$d, _class$e, _class2$d;
|
|
2040
|
+
let ControllerCacheMem = (_dec$e = Controller({
|
|
1981
2041
|
path: 'cacheMem',
|
|
1982
2042
|
meta: {
|
|
1983
2043
|
mode: 'test'
|
|
1984
2044
|
}
|
|
1985
|
-
}), _dec2$
|
|
2045
|
+
}), _dec2$e = Api.exclude(), _dec3$d = Passport.public(), _dec4$d = BeanInfo({
|
|
1986
2046
|
module: "test-vona"
|
|
1987
|
-
}), _dec5$
|
|
2047
|
+
}), _dec5$d = Web.post(), _dec6$d = Reflect.metadata("design:type", Function), _dec7$d = Reflect.metadata("design:paramtypes", []), _dec$e(_class$e = _dec2$e(_class$e = _dec3$d(_class$e = _dec4$d(_class$e = (_class2$d = class ControllerCacheMem extends BeanBase {
|
|
1988
2048
|
async mem() {
|
|
1989
2049
|
let res;
|
|
1990
2050
|
let value;
|
|
@@ -2039,17 +2099,17 @@ let ControllerCacheMem = (_dec$d = Controller({
|
|
|
2039
2099
|
assert.equal(value, undefined);
|
|
2040
2100
|
});
|
|
2041
2101
|
}
|
|
2042
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
2102
|
+
}, _applyDecoratedDescriptor(_class2$d.prototype, "mem", [_dec5$d, _dec6$d, _dec7$d], Object.getOwnPropertyDescriptor(_class2$d.prototype, "mem"), _class2$d.prototype), _class2$d)) || _class$e) || _class$e) || _class$e) || _class$e);
|
|
2043
2103
|
|
|
2044
|
-
var _dec$
|
|
2045
|
-
let ControllerCacheRedis = (_dec$
|
|
2104
|
+
var _dec$d, _dec2$d, _dec3$c, _dec4$c, _dec5$c, _dec6$c, _dec7$c, _class$d, _class2$c;
|
|
2105
|
+
let ControllerCacheRedis = (_dec$d = Controller({
|
|
2046
2106
|
path: 'cacheRedis',
|
|
2047
2107
|
meta: {
|
|
2048
2108
|
mode: 'test'
|
|
2049
2109
|
}
|
|
2050
|
-
}), _dec2$
|
|
2110
|
+
}), _dec2$d = Api.exclude(), _dec3$c = Passport.public(), _dec4$c = BeanInfo({
|
|
2051
2111
|
module: "test-vona"
|
|
2052
|
-
}), _dec5$
|
|
2112
|
+
}), _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 ControllerCacheRedis extends BeanBase {
|
|
2053
2113
|
async redis() {
|
|
2054
2114
|
let res;
|
|
2055
2115
|
let value;
|
|
@@ -2090,32 +2150,32 @@ let ControllerCacheRedis = (_dec$c = Controller({
|
|
|
2090
2150
|
assert.equal(value, undefined);
|
|
2091
2151
|
});
|
|
2092
2152
|
}
|
|
2093
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
2153
|
+
}, _applyDecoratedDescriptor(_class2$c.prototype, "redis", [_dec5$c, _dec6$c, _dec7$c], Object.getOwnPropertyDescriptor(_class2$c.prototype, "redis"), _class2$c.prototype), _class2$c)) || _class$d) || _class$d) || _class$d) || _class$d);
|
|
2094
2154
|
|
|
2095
|
-
var _dec$
|
|
2096
|
-
let ControllerCaptcha = (_dec$
|
|
2155
|
+
var _dec$c, _dec2$c, _dec3$b, _dec4$b, _dec5$b, _dec6$b, _dec7$b, _dec8$9, _class$c, _class2$b;
|
|
2156
|
+
let ControllerCaptcha = (_dec$c = Controller({
|
|
2097
2157
|
path: 'captcha',
|
|
2098
2158
|
meta: {
|
|
2099
2159
|
mode: ['test', 'dev']
|
|
2100
2160
|
}
|
|
2101
|
-
}), _dec2$
|
|
2161
|
+
}), _dec2$c = BeanInfo({
|
|
2102
2162
|
module: "test-vona"
|
|
2103
|
-
}), _dec3$
|
|
2163
|
+
}), _dec3$b = Web.post('signin'), _dec4$b = Passport.public(), _dec5$b = Aspect.middleware('a-captcha:captcha', {
|
|
2104
2164
|
scene: 'a-captchasimple:simple'
|
|
2105
|
-
}), _dec6$
|
|
2165
|
+
}), _dec6$b = function (target, key) {
|
|
2106
2166
|
return Arg.body()(target, key, 0);
|
|
2107
|
-
}, _dec7$
|
|
2167
|
+
}, _dec7$b = Reflect.metadata("design:type", Function), _dec8$9 = Reflect.metadata("design:paramtypes", [typeof DtoSignin === "undefined" ? Object : DtoSignin]), _dec$c(_class$c = _dec2$c(_class$c = (_class2$b = class ControllerCaptcha extends BeanBase {
|
|
2108
2168
|
async signin(_user) {}
|
|
2109
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
2169
|
+
}, _applyDecoratedDescriptor(_class2$b.prototype, "signin", [_dec3$b, _dec4$b, _dec5$b, _dec6$b, _dec7$b, _dec8$9], Object.getOwnPropertyDescriptor(_class2$b.prototype, "signin"), _class2$b.prototype), _class2$b)) || _class$c) || _class$c);
|
|
2110
2170
|
|
|
2111
|
-
var _dec$
|
|
2112
|
-
let ControllerDtoTest = (_dec$
|
|
2171
|
+
var _dec$b, _dec2$b, _dec3$a, _dec4$a, _dec5$a, _dec6$a, _dec7$a, _dec8$8, _dec9$7, _dec0$7, _dec1$7, _dec10$6, _dec11$6, _dec12$6, _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$b, _class2$a;
|
|
2172
|
+
let ControllerDtoTest = (_dec$b = Controller('dtoTest', {
|
|
2113
2173
|
meta: {
|
|
2114
2174
|
mode: ['test', 'dev']
|
|
2115
2175
|
}
|
|
2116
|
-
}), _dec2$
|
|
2176
|
+
}), _dec2$b = BeanInfo({
|
|
2117
2177
|
module: "test-vona"
|
|
2118
|
-
}), _dec3$
|
|
2178
|
+
}), _dec3$a = Web.get('getUserLazy'), _dec4$a = Reflect.metadata("design:type", Function), _dec5$a = Reflect.metadata("design:paramtypes", []), _dec6$a = Web.get('getUserDynamic'), _dec7$a = Api.body($Dto.get('test-vona:post')), _dec8$8 = Reflect.metadata("design:type", Function), _dec9$7 = Reflect.metadata("design:paramtypes", []), _dec0$7 = Web.get('getUserStats'), _dec1$7 = Api.body($Dto.get('test-vona:userStats')), _dec10$6 = Reflect.metadata("design:type", Function), _dec11$6 = Reflect.metadata("design:paramtypes", []), _dec12$6 = 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) {
|
|
2119
2179
|
return Arg.body(v.object(DtoUserCreate))(target, key, 0);
|
|
2120
2180
|
}, _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) {
|
|
2121
2181
|
return Arg.param('id')(target, key, 0);
|
|
@@ -2123,7 +2183,7 @@ let ControllerDtoTest = (_dec$a = Controller('dtoTest', {
|
|
|
2123
2183
|
return Arg.body(v.object(DtoUserUpdate))(target, key, 1);
|
|
2124
2184
|
}, _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', {
|
|
2125
2185
|
columns: ['id', 'name']
|
|
2126
|
-
}))), _dec27$2 = Reflect.metadata("design:type", Function), _dec28$1 = Reflect.metadata("design:paramtypes", []), _dec29$1 = Web.get('getCategoryTree2'), _dec30$1 = Api.body(v.array(DtoCategoryTree)), _dec31$1 = Reflect.metadata("design:type", Function), _dec32$1 = Reflect.metadata("design:paramtypes", []), _dec$
|
|
2186
|
+
}))), _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$b(_class$b = _dec2$b(_class$b = (_class2$a = class ControllerDtoTest extends BeanBase {
|
|
2127
2187
|
getUserLazy() {
|
|
2128
2188
|
return {};
|
|
2129
2189
|
}
|
|
@@ -2152,59 +2212,59 @@ let ControllerDtoTest = (_dec$a = Controller('dtoTest', {
|
|
|
2152
2212
|
});
|
|
2153
2213
|
return items;
|
|
2154
2214
|
}
|
|
2155
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
2215
|
+
}, _applyDecoratedDescriptor(_class2$a.prototype, "getUserLazy", [_dec3$a, _dec4$a, _dec5$a], Object.getOwnPropertyDescriptor(_class2$a.prototype, "getUserLazy"), _class2$a.prototype), _applyDecoratedDescriptor(_class2$a.prototype, "getPostDynamic", [_dec6$a, _dec7$a, _dec8$8, _dec9$7], Object.getOwnPropertyDescriptor(_class2$a.prototype, "getPostDynamic"), _class2$a.prototype), _applyDecoratedDescriptor(_class2$a.prototype, "getUserStats", [_dec0$7, _dec1$7, _dec10$6, _dec11$6], Object.getOwnPropertyDescriptor(_class2$a.prototype, "getUserStats"), _class2$a.prototype), _applyDecoratedDescriptor(_class2$a.prototype, "getUserStatsGroup", [_dec12$6, _dec13$5, _dec14$4, _dec15$4], Object.getOwnPropertyDescriptor(_class2$a.prototype, "getUserStatsGroup"), _class2$a.prototype), _applyDecoratedDescriptor(_class2$a.prototype, "createUser", [_dec16$4, _dec17$3, _dec18$3, _dec19$3], Object.getOwnPropertyDescriptor(_class2$a.prototype, "createUser"), _class2$a.prototype), _applyDecoratedDescriptor(_class2$a.prototype, "updateUser", [_dec20$3, _dec21$3, _dec22$3, _dec23$3, _dec24$3], Object.getOwnPropertyDescriptor(_class2$a.prototype, "updateUser"), _class2$a.prototype), _applyDecoratedDescriptor(_class2$a.prototype, "getCategoryTree", [_dec25$3, _dec26$2, _dec27$2, _dec28$1], Object.getOwnPropertyDescriptor(_class2$a.prototype, "getCategoryTree"), _class2$a.prototype), _applyDecoratedDescriptor(_class2$a.prototype, "getCategoryTree2", [_dec29$1, _dec30$1, _dec31$1, _dec32$1], Object.getOwnPropertyDescriptor(_class2$a.prototype, "getCategoryTree2"), _class2$a.prototype), _class2$a)) || _class$b) || _class$b);
|
|
2156
2216
|
|
|
2157
|
-
var _dec$
|
|
2158
|
-
let ControllerGuardPassport = (_dec$
|
|
2217
|
+
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$4, _dec14$3, _dec15$3, _dec16$3, _class$a, _class2$9;
|
|
2218
|
+
let ControllerGuardPassport = (_dec$a = Controller('guardPassport'), _dec2$a = BeanInfo({
|
|
2159
2219
|
module: "test-vona"
|
|
2160
|
-
}), _dec3$
|
|
2220
|
+
}), _dec3$9 = Web.get('testUserName'), _dec4$9 = Passport.userName({
|
|
2161
2221
|
name: 'admin'
|
|
2162
|
-
}), _dec5$
|
|
2222
|
+
}), _dec5$9 = Reflect.metadata("design:type", Function), _dec6$9 = Reflect.metadata("design:paramtypes", []), _dec7$9 = Web.get('testUserNameFail'), _dec8$7 = Passport.userName({
|
|
2163
2223
|
name: 'admin-none'
|
|
2164
|
-
}), _dec9$
|
|
2224
|
+
}), _dec9$6 = Reflect.metadata("design:type", Function), _dec0$6 = Reflect.metadata("design:paramtypes", []), _dec1$6 = Web.get('testRoleName'), _dec10$5 = Passport.roleName({
|
|
2165
2225
|
name: 'admin'
|
|
2166
|
-
}), _dec11$
|
|
2226
|
+
}), _dec11$5 = Reflect.metadata("design:type", Function), _dec12$5 = Reflect.metadata("design:paramtypes", []), _dec13$4 = Web.get('testRoleNameFail'), _dec14$3 = Passport.roleName({
|
|
2167
2227
|
name: 'admin-none'
|
|
2168
|
-
}), _dec15$3 = Reflect.metadata("design:type", Function), _dec16$3 = Reflect.metadata("design:paramtypes", []), _dec$
|
|
2228
|
+
}), _dec15$3 = Reflect.metadata("design:type", Function), _dec16$3 = Reflect.metadata("design:paramtypes", []), _dec$a(_class$a = _dec2$a(_class$a = (_class2$9 = class ControllerGuardPassport extends BeanBase {
|
|
2169
2229
|
testUserName() {}
|
|
2170
2230
|
testUserNameFail() {}
|
|
2171
2231
|
testRoleName() {}
|
|
2172
2232
|
testRoleNameFail() {}
|
|
2173
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
2233
|
+
}, _applyDecoratedDescriptor(_class2$9.prototype, "testUserName", [_dec3$9, _dec4$9, _dec5$9, _dec6$9], Object.getOwnPropertyDescriptor(_class2$9.prototype, "testUserName"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "testUserNameFail", [_dec7$9, _dec8$7, _dec9$6, _dec0$6], Object.getOwnPropertyDescriptor(_class2$9.prototype, "testUserNameFail"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "testRoleName", [_dec1$6, _dec10$5, _dec11$5, _dec12$5], Object.getOwnPropertyDescriptor(_class2$9.prototype, "testRoleName"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "testRoleNameFail", [_dec13$4, _dec14$3, _dec15$3, _dec16$3], Object.getOwnPropertyDescriptor(_class2$9.prototype, "testRoleNameFail"), _class2$9.prototype), _class2$9)) || _class$a) || _class$a);
|
|
2174
2234
|
|
|
2175
|
-
var _dec$
|
|
2176
|
-
let ControllerOnion = (_dec$
|
|
2235
|
+
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$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$9, _class2$8;
|
|
2236
|
+
let ControllerOnion = (_dec$9 = Controller({
|
|
2177
2237
|
path: 'onion',
|
|
2178
2238
|
tags: ['Onion'],
|
|
2179
2239
|
meta: {
|
|
2180
2240
|
mode: ['dev', 'test']
|
|
2181
2241
|
}
|
|
2182
|
-
}), _dec2$
|
|
2242
|
+
}), _dec2$9 = BeanInfo({
|
|
2183
2243
|
module: "test-vona"
|
|
2184
|
-
}), _dec3$
|
|
2244
|
+
}), _dec3$8 = Web.get('/'), _dec4$8 = Aspect.aopMethod('a-orm:transaction', {
|
|
2185
2245
|
enable: true,
|
|
2186
2246
|
meta: {
|
|
2187
2247
|
mode: 'dev'
|
|
2188
2248
|
}
|
|
2189
|
-
}), _dec5$
|
|
2249
|
+
}), _dec5$8 = Aspect.guardGlobal('a-user:passport', {
|
|
2190
2250
|
public: true
|
|
2191
|
-
}), _dec6$
|
|
2251
|
+
}), _dec6$8 = Reflect.metadata("design:type", Function), _dec7$8 = Reflect.metadata("design:paramtypes", []), _dec8$6 = Web.post('//echo'), _dec9$5 = Aspect.guardGlobal('a-user:passport', {
|
|
2192
2252
|
public: true
|
|
2193
|
-
}), _dec0$
|
|
2253
|
+
}), _dec0$5 = Aspect.middlewareGlobal('a-core:gate', {
|
|
2194
2254
|
gate: {
|
|
2195
2255
|
mode: 'dev'
|
|
2196
2256
|
}
|
|
2197
|
-
}), _dec1$
|
|
2257
|
+
}), _dec1$5 = Core.gate({
|
|
2198
2258
|
gate: {
|
|
2199
2259
|
mode: 'dev'
|
|
2200
2260
|
}
|
|
2201
|
-
}), _dec10$
|
|
2261
|
+
}), _dec10$4 = Aspect.aopMethod('a-orm:transaction', {
|
|
2202
2262
|
isolationLevel: 'SERIALIZABLE',
|
|
2203
2263
|
readOnly: true
|
|
2204
|
-
}), _dec11$
|
|
2264
|
+
}), _dec11$4 = Database.transaction({
|
|
2205
2265
|
isolationLevel: 'READ_COMMITTED',
|
|
2206
2266
|
readOnly: false
|
|
2207
|
-
}), _dec12$
|
|
2267
|
+
}), _dec12$4 = Api.body(v.optional(), z.string()), _dec13$3 = function (target, key) {
|
|
2208
2268
|
return Arg.query('id', v.default(0), z.number())(target, key, 0);
|
|
2209
2269
|
}, _dec14$2 = function (target, key) {
|
|
2210
2270
|
return Arg.query('name', z.number().optional())(target, key, 2);
|
|
@@ -2249,7 +2309,7 @@ let ControllerOnion = (_dec$8 = Controller({
|
|
|
2249
2309
|
return Arg.query('ids', v.default([1]), v.array(Number, {
|
|
2250
2310
|
separator: '-'
|
|
2251
2311
|
}))(target, key, 0);
|
|
2252
|
-
}, _dec43 = Reflect.metadata("design:type", Function), _dec44 = Reflect.metadata("design:paramtypes", [Array]), _dec45 = Web.get('echo6'), _dec46 = Passport.admin(), _dec47 = Reflect.metadata("design:type", Function), _dec48 = Reflect.metadata("design:paramtypes", []), _dec$
|
|
2312
|
+
}, _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$9(_class$9 = _dec2$9(_class$9 = (_class2$8 = class ControllerOnion extends BeanBase {
|
|
2253
2313
|
index() {
|
|
2254
2314
|
return this.ctx.db.inTransaction;
|
|
2255
2315
|
// return 'Hello Vona';
|
|
@@ -2280,25 +2340,25 @@ let ControllerOnion = (_dec$8 = Controller({
|
|
|
2280
2340
|
echo6() {
|
|
2281
2341
|
return this.bean.passport.isAuthenticated;
|
|
2282
2342
|
}
|
|
2283
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
2343
|
+
}, _applyDecoratedDescriptor(_class2$8.prototype, "index", [_dec3$8, _dec4$8, _dec5$8, _dec6$8, _dec7$8], Object.getOwnPropertyDescriptor(_class2$8.prototype, "index"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "echo", [_dec8$6, _dec9$5, _dec0$5, _dec1$5, _dec10$4, _dec11$4, _dec12$4, _dec13$3, _dec14$2, _dec15$2, _dec16$2, _dec17$2], Object.getOwnPropertyDescriptor(_class2$8.prototype, "echo"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "echo2", [_dec18$2, _dec19$2, _dec20$2, _dec21$2, _dec22$2, _dec23$2, _dec24$2, _dec25$2], Object.getOwnPropertyDescriptor(_class2$8.prototype, "echo2"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "echo3", [_dec26$1, _dec27$1, _dec28, _dec29, _dec30, _dec31, _dec32], Object.getOwnPropertyDescriptor(_class2$8.prototype, "echo3"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "echo4", [_dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39], Object.getOwnPropertyDescriptor(_class2$8.prototype, "echo4"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "echo5", [_dec40, _dec41, _dec42, _dec43, _dec44], Object.getOwnPropertyDescriptor(_class2$8.prototype, "echo5"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "echo6", [_dec45, _dec46, _dec47, _dec48], Object.getOwnPropertyDescriptor(_class2$8.prototype, "echo6"), _class2$8.prototype), _class2$8)) || _class$9) || _class$9);
|
|
2284
2344
|
|
|
2285
|
-
var _dec$
|
|
2286
|
-
let ControllerPassport = (_dec$
|
|
2345
|
+
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$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$8, _class2$7;
|
|
2346
|
+
let ControllerPassport = (_dec$8 = Controller({
|
|
2287
2347
|
path: 'passport',
|
|
2288
2348
|
meta: {
|
|
2289
2349
|
mode: 'test'
|
|
2290
2350
|
}
|
|
2291
|
-
}), _dec2$
|
|
2351
|
+
}), _dec2$8 = Api.exclude(), _dec3$7 = BeanInfo({
|
|
2292
2352
|
module: "test-vona"
|
|
2293
|
-
}), _dec4$
|
|
2353
|
+
}), _dec4$7 = Web.get('echo/:name'), _dec5$7 = Passport.public(), _dec6$7 = function (target, key) {
|
|
2294
2354
|
return Arg.param('name')(target, key, 0);
|
|
2295
|
-
}, _dec7$
|
|
2355
|
+
}, _dec7$7 = function (target, key) {
|
|
2296
2356
|
return Arg.user()(target, key, 1);
|
|
2297
|
-
}, _dec8$
|
|
2357
|
+
}, _dec8$5 = Reflect.metadata("design:type", Function), _dec9$4 = Reflect.metadata("design:paramtypes", [String, typeof IUserBase === "undefined" ? Object : IUserBase]), _dec0$4 = Web.post('login'), _dec1$4 = Api.body(v.object(DtoJwtToken)), _dec10$3 = Passport.public(), _dec11$3 = function (target, key) {
|
|
2298
2358
|
return Arg.body('name')(target, key, 0);
|
|
2299
|
-
}, _dec12$
|
|
2359
|
+
}, _dec12$3 = 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) {
|
|
2300
2360
|
return Arg.body('refreshToken')(target, key, 0);
|
|
2301
|
-
}, _dec21$1 = Reflect.metadata("design:type", Function), _dec22$1 = Reflect.metadata("design:paramtypes", [String]), _dec23$1 = Web.post('logout'), _dec24$1 = Reflect.metadata("design:type", Function), _dec25$1 = Reflect.metadata("design:paramtypes", []), _dec$
|
|
2361
|
+
}, _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$8(_class$8 = _dec2$8(_class$8 = _dec3$7(_class$8 = (_class2$7 = class ControllerPassport extends BeanBase {
|
|
2302
2362
|
echo(name, user) {
|
|
2303
2363
|
assert.equal(name, 'admin');
|
|
2304
2364
|
assert.equal($getUserName(user), 'admin');
|
|
@@ -2320,19 +2380,19 @@ let ControllerPassport = (_dec$7 = Controller({
|
|
|
2320
2380
|
async logout() {
|
|
2321
2381
|
return await this.bean.passport.signout();
|
|
2322
2382
|
}
|
|
2323
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
2383
|
+
}, _applyDecoratedDescriptor(_class2$7.prototype, "echo", [_dec4$7, _dec5$7, _dec6$7, _dec7$7, _dec8$5, _dec9$4], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "login", [_dec0$4, _dec1$4, _dec10$3, _dec11$3, _dec12$3, _dec13$2], Object.getOwnPropertyDescriptor(_class2$7.prototype, "login"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "isAuthenticated", [_dec14$1, _dec15$1, _dec16$1], Object.getOwnPropertyDescriptor(_class2$7.prototype, "isAuthenticated"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "refresh", [_dec17$1, _dec18$1, _dec19$1, _dec20$1, _dec21$1, _dec22$1], Object.getOwnPropertyDescriptor(_class2$7.prototype, "refresh"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "logout", [_dec23$1, _dec24$1, _dec25$1], Object.getOwnPropertyDescriptor(_class2$7.prototype, "logout"), _class2$7.prototype), _class2$7)) || _class$8) || _class$8) || _class$8);
|
|
2324
2384
|
|
|
2325
|
-
var _dec$
|
|
2326
|
-
let ControllerPerformAction = (_dec$
|
|
2385
|
+
var _dec$7, _dec2$7, _dec3$6, _dec4$6, _dec5$6, _dec6$6, _dec7$6, _dec8$4, _class$7, _class2$6;
|
|
2386
|
+
let ControllerPerformAction = (_dec$7 = Controller({
|
|
2327
2387
|
path: 'performAction',
|
|
2328
2388
|
meta: {
|
|
2329
2389
|
mode: 'test'
|
|
2330
2390
|
}
|
|
2331
|
-
}), _dec2$
|
|
2391
|
+
}), _dec2$7 = Api.exclude(), _dec3$6 = BeanInfo({
|
|
2332
2392
|
module: "test-vona"
|
|
2333
|
-
}), _dec4$
|
|
2393
|
+
}), _dec4$6 = Web.post('echo'), _dec5$6 = Passport.public(), _dec6$6 = function (target, key) {
|
|
2334
2394
|
return Arg.body('id')(target, key, 0);
|
|
2335
|
-
}, _dec7$
|
|
2395
|
+
}, _dec7$6 = Reflect.metadata("design:type", Function), _dec8$4 = Reflect.metadata("design:paramtypes", [Number]), _dec$7(_class$7 = _dec2$7(_class$7 = _dec3$6(_class$7 = (_class2$6 = class ControllerPerformAction extends BeanBase {
|
|
2336
2396
|
echo(id) {
|
|
2337
2397
|
const url = this.scope.util.combineApiPath('performAction/echo');
|
|
2338
2398
|
return {
|
|
@@ -2340,7 +2400,30 @@ let ControllerPerformAction = (_dec$6 = Controller({
|
|
|
2340
2400
|
url
|
|
2341
2401
|
};
|
|
2342
2402
|
}
|
|
2343
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
2403
|
+
}, _applyDecoratedDescriptor(_class2$6.prototype, "echo", [_dec4$6, _dec5$6, _dec6$6, _dec7$6, _dec8$4], Object.getOwnPropertyDescriptor(_class2$6.prototype, "echo"), _class2$6.prototype), _class2$6)) || _class$7) || _class$7) || _class$7);
|
|
2404
|
+
|
|
2405
|
+
var _dec$6, _dec2$6, _dec3$5, _dec4$5, _dec5$5, _dec6$5, _dec7$5, _dec8$3, _dec9$3, _dec0$3, _dec1$3, _dec10$2, _dec11$2, _dec12$2, _class$6, _class2$5;
|
|
2406
|
+
let ControllerPost = (_dec$6 = Controller('post', {
|
|
2407
|
+
meta: {
|
|
2408
|
+
mode: ['test', 'dev']
|
|
2409
|
+
}
|
|
2410
|
+
}), _dec2$6 = BeanInfo({
|
|
2411
|
+
module: "test-vona"
|
|
2412
|
+
}), _dec3$5 = Web.get('findManyEcho'), _dec4$5 = Api.body(DtoPostQueryRes), _dec5$5 = Passport.public(), _dec6$5 = function (target, key) {
|
|
2413
|
+
return Arg.queryPro(DtoPostQuery)(target, key, 0);
|
|
2414
|
+
}, _dec7$5 = Reflect.metadata("design:type", Function), _dec8$3 = Reflect.metadata("design:paramtypes", [typeof IQueryParams === "undefined" ? Object : IQueryParams]), _dec9$3 = Web.get('findMany'), _dec0$3 = Api.body(DtoPostQueryRes), _dec1$3 = Passport.public(), _dec10$2 = function (target, key) {
|
|
2415
|
+
return Arg.queryPro(DtoPostQuery)(target, key, 0);
|
|
2416
|
+
}, _dec11$2 = Reflect.metadata("design:type", Function), _dec12$2 = Reflect.metadata("design:paramtypes", [typeof IQueryParams === "undefined" ? Object : IQueryParams]), _dec$6(_class$6 = _dec2$6(_class$6 = (_class2$5 = class ControllerPost extends BeanBase {
|
|
2417
|
+
findManyEcho(params) {
|
|
2418
|
+
return params;
|
|
2419
|
+
}
|
|
2420
|
+
async findMany(params) {
|
|
2421
|
+
if (!params.orders) {
|
|
2422
|
+
params.orders = [['testVonaPost.createdAt', 'desc']];
|
|
2423
|
+
}
|
|
2424
|
+
return await this.scope.service.post.findMany(params);
|
|
2425
|
+
}
|
|
2426
|
+
}, _applyDecoratedDescriptor(_class2$5.prototype, "findManyEcho", [_dec3$5, _dec4$5, _dec5$5, _dec6$5, _dec7$5, _dec8$3], Object.getOwnPropertyDescriptor(_class2$5.prototype, "findManyEcho"), _class2$5.prototype), _applyDecoratedDescriptor(_class2$5.prototype, "findMany", [_dec9$3, _dec0$3, _dec1$3, _dec10$2, _dec11$2, _dec12$2], Object.getOwnPropertyDescriptor(_class2$5.prototype, "findMany"), _class2$5.prototype), _class2$5)) || _class$6) || _class$6);
|
|
2344
2427
|
|
|
2345
2428
|
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;
|
|
2346
2429
|
let ControllerQueue = (_dec$5 = Controller({
|
|
@@ -2674,4 +2757,4 @@ function $locale(key) {
|
|
|
2674
2757
|
}
|
|
2675
2758
|
/** scope: end */
|
|
2676
2759
|
|
|
2677
|
-
export { $locale, AopMethodTest, AopRegExp, AopSimple, BeanTestCtx, BroadcastTest, CacheMemTest, CacheRedisPost, CacheRedisTest, ControllerBean, ControllerCacheMem, ControllerCacheRedis, ControllerCaptcha, ControllerDtoTest, ControllerGuardPassport, ControllerOnion, ControllerPassport, ControllerPerformAction, ControllerQueue, ControllerSummer, ControllerTail, ControllerTransaction, ControllerUpload, DtoCategoryTree, DtoOrderCreate, DtoOrderResult, DtoOrderUpdate, DtoPostCreate, DtoProfile, DtoRoleLazy, DtoSignin, DtoUser, DtoUserCreate, DtoUserLazy, DtoUserUpdate, EntityCategory, EntityOrder, EntityPost, EntityPostContent, EntityProduct, EntityRole, EntityRoleUser, EntityTest, EntityUser, EventHelloEcho, EventListenerHelloEcho, MetaVersion, ModelCategory, ModelCategoryChain, ModelOrder, ModelOrderStats, ModelPost, ModelPostContent, ModelProduct, ModelRole, ModelRoleUser, ModelTest, ModelTestDynamicTable, ModelUser, ModelUserStats, ModelUserStatsGroup, QueueTest, ScheduleTest, ScheduleTest3, ScopeModuleTestVona, ServiceAopMethod, ServiceCaching, ServiceCategory, ServiceOrder, ServicePost, ServiceProduct, ServiceTest, ServiceTestApp, ServiceTestClass, ServiceTestData, ServiceTransaction, ServiceUser, SummerCacheTest, config, locales };
|
|
2760
|
+
export { $locale, AopMethodTest, AopRegExp, AopSimple, BeanTestCtx, BroadcastTest, CacheMemTest, CacheRedisPost, CacheRedisTest, ControllerBean, ControllerCacheMem, ControllerCacheRedis, ControllerCaptcha, ControllerDtoTest, ControllerGuardPassport, ControllerOnion, ControllerPassport, ControllerPerformAction, ControllerPost, ControllerQueue, ControllerSummer, ControllerTail, ControllerTransaction, ControllerUpload, DtoCategoryTree, DtoOrderCreate, DtoOrderResult, DtoOrderUpdate, DtoPostCreate, DtoPostQuery, DtoPostQueryRes, 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 };
|