vona-module-test-vona 5.0.38 → 5.0.41
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 +22 -1
- package/dist/bean/cacheRedis.post.d.ts +7 -0
- package/dist/index.js +499 -268
- package/dist/service/order.d.ts +4 -0
- package/dist/service/post.d.ts +20 -0
- package/package.json +4 -2
- package/src/.metadata/index.ts +1741 -0
- package/src/.metadata/this.ts +2 -0
- package/src/bean/aop.regExp.ts +30 -0
- package/src/bean/aop.simple.ts +58 -0
- package/src/bean/aopMethod.test.ts +42 -0
- package/src/bean/bean.testCtx.ts +55 -0
- package/src/bean/broadcast.test.ts +22 -0
- package/src/bean/cacheMem.test.ts +7 -0
- package/src/bean/cacheRedis.post.ts +10 -0
- package/src/bean/cacheRedis.test.ts +7 -0
- package/src/bean/event.helloEcho.ts +8 -0
- package/src/bean/eventListener.helloEcho.ts +21 -0
- package/src/bean/meta.version.ts +81 -0
- package/src/bean/queue.test.ts +18 -0
- package/src/bean/schedule.test.ts +12 -0
- package/src/bean/schedule.test3.ts +12 -0
- package/src/bean/summerCache.test.ts +29 -0
- package/src/config/config.ts +5 -0
- package/src/config/locale/en-us.ts +19 -0
- package/src/config/locale/zh-cn.ts +17 -0
- package/src/controller/bean.ts +95 -0
- package/src/controller/cacheMem.ts +63 -0
- package/src/controller/cacheRedis.ts +55 -0
- package/src/controller/dtoTest.ts +63 -0
- package/src/controller/guardPassport.ts +25 -0
- package/src/controller/onion.ts +92 -0
- package/src/controller/passport.ts +48 -0
- package/src/controller/performAction.ts +18 -0
- package/src/controller/queue.ts +25 -0
- package/src/controller/summer.ts +125 -0
- package/src/controller/tail.ts +32 -0
- package/src/controller/transaction.ts +29 -0
- package/src/controller/upload.ts +57 -0
- package/src/dto/categoryTree.ts +8 -0
- package/src/dto/orderCreate.ts +10 -0
- package/src/dto/orderResult.ts +9 -0
- package/src/dto/orderUpdate.ts +9 -0
- package/src/dto/postCreate.ts +9 -0
- package/src/dto/profile.ts +14 -0
- package/src/dto/roleLazy.ts +15 -0
- package/src/dto/user.ts +19 -0
- package/src/dto/userCreate.ts +8 -0
- package/src/dto/userLazy.ts +18 -0
- package/src/dto/userUpdate.ts +8 -0
- package/src/entity/category.ts +14 -0
- package/src/entity/order.ts +18 -0
- package/src/entity/post.ts +17 -0
- package/src/entity/postContent.ts +14 -0
- package/src/entity/product.ts +24 -0
- package/src/entity/role.ts +11 -0
- package/src/entity/roleUser.ts +14 -0
- package/src/entity/test.ts +18 -0
- package/src/entity/user.ts +17 -0
- package/src/index.ts +1 -0
- package/src/model/category.ts +17 -0
- package/src/model/categoryChain.ts +16 -0
- package/src/model/order.ts +26 -0
- package/src/model/orderStats.ts +27 -0
- package/src/model/post.ts +16 -0
- package/src/model/postContent.ts +17 -0
- package/src/model/product.ts +8 -0
- package/src/model/role.ts +15 -0
- package/src/model/roleUser.ts +8 -0
- package/src/model/test.ts +8 -0
- package/src/model/testDynamicTable.ts +21 -0
- package/src/model/user.ts +21 -0
- package/src/model/userStats.ts +15 -0
- package/src/model/userStatsGroup.ts +15 -0
- package/src/service/aopMethod.ts +38 -0
- package/src/service/caching.ts +75 -0
- package/src/service/order.ts +65 -0
- package/src/service/post.ts +219 -0
- package/src/service/test.ts +9 -0
- package/src/service/testApp.ts +13 -0
- package/src/service/testClass.ts +15 -0
- package/src/service/testData.ts +67 -0
- package/src/service/transaction.ts +20 -0
- package/test/aopMethod.test.ts +21 -0
- package/test/authSimple.test.ts +45 -0
- package/test/bean.test.ts +16 -0
- package/test/broadcast.test.ts +17 -0
- package/test/cache/cacheMem.test.ts +10 -0
- package/test/cache/cacheRedis.test.ts +10 -0
- package/test/cache/caching.test.ts +58 -0
- package/test/cache/summer.test.ts +10 -0
- package/test/database/database.test.ts +127 -0
- package/test/database/dtoAggregate.test.ts +44 -0
- package/test/database/dtoGet.test.ts +61 -0
- package/test/database/dtoGroup.test.ts +44 -0
- package/test/database/dtoLazy.test.ts +45 -0
- package/test/database/dtoMutate.test.ts +56 -0
- package/test/database/modelAggregate.test.ts +197 -0
- package/test/database/modelCache.test.ts +37 -0
- package/test/database/modelGeneral.test.ts +18 -0
- package/test/database/modelGroup.test.ts +211 -0
- package/test/database/modelRelations.test.ts +203 -0
- package/test/database/modelRelationsJoins.test.ts +39 -0
- package/test/database/modelRelationsMutate.test.ts +354 -0
- package/test/database/modelWhere.test.ts +138 -0
- package/test/database/orm.test.ts +22 -0
- package/test/database/transaction.test.ts +142 -0
- package/test/event.test.ts +14 -0
- package/test/guardPassport.test.ts +44 -0
- package/test/jwt.test.ts +27 -0
- package/test/locale.test.ts +51 -0
- package/test/passport.test.ts +57 -0
- package/test/queue.test.ts +11 -0
- package/test/tail.test.ts +21 -0
- package/test/upload.test.ts +58 -0
- package/test/utils/cabloyUtils.test.ts +22 -0
- package/test/utils/celjs.test.ts +26 -0
- package/test/utils/mappedTypes.test.ts +65 -0
- package/test/utils/performAction.test.ts +28 -0
package/dist/index.js
CHANGED
|
@@ -22,15 +22,15 @@ import { z } from 'zod';
|
|
|
22
22
|
import { DtoJwtToken } from 'vona-module-a-jwt';
|
|
23
23
|
import { SymbolUploadValue } from 'vona-module-a-upload';
|
|
24
24
|
|
|
25
|
-
var _dec$
|
|
26
|
-
let AopRegExp = (_dec$
|
|
25
|
+
var _dec$17, _dec2$17, _class$17;
|
|
26
|
+
let AopRegExp = (_dec$17 = Aop({
|
|
27
27
|
match: [/^test-vona\.service\.test\w+$/, 'testCtx'],
|
|
28
28
|
meta: {
|
|
29
29
|
mode: 'test'
|
|
30
30
|
}
|
|
31
|
-
}), _dec2$
|
|
31
|
+
}), _dec2$17 = BeanInfo({
|
|
32
32
|
module: "test-vona"
|
|
33
|
-
}), _dec$
|
|
33
|
+
}), _dec$17(_class$17 = _dec2$17(_class$17 = class AopRegExp extends BeanAopBase {
|
|
34
34
|
__get_name__(next) {
|
|
35
35
|
const value = next();
|
|
36
36
|
return `${value}:regexpaop`;
|
|
@@ -52,24 +52,24 @@ let AopRegExp = (_dec$15 = Aop({
|
|
|
52
52
|
const result = await next();
|
|
53
53
|
return `${result}:regexpaop`;
|
|
54
54
|
}
|
|
55
|
-
}) || _class$
|
|
55
|
+
}) || _class$17) || _class$17);
|
|
56
56
|
|
|
57
|
-
var _dec$
|
|
57
|
+
var _dec$16, _dec2$16, _class$16;
|
|
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$16 = Aop({
|
|
65
65
|
match: 'testCtx',
|
|
66
66
|
dependencies: 'test-vona:regExp',
|
|
67
67
|
meta: {
|
|
68
68
|
mode: 'test'
|
|
69
69
|
}
|
|
70
|
-
}), _dec2$
|
|
70
|
+
}), _dec2$16 = BeanInfo({
|
|
71
71
|
module: "test-vona"
|
|
72
|
-
}), _dec$
|
|
72
|
+
}), _dec$16(_class$16 = _dec2$16(_class$16 = class AopSimple extends AopSimpleBase {
|
|
73
73
|
// magic
|
|
74
74
|
__get__(prop, next) {
|
|
75
75
|
const value = next();
|
|
@@ -109,14 +109,14 @@ let AopSimple = (_dec$14 = Aop({
|
|
|
109
109
|
const result = await next();
|
|
110
110
|
return `${result}:simpleaop`;
|
|
111
111
|
}
|
|
112
|
-
}) || _class$
|
|
112
|
+
}) || _class$16) || _class$16);
|
|
113
113
|
|
|
114
|
-
var _dec$
|
|
115
|
-
let AopMethodTest = (_dec$
|
|
114
|
+
var _dec$15, _dec2$15, _class$15;
|
|
115
|
+
let AopMethodTest = (_dec$15 = AopMethod({
|
|
116
116
|
wrapper: ''
|
|
117
|
-
}), _dec2$
|
|
117
|
+
}), _dec2$15 = BeanInfo({
|
|
118
118
|
module: "test-vona"
|
|
119
|
-
}), _dec$
|
|
119
|
+
}), _dec$15(_class$15 = _dec2$15(_class$15 = class AopMethodTest extends BeanAopMethodBase {
|
|
120
120
|
get(options, next, _receiver, _prop) {
|
|
121
121
|
const res = next();
|
|
122
122
|
return this._wrapper(options.wrapper, res);
|
|
@@ -143,7 +143,7 @@ let AopMethodTest = (_dec$13 = AopMethod({
|
|
|
143
143
|
if (index === data.length - wrapper.length) data = data.substring(0, index);
|
|
144
144
|
return data;
|
|
145
145
|
}
|
|
146
|
-
}) || _class$
|
|
146
|
+
}) || _class$15) || _class$15);
|
|
147
147
|
|
|
148
148
|
function _applyDecoratedDescriptor(i, e, r, n, l) {
|
|
149
149
|
var a = {};
|
|
@@ -162,118 +162,118 @@ function _initializerDefineProperty(e, i, r, l) {
|
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
var _dec$
|
|
166
|
-
let EntityCategory = (_dec$
|
|
165
|
+
var _dec$14, _dec2$14, _dec3$t, _dec4$t, _dec5$s, _dec6$r, _class$14, _class2$t, _descriptor$c, _descriptor2$b;
|
|
166
|
+
let EntityCategory = (_dec$14 = Entity('testVonaCategory'), _dec2$14 = BeanInfo({
|
|
167
167
|
module: "test-vona"
|
|
168
|
-
}), _dec3$
|
|
168
|
+
}), _dec3$t = Api.field(), _dec4$t = Reflect.metadata("design:type", String), _dec5$s = Api.field(v.optional(), v.tableIdentity()), _dec6$r = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$14(_class$14 = _dec2$14(_class$14 = (_class2$t = class EntityCategory extends EntityBase {
|
|
169
169
|
constructor(...args) {
|
|
170
170
|
super(...args);
|
|
171
171
|
_initializerDefineProperty(this, "name", _descriptor$c, this);
|
|
172
172
|
_initializerDefineProperty(this, "categoryIdParent", _descriptor2$b, this);
|
|
173
173
|
}
|
|
174
|
-
}, _descriptor$c = _applyDecoratedDescriptor(_class2$
|
|
174
|
+
}, _descriptor$c = _applyDecoratedDescriptor(_class2$t.prototype, "name", [_dec3$t, _dec4$t], {
|
|
175
175
|
configurable: true,
|
|
176
176
|
enumerable: true,
|
|
177
177
|
writable: true,
|
|
178
178
|
initializer: null
|
|
179
|
-
}), _descriptor2$b = _applyDecoratedDescriptor(_class2$
|
|
179
|
+
}), _descriptor2$b = _applyDecoratedDescriptor(_class2$t.prototype, "categoryIdParent", [_dec5$s, _dec6$r], {
|
|
180
180
|
configurable: true,
|
|
181
181
|
enumerable: true,
|
|
182
182
|
writable: true,
|
|
183
183
|
initializer: null
|
|
184
|
-
}), _class2$
|
|
184
|
+
}), _class2$t)) || _class$14) || _class$14);
|
|
185
185
|
|
|
186
|
-
var _dec$
|
|
187
|
-
let EntityOrder = (_dec$
|
|
186
|
+
var _dec$13, _dec2$13, _dec3$s, _dec4$s, _dec5$r, _dec6$q, _dec7$m, _dec8$i, _class$13, _class2$s, _descriptor$b, _descriptor2$a, _descriptor3$6;
|
|
187
|
+
let EntityOrder = (_dec$13 = Entity('testVonaOrder', {
|
|
188
188
|
openapi: {
|
|
189
189
|
title: $locale('Order')
|
|
190
190
|
}
|
|
191
|
-
}), _dec2$
|
|
191
|
+
}), _dec2$13 = BeanInfo({
|
|
192
192
|
module: "test-vona"
|
|
193
|
-
}), _dec3$
|
|
193
|
+
}), _dec3$s = Api.field(v.openapi({
|
|
194
194
|
title: $locale('OrderNo')
|
|
195
|
-
}), v.default(''), v.min(3)), _dec4$
|
|
195
|
+
}), v.default(''), v.min(3)), _dec4$s = Reflect.metadata("design:type", String), _dec5$r = Api.field(v.openapi({
|
|
196
196
|
title: $locale('Remark')
|
|
197
|
-
}), v.optional()), _dec6$q = Reflect.metadata("design:type", String), _dec7$m = Api.field(v.tableIdentity()), _dec8$i = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$
|
|
197
|
+
}), v.optional()), _dec6$q = Reflect.metadata("design:type", String), _dec7$m = Api.field(v.tableIdentity()), _dec8$i = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$13(_class$13 = _dec2$13(_class$13 = (_class2$s = class EntityOrder extends EntityBase {
|
|
198
198
|
constructor(...args) {
|
|
199
199
|
super(...args);
|
|
200
200
|
_initializerDefineProperty(this, "orderNo", _descriptor$b, this);
|
|
201
201
|
_initializerDefineProperty(this, "remark", _descriptor2$a, this);
|
|
202
202
|
_initializerDefineProperty(this, "userId", _descriptor3$6, this);
|
|
203
203
|
}
|
|
204
|
-
}, _descriptor$b = _applyDecoratedDescriptor(_class2$
|
|
204
|
+
}, _descriptor$b = _applyDecoratedDescriptor(_class2$s.prototype, "orderNo", [_dec3$s, _dec4$s], {
|
|
205
205
|
configurable: true,
|
|
206
206
|
enumerable: true,
|
|
207
207
|
writable: true,
|
|
208
208
|
initializer: null
|
|
209
|
-
}), _descriptor2$a = _applyDecoratedDescriptor(_class2$
|
|
209
|
+
}), _descriptor2$a = _applyDecoratedDescriptor(_class2$s.prototype, "remark", [_dec5$r, _dec6$q], {
|
|
210
210
|
configurable: true,
|
|
211
211
|
enumerable: true,
|
|
212
212
|
writable: true,
|
|
213
213
|
initializer: null
|
|
214
|
-
}), _descriptor3$6 = _applyDecoratedDescriptor(_class2$
|
|
214
|
+
}), _descriptor3$6 = _applyDecoratedDescriptor(_class2$s.prototype, "userId", [_dec7$m, _dec8$i], {
|
|
215
215
|
configurable: true,
|
|
216
216
|
enumerable: true,
|
|
217
217
|
writable: true,
|
|
218
218
|
initializer: null
|
|
219
|
-
}), _class2$
|
|
219
|
+
}), _class2$s)) || _class$13) || _class$13);
|
|
220
220
|
|
|
221
|
-
var _dec$
|
|
222
|
-
let EntityPost = (_dec$
|
|
221
|
+
var _dec$12, _dec2$12, _dec3$r, _dec4$r, _dec5$q, _dec6$p, _dec7$l, _dec8$h, _class$12, _class2$r, _descriptor$a, _descriptor2$9, _descriptor3$5;
|
|
222
|
+
let EntityPost = (_dec$12 = Entity('testVonaPost'), _dec2$12 = BeanInfo({
|
|
223
223
|
module: "test-vona"
|
|
224
|
-
}), _dec3$
|
|
224
|
+
}), _dec3$r = Api.field(), _dec4$r = Reflect.metadata("design:type", String), _dec5$q = Api.field(v.tableIdentity()), _dec6$p = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec7$l = Api.field(v.optional()), _dec8$h = Reflect.metadata("design:type", Number), _dec$12(_class$12 = _dec2$12(_class$12 = (_class2$r = class EntityPost extends EntityBase {
|
|
225
225
|
constructor(...args) {
|
|
226
226
|
super(...args);
|
|
227
227
|
_initializerDefineProperty(this, "title", _descriptor$a, this);
|
|
228
228
|
_initializerDefineProperty(this, "userId", _descriptor2$9, this);
|
|
229
229
|
_initializerDefineProperty(this, "stars", _descriptor3$5, this);
|
|
230
230
|
}
|
|
231
|
-
}, _descriptor$a = _applyDecoratedDescriptor(_class2$
|
|
231
|
+
}, _descriptor$a = _applyDecoratedDescriptor(_class2$r.prototype, "title", [_dec3$r, _dec4$r], {
|
|
232
232
|
configurable: true,
|
|
233
233
|
enumerable: true,
|
|
234
234
|
writable: true,
|
|
235
235
|
initializer: null
|
|
236
|
-
}), _descriptor2$9 = _applyDecoratedDescriptor(_class2$
|
|
236
|
+
}), _descriptor2$9 = _applyDecoratedDescriptor(_class2$r.prototype, "userId", [_dec5$q, _dec6$p], {
|
|
237
237
|
configurable: true,
|
|
238
238
|
enumerable: true,
|
|
239
239
|
writable: true,
|
|
240
240
|
initializer: null
|
|
241
|
-
}), _descriptor3$5 = _applyDecoratedDescriptor(_class2$
|
|
241
|
+
}), _descriptor3$5 = _applyDecoratedDescriptor(_class2$r.prototype, "stars", [_dec7$l, _dec8$h], {
|
|
242
242
|
configurable: true,
|
|
243
243
|
enumerable: true,
|
|
244
244
|
writable: true,
|
|
245
245
|
initializer: null
|
|
246
|
-
}), _class2$
|
|
246
|
+
}), _class2$r)) || _class$12) || _class$12);
|
|
247
247
|
|
|
248
|
-
var _dec
|
|
249
|
-
let EntityPostContent = (_dec
|
|
248
|
+
var _dec$11, _dec2$11, _dec3$q, _dec4$q, _dec5$p, _dec6$o, _class$11, _class2$q, _descriptor$9, _descriptor2$8;
|
|
249
|
+
let EntityPostContent = (_dec$11 = Entity('testVonaPostContent'), _dec2$11 = BeanInfo({
|
|
250
250
|
module: "test-vona"
|
|
251
|
-
}), _dec3$
|
|
251
|
+
}), _dec3$q = Api.field(), _dec4$q = Reflect.metadata("design:type", String), _dec5$p = Api.field(v.tableIdentity()), _dec6$o = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$11(_class$11 = _dec2$11(_class$11 = (_class2$q = class EntityPostContent extends EntityBase {
|
|
252
252
|
constructor(...args) {
|
|
253
253
|
super(...args);
|
|
254
254
|
_initializerDefineProperty(this, "content", _descriptor$9, this);
|
|
255
255
|
_initializerDefineProperty(this, "postId", _descriptor2$8, this);
|
|
256
256
|
}
|
|
257
|
-
}, _descriptor$9 = _applyDecoratedDescriptor(_class2$
|
|
257
|
+
}, _descriptor$9 = _applyDecoratedDescriptor(_class2$q.prototype, "content", [_dec3$q, _dec4$q], {
|
|
258
258
|
configurable: true,
|
|
259
259
|
enumerable: true,
|
|
260
260
|
writable: true,
|
|
261
261
|
initializer: null
|
|
262
|
-
}), _descriptor2$8 = _applyDecoratedDescriptor(_class2$
|
|
262
|
+
}), _descriptor2$8 = _applyDecoratedDescriptor(_class2$q.prototype, "postId", [_dec5$p, _dec6$o], {
|
|
263
263
|
configurable: true,
|
|
264
264
|
enumerable: true,
|
|
265
265
|
writable: true,
|
|
266
266
|
initializer: null
|
|
267
|
-
}), _class2$
|
|
267
|
+
}), _class2$q)) || _class$11) || _class$11);
|
|
268
268
|
|
|
269
|
-
var _dec$
|
|
270
|
-
let EntityProduct = (_dec$
|
|
269
|
+
var _dec$10, _dec2$10, _dec3$p, _dec4$p, _dec5$o, _dec6$n, _dec7$k, _dec8$g, _dec9$a, _dec10$a, _dec11$a, _dec12$8, _class$10, _class2$p, _descriptor$8, _descriptor2$7, _descriptor3$4, _descriptor4, _descriptor5;
|
|
270
|
+
let EntityProduct = (_dec$10 = Entity('testVonaProduct', {
|
|
271
271
|
independent: true
|
|
272
|
-
}), _dec2$
|
|
272
|
+
}), _dec2$10 = BeanInfo({
|
|
273
273
|
module: "test-vona"
|
|
274
|
-
}), _dec3$
|
|
274
|
+
}), _dec3$p = Api.field(v.openapi({
|
|
275
275
|
title: $locale('Name')
|
|
276
|
-
})), _dec4$
|
|
276
|
+
})), _dec4$p = Reflect.metadata("design:type", String), _dec5$o = Api.field(v.title($locale('Price'))), _dec6$n = Reflect.metadata("design:type", Number), _dec7$k = Api.field(v.title($locale('Quantity'))), _dec8$g = Reflect.metadata("design:type", Number), _dec9$a = Api.field(v.title($locale('Amount'))), _dec10$a = Reflect.metadata("design:type", Number), _dec11$a = Api.field(v.tableIdentity()), _dec12$8 = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$10(_class$10 = _dec2$10(_class$10 = (_class2$p = class EntityProduct extends EntityBase {
|
|
277
277
|
constructor(...args) {
|
|
278
278
|
super(...args);
|
|
279
279
|
_initializerDefineProperty(this, "name", _descriptor$8, this);
|
|
@@ -282,131 +282,131 @@ let EntityProduct = (_dec$_ = Entity('testVonaProduct', {
|
|
|
282
282
|
_initializerDefineProperty(this, "amount", _descriptor4, this);
|
|
283
283
|
_initializerDefineProperty(this, "orderId", _descriptor5, this);
|
|
284
284
|
}
|
|
285
|
-
}, _descriptor$8 = _applyDecoratedDescriptor(_class2$
|
|
285
|
+
}, _descriptor$8 = _applyDecoratedDescriptor(_class2$p.prototype, "name", [_dec3$p, _dec4$p], {
|
|
286
286
|
configurable: true,
|
|
287
287
|
enumerable: true,
|
|
288
288
|
writable: true,
|
|
289
289
|
initializer: null
|
|
290
|
-
}), _descriptor2$7 = _applyDecoratedDescriptor(_class2$
|
|
290
|
+
}), _descriptor2$7 = _applyDecoratedDescriptor(_class2$p.prototype, "price", [_dec5$o, _dec6$n], {
|
|
291
291
|
configurable: true,
|
|
292
292
|
enumerable: true,
|
|
293
293
|
writable: true,
|
|
294
294
|
initializer: null
|
|
295
|
-
}), _descriptor3$4 = _applyDecoratedDescriptor(_class2$
|
|
295
|
+
}), _descriptor3$4 = _applyDecoratedDescriptor(_class2$p.prototype, "quantity", [_dec7$k, _dec8$g], {
|
|
296
296
|
configurable: true,
|
|
297
297
|
enumerable: true,
|
|
298
298
|
writable: true,
|
|
299
299
|
initializer: null
|
|
300
|
-
}), _descriptor4 = _applyDecoratedDescriptor(_class2$
|
|
300
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2$p.prototype, "amount", [_dec9$a, _dec10$a], {
|
|
301
301
|
configurable: true,
|
|
302
302
|
enumerable: true,
|
|
303
303
|
writable: true,
|
|
304
304
|
initializer: null
|
|
305
|
-
}), _descriptor5 = _applyDecoratedDescriptor(_class2$
|
|
305
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2$p.prototype, "orderId", [_dec11$a, _dec12$8], {
|
|
306
306
|
configurable: true,
|
|
307
307
|
enumerable: true,
|
|
308
308
|
writable: true,
|
|
309
309
|
initializer: null
|
|
310
|
-
}), _class2$
|
|
310
|
+
}), _class2$p)) || _class$10) || _class$10);
|
|
311
311
|
|
|
312
|
-
var _dec
|
|
313
|
-
let EntityRole = (_dec
|
|
312
|
+
var _dec$$, _dec2$$, _dec3$o, _dec4$o, _class$$, _class2$o, _descriptor$7;
|
|
313
|
+
let EntityRole = (_dec$$ = Entity('testVonaRole'), _dec2$$ = BeanInfo({
|
|
314
314
|
module: "test-vona"
|
|
315
|
-
}), _dec3$
|
|
315
|
+
}), _dec3$o = Api.field(), _dec4$o = Reflect.metadata("design:type", String), _dec$$(_class$$ = _dec2$$(_class$$ = (_class2$o = class EntityRole extends EntityBase {
|
|
316
316
|
constructor(...args) {
|
|
317
317
|
super(...args);
|
|
318
318
|
_initializerDefineProperty(this, "name", _descriptor$7, this);
|
|
319
319
|
}
|
|
320
|
-
}, _descriptor$7 = _applyDecoratedDescriptor(_class2$
|
|
320
|
+
}, _descriptor$7 = _applyDecoratedDescriptor(_class2$o.prototype, "name", [_dec3$o, _dec4$o], {
|
|
321
321
|
configurable: true,
|
|
322
322
|
enumerable: true,
|
|
323
323
|
writable: true,
|
|
324
324
|
initializer: null
|
|
325
|
-
}), _class2$
|
|
325
|
+
}), _class2$o)) || _class$$) || _class$$);
|
|
326
326
|
|
|
327
|
-
var _dec$
|
|
328
|
-
let EntityRoleUser = (_dec$
|
|
327
|
+
var _dec$_, _dec2$_, _dec3$n, _dec4$n, _dec5$n, _dec6$m, _class$_, _class2$n, _descriptor$6, _descriptor2$6;
|
|
328
|
+
let EntityRoleUser = (_dec$_ = Entity('testVonaRoleUser'), _dec2$_ = BeanInfo({
|
|
329
329
|
module: "test-vona"
|
|
330
|
-
}), _dec3$
|
|
330
|
+
}), _dec3$n = Api.field(v.tableIdentity()), _dec4$n = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec5$n = Api.field(v.tableIdentity()), _dec6$m = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec$_(_class$_ = _dec2$_(_class$_ = (_class2$n = class EntityRoleUser extends EntityBase {
|
|
331
331
|
constructor(...args) {
|
|
332
332
|
super(...args);
|
|
333
333
|
_initializerDefineProperty(this, "userId", _descriptor$6, this);
|
|
334
334
|
_initializerDefineProperty(this, "roleId", _descriptor2$6, this);
|
|
335
335
|
}
|
|
336
|
-
}, _descriptor$6 = _applyDecoratedDescriptor(_class2$
|
|
336
|
+
}, _descriptor$6 = _applyDecoratedDescriptor(_class2$n.prototype, "userId", [_dec3$n, _dec4$n], {
|
|
337
337
|
configurable: true,
|
|
338
338
|
enumerable: true,
|
|
339
339
|
writable: true,
|
|
340
340
|
initializer: null
|
|
341
|
-
}), _descriptor2$6 = _applyDecoratedDescriptor(_class2$
|
|
341
|
+
}), _descriptor2$6 = _applyDecoratedDescriptor(_class2$n.prototype, "roleId", [_dec5$n, _dec6$m], {
|
|
342
342
|
configurable: true,
|
|
343
343
|
enumerable: true,
|
|
344
344
|
writable: true,
|
|
345
345
|
initializer: null
|
|
346
|
-
}), _class2$
|
|
346
|
+
}), _class2$n)) || _class$_) || _class$_);
|
|
347
347
|
|
|
348
|
-
var _dec$
|
|
349
|
-
let EntityTest = (_dec$
|
|
348
|
+
var _dec$Z, _dec2$Z, _dec3$m, _dec4$m, _dec5$m, _dec6$l, _dec7$j, _dec8$f, _class$Z, _class2$m, _descriptor$5, _descriptor2$5, _descriptor3$3;
|
|
349
|
+
let EntityTest = (_dec$Z = Entity('testVonaTest', {
|
|
350
350
|
openapi: {
|
|
351
351
|
title: $locale('Test')
|
|
352
352
|
}
|
|
353
|
-
}), _dec2$
|
|
353
|
+
}), _dec2$Z = BeanInfo({
|
|
354
354
|
module: "test-vona"
|
|
355
|
-
}), _dec3$
|
|
355
|
+
}), _dec3$m = Api.field(v.title($locale('Test'))), _dec4$m = Reflect.metadata("design:type", String), _dec5$m = Api.field(), _dec6$l = Reflect.metadata("design:type", String), _dec7$j = Api.field(v.default(() => {
|
|
356
356
|
return new Date();
|
|
357
|
-
})), _dec8$f = Reflect.metadata("design:type", typeof Date === "undefined" ? Object : Date), _dec$
|
|
357
|
+
})), _dec8$f = Reflect.metadata("design:type", typeof Date === "undefined" ? Object : Date), _dec$Z(_class$Z = _dec2$Z(_class$Z = (_class2$m = class EntityTest extends EntityBase {
|
|
358
358
|
constructor(...args) {
|
|
359
359
|
super(...args);
|
|
360
360
|
_initializerDefineProperty(this, "title", _descriptor$5, this);
|
|
361
361
|
_initializerDefineProperty(this, "description", _descriptor2$5, this);
|
|
362
362
|
_initializerDefineProperty(this, "testDate", _descriptor3$3, this);
|
|
363
363
|
}
|
|
364
|
-
}, _descriptor$5 = _applyDecoratedDescriptor(_class2$
|
|
364
|
+
}, _descriptor$5 = _applyDecoratedDescriptor(_class2$m.prototype, "title", [_dec3$m, _dec4$m], {
|
|
365
365
|
configurable: true,
|
|
366
366
|
enumerable: true,
|
|
367
367
|
writable: true,
|
|
368
368
|
initializer: null
|
|
369
|
-
}), _descriptor2$5 = _applyDecoratedDescriptor(_class2$
|
|
369
|
+
}), _descriptor2$5 = _applyDecoratedDescriptor(_class2$m.prototype, "description", [_dec5$m, _dec6$l], {
|
|
370
370
|
configurable: true,
|
|
371
371
|
enumerable: true,
|
|
372
372
|
writable: true,
|
|
373
373
|
initializer: null
|
|
374
|
-
}), _descriptor3$3 = _applyDecoratedDescriptor(_class2$
|
|
374
|
+
}), _descriptor3$3 = _applyDecoratedDescriptor(_class2$m.prototype, "testDate", [_dec7$j, _dec8$f], {
|
|
375
375
|
configurable: true,
|
|
376
376
|
enumerable: true,
|
|
377
377
|
writable: true,
|
|
378
378
|
initializer: null
|
|
379
|
-
}), _class2$
|
|
379
|
+
}), _class2$m)) || _class$Z) || _class$Z);
|
|
380
380
|
|
|
381
|
-
var _dec$
|
|
382
|
-
let EntityUser = (_dec$
|
|
381
|
+
var _dec$Y, _dec2$Y, _dec3$l, _dec4$l, _dec5$l, _dec6$k, _dec7$i, _dec8$e, _class$Y, _class2$l, _descriptor$4, _descriptor2$4, _descriptor3$2;
|
|
382
|
+
let EntityUser = (_dec$Y = Entity('testVonaUser'), _dec2$Y = BeanInfo({
|
|
383
383
|
module: "test-vona"
|
|
384
|
-
}), _dec3$
|
|
384
|
+
}), _dec3$l = Api.field(), _dec4$l = Reflect.metadata("design:type", String), _dec5$l = Api.field(v.optional()), _dec6$k = Reflect.metadata("design:type", Number), _dec7$i = Api.field(v.optional()), _dec8$e = Reflect.metadata("design:type", Number), _dec$Y(_class$Y = _dec2$Y(_class$Y = (_class2$l = class EntityUser extends EntityBase {
|
|
385
385
|
constructor(...args) {
|
|
386
386
|
super(...args);
|
|
387
387
|
_initializerDefineProperty(this, "name", _descriptor$4, this);
|
|
388
388
|
_initializerDefineProperty(this, "age", _descriptor2$4, this);
|
|
389
389
|
_initializerDefineProperty(this, "scores", _descriptor3$2, this);
|
|
390
390
|
}
|
|
391
|
-
}, _descriptor$4 = _applyDecoratedDescriptor(_class2$
|
|
391
|
+
}, _descriptor$4 = _applyDecoratedDescriptor(_class2$l.prototype, "name", [_dec3$l, _dec4$l], {
|
|
392
392
|
configurable: true,
|
|
393
393
|
enumerable: true,
|
|
394
394
|
writable: true,
|
|
395
395
|
initializer: null
|
|
396
|
-
}), _descriptor2$4 = _applyDecoratedDescriptor(_class2$
|
|
396
|
+
}), _descriptor2$4 = _applyDecoratedDescriptor(_class2$l.prototype, "age", [_dec5$l, _dec6$k], {
|
|
397
397
|
configurable: true,
|
|
398
398
|
enumerable: true,
|
|
399
399
|
writable: true,
|
|
400
400
|
initializer: null
|
|
401
|
-
}), _descriptor3$2 = _applyDecoratedDescriptor(_class2$
|
|
401
|
+
}), _descriptor3$2 = _applyDecoratedDescriptor(_class2$l.prototype, "scores", [_dec7$i, _dec8$e], {
|
|
402
402
|
configurable: true,
|
|
403
403
|
enumerable: true,
|
|
404
404
|
writable: true,
|
|
405
405
|
initializer: null
|
|
406
|
-
}), _class2$
|
|
406
|
+
}), _class2$l)) || _class$Y) || _class$Y);
|
|
407
407
|
|
|
408
|
-
var _dec$
|
|
409
|
-
let ModelCategory = (_dec$
|
|
408
|
+
var _dec$X, _dec2$X, _class$X;
|
|
409
|
+
let ModelCategory = (_dec$X = Model({
|
|
410
410
|
entity: EntityCategory,
|
|
411
411
|
relations: {
|
|
412
412
|
children: $relation.hasMany(() => ModelCategory, 'categoryIdParent', {
|
|
@@ -417,12 +417,12 @@ let ModelCategory = (_dec$V = Model({
|
|
|
417
417
|
cache: {
|
|
418
418
|
modelsClear: () => ModelCategoryChain$1
|
|
419
419
|
}
|
|
420
|
-
}), _dec2$
|
|
420
|
+
}), _dec2$X = BeanInfo({
|
|
421
421
|
module: "test-vona"
|
|
422
|
-
}), _dec$
|
|
422
|
+
}), _dec$X(_class$X = _dec2$X(_class$X = class ModelCategory extends BeanModelBase {}) || _class$X) || _class$X);
|
|
423
423
|
|
|
424
|
-
var _dec$
|
|
425
|
-
let ModelCategoryChain = (_dec$
|
|
424
|
+
var _dec$W, _dec2$W, _class$W;
|
|
425
|
+
let ModelCategoryChain = (_dec$W = Model({
|
|
426
426
|
entity: EntityCategory,
|
|
427
427
|
relations: {
|
|
428
428
|
parent: $relation.belongsTo(() => ModelCategoryChain, () => ModelCategoryChain, 'categoryIdParent', {
|
|
@@ -430,19 +430,19 @@ let ModelCategoryChain = (_dec$U = Model({
|
|
|
430
430
|
columns: ['id', 'name', 'categoryIdParent']
|
|
431
431
|
})
|
|
432
432
|
}
|
|
433
|
-
}), _dec2$
|
|
433
|
+
}), _dec2$W = BeanInfo({
|
|
434
434
|
module: "test-vona"
|
|
435
|
-
}), _dec$
|
|
435
|
+
}), _dec$W(_class$W = _dec2$W(_class$W = class ModelCategoryChain extends BeanModelBase {}) || _class$W) || _class$W);
|
|
436
436
|
|
|
437
|
-
var _dec$
|
|
438
|
-
let ModelProduct = (_dec$
|
|
437
|
+
var _dec$V, _dec2$V, _class$V;
|
|
438
|
+
let ModelProduct = (_dec$V = Model({
|
|
439
439
|
entity: EntityProduct
|
|
440
|
-
}), _dec2$
|
|
440
|
+
}), _dec2$V = BeanInfo({
|
|
441
441
|
module: "test-vona"
|
|
442
|
-
}), _dec$
|
|
442
|
+
}), _dec$V(_class$V = _dec2$V(_class$V = class ModelProduct extends BeanModelBase {}) || _class$V) || _class$V);
|
|
443
443
|
|
|
444
|
-
var _dec$
|
|
445
|
-
let ModelOrderStats = (_dec$
|
|
444
|
+
var _dec$U, _dec2$U, _class$U;
|
|
445
|
+
let ModelOrderStats = (_dec$U = Model({
|
|
446
446
|
entity: EntityOrder,
|
|
447
447
|
relations: {
|
|
448
448
|
productStats: $relation.hasMany(() => ModelProduct, 'orderId', {
|
|
@@ -460,41 +460,41 @@ let ModelOrderStats = (_dec$S = Model({
|
|
|
460
460
|
}
|
|
461
461
|
})
|
|
462
462
|
}
|
|
463
|
-
}), _dec2$
|
|
463
|
+
}), _dec2$U = BeanInfo({
|
|
464
464
|
module: "test-vona"
|
|
465
|
-
}), _dec$
|
|
465
|
+
}), _dec$U(_class$U = _dec2$U(_class$U = class ModelOrderStats extends BeanModelBase {}) || _class$U) || _class$U);
|
|
466
466
|
|
|
467
|
-
var _dec$
|
|
468
|
-
let
|
|
467
|
+
var _dec$T, _dec2$T, _class$T;
|
|
468
|
+
let ModelPostContent = (_dec$T = Model({
|
|
469
|
+
entity: EntityPostContent,
|
|
470
|
+
relations: {
|
|
471
|
+
post: $relation.belongsTo(() => ModelPostContent, () => ModelPost, 'postId')
|
|
472
|
+
},
|
|
473
|
+
cache: {
|
|
474
|
+
modelsClear: () => ModelPost
|
|
475
|
+
}
|
|
476
|
+
}), _dec2$T = BeanInfo({
|
|
477
|
+
module: "test-vona"
|
|
478
|
+
}), _dec$T(_class$T = _dec2$T(_class$T = class ModelPostContent extends BeanModelBase {}) || _class$T) || _class$T);
|
|
479
|
+
|
|
480
|
+
var _dec$S, _dec2$S, _class$S;
|
|
481
|
+
let ModelPost = (_dec$S = Model({
|
|
469
482
|
entity: EntityPost,
|
|
470
483
|
relations: {
|
|
471
|
-
postContent: $relation.hasOne(
|
|
484
|
+
postContent: $relation.hasOne(ModelPostContent, 'postId', {
|
|
472
485
|
columns: ['id', 'content']
|
|
473
486
|
}),
|
|
474
|
-
user: $relation.belongsTo(ModelPost, () => ModelUser, 'userId', {
|
|
487
|
+
user: $relation.belongsTo(() => ModelPost, () => ModelUser, 'userId', {
|
|
475
488
|
autoload: true,
|
|
476
489
|
columns: ['id', 'name']
|
|
477
490
|
})
|
|
478
491
|
}
|
|
479
|
-
}), _dec2$
|
|
480
|
-
module: "test-vona"
|
|
481
|
-
}), _dec$R(_class$R = _dec2$R(_class$R = class ModelPost extends BeanModelBase {}) || _class$R) || _class$R);
|
|
482
|
-
|
|
483
|
-
var _dec$Q, _dec2$Q, _class$Q;
|
|
484
|
-
let ModelPostContent = (_dec$Q = Model({
|
|
485
|
-
entity: EntityPostContent,
|
|
486
|
-
relations: {
|
|
487
|
-
post: $relation.belongsTo(ModelPostContent, () => ModelPost, 'postId')
|
|
488
|
-
},
|
|
489
|
-
cache: {
|
|
490
|
-
modelsClear: () => ModelPost
|
|
491
|
-
}
|
|
492
|
-
}), _dec2$Q = BeanInfo({
|
|
492
|
+
}), _dec2$S = BeanInfo({
|
|
493
493
|
module: "test-vona"
|
|
494
|
-
}), _dec$
|
|
494
|
+
}), _dec$S(_class$S = _dec2$S(_class$S = class ModelPost extends BeanModelBase {}) || _class$S) || _class$S);
|
|
495
495
|
|
|
496
|
-
var _dec$
|
|
497
|
-
let ModelUserStats = (_dec$
|
|
496
|
+
var _dec$R, _dec2$R, _class$R;
|
|
497
|
+
let ModelUserStats = (_dec$R = Model({
|
|
498
498
|
entity: EntityUser,
|
|
499
499
|
relations: {
|
|
500
500
|
posts: $relation.hasMany(() => ModelPost, 'userId', {
|
|
@@ -510,12 +510,12 @@ let ModelUserStats = (_dec$P = Model({
|
|
|
510
510
|
}
|
|
511
511
|
})
|
|
512
512
|
}
|
|
513
|
-
}), _dec2$
|
|
513
|
+
}), _dec2$R = BeanInfo({
|
|
514
514
|
module: "test-vona"
|
|
515
|
-
}), _dec$
|
|
515
|
+
}), _dec$R(_class$R = _dec2$R(_class$R = class ModelUserStats extends BeanModelBase {}) || _class$R) || _class$R);
|
|
516
516
|
|
|
517
|
-
var _dec$
|
|
518
|
-
let ModelUserStatsGroup = (_dec$
|
|
517
|
+
var _dec$Q, _dec2$Q, _class$Q;
|
|
518
|
+
let ModelUserStatsGroup = (_dec$Q = Model({
|
|
519
519
|
entity: EntityUser,
|
|
520
520
|
relations: {
|
|
521
521
|
posts: $relation.hasMany(() => ModelPost, 'userId', {
|
|
@@ -535,12 +535,12 @@ let ModelUserStatsGroup = (_dec$O = Model({
|
|
|
535
535
|
orders: [['name', 'asc']]
|
|
536
536
|
}, undefined, true)
|
|
537
537
|
}
|
|
538
|
-
}), _dec2$
|
|
538
|
+
}), _dec2$Q = BeanInfo({
|
|
539
539
|
module: "test-vona"
|
|
540
|
-
}), _dec$
|
|
540
|
+
}), _dec$Q(_class$Q = _dec2$Q(_class$Q = class ModelUserStatsGroup extends BeanModelBase {}) || _class$Q) || _class$Q);
|
|
541
541
|
|
|
542
|
-
var _dec$
|
|
543
|
-
let ModelUser = (_dec$
|
|
542
|
+
var _dec$P, _dec2$P, _class$P;
|
|
543
|
+
let ModelUser = (_dec$P = Model({
|
|
544
544
|
entity: EntityUser,
|
|
545
545
|
relations: {
|
|
546
546
|
posts: $relation.hasMany(() => ModelPost, 'userId', {
|
|
@@ -553,12 +553,12 @@ let ModelUser = (_dec$N = Model({
|
|
|
553
553
|
cache: {
|
|
554
554
|
modelsClear: [() => ModelUserStats, () => ModelUserStatsGroup]
|
|
555
555
|
}
|
|
556
|
-
}), _dec2$
|
|
556
|
+
}), _dec2$P = BeanInfo({
|
|
557
557
|
module: "test-vona"
|
|
558
|
-
}), _dec$
|
|
558
|
+
}), _dec$P(_class$P = _dec2$P(_class$P = class ModelUser extends BeanModelBase {}) || _class$P) || _class$P);
|
|
559
559
|
|
|
560
|
-
var _dec$
|
|
561
|
-
let ModelOrder = (_dec$
|
|
560
|
+
var _dec$O, _dec2$O, _class$O;
|
|
561
|
+
let ModelOrder = (_dec$O = Model({
|
|
562
562
|
entity: EntityOrder,
|
|
563
563
|
relations: {
|
|
564
564
|
user: $relation.belongsTo(() => ModelOrder, () => ModelUser, 'userId', {
|
|
@@ -573,39 +573,39 @@ let ModelOrder = (_dec$M = Model({
|
|
|
573
573
|
cache: {
|
|
574
574
|
modelsClear: () => ModelOrderStats
|
|
575
575
|
}
|
|
576
|
-
}), _dec2$
|
|
576
|
+
}), _dec2$O = BeanInfo({
|
|
577
577
|
module: "test-vona"
|
|
578
|
-
}), _dec$
|
|
578
|
+
}), _dec$O(_class$O = _dec2$O(_class$O = class ModelOrder extends BeanModelBase {}) || _class$O) || _class$O);
|
|
579
579
|
|
|
580
|
-
var _dec$
|
|
581
|
-
let ModelRoleUser = (_dec$
|
|
580
|
+
var _dec$N, _dec2$N, _class$N;
|
|
581
|
+
let ModelRoleUser = (_dec$N = Model({
|
|
582
582
|
entity: EntityRoleUser
|
|
583
|
-
}), _dec2$
|
|
583
|
+
}), _dec2$N = BeanInfo({
|
|
584
584
|
module: "test-vona"
|
|
585
|
-
}), _dec$
|
|
585
|
+
}), _dec$N(_class$N = _dec2$N(_class$N = class ModelRoleUser extends BeanModelBase {}) || _class$N) || _class$N);
|
|
586
586
|
|
|
587
|
-
var _dec$
|
|
588
|
-
let ModelRole = (_dec$
|
|
587
|
+
var _dec$M, _dec2$M, _class$M;
|
|
588
|
+
let ModelRole = (_dec$M = 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$M = BeanInfo({
|
|
596
596
|
module: "test-vona"
|
|
597
|
-
}), _dec$
|
|
597
|
+
}), _dec$M(_class$M = _dec2$M(_class$M = class ModelRole extends BeanModelBase {}) || _class$M) || _class$M);
|
|
598
598
|
|
|
599
|
-
var _dec$
|
|
600
|
-
let ModelTest = (_dec$
|
|
599
|
+
var _dec$L, _dec2$L, _class$L;
|
|
600
|
+
let ModelTest = (_dec$L = Model({
|
|
601
601
|
entity: EntityTest,
|
|
602
602
|
client: 'default'
|
|
603
|
-
}), _dec2$
|
|
603
|
+
}), _dec2$L = BeanInfo({
|
|
604
604
|
module: "test-vona"
|
|
605
|
-
}), _dec$
|
|
605
|
+
}), _dec$L(_class$L = _dec2$L(_class$L = class ModelTest extends BeanModelBase {}) || _class$L) || _class$L);
|
|
606
606
|
|
|
607
|
-
var _dec$
|
|
608
|
-
let ModelTestDynamicTable = (_dec$
|
|
607
|
+
var _dec$K, _dec2$K, _class$K;
|
|
608
|
+
let ModelTestDynamicTable = (_dec$K = Model({
|
|
609
609
|
entity: EntityTest,
|
|
610
610
|
table(ctx, defaultTable) {
|
|
611
611
|
if (ctx.instanceName !== '') return defaultTable;
|
|
@@ -616,11 +616,11 @@ let ModelTestDynamicTable = (_dec$I = Model({
|
|
|
616
616
|
// do nothing
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
}), _dec2$
|
|
619
|
+
}), _dec2$K = BeanInfo({
|
|
620
620
|
module: "test-vona"
|
|
621
|
-
}), _dec$
|
|
621
|
+
}), _dec$K(_class$K = _dec2$K(_class$K = class ModelTestDynamicTable extends BeanModelBase {}) || _class$K) || _class$K);
|
|
622
622
|
|
|
623
|
-
var _dec$
|
|
623
|
+
var _dec$J, _dec2$J, _class$J;
|
|
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$J = Bean(), _dec2$J = BeanInfo({
|
|
686
686
|
module: "test-vona"
|
|
687
|
-
}), _dec$
|
|
687
|
+
}), _dec$J(_class$J = _dec2$J(_class$J = class BeanTestCtx extends TestCtx1 {}) || _class$J) || _class$J);
|
|
688
688
|
|
|
689
|
-
var _dec$
|
|
690
|
-
let ServiceAopMethodBase = (_dec$
|
|
689
|
+
var _dec$I, _dec2$I, _dec3$k, _dec4$k, _class$I, _dec5$k, _dec6$j, _dec7$h, _dec8$d, _dec9$9, _dec10$9, _dec11$9, _dec12$7, _dec13$7, _dec14$7, _dec15$7, _dec16$6, _dec17$6, _dec18$6, _class2$k, _class3;
|
|
690
|
+
let ServiceAopMethodBase = (_dec$I = Aspect.aopMethod('test-vona:test', {
|
|
691
691
|
wrapper: '+'
|
|
692
|
-
}), _dec2$
|
|
692
|
+
}), _dec2$I = Aspect.aopMethod('test-vona:test', {
|
|
693
693
|
wrapper: '-'
|
|
694
|
-
}), _dec3$
|
|
694
|
+
}), _dec3$k = Reflect.metadata("design:type", Function), _dec4$k = Reflect.metadata("design:paramtypes", []), _class$I = class ServiceAopMethodBase extends BeanBase {
|
|
695
695
|
testSyncBase() {
|
|
696
696
|
return 'hello';
|
|
697
697
|
}
|
|
698
|
-
}, _applyDecoratedDescriptor(_class$
|
|
699
|
-
let ServiceAopMethod = (_dec5$
|
|
698
|
+
}, _applyDecoratedDescriptor(_class$I.prototype, "testSyncBase", [_dec$I, _dec2$I, _dec3$k, _dec4$k], Object.getOwnPropertyDescriptor(_class$I.prototype, "testSyncBase"), _class$I.prototype), _class$I);
|
|
699
|
+
let ServiceAopMethod = (_dec5$k = Service(), _dec6$j = BeanInfo({
|
|
700
700
|
module: "test-vona"
|
|
701
701
|
}), _dec7$h = Aspect.aopMethod('test-vona:test', {
|
|
702
702
|
wrapper: '+'
|
|
703
703
|
}), _dec8$d = Aspect.aopMethod('test-vona:test', {
|
|
704
704
|
wrapper: '-'
|
|
705
|
-
}), _dec9$9 = Reflect.metadata("design:type", Function),
|
|
705
|
+
}), _dec9$9 = Reflect.metadata("design:type", Function), _dec10$9 = Reflect.metadata("design:paramtypes", []), _dec11$9 = Aspect.aopMethod('test-vona:test', {
|
|
706
706
|
wrapper: '+'
|
|
707
|
-
}),
|
|
707
|
+
}), _dec12$7 = Aspect.aopMethod('test-vona:test', {
|
|
708
708
|
wrapper: '-'
|
|
709
|
-
}),
|
|
709
|
+
}), _dec13$7 = Reflect.metadata("design:type", Function), _dec14$7 = Reflect.metadata("design:paramtypes", []), _dec15$7 = Aspect.aopMethod('test-vona:test', {
|
|
710
710
|
wrapper: '+'
|
|
711
|
-
}),
|
|
711
|
+
}), _dec16$6 = Aspect.aopMethod('test-vona:test', {
|
|
712
712
|
wrapper: '-'
|
|
713
|
-
}),
|
|
713
|
+
}), _dec17$6 = Reflect.metadata("design:type", Function), _dec18$6 = Reflect.metadata("design:paramtypes", []), _dec5$k(_class2$k = _dec6$j(_class2$k = (_class3 = class ServiceAopMethod extends ServiceAopMethodBase {
|
|
714
714
|
constructor(...args) {
|
|
715
715
|
super(...args);
|
|
716
716
|
this._name = '';
|
|
@@ -727,19 +727,19 @@ let ServiceAopMethod = (_dec5$j = Service(), _dec6$j = BeanInfo({
|
|
|
727
727
|
set name(value) {
|
|
728
728
|
this._name = value;
|
|
729
729
|
}
|
|
730
|
-
}, _applyDecoratedDescriptor(_class3.prototype, "testSync", [_dec7$h, _dec8$d, _dec9$9,
|
|
730
|
+
}, _applyDecoratedDescriptor(_class3.prototype, "testSync", [_dec7$h, _dec8$d, _dec9$9, _dec10$9], Object.getOwnPropertyDescriptor(_class3.prototype, "testSync"), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, "testAsync", [_dec11$9, _dec12$7, _dec13$7, _dec14$7], Object.getOwnPropertyDescriptor(_class3.prototype, "testAsync"), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, "name", [_dec15$7, _dec16$6, _dec17$6, _dec18$6], Object.getOwnPropertyDescriptor(_class3.prototype, "name"), _class3.prototype), _class3)) || _class2$k) || _class2$k);
|
|
731
731
|
|
|
732
|
-
var _dec$
|
|
732
|
+
var _dec$H, _dec2$H, _dec3$j, _dec4$j, _dec5$j, _dec6$i, _dec7$g, _dec8$c, _dec9$8, _dec10$8, _dec11$8, _dec12$6, _dec13$6, _dec14$6, _dec15$6, _dec16$5, _dec17$5, _dec18$5, _dec19$4, _dec20$4, _dec21$4, _dec22$4, _dec23$4, _dec24$4, _dec25$4, _dec26$4, _dec27$4, _dec28$3, _dec29$3, _class$H, _class2$j;
|
|
733
733
|
function cacheKeyFn(args, prop, options) {
|
|
734
734
|
return `${this.$beanFullName}_${options.cacheProp ?? prop}_${getKeyHash(args)}`;
|
|
735
735
|
}
|
|
736
|
-
let ServiceCaching = (_dec$
|
|
736
|
+
let ServiceCaching = (_dec$H = Service(), _dec2$H = BeanInfo({
|
|
737
737
|
module: "test-vona"
|
|
738
|
-
}), _dec3$
|
|
738
|
+
}), _dec3$j = Caching.get({
|
|
739
739
|
cacheName: 'test-vona:test',
|
|
740
740
|
cacheProp: 'test',
|
|
741
741
|
cacheKeyFn: 'cacheKey'
|
|
742
|
-
}), _dec4$
|
|
742
|
+
}), _dec4$j = Reflect.metadata("design:type", Function), _dec5$j = Reflect.metadata("design:paramtypes", [Number]), _dec6$i = Caching.get({
|
|
743
743
|
cacheName: 'test-vona:test',
|
|
744
744
|
cacheProp: 'test',
|
|
745
745
|
cacheKeyFn
|
|
@@ -747,29 +747,29 @@ let ServiceCaching = (_dec$F = Service(), _dec2$F = BeanInfo({
|
|
|
747
747
|
cacheName: 'test-vona:test',
|
|
748
748
|
cacheProp: 'test',
|
|
749
749
|
cacheKey: 'cel://join([get(self,"$beanFullName"),options.cacheProp,hashkey(args)],"_")'
|
|
750
|
-
}),
|
|
750
|
+
}), _dec10$8 = Reflect.metadata("design:type", Function), _dec11$8 = Reflect.metadata("design:paramtypes", [Number]), _dec12$6 = Caching.get({
|
|
751
751
|
cacheName: 'test-vona:test',
|
|
752
752
|
cacheProp: 'test'
|
|
753
|
-
}),
|
|
753
|
+
}), _dec13$6 = Reflect.metadata("design:type", Function), _dec14$6 = Reflect.metadata("design:paramtypes", [Number]), _dec15$6 = Caching.set({
|
|
754
754
|
cacheName: 'test-vona:test',
|
|
755
755
|
cacheProp: 'test',
|
|
756
756
|
cacheKeyFn: 'cacheKeySet',
|
|
757
757
|
cacheValueFn: 'cacheValueSet'
|
|
758
|
-
}),
|
|
758
|
+
}), _dec16$5 = Reflect.metadata("design:type", Function), _dec17$5 = Reflect.metadata("design:paramtypes", [Number, typeof TSummerCacheTestData === "undefined" ? Object : TSummerCacheTestData]), _dec18$5 = Caching.set({
|
|
759
759
|
cacheName: 'test-vona:test',
|
|
760
760
|
cacheProp: 'test',
|
|
761
761
|
cacheKey: 'cel://join([get(self,"$beanFullName"),options.cacheProp,hashkey([args[0]])],"_")',
|
|
762
762
|
cacheValue: 'cel://{"id": args[1].id, "name": args[1].name}'
|
|
763
|
-
}),
|
|
763
|
+
}), _dec19$4 = Reflect.metadata("design:type", Function), _dec20$4 = Reflect.metadata("design:paramtypes", [Number, typeof TSummerCacheTestData === "undefined" ? Object : TSummerCacheTestData]), _dec21$4 = Caching.set({
|
|
764
764
|
cacheName: 'test-vona:test',
|
|
765
765
|
cacheProp: 'test',
|
|
766
766
|
cacheKeyFn: 'cacheKeySet'
|
|
767
|
-
}),
|
|
767
|
+
}), _dec22$4 = Reflect.metadata("design:type", Function), _dec23$4 = Reflect.metadata("design:paramtypes", [Number, typeof TSummerCacheTestData === "undefined" ? Object : TSummerCacheTestData]), _dec24$4 = Caching.del({
|
|
768
768
|
cacheName: 'test-vona:test',
|
|
769
769
|
cacheProp: 'test'
|
|
770
|
-
}),
|
|
770
|
+
}), _dec25$4 = Reflect.metadata("design:type", Function), _dec26$4 = Reflect.metadata("design:paramtypes", [Number]), _dec27$4 = Caching.clear({
|
|
771
771
|
cacheName: 'test-vona:test'
|
|
772
|
-
}),
|
|
772
|
+
}), _dec28$3 = Reflect.metadata("design:type", Function), _dec29$3 = Reflect.metadata("design:paramtypes", []), _dec$H(_class$H = _dec2$H(_class$H = (_class2$j = class ServiceCaching extends BeanBase {
|
|
773
773
|
cacheKey(args, prop, options) {
|
|
774
774
|
return `${this.$beanFullName}_${options.cacheProp ?? prop}_${getKeyHash(args)}`;
|
|
775
775
|
}
|
|
@@ -813,12 +813,238 @@ let ServiceCaching = (_dec$F = Service(), _dec2$F = BeanInfo({
|
|
|
813
813
|
async clear() {
|
|
814
814
|
// do nothing
|
|
815
815
|
}
|
|
816
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
816
|
+
}, _applyDecoratedDescriptor(_class2$j.prototype, "get", [_dec3$j, _dec4$j, _dec5$j], Object.getOwnPropertyDescriptor(_class2$j.prototype, "get"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "get2", [_dec6$i, _dec7$g, _dec8$c], Object.getOwnPropertyDescriptor(_class2$j.prototype, "get2"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "get3", [_dec9$8, _dec10$8, _dec11$8], Object.getOwnPropertyDescriptor(_class2$j.prototype, "get3"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "get4", [_dec12$6, _dec13$6, _dec14$6], Object.getOwnPropertyDescriptor(_class2$j.prototype, "get4"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "set", [_dec15$6, _dec16$5, _dec17$5], Object.getOwnPropertyDescriptor(_class2$j.prototype, "set"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "set2", [_dec18$5, _dec19$4, _dec20$4], Object.getOwnPropertyDescriptor(_class2$j.prototype, "set2"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "set3", [_dec21$4, _dec22$4, _dec23$4], Object.getOwnPropertyDescriptor(_class2$j.prototype, "set3"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "del", [_dec24$4, _dec25$4, _dec26$4], Object.getOwnPropertyDescriptor(_class2$j.prototype, "del"), _class2$j.prototype), _applyDecoratedDescriptor(_class2$j.prototype, "clear", [_dec27$4, _dec28$3, _dec29$3], Object.getOwnPropertyDescriptor(_class2$j.prototype, "clear"), _class2$j.prototype), _class2$j)) || _class$H) || _class$H);
|
|
817
|
+
|
|
818
|
+
var _dec$G, _dec2$G, _class$G;
|
|
819
|
+
let ServiceOrder = (_dec$G = Service(), _dec2$G = BeanInfo({
|
|
820
|
+
module: "test-vona"
|
|
821
|
+
}), _dec$G(_class$G = _dec2$G(_class$G = class ServiceOrder extends BeanBase {
|
|
822
|
+
async relationHasMany() {
|
|
823
|
+
// insert
|
|
824
|
+
const orderCreate = await this.scope.model.order.insert({
|
|
825
|
+
orderNo: 'Order001',
|
|
826
|
+
products: [{
|
|
827
|
+
name: 'Apple'
|
|
828
|
+
}, {
|
|
829
|
+
name: 'Pear'
|
|
830
|
+
}]
|
|
831
|
+
}, {
|
|
832
|
+
include: {
|
|
833
|
+
products: true
|
|
834
|
+
}
|
|
835
|
+
});
|
|
836
|
+
// get
|
|
837
|
+
await this.scope.model.order.get({
|
|
838
|
+
id: orderCreate.id
|
|
839
|
+
}, {
|
|
840
|
+
include: {
|
|
841
|
+
products: true
|
|
842
|
+
}
|
|
843
|
+
});
|
|
844
|
+
// update
|
|
845
|
+
await this.scope.model.order.update({
|
|
846
|
+
id: orderCreate.id,
|
|
847
|
+
orderNo: 'Order001-Update',
|
|
848
|
+
products: [
|
|
849
|
+
// create product: Peach
|
|
850
|
+
{
|
|
851
|
+
name: 'Peach'
|
|
852
|
+
},
|
|
853
|
+
// update product: Apple
|
|
854
|
+
{
|
|
855
|
+
id: orderCreate.products[0].id,
|
|
856
|
+
name: 'Apple-Update'
|
|
857
|
+
},
|
|
858
|
+
// delete product: Pear
|
|
859
|
+
{
|
|
860
|
+
id: orderCreate.products[1].id,
|
|
861
|
+
deleted: true
|
|
862
|
+
}]
|
|
863
|
+
}, {
|
|
864
|
+
include: {
|
|
865
|
+
products: true
|
|
866
|
+
}
|
|
867
|
+
});
|
|
868
|
+
// delete
|
|
869
|
+
await this.scope.model.order.delete({
|
|
870
|
+
id: orderCreate.id
|
|
871
|
+
}, {
|
|
872
|
+
include: {
|
|
873
|
+
products: true
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
}) || _class$G) || _class$G);
|
|
817
878
|
|
|
818
|
-
var _dec$
|
|
819
|
-
let ServicePost = (_dec$
|
|
879
|
+
var _dec$F, _dec2$F, _dec3$i, _dec4$i, _dec5$i, _class$F, _class2$i;
|
|
880
|
+
let ServicePost = (_dec$F = Service(), _dec2$F = BeanInfo({
|
|
820
881
|
module: "test-vona"
|
|
821
|
-
}), _dec$
|
|
882
|
+
}), _dec3$i = Database.transaction(), _dec4$i = Reflect.metadata("design:type", Function), _dec5$i = Reflect.metadata("design:paramtypes", []), _dec$F(_class$F = _dec2$F(_class$F = (_class2$i = class ServicePost extends BeanBase {
|
|
883
|
+
async relationBelongsTo() {
|
|
884
|
+
const postContent = await this.scope.model.postContent.select({
|
|
885
|
+
include: {
|
|
886
|
+
post: true
|
|
887
|
+
}
|
|
888
|
+
});
|
|
889
|
+
console.log(postContent[0]?.post?.title);
|
|
890
|
+
}
|
|
891
|
+
async relationHasOne() {
|
|
892
|
+
// insert
|
|
893
|
+
const postCreate = await this.scope.model.post.insert({
|
|
894
|
+
title: 'Post001',
|
|
895
|
+
postContent: {
|
|
896
|
+
content: 'This is a post'
|
|
897
|
+
}
|
|
898
|
+
}, {
|
|
899
|
+
include: {
|
|
900
|
+
postContent: true
|
|
901
|
+
}
|
|
902
|
+
});
|
|
903
|
+
// get
|
|
904
|
+
const post = await this.scope.model.post.get({
|
|
905
|
+
id: postCreate.id
|
|
906
|
+
}, {
|
|
907
|
+
include: {
|
|
908
|
+
postContent: true
|
|
909
|
+
}
|
|
910
|
+
});
|
|
911
|
+
// update
|
|
912
|
+
await this.scope.model.post.update({
|
|
913
|
+
id: postCreate.id,
|
|
914
|
+
title: 'Post001-Update',
|
|
915
|
+
postContent: {
|
|
916
|
+
content: 'This is a post-changed'
|
|
917
|
+
}
|
|
918
|
+
}, {
|
|
919
|
+
include: {
|
|
920
|
+
postContent: true
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
// delete
|
|
924
|
+
await this.scope.model.post.delete({
|
|
925
|
+
id: postCreate.id
|
|
926
|
+
}, {
|
|
927
|
+
include: {
|
|
928
|
+
postContent: true
|
|
929
|
+
}
|
|
930
|
+
});
|
|
931
|
+
console.log(post?.postContent?.id);
|
|
932
|
+
}
|
|
933
|
+
async transaction() {
|
|
934
|
+
// insert
|
|
935
|
+
const post = await this.scope.model.post.insert({
|
|
936
|
+
title: 'Post001'
|
|
937
|
+
});
|
|
938
|
+
// cache
|
|
939
|
+
await this.scope.cacheRedis.post.set(post, post.id);
|
|
940
|
+
}
|
|
941
|
+
async transactionManually() {
|
|
942
|
+
const db = this.bean.database.getDb({
|
|
943
|
+
clientName: 'default'
|
|
944
|
+
});
|
|
945
|
+
await db.transaction.begin(async () => {
|
|
946
|
+
const modelPost = this.scope.model.post.newInstance(db);
|
|
947
|
+
const post = await modelPost.insert({
|
|
948
|
+
title: 'Post001'
|
|
949
|
+
});
|
|
950
|
+
await this.scope.cacheRedis.post.set(post, post.id, {
|
|
951
|
+
db
|
|
952
|
+
});
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
async create() {
|
|
956
|
+
const post = await this.scope.model.post.insert({
|
|
957
|
+
title: 'Post001'
|
|
958
|
+
});
|
|
959
|
+
// console.log(post.id);
|
|
960
|
+
return post;
|
|
961
|
+
}
|
|
962
|
+
async createBulk() {
|
|
963
|
+
const posts = await this.scope.model.post.insertBulk([{
|
|
964
|
+
title: 'Post001'
|
|
965
|
+
}, {
|
|
966
|
+
title: 'Post002'
|
|
967
|
+
}]);
|
|
968
|
+
// console.log(posts[0].id, posts[1].id);
|
|
969
|
+
return posts;
|
|
970
|
+
}
|
|
971
|
+
async update() {
|
|
972
|
+
const post = await this.scope.model.post.update({
|
|
973
|
+
id: 1,
|
|
974
|
+
title: 'Post001-Update'
|
|
975
|
+
});
|
|
976
|
+
return post;
|
|
977
|
+
}
|
|
978
|
+
async update2() {
|
|
979
|
+
const post = await this.scope.model.post.update({
|
|
980
|
+
title: 'Post001-Update'
|
|
981
|
+
}, {
|
|
982
|
+
where: {
|
|
983
|
+
title: {
|
|
984
|
+
_startsWith_: 'Post001'
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
});
|
|
988
|
+
return post;
|
|
989
|
+
}
|
|
990
|
+
async updateBulk() {
|
|
991
|
+
const posts = await this.scope.model.post.updateBulk([{
|
|
992
|
+
id: 1,
|
|
993
|
+
title: 'Post001-Update'
|
|
994
|
+
}, {
|
|
995
|
+
id: 2,
|
|
996
|
+
title: 'Post002-Update'
|
|
997
|
+
}]);
|
|
998
|
+
return posts;
|
|
999
|
+
}
|
|
1000
|
+
async delete() {
|
|
1001
|
+
await this.scope.model.post.delete({
|
|
1002
|
+
id: 1
|
|
1003
|
+
});
|
|
1004
|
+
}
|
|
1005
|
+
async delete2() {
|
|
1006
|
+
await this.scope.model.post.delete({
|
|
1007
|
+
title: {
|
|
1008
|
+
_startsWith_: 'Post'
|
|
1009
|
+
}
|
|
1010
|
+
});
|
|
1011
|
+
}
|
|
1012
|
+
async deleteBulk() {
|
|
1013
|
+
await this.scope.model.post.deleteBulk([1, 2]);
|
|
1014
|
+
}
|
|
1015
|
+
async mutate() {
|
|
1016
|
+
// insert
|
|
1017
|
+
const post = await this.scope.model.post.mutate({
|
|
1018
|
+
title: 'Post001'
|
|
1019
|
+
});
|
|
1020
|
+
// update
|
|
1021
|
+
await this.scope.model.post.mutate({
|
|
1022
|
+
id: post.id,
|
|
1023
|
+
title: 'Post001-Update'
|
|
1024
|
+
});
|
|
1025
|
+
// delete
|
|
1026
|
+
await this.scope.model.post.mutate({
|
|
1027
|
+
id: post.id,
|
|
1028
|
+
deleted: true
|
|
1029
|
+
});
|
|
1030
|
+
}
|
|
1031
|
+
async mutateBulk() {
|
|
1032
|
+
await this.scope.model.post.mutateBulk([
|
|
1033
|
+
// insert
|
|
1034
|
+
{
|
|
1035
|
+
title: 'Post003'
|
|
1036
|
+
},
|
|
1037
|
+
// update
|
|
1038
|
+
{
|
|
1039
|
+
id: 1,
|
|
1040
|
+
title: 'Post001-Update'
|
|
1041
|
+
},
|
|
1042
|
+
// delete
|
|
1043
|
+
{
|
|
1044
|
+
id: 2,
|
|
1045
|
+
deleted: true
|
|
1046
|
+
}]);
|
|
1047
|
+
}
|
|
822
1048
|
async select() {
|
|
823
1049
|
return await this.scope.model.post.select({
|
|
824
1050
|
where: {
|
|
@@ -854,21 +1080,21 @@ let ServicePost = (_dec$E = Service(), _dec2$E = BeanInfo({
|
|
|
854
1080
|
async count() {
|
|
855
1081
|
return await this.scope.model.post.count();
|
|
856
1082
|
}
|
|
857
|
-
}) || _class$
|
|
1083
|
+
}, _applyDecoratedDescriptor(_class2$i.prototype, "transaction", [_dec3$i, _dec4$i, _dec5$i], Object.getOwnPropertyDescriptor(_class2$i.prototype, "transaction"), _class2$i.prototype), _class2$i)) || _class$F) || _class$F);
|
|
858
1084
|
|
|
859
|
-
var _dec$
|
|
860
|
-
let ServiceTest = (_dec$
|
|
1085
|
+
var _dec$E, _dec2$E, _class$E;
|
|
1086
|
+
let ServiceTest = (_dec$E = Service(), _dec2$E = BeanInfo({
|
|
861
1087
|
module: "test-vona"
|
|
862
|
-
}), _dec$
|
|
1088
|
+
}), _dec$E(_class$E = _dec2$E(_class$E = class ServiceTest extends BeanBase {
|
|
863
1089
|
get name() {
|
|
864
1090
|
return 'serviceTest';
|
|
865
1091
|
}
|
|
866
|
-
}) || _class$
|
|
1092
|
+
}) || _class$E) || _class$E);
|
|
867
1093
|
|
|
868
|
-
var _dec$
|
|
869
|
-
let ServiceTestApp = (_dec$
|
|
1094
|
+
var _dec$D, _dec2$D, _class$D;
|
|
1095
|
+
let ServiceTestApp = (_dec$D = Service(), _dec2$D = BeanInfo({
|
|
870
1096
|
module: "test-vona"
|
|
871
|
-
}), _dec$
|
|
1097
|
+
}), _dec$D(_class$D = _dec2$D(_class$D = class ServiceTestApp extends BeanBase {
|
|
872
1098
|
actionSync({
|
|
873
1099
|
a,
|
|
874
1100
|
b
|
|
@@ -881,9 +1107,9 @@ let ServiceTestApp = (_dec$C = Service(), _dec2$C = BeanInfo({
|
|
|
881
1107
|
}) {
|
|
882
1108
|
return Promise.resolve(a + b);
|
|
883
1109
|
}
|
|
884
|
-
}) || _class$
|
|
1110
|
+
}) || _class$D) || _class$D);
|
|
885
1111
|
|
|
886
|
-
var _dec$
|
|
1112
|
+
var _dec$C, _dec2$C, _class$C;
|
|
887
1113
|
class ClassBeanBase extends BeanBase {
|
|
888
1114
|
actionSync({
|
|
889
1115
|
a,
|
|
@@ -892,21 +1118,21 @@ class ClassBeanBase extends BeanBase {
|
|
|
892
1118
|
return a + b;
|
|
893
1119
|
}
|
|
894
1120
|
}
|
|
895
|
-
let ServiceTestClass = (_dec$
|
|
1121
|
+
let ServiceTestClass = (_dec$C = Service(), _dec2$C = BeanInfo({
|
|
896
1122
|
module: "test-vona"
|
|
897
|
-
}), _dec$
|
|
1123
|
+
}), _dec$C(_class$C = _dec2$C(_class$C = class ServiceTestClass extends ClassBeanBase {
|
|
898
1124
|
async actionAsync({
|
|
899
1125
|
a,
|
|
900
1126
|
b
|
|
901
1127
|
}) {
|
|
902
1128
|
return Promise.resolve(a + b);
|
|
903
1129
|
}
|
|
904
|
-
}) || _class$
|
|
1130
|
+
}) || _class$C) || _class$C);
|
|
905
1131
|
|
|
906
|
-
var _dec$
|
|
907
|
-
let ServiceTestData = (_dec$
|
|
1132
|
+
var _dec$B, _dec2$B, _class$B;
|
|
1133
|
+
let ServiceTestData = (_dec$B = Service(), _dec2$B = BeanInfo({
|
|
908
1134
|
module: "test-vona"
|
|
909
|
-
}), _dec$
|
|
1135
|
+
}), _dec$B(_class$B = _dec2$B(_class$B = class ServiceTestData extends BeanBase {
|
|
910
1136
|
async create(prefix) {
|
|
911
1137
|
const scopeTest = this.scope;
|
|
912
1138
|
const userTom = await scopeTest.model.user.insert({
|
|
@@ -993,14 +1219,14 @@ let ServiceTestData = (_dec$A = Service(), _dec2$A = BeanInfo({
|
|
|
993
1219
|
id: userJimmy.id
|
|
994
1220
|
});
|
|
995
1221
|
}
|
|
996
|
-
}) || _class$
|
|
1222
|
+
}) || _class$B) || _class$B);
|
|
997
1223
|
|
|
998
|
-
var _dec$
|
|
1224
|
+
var _dec$A, _dec2$A, _dec3$h, _dec4$h, _dec5$h, _dec6$h, _dec7$f, _dec8$b, _class$A, _class2$h;
|
|
999
1225
|
const tableNameFail$1 = '__tempTransactionFail';
|
|
1000
1226
|
const tableNameSuccess$1 = '__tempTransactionSuccess';
|
|
1001
|
-
let ServiceTransaction = (_dec$
|
|
1227
|
+
let ServiceTransaction = (_dec$A = Service(), _dec2$A = BeanInfo({
|
|
1002
1228
|
module: "test-vona"
|
|
1003
|
-
}), _dec3$h = Database.transaction(), _dec4$h = Reflect.metadata("design:type", Function), _dec5$h = Reflect.metadata("design:paramtypes", [Object]), _dec6$h = Database.transaction(), _dec7$f = Reflect.metadata("design:type", Function), _dec8$b = Reflect.metadata("design:paramtypes", [Object]), _dec$
|
|
1229
|
+
}), _dec3$h = Database.transaction(), _dec4$h = Reflect.metadata("design:type", Function), _dec5$h = Reflect.metadata("design:paramtypes", [Object]), _dec6$h = Database.transaction(), _dec7$f = Reflect.metadata("design:type", Function), _dec8$b = Reflect.metadata("design:paramtypes", [Object]), _dec$A(_class$A = _dec2$A(_class$A = (_class2$h = class ServiceTransaction extends BeanBase {
|
|
1004
1230
|
async fail(item) {
|
|
1005
1231
|
await this.bean.model.update(`${tableNameFail$1}`, item);
|
|
1006
1232
|
await this.bean.model.update(`${tableNameFail$1}error`, item);
|
|
@@ -1008,26 +1234,31 @@ let ServiceTransaction = (_dec$z = Service(), _dec2$z = BeanInfo({
|
|
|
1008
1234
|
async success(item) {
|
|
1009
1235
|
await this.bean.model.update(tableNameSuccess$1, item);
|
|
1010
1236
|
}
|
|
1011
|
-
}, _applyDecoratedDescriptor(_class2$h.prototype, "fail", [_dec3$h, _dec4$h, _dec5$h], Object.getOwnPropertyDescriptor(_class2$h.prototype, "fail"), _class2$h.prototype), _applyDecoratedDescriptor(_class2$h.prototype, "success", [_dec6$h, _dec7$f, _dec8$b], Object.getOwnPropertyDescriptor(_class2$h.prototype, "success"), _class2$h.prototype), _class2$h)) || _class$
|
|
1237
|
+
}, _applyDecoratedDescriptor(_class2$h.prototype, "fail", [_dec3$h, _dec4$h, _dec5$h], Object.getOwnPropertyDescriptor(_class2$h.prototype, "fail"), _class2$h.prototype), _applyDecoratedDescriptor(_class2$h.prototype, "success", [_dec6$h, _dec7$f, _dec8$b], Object.getOwnPropertyDescriptor(_class2$h.prototype, "success"), _class2$h.prototype), _class2$h)) || _class$A) || _class$A);
|
|
1012
1238
|
|
|
1013
|
-
var _dec$
|
|
1014
|
-
let BroadcastTest = (_dec$
|
|
1239
|
+
var _dec$z, _dec2$z, _class$z;
|
|
1240
|
+
let BroadcastTest = (_dec$z = Broadcast(), _dec2$z = BeanInfo({
|
|
1015
1241
|
module: "test-vona"
|
|
1016
|
-
}), _dec$
|
|
1242
|
+
}), _dec$z(_class$z = _dec2$z(_class$z = class BroadcastTest extends BeanBroadcastBase {
|
|
1017
1243
|
async execute(data, isEmitter) {
|
|
1018
1244
|
// locale
|
|
1019
1245
|
assert.equal(this.ctx.locale, 'zh-cn');
|
|
1020
1246
|
// data
|
|
1021
1247
|
assert.equal(data.message, 'hello');
|
|
1022
1248
|
}
|
|
1023
|
-
}) || _class$
|
|
1249
|
+
}) || _class$z) || _class$z);
|
|
1024
1250
|
|
|
1025
|
-
var _dec$
|
|
1026
|
-
let CacheMemTest = (_dec$
|
|
1251
|
+
var _dec$y, _dec2$y, _class$y;
|
|
1252
|
+
let CacheMemTest = (_dec$y = CacheMem({
|
|
1027
1253
|
ttl: 1 * 1000
|
|
1028
|
-
}), _dec2$
|
|
1254
|
+
}), _dec2$y = BeanInfo({
|
|
1255
|
+
module: "test-vona"
|
|
1256
|
+
}), _dec$y(_class$y = _dec2$y(_class$y = class CacheMemTest extends BeanCacheMemBase {}) || _class$y) || _class$y);
|
|
1257
|
+
|
|
1258
|
+
var _dec$x, _dec2$x, _class$x;
|
|
1259
|
+
let CacheRedisPost = (_dec$x = CacheRedis(), _dec2$x = BeanInfo({
|
|
1029
1260
|
module: "test-vona"
|
|
1030
|
-
}), _dec$x(_class$x = _dec2$x(_class$x = class
|
|
1261
|
+
}), _dec$x(_class$x = _dec2$x(_class$x = class CacheRedisPost extends BeanCacheRedisBase {}) || _class$x) || _class$x);
|
|
1031
1262
|
|
|
1032
1263
|
var _dec$w, _dec2$w, _class$w;
|
|
1033
1264
|
let CacheRedisTest = (_dec$w = CacheRedis({
|
|
@@ -1344,7 +1575,7 @@ let DtoUserUpdate = (_dec$e = Dto(), _dec2$e = BeanInfo({
|
|
|
1344
1575
|
|
|
1345
1576
|
const __ThisModule__ = 'test-vona';
|
|
1346
1577
|
|
|
1347
|
-
var _dec$d, _dec2$d, _dec3$c, _dec4$c, _dec5$c, _dec6$c, _dec7$c, _dec8$8, _dec9$7,
|
|
1578
|
+
var _dec$d, _dec2$d, _dec3$c, _dec4$c, _dec5$c, _dec6$c, _dec7$c, _dec8$8, _dec9$7, _dec10$7, _dec11$7, _class$d, _class2$c;
|
|
1348
1579
|
let ControllerBean = (_dec$d = Controller({
|
|
1349
1580
|
path: 'bean',
|
|
1350
1581
|
meta: {
|
|
@@ -1352,7 +1583,7 @@ let ControllerBean = (_dec$d = Controller({
|
|
|
1352
1583
|
}
|
|
1353
1584
|
}), _dec2$d = Api.exclude(), _dec3$c = Passport.public(), _dec4$c = BeanInfo({
|
|
1354
1585
|
module: "test-vona"
|
|
1355
|
-
}), _dec5$c = Web.get('test'), _dec6$c = Reflect.metadata("design:type", Function), _dec7$c = Reflect.metadata("design:paramtypes", []), _dec8$8 = Web.get('service'), _dec9$7 = Passport.public(),
|
|
1586
|
+
}), _dec5$c = Web.get('test'), _dec6$c = Reflect.metadata("design:type", Function), _dec7$c = Reflect.metadata("design:paramtypes", []), _dec8$8 = Web.get('service'), _dec9$7 = Passport.public(), _dec10$7 = Reflect.metadata("design:type", Function), _dec11$7 = Reflect.metadata("design:paramtypes", []), _dec$d(_class$d = _dec2$d(_class$d = _dec3$c(_class$d = _dec4$c(_class$d = (_class2$c = class ControllerBean extends BeanBase {
|
|
1356
1587
|
async test() {
|
|
1357
1588
|
const a = 3;
|
|
1358
1589
|
const b = 4;
|
|
@@ -1442,7 +1673,7 @@ let ControllerBean = (_dec$d = Controller({
|
|
|
1442
1673
|
res = this.$scope.testVona.service.test.name;
|
|
1443
1674
|
assert.equal(res, 'serviceTest');
|
|
1444
1675
|
}
|
|
1445
|
-
}, _applyDecoratedDescriptor(_class2$c.prototype, "test", [_dec5$c, _dec6$c, _dec7$c], Object.getOwnPropertyDescriptor(_class2$c.prototype, "test"), _class2$c.prototype), _applyDecoratedDescriptor(_class2$c.prototype, "service", [_dec8$8, _dec9$7,
|
|
1676
|
+
}, _applyDecoratedDescriptor(_class2$c.prototype, "test", [_dec5$c, _dec6$c, _dec7$c], Object.getOwnPropertyDescriptor(_class2$c.prototype, "test"), _class2$c.prototype), _applyDecoratedDescriptor(_class2$c.prototype, "service", [_dec8$8, _dec9$7, _dec10$7, _dec11$7], Object.getOwnPropertyDescriptor(_class2$c.prototype, "service"), _class2$c.prototype), _class2$c)) || _class$d) || _class$d) || _class$d) || _class$d);
|
|
1446
1677
|
|
|
1447
1678
|
var _dec$c, _dec2$c, _dec3$b, _dec4$b, _dec5$b, _dec6$b, _dec7$b, _class$c, _class2$b;
|
|
1448
1679
|
let ControllerCacheMem = (_dec$c = Controller({
|
|
@@ -1560,22 +1791,22 @@ let ControllerCacheRedis = (_dec$b = Controller({
|
|
|
1560
1791
|
}
|
|
1561
1792
|
}, _applyDecoratedDescriptor(_class2$a.prototype, "redis", [_dec5$a, _dec6$a, _dec7$a], Object.getOwnPropertyDescriptor(_class2$a.prototype, "redis"), _class2$a.prototype), _class2$a)) || _class$b) || _class$b) || _class$b) || _class$b);
|
|
1562
1793
|
|
|
1563
|
-
var _dec$a, _dec2$a, _dec3$9, _dec4$9, _dec5$9, _dec6$9, _dec7$9, _dec8$7, _dec9$6,
|
|
1794
|
+
var _dec$a, _dec2$a, _dec3$9, _dec4$9, _dec5$9, _dec6$9, _dec7$9, _dec8$7, _dec9$6, _dec10$6, _dec11$6, _dec12$5, _dec13$5, _dec14$5, _dec15$5, _dec16$4, _dec17$4, _dec18$4, _dec19$3, _dec20$3, _dec21$3, _dec22$3, _dec23$3, _dec24$3, _dec25$3, _dec26$3, _dec27$3, _dec28$2, _dec29$2, _dec30$1, _dec31$1, _dec32$1, _dec33$1, _dec34$1, _class$a, _class2$9;
|
|
1564
1795
|
let ControllerDtoTest = (_dec$a = Controller('dtoTest', {
|
|
1565
1796
|
meta: {
|
|
1566
1797
|
mode: ['test', 'dev']
|
|
1567
1798
|
}
|
|
1568
1799
|
}), _dec2$a = BeanInfo({
|
|
1569
1800
|
module: "test-vona"
|
|
1570
|
-
}), _dec3$9 = Web.get('getUserLazy'), _dec4$9 = Reflect.metadata("design:type", Function), _dec5$9 = Reflect.metadata("design:paramtypes", []), _dec6$9 = Web.get('getUserDynamic'), _dec7$9 = Api.body($Dto.get('test-vona:post')), _dec8$7 = Reflect.metadata("design:type", Function), _dec9$6 = Reflect.metadata("design:paramtypes", []),
|
|
1801
|
+
}), _dec3$9 = Web.get('getUserLazy'), _dec4$9 = Reflect.metadata("design:type", Function), _dec5$9 = Reflect.metadata("design:paramtypes", []), _dec6$9 = Web.get('getUserDynamic'), _dec7$9 = Api.body($Dto.get('test-vona:post')), _dec8$7 = Reflect.metadata("design:type", Function), _dec9$6 = Reflect.metadata("design:paramtypes", []), _dec10$6 = Web.get('getUserStats'), _dec11$6 = Api.body($Dto.get('test-vona:userStats')), _dec12$5 = Reflect.metadata("design:type", Function), _dec13$5 = Reflect.metadata("design:paramtypes", []), _dec14$5 = Web.get('getUserStatsGroup'), _dec15$5 = Api.body($Dto.get('test-vona:userStatsGroup')), _dec16$4 = Reflect.metadata("design:type", Function), _dec17$4 = Reflect.metadata("design:paramtypes", []), _dec18$4 = Web.post('createUser'), _dec19$3 = function (target, key) {
|
|
1571
1802
|
return Arg.body(v.object(DtoUserCreate))(target, key, 0);
|
|
1572
|
-
},
|
|
1803
|
+
}, _dec20$3 = Reflect.metadata("design:type", Function), _dec21$3 = Reflect.metadata("design:paramtypes", [typeof DtoUserCreate === "undefined" ? Object : DtoUserCreate]), _dec22$3 = Web.patch('updateUser/:id'), _dec23$3 = function (target, key) {
|
|
1573
1804
|
return Arg.param('id')(target, key, 0);
|
|
1574
|
-
},
|
|
1805
|
+
}, _dec24$3 = function (target, key) {
|
|
1575
1806
|
return Arg.body(v.object(DtoUserUpdate))(target, key, 1);
|
|
1576
|
-
},
|
|
1807
|
+
}, _dec25$3 = Reflect.metadata("design:type", Function), _dec26$3 = Reflect.metadata("design:paramtypes", [typeof TableIdentity$1 === "undefined" ? Object : TableIdentity$1, typeof DtoUserUpdate === "undefined" ? Object : DtoUserUpdate]), _dec27$3 = Web.get('getCategoryTree'), _dec28$2 = Api.body(v.array($Dto.get('test-vona:category', {
|
|
1577
1808
|
columns: ['id', 'name']
|
|
1578
|
-
}))),
|
|
1809
|
+
}))), _dec29$2 = Reflect.metadata("design:type", Function), _dec30$1 = Reflect.metadata("design:paramtypes", []), _dec31$1 = Web.get('getCategoryTree2'), _dec32$1 = Api.body(v.array(DtoCategoryTree)), _dec33$1 = Reflect.metadata("design:type", Function), _dec34$1 = Reflect.metadata("design:paramtypes", []), _dec$a(_class$a = _dec2$a(_class$a = (_class2$9 = class ControllerDtoTest extends BeanBase {
|
|
1579
1810
|
getUserLazy() {
|
|
1580
1811
|
return {};
|
|
1581
1812
|
}
|
|
@@ -1604,27 +1835,27 @@ let ControllerDtoTest = (_dec$a = Controller('dtoTest', {
|
|
|
1604
1835
|
});
|
|
1605
1836
|
return items;
|
|
1606
1837
|
}
|
|
1607
|
-
}, _applyDecoratedDescriptor(_class2$9.prototype, "getUserLazy", [_dec3$9, _dec4$9, _dec5$9], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getUserLazy"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getPostDynamic", [_dec6$9, _dec7$9, _dec8$7, _dec9$6], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getPostDynamic"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getUserStats", [
|
|
1838
|
+
}, _applyDecoratedDescriptor(_class2$9.prototype, "getUserLazy", [_dec3$9, _dec4$9, _dec5$9], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getUserLazy"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getPostDynamic", [_dec6$9, _dec7$9, _dec8$7, _dec9$6], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getPostDynamic"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getUserStats", [_dec10$6, _dec11$6, _dec12$5, _dec13$5], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getUserStats"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getUserStatsGroup", [_dec14$5, _dec15$5, _dec16$4, _dec17$4], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getUserStatsGroup"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "createUser", [_dec18$4, _dec19$3, _dec20$3, _dec21$3], Object.getOwnPropertyDescriptor(_class2$9.prototype, "createUser"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "updateUser", [_dec22$3, _dec23$3, _dec24$3, _dec25$3, _dec26$3], Object.getOwnPropertyDescriptor(_class2$9.prototype, "updateUser"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getCategoryTree", [_dec27$3, _dec28$2, _dec29$2, _dec30$1], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getCategoryTree"), _class2$9.prototype), _applyDecoratedDescriptor(_class2$9.prototype, "getCategoryTree2", [_dec31$1, _dec32$1, _dec33$1, _dec34$1], Object.getOwnPropertyDescriptor(_class2$9.prototype, "getCategoryTree2"), _class2$9.prototype), _class2$9)) || _class$a) || _class$a);
|
|
1608
1839
|
|
|
1609
|
-
var _dec$9, _dec2$9, _dec3$8, _dec4$8, _dec5$8, _dec6$8, _dec7$8, _dec8$6, _dec9$5,
|
|
1840
|
+
var _dec$9, _dec2$9, _dec3$8, _dec4$8, _dec5$8, _dec6$8, _dec7$8, _dec8$6, _dec9$5, _dec10$5, _dec11$5, _dec12$4, _dec13$4, _dec14$4, _dec15$4, _dec16$3, _dec17$3, _dec18$3, _class$9, _class2$8;
|
|
1610
1841
|
let ControllerGuardPassport = (_dec$9 = Controller('guardPassport'), _dec2$9 = BeanInfo({
|
|
1611
1842
|
module: "test-vona"
|
|
1612
1843
|
}), _dec3$8 = Web.get('testUserName'), _dec4$8 = Passport.userName({
|
|
1613
1844
|
name: 'admin'
|
|
1614
1845
|
}), _dec5$8 = Reflect.metadata("design:type", Function), _dec6$8 = Reflect.metadata("design:paramtypes", []), _dec7$8 = Web.get('testUserNameFail'), _dec8$6 = Passport.userName({
|
|
1615
1846
|
name: 'admin-none'
|
|
1616
|
-
}), _dec9$5 = Reflect.metadata("design:type", Function),
|
|
1847
|
+
}), _dec9$5 = Reflect.metadata("design:type", Function), _dec10$5 = Reflect.metadata("design:paramtypes", []), _dec11$5 = Web.get('testRoleName'), _dec12$4 = Passport.roleName({
|
|
1617
1848
|
name: 'admin'
|
|
1618
|
-
}),
|
|
1849
|
+
}), _dec13$4 = Reflect.metadata("design:type", Function), _dec14$4 = Reflect.metadata("design:paramtypes", []), _dec15$4 = Web.get('testRoleNameFail'), _dec16$3 = Passport.roleName({
|
|
1619
1850
|
name: 'admin-none'
|
|
1620
|
-
}),
|
|
1851
|
+
}), _dec17$3 = Reflect.metadata("design:type", Function), _dec18$3 = Reflect.metadata("design:paramtypes", []), _dec$9(_class$9 = _dec2$9(_class$9 = (_class2$8 = class ControllerGuardPassport extends BeanBase {
|
|
1621
1852
|
testUserName() {}
|
|
1622
1853
|
testUserNameFail() {}
|
|
1623
1854
|
testRoleName() {}
|
|
1624
1855
|
testRoleNameFail() {}
|
|
1625
|
-
}, _applyDecoratedDescriptor(_class2$8.prototype, "testUserName", [_dec3$8, _dec4$8, _dec5$8, _dec6$8], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testUserName"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "testUserNameFail", [_dec7$8, _dec8$6, _dec9$5,
|
|
1856
|
+
}, _applyDecoratedDescriptor(_class2$8.prototype, "testUserName", [_dec3$8, _dec4$8, _dec5$8, _dec6$8], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testUserName"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "testUserNameFail", [_dec7$8, _dec8$6, _dec9$5, _dec10$5], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testUserNameFail"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "testRoleName", [_dec11$5, _dec12$4, _dec13$4, _dec14$4], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testRoleName"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "testRoleNameFail", [_dec15$4, _dec16$3, _dec17$3, _dec18$3], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testRoleNameFail"), _class2$8.prototype), _class2$8)) || _class$9) || _class$9);
|
|
1626
1857
|
|
|
1627
|
-
var _dec$8, _dec2$8, _dec3$7, _dec4$7, _dec5$7, _dec6$7, _dec7$7, _dec8$5, _dec9$4,
|
|
1858
|
+
var _dec$8, _dec2$8, _dec3$7, _dec4$7, _dec5$7, _dec6$7, _dec7$7, _dec8$5, _dec9$4, _dec10$4, _dec11$4, _dec12$3, _dec13$3, _dec14$3, _dec15$3, _dec16$2, _dec17$2, _dec18$2, _dec19$2, _dec20$2, _dec21$2, _dec22$2, _dec23$2, _dec24$2, _dec25$2, _dec26$2, _dec27$2, _dec28$1, _dec29$1, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _dec49, _dec50, _class$8, _class2$7;
|
|
1628
1859
|
let ControllerOnion = (_dec$8 = Controller({
|
|
1629
1860
|
path: 'onion',
|
|
1630
1861
|
tags: ['Onion'],
|
|
@@ -1642,66 +1873,66 @@ let ControllerOnion = (_dec$8 = Controller({
|
|
|
1642
1873
|
public: true
|
|
1643
1874
|
}), _dec6$7 = Reflect.metadata("design:type", Function), _dec7$7 = Reflect.metadata("design:paramtypes", []), _dec8$5 = Web.post('//echo'), _dec9$4 = Aspect.guardGlobal('a-user:passport', {
|
|
1644
1875
|
public: true
|
|
1645
|
-
}),
|
|
1876
|
+
}), _dec10$4 = Aspect.middlewareGlobal('a-core:gate', {
|
|
1646
1877
|
gate: {
|
|
1647
1878
|
mode: 'dev'
|
|
1648
1879
|
}
|
|
1649
|
-
}),
|
|
1880
|
+
}), _dec11$4 = Core.gate({
|
|
1650
1881
|
gate: {
|
|
1651
1882
|
mode: 'dev'
|
|
1652
1883
|
}
|
|
1653
|
-
}),
|
|
1884
|
+
}), _dec12$3 = Aspect.aopMethod('a-orm:transaction', {
|
|
1654
1885
|
isolationLevel: 'SERIALIZABLE',
|
|
1655
1886
|
readOnly: true
|
|
1656
|
-
}),
|
|
1887
|
+
}), _dec13$3 = Database.transaction({
|
|
1657
1888
|
isolationLevel: 'READ_COMMITTED',
|
|
1658
1889
|
readOnly: false
|
|
1659
|
-
}),
|
|
1890
|
+
}), _dec14$3 = Api.body(v.optional(), z.string()), _dec15$3 = function (target, key) {
|
|
1660
1891
|
return Arg.query('id', v.default(0), z.number())(target, key, 0);
|
|
1661
|
-
},
|
|
1892
|
+
}, _dec16$2 = function (target, key) {
|
|
1662
1893
|
return Arg.query('name', z.number().optional())(target, key, 2);
|
|
1663
|
-
},
|
|
1894
|
+
}, _dec17$2 = function (target, key) {
|
|
1664
1895
|
return Arg.body(v.title($locale('User')), z.object({
|
|
1665
1896
|
id: z.number().openapi({
|
|
1666
1897
|
title: $locale('UserId')
|
|
1667
1898
|
})
|
|
1668
1899
|
}))(target, key, 3);
|
|
1669
|
-
},
|
|
1900
|
+
}, _dec18$2 = Reflect.metadata("design:type", Function), _dec19$2 = Reflect.metadata("design:paramtypes", [Number, String, String, typeof DtoUser === "undefined" ? Object : DtoUser]), _dec20$2 = Web.post('echo2/:userId/:userName'), _dec21$2 = Aspect.guardGlobal('a-user:passport', {
|
|
1670
1901
|
public: true
|
|
1671
|
-
}),
|
|
1902
|
+
}), _dec22$2 = function (target, key) {
|
|
1672
1903
|
return Arg.param('userId', v.title($locale('UserId')), v.example('example:1'))(target, key, 0);
|
|
1673
|
-
},
|
|
1904
|
+
}, _dec23$2 = function (target, key) {
|
|
1674
1905
|
return Arg.param('userName', v.title($locale('UserId')), v.example('example:1'))(target, key, 1);
|
|
1675
|
-
},
|
|
1906
|
+
}, _dec24$2 = function (target, key) {
|
|
1676
1907
|
return Arg.query(DtoUser)(target, key, 2);
|
|
1677
|
-
},
|
|
1908
|
+
}, _dec25$2 = function (target, key) {
|
|
1678
1909
|
return Arg.body(v.title($locale('User')), z.object({
|
|
1679
1910
|
id: z.number().openapi({
|
|
1680
1911
|
title: $locale('UserId')
|
|
1681
1912
|
})
|
|
1682
1913
|
}))(target, key, 3);
|
|
1683
|
-
},
|
|
1914
|
+
}, _dec26$2 = Reflect.metadata("design:type", Function), _dec27$2 = Reflect.metadata("design:paramtypes", [Number, String, typeof DtoUser === "undefined" ? Object : DtoUser, typeof DtoUser === "undefined" ? Object : DtoUser]), _dec28$1 = Web.get('echo3/:userId'), _dec29$1 = Aspect.guardGlobal('a-user:passport', {
|
|
1684
1915
|
public: true
|
|
1685
|
-
}),
|
|
1916
|
+
}), _dec30 = function (target, key) {
|
|
1686
1917
|
return Arg.param('userId')(target, key, 0);
|
|
1687
|
-
},
|
|
1918
|
+
}, _dec31 = function (target, key) {
|
|
1688
1919
|
return Arg.query('id', v.optional())(target, key, 1);
|
|
1689
|
-
},
|
|
1920
|
+
}, _dec32 = function (target, key) {
|
|
1690
1921
|
return Arg.headers('Accept', v.title($locale('UserId')))(target, key, 2);
|
|
1691
|
-
},
|
|
1922
|
+
}, _dec33 = Reflect.metadata("design:type", Function), _dec34 = Reflect.metadata("design:paramtypes", [Number, Number, String]), _dec35 = Web.post('echo4'), _dec36 = Aspect.guardGlobal('a-user:passport', {
|
|
1692
1923
|
public: true
|
|
1693
|
-
}),
|
|
1924
|
+
}), _dec37 = Aspect.filterGlobal('a-error:error', {
|
|
1694
1925
|
enable: true,
|
|
1695
1926
|
logs: {
|
|
1696
1927
|
422: true
|
|
1697
1928
|
}
|
|
1698
|
-
}),
|
|
1929
|
+
}), _dec38 = Api.body(v.array(DtoUser)), _dec39 = function (target, key) {
|
|
1699
1930
|
return Arg.body(v.optional(), v.array(), v.object(DtoUser))(target, key, 0);
|
|
1700
|
-
},
|
|
1931
|
+
}, _dec40 = Reflect.metadata("design:type", Function), _dec41 = Reflect.metadata("design:paramtypes", [Array]), _dec42 = Web.get('echo5'), _dec43 = Passport.public(), _dec44 = function (target, key) {
|
|
1701
1932
|
return Arg.query('ids', v.default([1]), v.array(Number, {
|
|
1702
1933
|
separator: '-'
|
|
1703
1934
|
}))(target, key, 0);
|
|
1704
|
-
},
|
|
1935
|
+
}, _dec45 = Reflect.metadata("design:type", Function), _dec46 = Reflect.metadata("design:paramtypes", [Array]), _dec47 = Web.get('echo6'), _dec48 = Passport.admin(), _dec49 = Reflect.metadata("design:type", Function), _dec50 = Reflect.metadata("design:paramtypes", []), _dec$8(_class$8 = _dec2$8(_class$8 = (_class2$7 = class ControllerOnion extends BeanBase {
|
|
1705
1936
|
index() {
|
|
1706
1937
|
return this.ctx.db.inTransaction;
|
|
1707
1938
|
// return 'Hello Vona';
|
|
@@ -1732,9 +1963,9 @@ let ControllerOnion = (_dec$8 = Controller({
|
|
|
1732
1963
|
echo6() {
|
|
1733
1964
|
return this.bean.passport.isAuthenticated;
|
|
1734
1965
|
}
|
|
1735
|
-
}, _applyDecoratedDescriptor(_class2$7.prototype, "index", [_dec3$7, _dec4$7, _dec5$7, _dec6$7, _dec7$7], Object.getOwnPropertyDescriptor(_class2$7.prototype, "index"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo", [_dec8$5, _dec9$4,
|
|
1966
|
+
}, _applyDecoratedDescriptor(_class2$7.prototype, "index", [_dec3$7, _dec4$7, _dec5$7, _dec6$7, _dec7$7], Object.getOwnPropertyDescriptor(_class2$7.prototype, "index"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo", [_dec8$5, _dec9$4, _dec10$4, _dec11$4, _dec12$3, _dec13$3, _dec14$3, _dec15$3, _dec16$2, _dec17$2, _dec18$2, _dec19$2], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo2", [_dec20$2, _dec21$2, _dec22$2, _dec23$2, _dec24$2, _dec25$2, _dec26$2, _dec27$2], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo2"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo3", [_dec28$1, _dec29$1, _dec30, _dec31, _dec32, _dec33, _dec34], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo3"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo4", [_dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo4"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo5", [_dec42, _dec43, _dec44, _dec45, _dec46], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo5"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo6", [_dec47, _dec48, _dec49, _dec50], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo6"), _class2$7.prototype), _class2$7)) || _class$8) || _class$8);
|
|
1736
1967
|
|
|
1737
|
-
var _dec$7, _dec2$7, _dec3$6, _dec4$6, _dec5$6, _dec6$6, _dec7$6, _dec8$4, _dec9$3,
|
|
1968
|
+
var _dec$7, _dec2$7, _dec3$6, _dec4$6, _dec5$6, _dec6$6, _dec7$6, _dec8$4, _dec9$3, _dec10$3, _dec11$3, _dec12$2, _dec13$2, _dec14$2, _dec15$2, _dec16$1, _dec17$1, _dec18$1, _dec19$1, _dec20$1, _dec21$1, _dec22$1, _dec23$1, _dec24$1, _dec25$1, _dec26$1, _dec27$1, _class$7, _class2$6;
|
|
1738
1969
|
let ControllerPassport = (_dec$7 = Controller({
|
|
1739
1970
|
path: 'passport',
|
|
1740
1971
|
meta: {
|
|
@@ -1746,11 +1977,11 @@ let ControllerPassport = (_dec$7 = Controller({
|
|
|
1746
1977
|
return Arg.param('name')(target, key, 0);
|
|
1747
1978
|
}, _dec7$6 = function (target, key) {
|
|
1748
1979
|
return Arg.user()(target, key, 1);
|
|
1749
|
-
}, _dec8$4 = Reflect.metadata("design:type", Function), _dec9$3 = Reflect.metadata("design:paramtypes", [String, typeof IUserBase === "undefined" ? Object : IUserBase]),
|
|
1980
|
+
}, _dec8$4 = Reflect.metadata("design:type", Function), _dec9$3 = Reflect.metadata("design:paramtypes", [String, typeof IUserBase === "undefined" ? Object : IUserBase]), _dec10$3 = Web.post('login'), _dec11$3 = Api.body(v.object(DtoJwtToken)), _dec12$2 = Passport.public(), _dec13$2 = function (target, key) {
|
|
1750
1981
|
return Arg.body('name')(target, key, 0);
|
|
1751
|
-
},
|
|
1982
|
+
}, _dec14$2 = Reflect.metadata("design:type", Function), _dec15$2 = Reflect.metadata("design:paramtypes", [String]), _dec16$1 = Web.get('isAuthenticated'), _dec17$1 = Reflect.metadata("design:type", Function), _dec18$1 = Reflect.metadata("design:paramtypes", []), _dec19$1 = Web.post('refresh'), _dec20$1 = Api.body(v.object(DtoJwtToken)), _dec21$1 = Passport.public(), _dec22$1 = function (target, key) {
|
|
1752
1983
|
return Arg.body('refreshToken')(target, key, 0);
|
|
1753
|
-
},
|
|
1984
|
+
}, _dec23$1 = Reflect.metadata("design:type", Function), _dec24$1 = Reflect.metadata("design:paramtypes", [String]), _dec25$1 = Web.post('logout'), _dec26$1 = Reflect.metadata("design:type", Function), _dec27$1 = Reflect.metadata("design:paramtypes", []), _dec$7(_class$7 = _dec2$7(_class$7 = _dec3$6(_class$7 = (_class2$6 = class ControllerPassport extends BeanBase {
|
|
1754
1985
|
echo(name, user) {
|
|
1755
1986
|
assert.equal(name, 'admin');
|
|
1756
1987
|
assert.equal($getUserName(user), 'admin');
|
|
@@ -1772,7 +2003,7 @@ let ControllerPassport = (_dec$7 = Controller({
|
|
|
1772
2003
|
async logout() {
|
|
1773
2004
|
return await this.bean.passport.signout();
|
|
1774
2005
|
}
|
|
1775
|
-
}, _applyDecoratedDescriptor(_class2$6.prototype, "echo", [_dec4$6, _dec5$6, _dec6$6, _dec7$6, _dec8$4, _dec9$3], Object.getOwnPropertyDescriptor(_class2$6.prototype, "echo"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "login", [
|
|
2006
|
+
}, _applyDecoratedDescriptor(_class2$6.prototype, "echo", [_dec4$6, _dec5$6, _dec6$6, _dec7$6, _dec8$4, _dec9$3], Object.getOwnPropertyDescriptor(_class2$6.prototype, "echo"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "login", [_dec10$3, _dec11$3, _dec12$2, _dec13$2, _dec14$2, _dec15$2], Object.getOwnPropertyDescriptor(_class2$6.prototype, "login"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "isAuthenticated", [_dec16$1, _dec17$1, _dec18$1], Object.getOwnPropertyDescriptor(_class2$6.prototype, "isAuthenticated"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "refresh", [_dec19$1, _dec20$1, _dec21$1, _dec22$1, _dec23$1, _dec24$1], Object.getOwnPropertyDescriptor(_class2$6.prototype, "refresh"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "logout", [_dec25$1, _dec26$1, _dec27$1], Object.getOwnPropertyDescriptor(_class2$6.prototype, "logout"), _class2$6.prototype), _class2$6)) || _class$7) || _class$7) || _class$7);
|
|
1776
2007
|
|
|
1777
2008
|
var _dec$6, _dec2$6, _dec3$5, _dec4$5, _dec5$5, _dec6$5, _dec7$5, _dec8$3, _class$6, _class2$5;
|
|
1778
2009
|
let ControllerPerformAction = (_dec$6 = Controller({
|
|
@@ -1794,7 +2025,7 @@ let ControllerPerformAction = (_dec$6 = Controller({
|
|
|
1794
2025
|
}
|
|
1795
2026
|
}, _applyDecoratedDescriptor(_class2$5.prototype, "echo", [_dec4$5, _dec5$5, _dec6$5, _dec7$5, _dec8$3], Object.getOwnPropertyDescriptor(_class2$5.prototype, "echo"), _class2$5.prototype), _class2$5)) || _class$6) || _class$6) || _class$6);
|
|
1796
2027
|
|
|
1797
|
-
var _dec$5, _dec2$5, _dec3$4, _dec4$4, _dec5$4, _dec6$4, _dec7$4, _dec8$2, _dec9$2,
|
|
2028
|
+
var _dec$5, _dec2$5, _dec3$4, _dec4$4, _dec5$4, _dec6$4, _dec7$4, _dec8$2, _dec9$2, _dec10$2, _dec11$2, _class$5, _class2$4;
|
|
1798
2029
|
let ControllerQueue = (_dec$5 = Controller({
|
|
1799
2030
|
path: 'queue',
|
|
1800
2031
|
meta: {
|
|
@@ -1802,7 +2033,7 @@ let ControllerQueue = (_dec$5 = Controller({
|
|
|
1802
2033
|
}
|
|
1803
2034
|
}), _dec2$5 = Api.exclude(), _dec3$4 = BeanInfo({
|
|
1804
2035
|
module: "test-vona"
|
|
1805
|
-
}), _dec4$4 = Web.post('pushAsync'), _dec5$4 = Passport.public(), _dec6$4 = Reflect.metadata("design:type", Function), _dec7$4 = Reflect.metadata("design:paramtypes", []), _dec8$2 = Web.post('push'), _dec9$2 = Passport.public(),
|
|
2036
|
+
}), _dec4$4 = Web.post('pushAsync'), _dec5$4 = Passport.public(), _dec6$4 = Reflect.metadata("design:type", Function), _dec7$4 = Reflect.metadata("design:paramtypes", []), _dec8$2 = Web.post('push'), _dec9$2 = Passport.public(), _dec10$2 = Reflect.metadata("design:type", Function), _dec11$2 = Reflect.metadata("design:paramtypes", []), _dec$5(_class$5 = _dec2$5(_class$5 = _dec3$4(_class$5 = (_class2$4 = class ControllerQueue extends BeanBase {
|
|
1806
2037
|
async pushAsync() {
|
|
1807
2038
|
const res = await this.scope.queue.test.pushAsync({
|
|
1808
2039
|
a: 1,
|
|
@@ -1816,7 +2047,7 @@ let ControllerQueue = (_dec$5 = Controller({
|
|
|
1816
2047
|
b: 2
|
|
1817
2048
|
});
|
|
1818
2049
|
}
|
|
1819
|
-
}, _applyDecoratedDescriptor(_class2$4.prototype, "pushAsync", [_dec4$4, _dec5$4, _dec6$4, _dec7$4], Object.getOwnPropertyDescriptor(_class2$4.prototype, "pushAsync"), _class2$4.prototype), _applyDecoratedDescriptor(_class2$4.prototype, "push", [_dec8$2, _dec9$2,
|
|
2050
|
+
}, _applyDecoratedDescriptor(_class2$4.prototype, "pushAsync", [_dec4$4, _dec5$4, _dec6$4, _dec7$4], Object.getOwnPropertyDescriptor(_class2$4.prototype, "pushAsync"), _class2$4.prototype), _applyDecoratedDescriptor(_class2$4.prototype, "push", [_dec8$2, _dec9$2, _dec10$2, _dec11$2], Object.getOwnPropertyDescriptor(_class2$4.prototype, "push"), _class2$4.prototype), _class2$4)) || _class$5) || _class$5) || _class$5);
|
|
1820
2051
|
|
|
1821
2052
|
var _dec$4, _dec2$4, _dec3$3, _dec4$3, _dec5$3, _dec6$3, _dec7$3, _class$4, _class2$3;
|
|
1822
2053
|
let ControllerSummer = (_dec$4 = Controller({
|
|
@@ -1999,7 +2230,7 @@ let ControllerTail = (_dec$3 = Controller({
|
|
|
1999
2230
|
}
|
|
2000
2231
|
}, _applyDecoratedDescriptor(_class2$2.prototype, "tail", [_dec4$2, _dec5$2, _dec6$2, _dec7$2], Object.getOwnPropertyDescriptor(_class2$2.prototype, "tail"), _class2$2.prototype), _class2$2)) || _class$3) || _class$3) || _class$3);
|
|
2001
2232
|
|
|
2002
|
-
var _dec$2, _dec2$2, _dec3$1, _dec4$1, _dec5$1, _dec6$1, _dec7$1, _dec8$1, _dec9$1,
|
|
2233
|
+
var _dec$2, _dec2$2, _dec3$1, _dec4$1, _dec5$1, _dec6$1, _dec7$1, _dec8$1, _dec9$1, _dec10$1, _dec11$1, _dec12$1, _dec13$1, _dec14$1, _dec15$1, _class$2, _class2$1;
|
|
2003
2234
|
const tableNameFail = '__tempTransactionFail';
|
|
2004
2235
|
const tableNameSuccess = '__tempTransactionSuccess';
|
|
2005
2236
|
let ControllerTransaction = (_dec$2 = Controller({
|
|
@@ -2011,9 +2242,9 @@ let ControllerTransaction = (_dec$2 = Controller({
|
|
|
2011
2242
|
module: "test-vona"
|
|
2012
2243
|
}), _dec4$1 = Web.post('fail'), _dec5$1 = Database.transaction(), _dec6$1 = Passport.public(), _dec7$1 = function (target, key) {
|
|
2013
2244
|
return Arg.body()(target, key, 0);
|
|
2014
|
-
}, _dec8$1 = Reflect.metadata("design:type", Function), _dec9$1 = Reflect.metadata("design:paramtypes", [Object]),
|
|
2245
|
+
}, _dec8$1 = Reflect.metadata("design:type", Function), _dec9$1 = Reflect.metadata("design:paramtypes", [Object]), _dec10$1 = Web.post('success'), _dec11$1 = Database.transaction(), _dec12$1 = Passport.public(), _dec13$1 = function (target, key) {
|
|
2015
2246
|
return Arg.body()(target, key, 0);
|
|
2016
|
-
},
|
|
2247
|
+
}, _dec14$1 = Reflect.metadata("design:type", Function), _dec15$1 = Reflect.metadata("design:paramtypes", [Object]), _dec$2(_class$2 = _dec2$2(_class$2 = _dec3$1(_class$2 = (_class2$1 = class ControllerTransaction extends BeanBase {
|
|
2017
2248
|
async fail(item) {
|
|
2018
2249
|
await this.bean.model.update(`${tableNameFail}`, item);
|
|
2019
2250
|
await this.bean.model.update(`${tableNameFail}error`, item);
|
|
@@ -2021,9 +2252,9 @@ let ControllerTransaction = (_dec$2 = Controller({
|
|
|
2021
2252
|
async success(item) {
|
|
2022
2253
|
await this.bean.model.update(tableNameSuccess, item);
|
|
2023
2254
|
}
|
|
2024
|
-
}, _applyDecoratedDescriptor(_class2$1.prototype, "fail", [_dec4$1, _dec5$1, _dec6$1, _dec7$1, _dec8$1, _dec9$1], Object.getOwnPropertyDescriptor(_class2$1.prototype, "fail"), _class2$1.prototype), _applyDecoratedDescriptor(_class2$1.prototype, "success", [
|
|
2255
|
+
}, _applyDecoratedDescriptor(_class2$1.prototype, "fail", [_dec4$1, _dec5$1, _dec6$1, _dec7$1, _dec8$1, _dec9$1], Object.getOwnPropertyDescriptor(_class2$1.prototype, "fail"), _class2$1.prototype), _applyDecoratedDescriptor(_class2$1.prototype, "success", [_dec10$1, _dec11$1, _dec12$1, _dec13$1, _dec14$1, _dec15$1], Object.getOwnPropertyDescriptor(_class2$1.prototype, "success"), _class2$1.prototype), _class2$1)) || _class$2) || _class$2) || _class$2);
|
|
2025
2256
|
|
|
2026
|
-
var _dec$1, _dec2$1, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9,
|
|
2257
|
+
var _dec$1, _dec2$1, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _class$1, _class2;
|
|
2027
2258
|
let ControllerUpload = (_dec$1 = Controller({
|
|
2028
2259
|
path: 'upload',
|
|
2029
2260
|
meta: {
|
|
@@ -2037,19 +2268,19 @@ let ControllerUpload = (_dec$1 = Controller({
|
|
|
2037
2268
|
return Arg.fields('checkes', v.array(z.string()))(target, key, 1);
|
|
2038
2269
|
}, _dec9 = function (target, key) {
|
|
2039
2270
|
return Arg.field('name', v.default('zhennann'), v.title('your name'))(target, key, 2);
|
|
2040
|
-
},
|
|
2271
|
+
}, _dec10 = Reflect.metadata("design:type", Function), _dec11 = Reflect.metadata("design:paramtypes", [Array, Array, String]), _dec12 = Web.post('file'), _dec13 = Passport.public(), _dec14 = Aspect.interceptor('a-upload:upload'), _dec15 = Api.contentType('application/json'), _dec16 = function (target, key) {
|
|
2041
2272
|
return Arg.field('name', v.default('zhennann'))(target, key, 0);
|
|
2042
|
-
},
|
|
2273
|
+
}, _dec17 = function (target, key) {
|
|
2043
2274
|
return Arg.file('welcome')(target, key, 1);
|
|
2044
|
-
},
|
|
2275
|
+
}, _dec18 = Reflect.metadata("design:type", Function), _dec19 = Reflect.metadata("design:paramtypes", [String, typeof IUploadFile === "undefined" ? Object : IUploadFile]), _dec20 = Web.post('files'), _dec21 = Passport.public(), _dec22 = Aspect.interceptor('a-upload:upload'), _dec23 = Api.contentType('application/json'), _dec24 = function (target, key) {
|
|
2045
2276
|
return Arg.files(v.title('more files'))(target, key, 0);
|
|
2046
|
-
},
|
|
2277
|
+
}, _dec25 = function (target, key) {
|
|
2047
2278
|
return Arg.files('images', v.title('images'))(target, key, 1);
|
|
2048
|
-
},
|
|
2279
|
+
}, _dec26 = function (target, key) {
|
|
2049
2280
|
return Arg.file('welcome1', v.title('single file'))(target, key, 2);
|
|
2050
|
-
},
|
|
2281
|
+
}, _dec27 = function (target, key) {
|
|
2051
2282
|
return Arg.file('welcome2')(target, key, 3);
|
|
2052
|
-
},
|
|
2283
|
+
}, _dec28 = Reflect.metadata("design:type", Function), _dec29 = Reflect.metadata("design:paramtypes", [Array, Array, typeof IUploadFile === "undefined" ? Object : IUploadFile, typeof IUploadFile === "undefined" ? Object : IUploadFile]), _dec$1(_class$1 = _dec2$1(_class$1 = (_class2 = class ControllerUpload extends BeanBase {
|
|
2053
2284
|
fields(fields, checkes, name) {
|
|
2054
2285
|
assert.equal(fields.find(item => item.name === 'name')?.value, 'zhennann');
|
|
2055
2286
|
assert.equal(checkes.length > 0, true);
|
|
@@ -2068,7 +2299,7 @@ let ControllerUpload = (_dec$1 = Controller({
|
|
|
2068
2299
|
assert.equal(file2.name, 'welcome2');
|
|
2069
2300
|
return this.ctx[SymbolUploadValue];
|
|
2070
2301
|
}
|
|
2071
|
-
}, _applyDecoratedDescriptor(_class2.prototype, "fields", [_dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9,
|
|
2302
|
+
}, _applyDecoratedDescriptor(_class2.prototype, "fields", [_dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11], Object.getOwnPropertyDescriptor(_class2.prototype, "fields"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "file", [_dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19], Object.getOwnPropertyDescriptor(_class2.prototype, "file"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "files", [_dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29], Object.getOwnPropertyDescriptor(_class2.prototype, "files"), _class2.prototype), _class2)) || _class$1) || _class$1);
|
|
2072
2303
|
|
|
2073
2304
|
function config(_app) {
|
|
2074
2305
|
return {};
|
|
@@ -2125,4 +2356,4 @@ function $locale(key) {
|
|
|
2125
2356
|
}
|
|
2126
2357
|
/** scope: end */
|
|
2127
2358
|
|
|
2128
|
-
export { $locale, AopMethodTest, AopRegExp, AopSimple, BeanTestCtx, BroadcastTest, CacheMemTest, CacheRedisTest, ControllerBean, ControllerCacheMem, ControllerCacheRedis, ControllerDtoTest, ControllerGuardPassport, ControllerOnion, ControllerPassport, ControllerPerformAction, ControllerQueue, ControllerSummer, ControllerTail, ControllerTransaction, ControllerUpload, DtoCategoryTree, DtoOrderCreate, DtoOrderResult, DtoOrderUpdate, DtoPostCreate, DtoProfile, DtoRoleLazy, DtoUser, DtoUserCreate, DtoUserLazy, DtoUserUpdate, EntityCategory, EntityOrder, EntityPost, EntityPostContent, EntityProduct, EntityRole, EntityRoleUser, EntityTest, EntityUser, EventHelloEcho, EventListenerHelloEcho, MetaVersion, ModelCategory, ModelCategoryChain, ModelOrder, ModelOrderStats, ModelPost, ModelPostContent, ModelProduct, ModelRole, ModelRoleUser, ModelTest, ModelTestDynamicTable, ModelUser, ModelUserStats, ModelUserStatsGroup, QueueTest, ScheduleTest, ScheduleTest3, ScopeModuleTestVona, ServiceAopMethod, ServiceCaching, ServicePost, ServiceTest, ServiceTestApp, ServiceTestClass, ServiceTestData, ServiceTransaction, SummerCacheTest, config, locales };
|
|
2359
|
+
export { $locale, AopMethodTest, AopRegExp, AopSimple, BeanTestCtx, BroadcastTest, CacheMemTest, CacheRedisPost, CacheRedisTest, ControllerBean, ControllerCacheMem, ControllerCacheRedis, ControllerDtoTest, ControllerGuardPassport, ControllerOnion, ControllerPassport, ControllerPerformAction, ControllerQueue, ControllerSummer, ControllerTail, ControllerTransaction, ControllerUpload, DtoCategoryTree, DtoOrderCreate, DtoOrderResult, DtoOrderUpdate, DtoPostCreate, DtoProfile, DtoRoleLazy, DtoUser, DtoUserCreate, DtoUserLazy, DtoUserUpdate, EntityCategory, EntityOrder, EntityPost, EntityPostContent, EntityProduct, EntityRole, EntityRoleUser, EntityTest, EntityUser, EventHelloEcho, EventListenerHelloEcho, MetaVersion, ModelCategory, ModelCategoryChain, ModelOrder, ModelOrderStats, ModelPost, ModelPostContent, ModelProduct, ModelRole, ModelRoleUser, ModelTest, ModelTestDynamicTable, ModelUser, ModelUserStats, ModelUserStatsGroup, QueueTest, ScheduleTest, ScheduleTest3, ScopeModuleTestVona, ServiceAopMethod, ServiceCaching, ServiceOrder, ServicePost, ServiceTest, ServiceTestApp, ServiceTestClass, ServiceTestData, ServiceTransaction, SummerCacheTest, config, locales };
|