vona-module-test-vona 5.0.19 → 5.0.21

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/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import { BeanInfo, BeanAopBase, BeanAopMethodBase, BeanBase, cast, retry, BeanScopeBase } from 'vona';
2
- import { Bean, Scope } from 'vona-module-a-bean';
3
2
  import { Aop, AopMethod, Aspect } from 'vona-module-a-aspect';
3
+ import { Entity, EntityBase, Model, BeanModelBase, Database } from 'vona-module-a-database';
4
+ import { Api, v, Arg } from 'vona-module-a-openapi';
5
+ import { Bean, Scope } from 'vona-module-a-bean';
4
6
  import assert from 'node:assert';
5
7
  import { Broadcast, BeanBroadcastBase } from 'vona-module-a-broadcast';
6
8
  import { CacheMem, BeanCacheMemBase, CacheRedis, BeanCacheRedisBase } from 'vona-module-a-cache';
@@ -9,38 +11,14 @@ import { Meta } from 'vona-module-a-meta';
9
11
  import { Queue, BeanQueueBase } from 'vona-module-a-queue';
10
12
  import { Schedule } from 'vona-module-a-schedule';
11
13
  import { SummerCache, BeanSummerCacheBase } from 'vona-module-a-summer';
12
- import { Api, v, Arg } from 'vona-module-a-openapi';
14
+ import { Dto, Service, Controller, Web } from 'vona-module-a-web';
13
15
  import { Passport, $getUserName } from 'vona-module-a-user';
14
- import { Service, Controller, Web, Dto } from 'vona-module-a-web';
15
16
  import { sleep } from '@cabloy/utils';
16
17
  import { Core } from 'vona-module-a-core';
17
- import { Database, Entity, EntityBase, Model, BeanModelBase } from 'vona-module-a-database';
18
18
  import { z } from 'zod';
19
19
  import { DtoJwtToken } from 'vona-module-a-jwt';
20
20
  import { SymbolUploadValue } from 'vona-module-a-upload';
21
21
 
22
- var locale_en_us = {
23
- User: 'User',
24
- UserId: 'User Id',
25
- TestHelloWorld: 'Hello World',
26
- TestApples: '%d apples',
27
- TestApples_0: 'no apples',
28
- TestApples_1: 'one apple',
29
- TestNameApples_: '%s has %d apples',
30
- TestNameApples_0_1: '%s has no apples',
31
- TestNameApples_1_1: '%s has one apple'
32
- };
33
-
34
- var locale_zh_cn = {
35
- User: '用户',
36
- UserId: '用户Id',
37
- TestHelloWorld: '您好,世界',
38
- TestApples: '%d个苹果',
39
- TestApples_0: '没有苹果',
40
- TestNameApples_: '%s有%d个苹果',
41
- TestNameApples_0_1: '%s没有苹果'
42
- };
43
-
44
22
  var _dec$z, _dec2$z, _class$z;
45
23
  let AopRegExp = (_dec$z = Aop({
46
24
  match: [/^test-vona\.service\.test\w+$/, 'testCtx'],
@@ -164,7 +142,53 @@ let AopMethodTest = (_dec$x = AopMethod({
164
142
  }
165
143
  }) || _class$x) || _class$x);
166
144
 
167
- var _dec$w, _dec2$w, _class$w;
145
+ function _applyDecoratedDescriptor(i, e, r, n, l) {
146
+ var a = {};
147
+ return Object.keys(n).forEach(function (i) {
148
+ a[i] = n[i];
149
+ }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = true), a = r.slice().reverse().reduce(function (r, n) {
150
+ return n(i, e, r) || r;
151
+ }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a;
152
+ }
153
+ function _initializerDefineProperty(e, i, r, l) {
154
+ r && Object.defineProperty(e, i, {
155
+ enumerable: r.enumerable,
156
+ configurable: r.configurable,
157
+ writable: r.writable,
158
+ value: r.initializer ? r.initializer.call(l) : void 0
159
+ });
160
+ }
161
+
162
+ var _dec$w, _dec2$w, _dec3$g, _dec4$g, _dec5$g, _dec6$g, _class$w, _class2$g, _descriptor$2, _descriptor2$2;
163
+ let EntityTest = (_dec$w = Entity('testVona'), _dec2$w = BeanInfo({
164
+ module: "test-vona"
165
+ }), _dec3$g = Api.field(), _dec4$g = Reflect.metadata("design:type", String), _dec5$g = Api.field(), _dec6$g = Reflect.metadata("design:type", String), _dec$w(_class$w = _dec2$w(_class$w = (_class2$g = class EntityTest extends EntityBase {
166
+ constructor(...args) {
167
+ super(...args);
168
+ _initializerDefineProperty(this, "title", _descriptor$2, this);
169
+ _initializerDefineProperty(this, "description", _descriptor2$2, this);
170
+ }
171
+ }, _descriptor$2 = _applyDecoratedDescriptor(_class2$g.prototype, "title", [_dec3$g, _dec4$g], {
172
+ configurable: true,
173
+ enumerable: true,
174
+ writable: true,
175
+ initializer: null
176
+ }), _descriptor2$2 = _applyDecoratedDescriptor(_class2$g.prototype, "description", [_dec5$g, _dec6$g], {
177
+ configurable: true,
178
+ enumerable: true,
179
+ writable: true,
180
+ initializer: null
181
+ }), _class2$g)) || _class$w) || _class$w);
182
+
183
+ var _dec$v, _dec2$v, _class$v;
184
+ let ModelTest = (_dec$v = Model({
185
+ entity: EntityTest,
186
+ clientName: 'default'
187
+ }), _dec2$v = BeanInfo({
188
+ module: "test-vona"
189
+ }), _dec$v(_class$v = _dec2$v(_class$v = class ModelTest extends BeanModelBase {}) || _class$v) || _class$v);
190
+
191
+ var _dec$u, _dec2$u, _class$u;
168
192
  class TestCtx0 extends BeanBase {
169
193
  constructor(...args) {
170
194
  super(...args);
@@ -226,58 +250,58 @@ class TestCtx1 extends TestCtx0 {
226
250
  });
227
251
  }
228
252
  }
229
- let BeanTestCtx = (_dec$w = Bean(), _dec2$w = BeanInfo({
253
+ let BeanTestCtx = (_dec$u = Bean(), _dec2$u = BeanInfo({
230
254
  module: "test-vona"
231
- }), _dec$w(_class$w = _dec2$w(_class$w = class BeanTestCtx extends TestCtx1 {}) || _class$w) || _class$w);
255
+ }), _dec$u(_class$u = _dec2$u(_class$u = class BeanTestCtx extends TestCtx1 {}) || _class$u) || _class$u);
232
256
 
233
- var _dec$v, _dec2$v, _class$v;
234
- let BroadcastTest = (_dec$v = Broadcast(), _dec2$v = BeanInfo({
257
+ var _dec$t, _dec2$t, _class$t;
258
+ let BroadcastTest = (_dec$t = Broadcast(), _dec2$t = BeanInfo({
235
259
  module: "test-vona"
236
- }), _dec$v(_class$v = _dec2$v(_class$v = class BroadcastTest extends BeanBroadcastBase {
260
+ }), _dec$t(_class$t = _dec2$t(_class$t = class BroadcastTest extends BeanBroadcastBase {
237
261
  async execute(data, isEmitter) {
238
262
  // locale
239
263
  assert.equal(this.ctx.locale, 'zh-cn');
240
264
  // data
241
265
  assert.equal(data.message, 'hello');
242
266
  }
243
- }) || _class$v) || _class$v);
267
+ }) || _class$t) || _class$t);
244
268
 
245
- var _dec$u, _dec2$u, _class$u;
246
- let CacheMemTest = (_dec$u = CacheMem({
269
+ var _dec$s, _dec2$s, _class$s;
270
+ let CacheMemTest = (_dec$s = CacheMem({
247
271
  ttl: 1 * 1000
248
- }), _dec2$u = BeanInfo({
272
+ }), _dec2$s = BeanInfo({
249
273
  module: "test-vona"
250
- }), _dec$u(_class$u = _dec2$u(_class$u = class CacheMemTest extends BeanCacheMemBase {}) || _class$u) || _class$u);
274
+ }), _dec$s(_class$s = _dec2$s(_class$s = class CacheMemTest extends BeanCacheMemBase {}) || _class$s) || _class$s);
251
275
 
252
- var _dec$t, _dec2$t, _class$t;
253
- let CacheRedisTest = (_dec$t = CacheRedis({
276
+ var _dec$r, _dec2$r, _class$r;
277
+ let CacheRedisTest = (_dec$r = CacheRedis({
254
278
  ttl: 1 * 1000
255
- }), _dec2$t = BeanInfo({
279
+ }), _dec2$r = BeanInfo({
256
280
  module: "test-vona"
257
- }), _dec$t(_class$t = _dec2$t(_class$t = class CacheRedisTest extends BeanCacheRedisBase {}) || _class$t) || _class$t);
281
+ }), _dec$r(_class$r = _dec2$r(_class$r = class CacheRedisTest extends BeanCacheRedisBase {}) || _class$r) || _class$r);
258
282
 
259
- var _dec$s, _dec2$s, _class$s;
260
- let EventHelloEcho = (_dec$s = Event(), _dec2$s = BeanInfo({
283
+ var _dec$q, _dec2$q, _class$q;
284
+ let EventHelloEcho = (_dec$q = Event(), _dec2$q = BeanInfo({
261
285
  module: "test-vona"
262
- }), _dec$s(_class$s = _dec2$s(_class$s = class EventHelloEcho extends BeanEventBase {}) || _class$s) || _class$s);
286
+ }), _dec$q(_class$q = _dec2$q(_class$q = class EventHelloEcho extends BeanEventBase {}) || _class$q) || _class$q);
263
287
 
264
- var _dec$r, _dec2$r, _class$r;
265
- let EventListenerHelloEcho = (_dec$r = EventListener({
288
+ var _dec$p, _dec2$p, _class$p;
289
+ let EventListenerHelloEcho = (_dec$p = EventListener({
266
290
  match: 'test-vona:helloEcho'
267
- }), _dec2$r = BeanInfo({
291
+ }), _dec2$p = BeanInfo({
268
292
  module: "test-vona"
269
- }), _dec$r(_class$r = _dec2$r(_class$r = class EventListenerHelloEcho extends BeanBase {
293
+ }), _dec$p(_class$p = _dec2$p(_class$p = class EventListenerHelloEcho extends BeanBase {
270
294
  async execute(data, next) {
271
295
  // next
272
296
  const result = await next();
273
297
  return `${data.text} ${result}`;
274
298
  }
275
- }) || _class$r) || _class$r);
299
+ }) || _class$p) || _class$p);
276
300
 
277
- var _dec$q, _dec2$q, _class$q;
278
- let MetaVersion = (_dec$q = Meta(), _dec2$q = BeanInfo({
301
+ var _dec$o, _dec2$o, _class$o;
302
+ let MetaVersion = (_dec$o = Meta(), _dec2$o = BeanInfo({
279
303
  module: "test-vona"
280
- }), _dec$q(_class$q = _dec2$q(_class$q = class MetaVersion extends BeanBase {
304
+ }), _dec$o(_class$o = _dec2$o(_class$o = class MetaVersion extends BeanBase {
281
305
  async update(options) {
282
306
  if (options.version === 1) {
283
307
  // testVona
@@ -289,47 +313,47 @@ let MetaVersion = (_dec$q = Meta(), _dec2$q = BeanInfo({
289
313
  });
290
314
  }
291
315
  }
292
- }) || _class$q) || _class$q);
316
+ }) || _class$o) || _class$o);
293
317
 
294
- var _dec$p, _dec2$p, _class$p;
295
- let QueueTest = (_dec$p = Queue(), _dec2$p = BeanInfo({
318
+ var _dec$n, _dec2$n, _class$n;
319
+ let QueueTest = (_dec$n = Queue(), _dec2$n = BeanInfo({
296
320
  module: "test-vona"
297
- }), _dec$p(_class$p = _dec2$p(_class$p = class QueueTest extends BeanQueueBase {
321
+ }), _dec$n(_class$n = _dec2$n(_class$n = class QueueTest extends BeanQueueBase {
298
322
  async execute(data, _options) {
299
323
  return data.a + data.b;
300
324
  }
301
- }) || _class$p) || _class$p);
325
+ }) || _class$n) || _class$n);
302
326
 
303
- var _dec$o, _dec2$o, _class$o;
304
- let ScheduleTest3 = (_dec$o = Schedule({
327
+ var _dec$m, _dec2$m, _class$m;
328
+ let ScheduleTest = (_dec$m = Schedule({
305
329
  enable: false,
306
330
  repeat: {
307
- every: 5000
331
+ every: 3000
308
332
  }
309
- }), _dec2$o = BeanInfo({
333
+ }), _dec2$m = BeanInfo({
310
334
  module: "test-vona"
311
- }), _dec$o(_class$o = _dec2$o(_class$o = class ScheduleTest3 extends BeanBase {
335
+ }), _dec$m(_class$m = _dec2$m(_class$m = class ScheduleTest extends BeanBase {
312
336
  async execute(job) {
313
- this.$logger.silly(`Schedule Test3: iid=${this.ctx.instance.id}, every=${job?.data.options?.jobOptions?.repeat?.every}, ${new Date()}`);
337
+ this.$logger.silly(`Schedule Test: iid=${this.ctx.instance.id}, every=${job?.data.options?.jobOptions?.repeat?.every}, ${new Date()}`);
314
338
  }
315
- }) || _class$o) || _class$o);
339
+ }) || _class$m) || _class$m);
316
340
 
317
- var _dec$n, _dec2$n, _class$n;
318
- let ScheduleTest = (_dec$n = Schedule({
341
+ var _dec$l, _dec2$l, _class$l;
342
+ let ScheduleTest3 = (_dec$l = Schedule({
319
343
  enable: false,
320
344
  repeat: {
321
- every: 3000
345
+ every: 5000
322
346
  }
323
- }), _dec2$n = BeanInfo({
347
+ }), _dec2$l = BeanInfo({
324
348
  module: "test-vona"
325
- }), _dec$n(_class$n = _dec2$n(_class$n = class ScheduleTest extends BeanBase {
349
+ }), _dec$l(_class$l = _dec2$l(_class$l = class ScheduleTest3 extends BeanBase {
326
350
  async execute(job) {
327
- this.$logger.silly(`Schedule Test: iid=${this.ctx.instance.id}, every=${job?.data.options?.jobOptions?.repeat?.every}, ${new Date()}`);
351
+ this.$logger.silly(`Schedule Test3: iid=${this.ctx.instance.id}, every=${job?.data.options?.jobOptions?.repeat?.every}, ${new Date()}`);
328
352
  }
329
- }) || _class$n) || _class$n);
353
+ }) || _class$l) || _class$l);
330
354
 
331
- var _dec$m, _dec2$m, _class$m;
332
- let SummerCacheTest = (_dec$m = SummerCache({
355
+ var _dec$k, _dec2$k, _class$k;
356
+ let SummerCacheTest = (_dec$k = SummerCache({
333
357
  mode: 'all',
334
358
  mem: {
335
359
  max: 2,
@@ -338,58 +362,183 @@ let SummerCacheTest = (_dec$m = SummerCache({
338
362
  redis: {
339
363
  ttl: 3 * 1000
340
364
  }
341
- }), _dec2$m = BeanInfo({
365
+ }), _dec2$k = BeanInfo({
342
366
  module: "test-vona"
343
- }), _dec$m(_class$m = _dec2$m(_class$m = class SummerCacheTest extends BeanSummerCacheBase {
367
+ }), _dec$k(_class$k = _dec2$k(_class$k = class SummerCacheTest extends BeanSummerCacheBase {
344
368
  async getNative(key, _options) {
345
369
  return {
346
370
  id: key.id,
347
371
  name: `name_${key.id}`
348
372
  };
349
373
  }
350
- }) || _class$m) || _class$m);
374
+ }) || _class$k) || _class$k);
351
375
 
352
- function config(_app) {
353
- return {};
354
- }
376
+ var _dec$j, _dec2$j, _dec3$f, _dec4$f, _dec5$f, _dec6$f, _class$j, _class2$f, _descriptor$1, _descriptor2$1;
377
+ let DtoProfile = (_dec$j = Dto(), _dec2$j = BeanInfo({
378
+ module: "test-vona"
379
+ }), _dec3$f = Api.field(), _dec4$f = Reflect.metadata("design:type", Number), _dec5$f = Api.field(v.email()), _dec6$f = Reflect.metadata("design:type", String), _dec$j(_class$j = _dec2$j(_class$j = (_class2$f = class DtoProfile {
380
+ constructor() {
381
+ _initializerDefineProperty(this, "id", _descriptor$1, this);
382
+ _initializerDefineProperty(this, "email", _descriptor2$1, this);
383
+ }
384
+ }, _descriptor$1 = _applyDecoratedDescriptor(_class2$f.prototype, "id", [_dec3$f, _dec4$f], {
385
+ configurable: true,
386
+ enumerable: true,
387
+ writable: true,
388
+ initializer: null
389
+ }), _descriptor2$1 = _applyDecoratedDescriptor(_class2$f.prototype, "email", [_dec5$f, _dec6$f], {
390
+ configurable: true,
391
+ enumerable: true,
392
+ writable: true,
393
+ initializer: null
394
+ }), _class2$f)) || _class$j) || _class$j);
355
395
 
356
- function _applyDecoratedDescriptor(i, e, r, n, l) {
357
- var a = {};
358
- return Object.keys(n).forEach(function (i) {
359
- a[i] = n[i];
360
- }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = true), a = r.slice().reverse().reduce(function (r, n) {
361
- return n(i, e, r) || r;
362
- }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a;
363
- }
364
- function _initializerDefineProperty(e, i, r, l) {
365
- r && Object.defineProperty(e, i, {
366
- enumerable: r.enumerable,
367
- configurable: r.configurable,
368
- writable: r.writable,
369
- value: r.initializer ? r.initializer.call(l) : void 0
370
- });
371
- }
396
+ var _dec$i, _dec2$i, _dec3$e, _dec4$e, _dec5$e, _dec6$e, _dec7$e, _dec8$a, _class$i, _class2$e, _descriptor, _descriptor2, _descriptor3;
397
+ let DtoUser = (_dec$i = Dto({
398
+ openapi: {
399
+ title: $locale('User')
400
+ }
401
+ }), _dec2$i = BeanInfo({
402
+ module: "test-vona"
403
+ }), _dec3$e = Api.field(v.title($locale('UserId')), v.tableIdentity()), _dec4$e = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec5$e = Api.field(v.min(3)), _dec6$e = Reflect.metadata("design:type", String), _dec7$e = Api.field(), _dec8$a = Reflect.metadata("design:type", Boolean), _dec$i(_class$i = _dec2$i(_class$i = (_class2$e = class DtoUser {
404
+ constructor() {
405
+ _initializerDefineProperty(this, "id", _descriptor, this);
406
+ _initializerDefineProperty(this, "name", _descriptor2, this);
407
+ _initializerDefineProperty(this, "married", _descriptor3, this);
408
+ }
409
+ }, _descriptor = _applyDecoratedDescriptor(_class2$e.prototype, "id", [_dec3$e, _dec4$e], {
410
+ configurable: true,
411
+ enumerable: true,
412
+ writable: true,
413
+ initializer: null
414
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2$e.prototype, "name", [_dec5$e, _dec6$e], {
415
+ configurable: true,
416
+ enumerable: true,
417
+ writable: true,
418
+ initializer: null
419
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2$e.prototype, "married", [_dec7$e, _dec8$a], {
420
+ configurable: true,
421
+ enumerable: true,
422
+ writable: true,
423
+ initializer: null
424
+ }), _class2$e)) || _class$i) || _class$i);
372
425
 
373
- const __ThisModule__ = 'test-vona';
426
+ var _dec$h, _dec2$h, _dec3$d, _dec4$d, _class$h, _dec5$d, _dec6$d, _dec7$d, _dec8$9, _dec9$7, _dec0$7, _dec1$7, _dec10$5, _dec11$5, _dec12$5, _dec13$5, _dec14$4, _dec15$4, _dec16$4, _class2$d, _class3;
427
+ let ServiceAopMethodBase = (_dec$h = Aspect.aopMethod('test-vona:test', {
428
+ wrapper: '+'
429
+ }), _dec2$h = Aspect.aopMethod('test-vona:test', {
430
+ wrapper: '-'
431
+ }), _dec3$d = Reflect.metadata("design:type", Function), _dec4$d = Reflect.metadata("design:paramtypes", []), _class$h = class ServiceAopMethodBase extends BeanBase {
432
+ testSyncBase() {
433
+ return 'hello';
434
+ }
435
+ }, _applyDecoratedDescriptor(_class$h.prototype, "testSyncBase", [_dec$h, _dec2$h, _dec3$d, _dec4$d], Object.getOwnPropertyDescriptor(_class$h.prototype, "testSyncBase"), _class$h.prototype), _class$h);
436
+ let ServiceAopMethod = (_dec5$d = Service(), _dec6$d = BeanInfo({
437
+ module: "test-vona"
438
+ }), _dec7$d = Aspect.aopMethod('test-vona:test', {
439
+ wrapper: '+'
440
+ }), _dec8$9 = Aspect.aopMethod('test-vona:test', {
441
+ wrapper: '-'
442
+ }), _dec9$7 = Reflect.metadata("design:type", Function), _dec0$7 = Reflect.metadata("design:paramtypes", []), _dec1$7 = Aspect.aopMethod('test-vona:test', {
443
+ wrapper: '+'
444
+ }), _dec10$5 = Aspect.aopMethod('test-vona:test', {
445
+ wrapper: '-'
446
+ }), _dec11$5 = Reflect.metadata("design:type", Function), _dec12$5 = Reflect.metadata("design:paramtypes", []), _dec13$5 = Aspect.aopMethod('test-vona:test', {
447
+ wrapper: '+'
448
+ }), _dec14$4 = Aspect.aopMethod('test-vona:test', {
449
+ wrapper: '-'
450
+ }), _dec15$4 = Reflect.metadata("design:type", Function), _dec16$4 = Reflect.metadata("design:paramtypes", []), _dec5$d(_class2$d = _dec6$d(_class2$d = (_class3 = class ServiceAopMethod extends ServiceAopMethodBase {
451
+ constructor(...args) {
452
+ super(...args);
453
+ this._name = '';
454
+ }
455
+ testSync() {
456
+ return 'hello';
457
+ }
458
+ async testAsync() {
459
+ return 'hello';
460
+ }
461
+ get name() {
462
+ return this._name;
463
+ }
464
+ set name(value) {
465
+ this._name = value;
466
+ }
467
+ }, _applyDecoratedDescriptor(_class3.prototype, "testSync", [_dec7$d, _dec8$9, _dec9$7, _dec0$7], Object.getOwnPropertyDescriptor(_class3.prototype, "testSync"), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, "testAsync", [_dec1$7, _dec10$5, _dec11$5, _dec12$5], Object.getOwnPropertyDescriptor(_class3.prototype, "testAsync"), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, "name", [_dec13$5, _dec14$4, _dec15$4, _dec16$4], Object.getOwnPropertyDescriptor(_class3.prototype, "name"), _class3.prototype), _class3)) || _class2$d) || _class2$d);
374
468
 
375
- var _dec$l, _dec2$l, _class$l;
376
- let ServiceTest = (_dec$l = Service(), _dec2$l = BeanInfo({
469
+ var _dec$g, _dec2$g, _class$g;
470
+ let ServiceTest = (_dec$g = Service(), _dec2$g = BeanInfo({
377
471
  module: "test-vona"
378
- }), _dec$l(_class$l = _dec2$l(_class$l = class ServiceTest extends BeanBase {
472
+ }), _dec$g(_class$g = _dec2$g(_class$g = class ServiceTest extends BeanBase {
379
473
  get name() {
380
474
  return 'serviceTest';
381
475
  }
382
- }) || _class$l) || _class$l);
476
+ }) || _class$g) || _class$g);
477
+
478
+ var _dec$f, _dec2$f, _class$f;
479
+ let ServiceTestApp = (_dec$f = Service(), _dec2$f = BeanInfo({
480
+ module: "test-vona"
481
+ }), _dec$f(_class$f = _dec2$f(_class$f = class ServiceTestApp extends BeanBase {
482
+ actionSync({
483
+ a,
484
+ b
485
+ }) {
486
+ return a + b;
487
+ }
488
+ async actionAsync({
489
+ a,
490
+ b
491
+ }) {
492
+ return Promise.resolve(a + b);
493
+ }
494
+ }) || _class$f) || _class$f);
495
+
496
+ var _dec$e, _dec2$e, _class$e;
497
+ class ClassBeanBase extends BeanBase {
498
+ actionSync({
499
+ a,
500
+ b
501
+ }) {
502
+ return a + b;
503
+ }
504
+ }
505
+ let ServiceTestClass = (_dec$e = Service(), _dec2$e = BeanInfo({
506
+ module: "test-vona"
507
+ }), _dec$e(_class$e = _dec2$e(_class$e = class ServiceTestClass extends ClassBeanBase {
508
+ async actionAsync({
509
+ a,
510
+ b
511
+ }) {
512
+ return Promise.resolve(a + b);
513
+ }
514
+ }) || _class$e) || _class$e);
383
515
 
384
- var _dec$k, _dec2$k, _dec3$g, _dec4$g, _dec5$g, _dec6$g, _dec7$e, _dec8$a, _dec9$7, _dec0$7, _dec1$7, _class$k, _class2$g;
385
- let ControllerBean = (_dec$k = Controller({
516
+ var _dec$d, _dec2$d, _dec3$c, _dec4$c, _dec5$c, _dec6$c, _dec7$c, _dec8$8, _class$d, _class2$c;
517
+ const tableNameFail$1 = '__tempTransactionFail';
518
+ const tableNameSuccess$1 = '__tempTransactionSuccess';
519
+ let ServiceTransaction = (_dec$d = Service(), _dec2$d = BeanInfo({
520
+ module: "test-vona"
521
+ }), _dec3$c = Database.transaction(), _dec4$c = Reflect.metadata("design:type", Function), _dec5$c = Reflect.metadata("design:paramtypes", [Object]), _dec6$c = Database.transaction(), _dec7$c = Reflect.metadata("design:type", Function), _dec8$8 = Reflect.metadata("design:paramtypes", [Object]), _dec$d(_class$d = _dec2$d(_class$d = (_class2$c = class ServiceTransaction extends BeanBase {
522
+ async fail(item) {
523
+ await this.app.bean.model.update(`${tableNameFail$1}`, item);
524
+ await this.app.bean.model.update(`${tableNameFail$1}error`, item);
525
+ }
526
+ async success(item) {
527
+ await this.app.bean.model.update(tableNameSuccess$1, item);
528
+ }
529
+ }, _applyDecoratedDescriptor(_class2$c.prototype, "fail", [_dec3$c, _dec4$c, _dec5$c], Object.getOwnPropertyDescriptor(_class2$c.prototype, "fail"), _class2$c.prototype), _applyDecoratedDescriptor(_class2$c.prototype, "success", [_dec6$c, _dec7$c, _dec8$8], Object.getOwnPropertyDescriptor(_class2$c.prototype, "success"), _class2$c.prototype), _class2$c)) || _class$d) || _class$d);
530
+
531
+ const __ThisModule__ = 'test-vona';
532
+
533
+ var _dec$c, _dec2$c, _dec3$b, _dec4$b, _dec5$b, _dec6$b, _dec7$b, _dec8$7, _dec9$6, _dec0$6, _dec1$6, _class$c, _class2$b;
534
+ let ControllerBean = (_dec$c = Controller({
386
535
  path: 'bean',
387
536
  meta: {
388
537
  mode: 'test'
389
538
  }
390
- }), _dec2$k = Api.exclude(), _dec3$g = Passport.public(), _dec4$g = BeanInfo({
539
+ }), _dec2$c = Api.exclude(), _dec3$b = Passport.public(), _dec4$b = BeanInfo({
391
540
  module: "test-vona"
392
- }), _dec5$g = Web.get('test'), _dec6$g = Reflect.metadata("design:type", Function), _dec7$e = Reflect.metadata("design:paramtypes", []), _dec8$a = Web.get('service'), _dec9$7 = Passport.public(), _dec0$7 = Reflect.metadata("design:type", Function), _dec1$7 = Reflect.metadata("design:paramtypes", []), _dec$k(_class$k = _dec2$k(_class$k = _dec3$g(_class$k = _dec4$g(_class$k = (_class2$g = class ControllerBean extends BeanBase {
541
+ }), _dec5$b = Web.get('test'), _dec6$b = Reflect.metadata("design:type", Function), _dec7$b = Reflect.metadata("design:paramtypes", []), _dec8$7 = Web.get('service'), _dec9$6 = Passport.public(), _dec0$6 = Reflect.metadata("design:type", Function), _dec1$6 = Reflect.metadata("design:paramtypes", []), _dec$c(_class$c = _dec2$c(_class$c = _dec3$b(_class$c = _dec4$b(_class$c = (_class2$b = class ControllerBean extends BeanBase {
393
542
  async test() {
394
543
  const a = 3;
395
544
  const b = 4;
@@ -479,17 +628,17 @@ let ControllerBean = (_dec$k = Controller({
479
628
  res = this.$scope.testVona.service.test.name;
480
629
  assert.equal(res, 'serviceTest');
481
630
  }
482
- }, _applyDecoratedDescriptor(_class2$g.prototype, "test", [_dec5$g, _dec6$g, _dec7$e], Object.getOwnPropertyDescriptor(_class2$g.prototype, "test"), _class2$g.prototype), _applyDecoratedDescriptor(_class2$g.prototype, "service", [_dec8$a, _dec9$7, _dec0$7, _dec1$7], Object.getOwnPropertyDescriptor(_class2$g.prototype, "service"), _class2$g.prototype), _class2$g)) || _class$k) || _class$k) || _class$k) || _class$k);
631
+ }, _applyDecoratedDescriptor(_class2$b.prototype, "test", [_dec5$b, _dec6$b, _dec7$b], Object.getOwnPropertyDescriptor(_class2$b.prototype, "test"), _class2$b.prototype), _applyDecoratedDescriptor(_class2$b.prototype, "service", [_dec8$7, _dec9$6, _dec0$6, _dec1$6], Object.getOwnPropertyDescriptor(_class2$b.prototype, "service"), _class2$b.prototype), _class2$b)) || _class$c) || _class$c) || _class$c) || _class$c);
483
632
 
484
- var _dec$j, _dec2$j, _dec3$f, _dec4$f, _dec5$f, _dec6$f, _dec7$d, _class$j, _class2$f;
485
- let ControllerCacheMem = (_dec$j = Controller({
633
+ var _dec$b, _dec2$b, _dec3$a, _dec4$a, _dec5$a, _dec6$a, _dec7$a, _class$b, _class2$a;
634
+ let ControllerCacheMem = (_dec$b = Controller({
486
635
  path: 'cacheMem',
487
636
  meta: {
488
637
  mode: 'test'
489
638
  }
490
- }), _dec2$j = Api.exclude(), _dec3$f = Passport.public(), _dec4$f = BeanInfo({
639
+ }), _dec2$b = Api.exclude(), _dec3$a = Passport.public(), _dec4$a = BeanInfo({
491
640
  module: "test-vona"
492
- }), _dec5$f = Web.post(), _dec6$f = Reflect.metadata("design:type", Function), _dec7$d = Reflect.metadata("design:paramtypes", []), _dec$j(_class$j = _dec2$j(_class$j = _dec3$f(_class$j = _dec4$f(_class$j = (_class2$f = class ControllerCacheMem extends BeanBase {
641
+ }), _dec5$a = Web.post(), _dec6$a = Reflect.metadata("design:type", Function), _dec7$a = Reflect.metadata("design:paramtypes", []), _dec$b(_class$b = _dec2$b(_class$b = _dec3$a(_class$b = _dec4$a(_class$b = (_class2$a = class ControllerCacheMem extends BeanBase {
493
642
  async mem() {
494
643
  let res;
495
644
  let value;
@@ -530,17 +679,17 @@ let ControllerCacheMem = (_dec$j = Controller({
530
679
  assert.equal(value, undefined);
531
680
  });
532
681
  }
533
- }, _applyDecoratedDescriptor(_class2$f.prototype, "mem", [_dec5$f, _dec6$f, _dec7$d], Object.getOwnPropertyDescriptor(_class2$f.prototype, "mem"), _class2$f.prototype), _class2$f)) || _class$j) || _class$j) || _class$j) || _class$j);
682
+ }, _applyDecoratedDescriptor(_class2$a.prototype, "mem", [_dec5$a, _dec6$a, _dec7$a], Object.getOwnPropertyDescriptor(_class2$a.prototype, "mem"), _class2$a.prototype), _class2$a)) || _class$b) || _class$b) || _class$b) || _class$b);
534
683
 
535
- var _dec$i, _dec2$i, _dec3$e, _dec4$e, _dec5$e, _dec6$e, _dec7$c, _class$i, _class2$e;
536
- let ControllerCacheRedis = (_dec$i = Controller({
684
+ var _dec$a, _dec2$a, _dec3$9, _dec4$9, _dec5$9, _dec6$9, _dec7$9, _class$a, _class2$9;
685
+ let ControllerCacheRedis = (_dec$a = Controller({
537
686
  path: 'cacheRedis',
538
687
  meta: {
539
688
  mode: 'test'
540
689
  }
541
- }), _dec2$i = Api.exclude(), _dec3$e = Passport.public(), _dec4$e = BeanInfo({
690
+ }), _dec2$a = Api.exclude(), _dec3$9 = Passport.public(), _dec4$9 = BeanInfo({
542
691
  module: "test-vona"
543
- }), _dec5$e = Web.post(), _dec6$e = Reflect.metadata("design:type", Function), _dec7$c = Reflect.metadata("design:paramtypes", []), _dec$i(_class$i = _dec2$i(_class$i = _dec3$e(_class$i = _dec4$e(_class$i = (_class2$e = class ControllerCacheRedis extends BeanBase {
692
+ }), _dec5$9 = Web.post(), _dec6$9 = Reflect.metadata("design:type", Function), _dec7$9 = Reflect.metadata("design:paramtypes", []), _dec$a(_class$a = _dec2$a(_class$a = _dec3$9(_class$a = _dec4$9(_class$a = (_class2$9 = class ControllerCacheRedis extends BeanBase {
544
693
  async redis() {
545
694
  let res;
546
695
  let value;
@@ -581,99 +730,69 @@ let ControllerCacheRedis = (_dec$i = Controller({
581
730
  assert.equal(value, undefined);
582
731
  });
583
732
  }
584
- }, _applyDecoratedDescriptor(_class2$e.prototype, "redis", [_dec5$e, _dec6$e, _dec7$c], Object.getOwnPropertyDescriptor(_class2$e.prototype, "redis"), _class2$e.prototype), _class2$e)) || _class$i) || _class$i) || _class$i) || _class$i);
733
+ }, _applyDecoratedDescriptor(_class2$9.prototype, "redis", [_dec5$9, _dec6$9, _dec7$9], Object.getOwnPropertyDescriptor(_class2$9.prototype, "redis"), _class2$9.prototype), _class2$9)) || _class$a) || _class$a) || _class$a) || _class$a);
585
734
 
586
- var _dec$h, _dec2$h, _dec3$d, _dec4$d, _dec5$d, _dec6$d, _dec7$b, _dec8$9, _dec9$6, _dec0$6, _dec1$6, _dec10$5, _dec11$5, _dec12$5, _dec13$5, _dec14$4, _dec15$4, _dec16$4, _class$h, _class2$d;
587
- let ControllerGuardPassport = (_dec$h = Controller('guardPassport'), _dec2$h = BeanInfo({
735
+ var _dec$9, _dec2$9, _dec3$8, _dec4$8, _dec5$8, _dec6$8, _dec7$8, _dec8$6, _dec9$5, _dec0$5, _dec1$5, _dec10$4, _dec11$4, _dec12$4, _dec13$4, _dec14$3, _dec15$3, _dec16$3, _class$9, _class2$8;
736
+ let ControllerGuardPassport = (_dec$9 = Controller('guardPassport'), _dec2$9 = BeanInfo({
588
737
  module: "test-vona"
589
- }), _dec3$d = Web.get('testUserName'), _dec4$d = Passport.userName({
738
+ }), _dec3$8 = Web.get('testUserName'), _dec4$8 = Passport.userName({
590
739
  name: 'admin'
591
- }), _dec5$d = Reflect.metadata("design:type", Function), _dec6$d = Reflect.metadata("design:paramtypes", []), _dec7$b = Web.get('testUserNameFail'), _dec8$9 = Passport.userName({
740
+ }), _dec5$8 = Reflect.metadata("design:type", Function), _dec6$8 = Reflect.metadata("design:paramtypes", []), _dec7$8 = Web.get('testUserNameFail'), _dec8$6 = Passport.userName({
592
741
  name: 'admin-none'
593
- }), _dec9$6 = Reflect.metadata("design:type", Function), _dec0$6 = Reflect.metadata("design:paramtypes", []), _dec1$6 = Web.get('testRoleName'), _dec10$5 = Passport.roleName({
742
+ }), _dec9$5 = Reflect.metadata("design:type", Function), _dec0$5 = Reflect.metadata("design:paramtypes", []), _dec1$5 = Web.get('testRoleName'), _dec10$4 = Passport.roleName({
594
743
  name: 'admin'
595
- }), _dec11$5 = Reflect.metadata("design:type", Function), _dec12$5 = Reflect.metadata("design:paramtypes", []), _dec13$5 = Web.get('testRoleNameFail'), _dec14$4 = Passport.roleName({
744
+ }), _dec11$4 = Reflect.metadata("design:type", Function), _dec12$4 = Reflect.metadata("design:paramtypes", []), _dec13$4 = Web.get('testRoleNameFail'), _dec14$3 = Passport.roleName({
596
745
  name: 'admin-none'
597
- }), _dec15$4 = Reflect.metadata("design:type", Function), _dec16$4 = Reflect.metadata("design:paramtypes", []), _dec$h(_class$h = _dec2$h(_class$h = (_class2$d = class ControllerGuardPassport extends BeanBase {
746
+ }), _dec15$3 = Reflect.metadata("design:type", Function), _dec16$3 = Reflect.metadata("design:paramtypes", []), _dec$9(_class$9 = _dec2$9(_class$9 = (_class2$8 = class ControllerGuardPassport extends BeanBase {
598
747
  testUserName() {}
599
748
  testUserNameFail() {}
600
749
  testRoleName() {}
601
750
  testRoleNameFail() {}
602
- }, _applyDecoratedDescriptor(_class2$d.prototype, "testUserName", [_dec3$d, _dec4$d, _dec5$d, _dec6$d], Object.getOwnPropertyDescriptor(_class2$d.prototype, "testUserName"), _class2$d.prototype), _applyDecoratedDescriptor(_class2$d.prototype, "testUserNameFail", [_dec7$b, _dec8$9, _dec9$6, _dec0$6], Object.getOwnPropertyDescriptor(_class2$d.prototype, "testUserNameFail"), _class2$d.prototype), _applyDecoratedDescriptor(_class2$d.prototype, "testRoleName", [_dec1$6, _dec10$5, _dec11$5, _dec12$5], Object.getOwnPropertyDescriptor(_class2$d.prototype, "testRoleName"), _class2$d.prototype), _applyDecoratedDescriptor(_class2$d.prototype, "testRoleNameFail", [_dec13$5, _dec14$4, _dec15$4, _dec16$4], Object.getOwnPropertyDescriptor(_class2$d.prototype, "testRoleNameFail"), _class2$d.prototype), _class2$d)) || _class$h) || _class$h);
751
+ }, _applyDecoratedDescriptor(_class2$8.prototype, "testUserName", [_dec3$8, _dec4$8, _dec5$8, _dec6$8], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testUserName"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "testUserNameFail", [_dec7$8, _dec8$6, _dec9$5, _dec0$5], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testUserNameFail"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "testRoleName", [_dec1$5, _dec10$4, _dec11$4, _dec12$4], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testRoleName"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "testRoleNameFail", [_dec13$4, _dec14$3, _dec15$3, _dec16$3], Object.getOwnPropertyDescriptor(_class2$8.prototype, "testRoleNameFail"), _class2$8.prototype), _class2$8)) || _class$9) || _class$9);
603
752
 
604
- var _dec$g, _dec2$g, _dec3$c, _dec4$c, _dec5$c, _dec6$c, _dec7$a, _dec8$8, _class$g, _class2$c, _descriptor$2, _descriptor2$2, _descriptor3;
605
- let DtoUser = (_dec$g = Dto({
606
- openapi: {
607
- title: $locale('User')
608
- }
609
- }), _dec2$g = BeanInfo({
610
- module: "test-vona"
611
- }), _dec3$c = Api.field(v.title($locale('UserId')), v.tableIdentity()), _dec4$c = Reflect.metadata("design:type", typeof TableIdentity === "undefined" ? Object : TableIdentity), _dec5$c = Api.field(v.min(3)), _dec6$c = Reflect.metadata("design:type", String), _dec7$a = Api.field(), _dec8$8 = Reflect.metadata("design:type", Boolean), _dec$g(_class$g = _dec2$g(_class$g = (_class2$c = class DtoUser {
612
- constructor() {
613
- _initializerDefineProperty(this, "id", _descriptor$2, this);
614
- _initializerDefineProperty(this, "name", _descriptor2$2, this);
615
- _initializerDefineProperty(this, "married", _descriptor3, this);
616
- }
617
- }, _descriptor$2 = _applyDecoratedDescriptor(_class2$c.prototype, "id", [_dec3$c, _dec4$c], {
618
- configurable: true,
619
- enumerable: true,
620
- writable: true,
621
- initializer: null
622
- }), _descriptor2$2 = _applyDecoratedDescriptor(_class2$c.prototype, "name", [_dec5$c, _dec6$c], {
623
- configurable: true,
624
- enumerable: true,
625
- writable: true,
626
- initializer: null
627
- }), _descriptor3 = _applyDecoratedDescriptor(_class2$c.prototype, "married", [_dec7$a, _dec8$8], {
628
- configurable: true,
629
- enumerable: true,
630
- writable: true,
631
- initializer: null
632
- }), _class2$c)) || _class$g) || _class$g);
633
-
634
- var _dec$f, _dec2$f, _dec3$b, _dec4$b, _dec5$b, _dec6$b, _dec7$9, _dec8$7, _dec9$5, _dec0$5, _dec1$5, _dec10$4, _dec11$4, _dec12$4, _dec13$4, _dec14$3, _dec15$3, _dec16$3, _dec17$2, _dec18$2, _dec19$2, _dec20$2, _dec21$2, _dec22$2, _dec23$2, _dec24$2, _dec25$2, _dec26$1, _dec27$1, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _class$f, _class2$b;
635
- let ControllerOnion = (_dec$f = Controller({
753
+ var _dec$8, _dec2$8, _dec3$7, _dec4$7, _dec5$7, _dec6$7, _dec7$7, _dec8$5, _dec9$4, _dec0$4, _dec1$4, _dec10$3, _dec11$3, _dec12$3, _dec13$3, _dec14$2, _dec15$2, _dec16$2, _dec17$2, _dec18$2, _dec19$2, _dec20$2, _dec21$2, _dec22$2, _dec23$2, _dec24$2, _dec25$2, _dec26$1, _dec27$1, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _class$8, _class2$7;
754
+ let ControllerOnion = (_dec$8 = Controller({
636
755
  path: 'onion',
637
756
  tags: ['Onion'],
638
757
  meta: {
639
- mode: ['local', 'test']
758
+ mode: ['dev', 'test']
640
759
  }
641
- }), _dec2$f = BeanInfo({
760
+ }), _dec2$8 = BeanInfo({
642
761
  module: "test-vona"
643
- }), _dec3$b = Web.get('/'), _dec4$b = Aspect.aopMethod('a-database:transaction', {
762
+ }), _dec3$7 = Web.get('/'), _dec4$7 = Aspect.aopMethod('a-database:transaction', {
644
763
  enable: true,
645
764
  meta: {
646
- mode: 'local'
765
+ mode: 'dev'
647
766
  }
648
- }), _dec5$b = Aspect.guardGlobal('a-user:passport', {
767
+ }), _dec5$7 = Aspect.guardGlobal('a-user:passport', {
649
768
  public: true
650
- }), _dec6$b = Reflect.metadata("design:type", Function), _dec7$9 = Reflect.metadata("design:paramtypes", []), _dec8$7 = Web.post('//echo'), _dec9$5 = Aspect.guardGlobal('a-user:passport', {
769
+ }), _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', {
651
770
  public: true
652
- }), _dec0$5 = Aspect.middlewareGlobal('a-core:gate', {
771
+ }), _dec0$4 = Aspect.middlewareGlobal('a-core:gate', {
653
772
  gate: {
654
- mode: 'local'
773
+ mode: 'dev'
655
774
  }
656
- }), _dec1$5 = Core.gate({
775
+ }), _dec1$4 = Core.gate({
657
776
  gate: {
658
- mode: 'local'
777
+ mode: 'dev'
659
778
  }
660
- }), _dec10$4 = Aspect.aopMethod('a-database:transaction', {
779
+ }), _dec10$3 = Aspect.aopMethod('a-database:transaction', {
661
780
  isolationLevel: 'SERIALIZABLE',
662
781
  readOnly: true
663
- }), _dec11$4 = Database.transaction({
782
+ }), _dec11$3 = Database.transaction({
664
783
  isolationLevel: 'READ_COMMITTED',
665
784
  readOnly: false
666
- }), _dec12$4 = Api.body(v.optional(), z.string()), _dec13$4 = function (target, key) {
785
+ }), _dec12$3 = Api.body(v.optional(), z.string()), _dec13$3 = function (target, key) {
667
786
  return Arg.query('id', v.default(0), z.number())(target, key, 0);
668
- }, _dec14$3 = function (target, key) {
787
+ }, _dec14$2 = function (target, key) {
669
788
  return Arg.query('name', z.number().optional())(target, key, 2);
670
- }, _dec15$3 = function (target, key) {
789
+ }, _dec15$2 = function (target, key) {
671
790
  return Arg.body(v.title($locale('User')), z.object({
672
791
  id: z.number().openapi({
673
792
  title: $locale('UserId')
674
793
  })
675
794
  }))(target, key, 3);
676
- }, _dec16$3 = Reflect.metadata("design:type", Function), _dec17$2 = Reflect.metadata("design:paramtypes", [Number, String, String, typeof DtoUser === "undefined" ? Object : DtoUser]), _dec18$2 = Web.post('echo2/:userId/:userName'), _dec19$2 = Aspect.guardGlobal('a-user:passport', {
795
+ }, _dec16$2 = Reflect.metadata("design:type", Function), _dec17$2 = Reflect.metadata("design:paramtypes", [Number, String, String, typeof DtoUser === "undefined" ? Object : DtoUser]), _dec18$2 = Web.post('echo2/:userId/:userName'), _dec19$2 = Aspect.guardGlobal('a-user:passport', {
677
796
  public: true
678
797
  }), _dec20$2 = function (target, key) {
679
798
  return Arg.param('userId', v.title($locale('UserId')), v.example('example:1'))(target, key, 0);
@@ -708,7 +827,7 @@ let ControllerOnion = (_dec$f = Controller({
708
827
  return Arg.query('ids', v.default([1]), v.array(Number, {
709
828
  separator: '-'
710
829
  }))(target, key, 0);
711
- }, _dec43 = Reflect.metadata("design:type", Function), _dec44 = Reflect.metadata("design:paramtypes", [Array]), _dec45 = Web.get('echo6'), _dec46 = Passport.admin(), _dec47 = Reflect.metadata("design:type", Function), _dec48 = Reflect.metadata("design:paramtypes", []), _dec$f(_class$f = _dec2$f(_class$f = (_class2$b = class ControllerOnion extends BeanBase {
830
+ }, _dec43 = Reflect.metadata("design:type", Function), _dec44 = Reflect.metadata("design:paramtypes", [Array]), _dec45 = Web.get('echo6'), _dec46 = Passport.admin(), _dec47 = Reflect.metadata("design:type", Function), _dec48 = Reflect.metadata("design:paramtypes", []), _dec$8(_class$8 = _dec2$8(_class$8 = (_class2$7 = class ControllerOnion extends BeanBase {
712
831
  index() {
713
832
  return this.ctx.db.inTransaction;
714
833
  // return 'Hello Vona';
@@ -739,25 +858,25 @@ let ControllerOnion = (_dec$f = Controller({
739
858
  echo6() {
740
859
  return this.bean.passport.isAuthenticated;
741
860
  }
742
- }, _applyDecoratedDescriptor(_class2$b.prototype, "index", [_dec3$b, _dec4$b, _dec5$b, _dec6$b, _dec7$9], Object.getOwnPropertyDescriptor(_class2$b.prototype, "index"), _class2$b.prototype), _applyDecoratedDescriptor(_class2$b.prototype, "echo", [_dec8$7, _dec9$5, _dec0$5, _dec1$5, _dec10$4, _dec11$4, _dec12$4, _dec13$4, _dec14$3, _dec15$3, _dec16$3, _dec17$2], Object.getOwnPropertyDescriptor(_class2$b.prototype, "echo"), _class2$b.prototype), _applyDecoratedDescriptor(_class2$b.prototype, "echo2", [_dec18$2, _dec19$2, _dec20$2, _dec21$2, _dec22$2, _dec23$2, _dec24$2, _dec25$2], Object.getOwnPropertyDescriptor(_class2$b.prototype, "echo2"), _class2$b.prototype), _applyDecoratedDescriptor(_class2$b.prototype, "echo3", [_dec26$1, _dec27$1, _dec28, _dec29, _dec30, _dec31, _dec32], Object.getOwnPropertyDescriptor(_class2$b.prototype, "echo3"), _class2$b.prototype), _applyDecoratedDescriptor(_class2$b.prototype, "echo4", [_dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39], Object.getOwnPropertyDescriptor(_class2$b.prototype, "echo4"), _class2$b.prototype), _applyDecoratedDescriptor(_class2$b.prototype, "echo5", [_dec40, _dec41, _dec42, _dec43, _dec44], Object.getOwnPropertyDescriptor(_class2$b.prototype, "echo5"), _class2$b.prototype), _applyDecoratedDescriptor(_class2$b.prototype, "echo6", [_dec45, _dec46, _dec47, _dec48], Object.getOwnPropertyDescriptor(_class2$b.prototype, "echo6"), _class2$b.prototype), _class2$b)) || _class$f) || _class$f);
861
+ }, _applyDecoratedDescriptor(_class2$7.prototype, "index", [_dec3$7, _dec4$7, _dec5$7, _dec6$7, _dec7$7], Object.getOwnPropertyDescriptor(_class2$7.prototype, "index"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo", [_dec8$5, _dec9$4, _dec0$4, _dec1$4, _dec10$3, _dec11$3, _dec12$3, _dec13$3, _dec14$2, _dec15$2, _dec16$2, _dec17$2], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo2", [_dec18$2, _dec19$2, _dec20$2, _dec21$2, _dec22$2, _dec23$2, _dec24$2, _dec25$2], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo2"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo3", [_dec26$1, _dec27$1, _dec28, _dec29, _dec30, _dec31, _dec32], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo3"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo4", [_dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo4"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo5", [_dec40, _dec41, _dec42, _dec43, _dec44], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo5"), _class2$7.prototype), _applyDecoratedDescriptor(_class2$7.prototype, "echo6", [_dec45, _dec46, _dec47, _dec48], Object.getOwnPropertyDescriptor(_class2$7.prototype, "echo6"), _class2$7.prototype), _class2$7)) || _class$8) || _class$8);
743
862
 
744
- var _dec$e, _dec2$e, _dec3$a, _dec4$a, _dec5$a, _dec6$a, _dec7$8, _dec8$6, _dec9$4, _dec0$4, _dec1$4, _dec10$3, _dec11$3, _dec12$3, _dec13$3, _dec14$2, _dec15$2, _dec16$2, _dec17$1, _dec18$1, _dec19$1, _dec20$1, _dec21$1, _dec22$1, _dec23$1, _dec24$1, _dec25$1, _class$e, _class2$a;
745
- let ControllerPassport = (_dec$e = Controller({
863
+ var _dec$7, _dec2$7, _dec3$6, _dec4$6, _dec5$6, _dec6$6, _dec7$6, _dec8$4, _dec9$3, _dec0$3, _dec1$3, _dec10$2, _dec11$2, _dec12$2, _dec13$2, _dec14$1, _dec15$1, _dec16$1, _dec17$1, _dec18$1, _dec19$1, _dec20$1, _dec21$1, _dec22$1, _dec23$1, _dec24$1, _dec25$1, _class$7, _class2$6;
864
+ let ControllerPassport = (_dec$7 = Controller({
746
865
  path: 'passport',
747
866
  meta: {
748
867
  mode: 'test'
749
868
  }
750
- }), _dec2$e = Api.exclude(), _dec3$a = BeanInfo({
869
+ }), _dec2$7 = Api.exclude(), _dec3$6 = BeanInfo({
751
870
  module: "test-vona"
752
- }), _dec4$a = Web.get('echo/:name'), _dec5$a = Passport.public(), _dec6$a = function (target, key) {
871
+ }), _dec4$6 = Web.get('echo/:name'), _dec5$6 = Passport.public(), _dec6$6 = function (target, key) {
753
872
  return Arg.param('name')(target, key, 0);
754
- }, _dec7$8 = function (target, key) {
873
+ }, _dec7$6 = function (target, key) {
755
874
  return Arg.user()(target, key, 1);
756
- }, _dec8$6 = Reflect.metadata("design:type", Function), _dec9$4 = Reflect.metadata("design:paramtypes", [String, typeof IUserBase === "undefined" ? Object : IUserBase]), _dec0$4 = Web.post('login'), _dec1$4 = Api.body(v.object(DtoJwtToken)), _dec10$3 = Passport.public(), _dec11$3 = function (target, key) {
875
+ }, _dec8$4 = Reflect.metadata("design:type", Function), _dec9$3 = Reflect.metadata("design:paramtypes", [String, typeof IUserBase === "undefined" ? Object : IUserBase]), _dec0$3 = Web.post('login'), _dec1$3 = Api.body(v.object(DtoJwtToken)), _dec10$2 = Passport.public(), _dec11$2 = function (target, key) {
757
876
  return Arg.body('name')(target, key, 0);
758
- }, _dec12$3 = Reflect.metadata("design:type", Function), _dec13$3 = Reflect.metadata("design:paramtypes", [String]), _dec14$2 = Web.get('isAuthenticated'), _dec15$2 = Reflect.metadata("design:type", Function), _dec16$2 = Reflect.metadata("design:paramtypes", []), _dec17$1 = Web.post('refresh'), _dec18$1 = Api.body(v.object(DtoJwtToken)), _dec19$1 = Passport.public(), _dec20$1 = function (target, key) {
877
+ }, _dec12$2 = Reflect.metadata("design:type", Function), _dec13$2 = Reflect.metadata("design:paramtypes", [String]), _dec14$1 = Web.get('isAuthenticated'), _dec15$1 = Reflect.metadata("design:type", Function), _dec16$1 = Reflect.metadata("design:paramtypes", []), _dec17$1 = Web.post('refresh'), _dec18$1 = Api.body(v.object(DtoJwtToken)), _dec19$1 = Passport.public(), _dec20$1 = function (target, key) {
759
878
  return Arg.body('refreshToken')(target, key, 0);
760
- }, _dec21$1 = Reflect.metadata("design:type", Function), _dec22$1 = Reflect.metadata("design:paramtypes", [String]), _dec23$1 = Web.post('logout'), _dec24$1 = Reflect.metadata("design:type", Function), _dec25$1 = Reflect.metadata("design:paramtypes", []), _dec$e(_class$e = _dec2$e(_class$e = _dec3$a(_class$e = (_class2$a = class ControllerPassport extends BeanBase {
879
+ }, _dec21$1 = Reflect.metadata("design:type", Function), _dec22$1 = Reflect.metadata("design:paramtypes", [String]), _dec23$1 = Web.post('logout'), _dec24$1 = Reflect.metadata("design:type", Function), _dec25$1 = Reflect.metadata("design:paramtypes", []), _dec$7(_class$7 = _dec2$7(_class$7 = _dec3$6(_class$7 = (_class2$6 = class ControllerPassport extends BeanBase {
761
880
  echo(name, user) {
762
881
  assert.equal(name, 'admin');
763
882
  assert.equal($getUserName(user), 'admin');
@@ -779,19 +898,19 @@ let ControllerPassport = (_dec$e = Controller({
779
898
  async logout() {
780
899
  return await this.bean.passport.signout();
781
900
  }
782
- }, _applyDecoratedDescriptor(_class2$a.prototype, "echo", [_dec4$a, _dec5$a, _dec6$a, _dec7$8, _dec8$6, _dec9$4], Object.getOwnPropertyDescriptor(_class2$a.prototype, "echo"), _class2$a.prototype), _applyDecoratedDescriptor(_class2$a.prototype, "login", [_dec0$4, _dec1$4, _dec10$3, _dec11$3, _dec12$3, _dec13$3], Object.getOwnPropertyDescriptor(_class2$a.prototype, "login"), _class2$a.prototype), _applyDecoratedDescriptor(_class2$a.prototype, "isAuthenticated", [_dec14$2, _dec15$2, _dec16$2], Object.getOwnPropertyDescriptor(_class2$a.prototype, "isAuthenticated"), _class2$a.prototype), _applyDecoratedDescriptor(_class2$a.prototype, "refresh", [_dec17$1, _dec18$1, _dec19$1, _dec20$1, _dec21$1, _dec22$1], Object.getOwnPropertyDescriptor(_class2$a.prototype, "refresh"), _class2$a.prototype), _applyDecoratedDescriptor(_class2$a.prototype, "logout", [_dec23$1, _dec24$1, _dec25$1], Object.getOwnPropertyDescriptor(_class2$a.prototype, "logout"), _class2$a.prototype), _class2$a)) || _class$e) || _class$e) || _class$e);
901
+ }, _applyDecoratedDescriptor(_class2$6.prototype, "echo", [_dec4$6, _dec5$6, _dec6$6, _dec7$6, _dec8$4, _dec9$3], Object.getOwnPropertyDescriptor(_class2$6.prototype, "echo"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "login", [_dec0$3, _dec1$3, _dec10$2, _dec11$2, _dec12$2, _dec13$2], Object.getOwnPropertyDescriptor(_class2$6.prototype, "login"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "isAuthenticated", [_dec14$1, _dec15$1, _dec16$1], Object.getOwnPropertyDescriptor(_class2$6.prototype, "isAuthenticated"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "refresh", [_dec17$1, _dec18$1, _dec19$1, _dec20$1, _dec21$1, _dec22$1], Object.getOwnPropertyDescriptor(_class2$6.prototype, "refresh"), _class2$6.prototype), _applyDecoratedDescriptor(_class2$6.prototype, "logout", [_dec23$1, _dec24$1, _dec25$1], Object.getOwnPropertyDescriptor(_class2$6.prototype, "logout"), _class2$6.prototype), _class2$6)) || _class$7) || _class$7) || _class$7);
783
902
 
784
- var _dec$d, _dec2$d, _dec3$9, _dec4$9, _dec5$9, _dec6$9, _dec7$7, _dec8$5, _class$d, _class2$9;
785
- let ControllerPerformAction = (_dec$d = Controller({
903
+ var _dec$6, _dec2$6, _dec3$5, _dec4$5, _dec5$5, _dec6$5, _dec7$5, _dec8$3, _class$6, _class2$5;
904
+ let ControllerPerformAction = (_dec$6 = Controller({
786
905
  path: 'performAction',
787
906
  meta: {
788
907
  mode: 'test'
789
908
  }
790
- }), _dec2$d = Api.exclude(), _dec3$9 = BeanInfo({
909
+ }), _dec2$6 = Api.exclude(), _dec3$5 = BeanInfo({
791
910
  module: "test-vona"
792
- }), _dec4$9 = Web.post('echo'), _dec5$9 = Passport.public(), _dec6$9 = function (target, key) {
911
+ }), _dec4$5 = Web.post('echo'), _dec5$5 = Passport.public(), _dec6$5 = function (target, key) {
793
912
  return Arg.body('id')(target, key, 0);
794
- }, _dec7$7 = Reflect.metadata("design:type", Function), _dec8$5 = Reflect.metadata("design:paramtypes", [Number]), _dec$d(_class$d = _dec2$d(_class$d = _dec3$9(_class$d = (_class2$9 = class ControllerPerformAction extends BeanBase {
913
+ }, _dec7$5 = Reflect.metadata("design:type", Function), _dec8$3 = Reflect.metadata("design:paramtypes", [Number]), _dec$6(_class$6 = _dec2$6(_class$6 = _dec3$5(_class$6 = (_class2$5 = class ControllerPerformAction extends BeanBase {
795
914
  echo(id) {
796
915
  const url = this.scope.util.combineApiPath('performAction/echo');
797
916
  return {
@@ -799,17 +918,17 @@ let ControllerPerformAction = (_dec$d = Controller({
799
918
  url
800
919
  };
801
920
  }
802
- }, _applyDecoratedDescriptor(_class2$9.prototype, "echo", [_dec4$9, _dec5$9, _dec6$9, _dec7$7, _dec8$5], Object.getOwnPropertyDescriptor(_class2$9.prototype, "echo"), _class2$9.prototype), _class2$9)) || _class$d) || _class$d) || _class$d);
921
+ }, _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);
803
922
 
804
- var _dec$c, _dec2$c, _dec3$8, _dec4$8, _dec5$8, _dec6$8, _dec7$6, _dec8$4, _dec9$3, _dec0$3, _dec1$3, _class$c, _class2$8;
805
- let ControllerQueue = (_dec$c = Controller({
923
+ var _dec$5, _dec2$5, _dec3$4, _dec4$4, _dec5$4, _dec6$4, _dec7$4, _dec8$2, _dec9$2, _dec0$2, _dec1$2, _class$5, _class2$4;
924
+ let ControllerQueue = (_dec$5 = Controller({
806
925
  path: 'queue',
807
926
  meta: {
808
927
  mode: 'test'
809
928
  }
810
- }), _dec2$c = Api.exclude(), _dec3$8 = BeanInfo({
929
+ }), _dec2$5 = Api.exclude(), _dec3$4 = BeanInfo({
811
930
  module: "test-vona"
812
- }), _dec4$8 = Web.post('pushAsync'), _dec5$8 = Passport.public(), _dec6$8 = Reflect.metadata("design:type", Function), _dec7$6 = Reflect.metadata("design:paramtypes", []), _dec8$4 = Web.post('push'), _dec9$3 = Passport.public(), _dec0$3 = Reflect.metadata("design:type", Function), _dec1$3 = Reflect.metadata("design:paramtypes", []), _dec$c(_class$c = _dec2$c(_class$c = _dec3$8(_class$c = (_class2$8 = class ControllerQueue extends BeanBase {
931
+ }), _dec4$4 = Web.post('pushAsync'), _dec5$4 = Passport.public(), _dec6$4 = Reflect.metadata("design:type", Function), _dec7$4 = Reflect.metadata("design:paramtypes", []), _dec8$2 = Web.post('push'), _dec9$2 = Passport.public(), _dec0$2 = Reflect.metadata("design:type", Function), _dec1$2 = Reflect.metadata("design:paramtypes", []), _dec$5(_class$5 = _dec2$5(_class$5 = _dec3$4(_class$5 = (_class2$4 = class ControllerQueue extends BeanBase {
813
932
  async pushAsync() {
814
933
  const res = await this.scope.queue.test.pushAsync({
815
934
  a: 1,
@@ -823,17 +942,17 @@ let ControllerQueue = (_dec$c = Controller({
823
942
  b: 2
824
943
  });
825
944
  }
826
- }, _applyDecoratedDescriptor(_class2$8.prototype, "pushAsync", [_dec4$8, _dec5$8, _dec6$8, _dec7$6], Object.getOwnPropertyDescriptor(_class2$8.prototype, "pushAsync"), _class2$8.prototype), _applyDecoratedDescriptor(_class2$8.prototype, "push", [_dec8$4, _dec9$3, _dec0$3, _dec1$3], Object.getOwnPropertyDescriptor(_class2$8.prototype, "push"), _class2$8.prototype), _class2$8)) || _class$c) || _class$c) || _class$c);
945
+ }, _applyDecoratedDescriptor(_class2$4.prototype, "pushAsync", [_dec4$4, _dec5$4, _dec6$4, _dec7$4], Object.getOwnPropertyDescriptor(_class2$4.prototype, "pushAsync"), _class2$4.prototype), _applyDecoratedDescriptor(_class2$4.prototype, "push", [_dec8$2, _dec9$2, _dec0$2, _dec1$2], Object.getOwnPropertyDescriptor(_class2$4.prototype, "push"), _class2$4.prototype), _class2$4)) || _class$5) || _class$5) || _class$5);
827
946
 
828
- var _dec$b, _dec2$b, _dec3$7, _dec4$7, _dec5$7, _dec6$7, _dec7$5, _class$b, _class2$7;
829
- let ControllerSummer = (_dec$b = Controller({
947
+ var _dec$4, _dec2$4, _dec3$3, _dec4$3, _dec5$3, _dec6$3, _dec7$3, _class$4, _class2$3;
948
+ let ControllerSummer = (_dec$4 = Controller({
830
949
  path: 'summer',
831
950
  meta: {
832
951
  mode: 'test'
833
952
  }
834
- }), _dec2$b = Api.exclude(), _dec3$7 = BeanInfo({
953
+ }), _dec2$4 = Api.exclude(), _dec3$3 = BeanInfo({
835
954
  module: "test-vona"
836
- }), _dec4$7 = Web.post(), _dec5$7 = Passport.public(), _dec6$7 = Reflect.metadata("design:type", Function), _dec7$5 = Reflect.metadata("design:paramtypes", []), _dec$b(_class$b = _dec2$b(_class$b = _dec3$7(_class$b = (_class2$7 = class ControllerSummer extends BeanBase {
955
+ }), _dec4$3 = Web.post(), _dec5$3 = Passport.public(), _dec6$3 = Reflect.metadata("design:type", Function), _dec7$3 = Reflect.metadata("design:paramtypes", []), _dec$4(_class$4 = _dec2$4(_class$4 = _dec3$3(_class$4 = (_class2$3 = class ControllerSummer extends BeanBase {
837
956
  async test() {
838
957
  // name
839
958
  const name = 'test';
@@ -976,17 +1095,17 @@ let ControllerSummer = (_dec$b = Controller({
976
1095
  });
977
1096
  assert.equal(value, undefined);
978
1097
  }
979
- }, _applyDecoratedDescriptor(_class2$7.prototype, "test", [_dec4$7, _dec5$7, _dec6$7, _dec7$5], Object.getOwnPropertyDescriptor(_class2$7.prototype, "test"), _class2$7.prototype), _class2$7)) || _class$b) || _class$b) || _class$b);
1098
+ }, _applyDecoratedDescriptor(_class2$3.prototype, "test", [_dec4$3, _dec5$3, _dec6$3, _dec7$3], Object.getOwnPropertyDescriptor(_class2$3.prototype, "test"), _class2$3.prototype), _class2$3)) || _class$4) || _class$4) || _class$4);
980
1099
 
981
- var _dec$a, _dec2$a, _dec3$6, _dec4$6, _dec5$6, _dec6$6, _dec7$4, _class$a, _class2$6;
982
- let ControllerTail = (_dec$a = Controller({
1100
+ var _dec$3, _dec2$3, _dec3$2, _dec4$2, _dec5$2, _dec6$2, _dec7$2, _class$3, _class2$2;
1101
+ let ControllerTail = (_dec$3 = Controller({
983
1102
  path: 'tail',
984
1103
  meta: {
985
1104
  mode: 'test'
986
1105
  }
987
- }), _dec2$a = Api.exclude(), _dec3$6 = BeanInfo({
1106
+ }), _dec2$3 = Api.exclude(), _dec3$2 = BeanInfo({
988
1107
  module: "test-vona"
989
- }), _dec4$6 = Web.post(), _dec5$6 = Passport.public(), _dec6$6 = Reflect.metadata("design:type", Function), _dec7$4 = Reflect.metadata("design:paramtypes", []), _dec$a(_class$a = _dec2$a(_class$a = _dec3$6(_class$a = (_class2$6 = class ControllerTail extends BeanBase {
1108
+ }), _dec4$2 = Web.post(), _dec5$2 = Passport.public(), _dec6$2 = Reflect.metadata("design:type", Function), _dec7$2 = Reflect.metadata("design:paramtypes", []), _dec$3(_class$3 = _dec2$3(_class$3 = _dec3$2(_class$3 = (_class2$2 = class ControllerTail extends BeanBase {
990
1109
  tail() {
991
1110
  // 1
992
1111
  cast(this.ctx)._tail_test = 1;
@@ -1004,51 +1123,51 @@ let ControllerTail = (_dec$a = Controller({
1004
1123
  // 2
1005
1124
  cast(this.ctx)._tail_test = 2;
1006
1125
  }
1007
- }, _applyDecoratedDescriptor(_class2$6.prototype, "tail", [_dec4$6, _dec5$6, _dec6$6, _dec7$4], Object.getOwnPropertyDescriptor(_class2$6.prototype, "tail"), _class2$6.prototype), _class2$6)) || _class$a) || _class$a) || _class$a);
1126
+ }, _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);
1008
1127
 
1009
- var _dec$9, _dec2$9, _dec3$5, _dec4$5, _dec5$5, _dec6$5, _dec7$3, _dec8$3, _dec9$2, _dec0$2, _dec1$2, _dec10$2, _dec11$2, _dec12$2, _dec13$2, _class$9, _class2$5;
1010
- const tableNameFail$1 = '__tempTransactionFail';
1011
- const tableNameSuccess$1 = '__tempTransactionSuccess';
1012
- let ControllerTransaction = (_dec$9 = Controller({
1128
+ var _dec$2, _dec2$2, _dec3$1, _dec4$1, _dec5$1, _dec6$1, _dec7$1, _dec8$1, _dec9$1, _dec0$1, _dec1$1, _dec10$1, _dec11$1, _dec12$1, _dec13$1, _class$2, _class2$1;
1129
+ const tableNameFail = '__tempTransactionFail';
1130
+ const tableNameSuccess = '__tempTransactionSuccess';
1131
+ let ControllerTransaction = (_dec$2 = Controller({
1013
1132
  path: 'transaction',
1014
1133
  meta: {
1015
1134
  mode: 'test'
1016
1135
  }
1017
- }), _dec2$9 = Api.exclude(), _dec3$5 = BeanInfo({
1136
+ }), _dec2$2 = Api.exclude(), _dec3$1 = BeanInfo({
1018
1137
  module: "test-vona"
1019
- }), _dec4$5 = Web.post('fail'), _dec5$5 = Database.transaction(), _dec6$5 = Passport.public(), _dec7$3 = function (target, key) {
1138
+ }), _dec4$1 = Web.post('fail'), _dec5$1 = Database.transaction(), _dec6$1 = Passport.public(), _dec7$1 = function (target, key) {
1020
1139
  return Arg.body()(target, key, 0);
1021
- }, _dec8$3 = Reflect.metadata("design:type", Function), _dec9$2 = Reflect.metadata("design:paramtypes", [Object]), _dec0$2 = Web.post('success'), _dec1$2 = Database.transaction(), _dec10$2 = Passport.public(), _dec11$2 = function (target, key) {
1140
+ }, _dec8$1 = Reflect.metadata("design:type", Function), _dec9$1 = Reflect.metadata("design:paramtypes", [Object]), _dec0$1 = Web.post('success'), _dec1$1 = Database.transaction(), _dec10$1 = Passport.public(), _dec11$1 = function (target, key) {
1022
1141
  return Arg.body()(target, key, 0);
1023
- }, _dec12$2 = Reflect.metadata("design:type", Function), _dec13$2 = Reflect.metadata("design:paramtypes", [Object]), _dec$9(_class$9 = _dec2$9(_class$9 = _dec3$5(_class$9 = (_class2$5 = class ControllerTransaction extends BeanBase {
1142
+ }, _dec12$1 = Reflect.metadata("design:type", Function), _dec13$1 = Reflect.metadata("design:paramtypes", [Object]), _dec$2(_class$2 = _dec2$2(_class$2 = _dec3$1(_class$2 = (_class2$1 = class ControllerTransaction extends BeanBase {
1024
1143
  async fail(item) {
1025
- await this.app.bean.model.update(`${tableNameFail$1}`, item);
1026
- await this.app.bean.model.update(`${tableNameFail$1}error`, item);
1144
+ await this.app.bean.model.update(`${tableNameFail}`, item);
1145
+ await this.app.bean.model.update(`${tableNameFail}error`, item);
1027
1146
  }
1028
1147
  async success(item) {
1029
- await this.app.bean.model.update(tableNameSuccess$1, item);
1148
+ await this.app.bean.model.update(tableNameSuccess, item);
1030
1149
  }
1031
- }, _applyDecoratedDescriptor(_class2$5.prototype, "fail", [_dec4$5, _dec5$5, _dec6$5, _dec7$3, _dec8$3, _dec9$2], Object.getOwnPropertyDescriptor(_class2$5.prototype, "fail"), _class2$5.prototype), _applyDecoratedDescriptor(_class2$5.prototype, "success", [_dec0$2, _dec1$2, _dec10$2, _dec11$2, _dec12$2, _dec13$2], Object.getOwnPropertyDescriptor(_class2$5.prototype, "success"), _class2$5.prototype), _class2$5)) || _class$9) || _class$9) || _class$9);
1150
+ }, _applyDecoratedDescriptor(_class2$1.prototype, "fail", [_dec4$1, _dec5$1, _dec6$1, _dec7$1, _dec8$1, _dec9$1], Object.getOwnPropertyDescriptor(_class2$1.prototype, "fail"), _class2$1.prototype), _applyDecoratedDescriptor(_class2$1.prototype, "success", [_dec0$1, _dec1$1, _dec10$1, _dec11$1, _dec12$1, _dec13$1], Object.getOwnPropertyDescriptor(_class2$1.prototype, "success"), _class2$1.prototype), _class2$1)) || _class$2) || _class$2) || _class$2);
1032
1151
 
1033
- var _dec$8, _dec2$8, _dec3$4, _dec4$4, _dec5$4, _dec6$4, _dec7$2, _dec8$2, _dec9$1, _dec0$1, _dec1$1, _dec10$1, _dec11$1, _dec12$1, _dec13$1, _dec14$1, _dec15$1, _dec16$1, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _class$8, _class2$4;
1034
- let ControllerUpload = (_dec$8 = Controller({
1152
+ var _dec$1, _dec2$1, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec0, _dec1, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _class$1, _class2;
1153
+ let ControllerUpload = (_dec$1 = Controller({
1035
1154
  path: 'upload',
1036
1155
  meta: {
1037
- mode: ['test', 'local']
1156
+ mode: ['test', 'dev']
1038
1157
  }
1039
- }), _dec2$8 = BeanInfo({
1158
+ }), _dec2$1 = BeanInfo({
1040
1159
  module: "test-vona"
1041
- }), _dec3$4 = Web.post('fields'), _dec4$4 = Passport.public(), _dec5$4 = Aspect.interceptor('a-upload:upload'), _dec6$4 = Api.contentType('application/json'), _dec7$2 = function (target, key) {
1160
+ }), _dec3 = Web.post('fields'), _dec4 = Passport.public(), _dec5 = Aspect.interceptor('a-upload:upload'), _dec6 = Api.contentType('application/json'), _dec7 = function (target, key) {
1042
1161
  return Arg.fields()(target, key, 0);
1043
- }, _dec8$2 = function (target, key) {
1162
+ }, _dec8 = function (target, key) {
1044
1163
  return Arg.fields('checkes', v.array(z.string()))(target, key, 1);
1045
- }, _dec9$1 = function (target, key) {
1164
+ }, _dec9 = function (target, key) {
1046
1165
  return Arg.field('name', v.default('zhennann'), v.title('your name'))(target, key, 2);
1047
- }, _dec0$1 = Reflect.metadata("design:type", Function), _dec1$1 = Reflect.metadata("design:paramtypes", [Array, Array, String]), _dec10$1 = Web.post('file'), _dec11$1 = Passport.public(), _dec12$1 = Aspect.interceptor('a-upload:upload'), _dec13$1 = Api.contentType('application/json'), _dec14$1 = function (target, key) {
1166
+ }, _dec0 = Reflect.metadata("design:type", Function), _dec1 = Reflect.metadata("design:paramtypes", [Array, Array, String]), _dec10 = Web.post('file'), _dec11 = Passport.public(), _dec12 = Aspect.interceptor('a-upload:upload'), _dec13 = Api.contentType('application/json'), _dec14 = function (target, key) {
1048
1167
  return Arg.field('name', v.default('zhennann'))(target, key, 0);
1049
- }, _dec15$1 = function (target, key) {
1168
+ }, _dec15 = function (target, key) {
1050
1169
  return Arg.file('welcome')(target, key, 1);
1051
- }, _dec16$1 = Reflect.metadata("design:type", Function), _dec17 = Reflect.metadata("design:paramtypes", [String, typeof IUploadFile === "undefined" ? Object : IUploadFile]), _dec18 = Web.post('files'), _dec19 = Passport.public(), _dec20 = Aspect.interceptor('a-upload:upload'), _dec21 = Api.contentType('application/json'), _dec22 = function (target, key) {
1170
+ }, _dec16 = Reflect.metadata("design:type", Function), _dec17 = Reflect.metadata("design:paramtypes", [String, typeof IUploadFile === "undefined" ? Object : IUploadFile]), _dec18 = Web.post('files'), _dec19 = Passport.public(), _dec20 = Aspect.interceptor('a-upload:upload'), _dec21 = Api.contentType('application/json'), _dec22 = function (target, key) {
1052
1171
  return Arg.files(v.title('more files'))(target, key, 0);
1053
1172
  }, _dec23 = function (target, key) {
1054
1173
  return Arg.files('images', v.title('images'))(target, key, 1);
@@ -1056,7 +1175,7 @@ let ControllerUpload = (_dec$8 = Controller({
1056
1175
  return Arg.file('welcome1', v.title('single file'))(target, key, 2);
1057
1176
  }, _dec25 = function (target, key) {
1058
1177
  return Arg.file('welcome2')(target, key, 3);
1059
- }, _dec26 = Reflect.metadata("design:type", Function), _dec27 = Reflect.metadata("design:paramtypes", [Array, Array, typeof IUploadFile === "undefined" ? Object : IUploadFile, typeof IUploadFile === "undefined" ? Object : IUploadFile]), _dec$8(_class$8 = _dec2$8(_class$8 = (_class2$4 = class ControllerUpload extends BeanBase {
1178
+ }, _dec26 = Reflect.metadata("design:type", Function), _dec27 = Reflect.metadata("design:paramtypes", [Array, Array, typeof IUploadFile === "undefined" ? Object : IUploadFile, typeof IUploadFile === "undefined" ? Object : IUploadFile]), _dec$1(_class$1 = _dec2$1(_class$1 = (_class2 = class ControllerUpload extends BeanBase {
1060
1179
  fields(fields, checkes, name) {
1061
1180
  assert.equal(fields.find(item => item.name === 'name')?.value, 'zhennann');
1062
1181
  assert.equal(checkes.length > 0, true);
@@ -1075,152 +1194,33 @@ let ControllerUpload = (_dec$8 = Controller({
1075
1194
  assert.equal(file2.name, 'welcome2');
1076
1195
  return this.ctx[SymbolUploadValue];
1077
1196
  }
1078
- }, _applyDecoratedDescriptor(_class2$4.prototype, "fields", [_dec3$4, _dec4$4, _dec5$4, _dec6$4, _dec7$2, _dec8$2, _dec9$1, _dec0$1, _dec1$1], Object.getOwnPropertyDescriptor(_class2$4.prototype, "fields"), _class2$4.prototype), _applyDecoratedDescriptor(_class2$4.prototype, "file", [_dec10$1, _dec11$1, _dec12$1, _dec13$1, _dec14$1, _dec15$1, _dec16$1, _dec17], Object.getOwnPropertyDescriptor(_class2$4.prototype, "file"), _class2$4.prototype), _applyDecoratedDescriptor(_class2$4.prototype, "files", [_dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27], Object.getOwnPropertyDescriptor(_class2$4.prototype, "files"), _class2$4.prototype), _class2$4)) || _class$8) || _class$8);
1079
-
1080
- var _dec$7, _dec2$7, _dec3$3, _dec4$3, _dec5$3, _dec6$3, _class$7, _class2$3, _descriptor$1, _descriptor2$1;
1081
- let DtoProfile = (_dec$7 = Dto(), _dec2$7 = BeanInfo({
1082
- module: "test-vona"
1083
- }), _dec3$3 = Api.field(), _dec4$3 = Reflect.metadata("design:type", Number), _dec5$3 = Api.field(v.email()), _dec6$3 = Reflect.metadata("design:type", String), _dec$7(_class$7 = _dec2$7(_class$7 = (_class2$3 = class DtoProfile {
1084
- constructor() {
1085
- _initializerDefineProperty(this, "id", _descriptor$1, this);
1086
- _initializerDefineProperty(this, "email", _descriptor2$1, this);
1087
- }
1088
- }, _descriptor$1 = _applyDecoratedDescriptor(_class2$3.prototype, "id", [_dec3$3, _dec4$3], {
1089
- configurable: true,
1090
- enumerable: true,
1091
- writable: true,
1092
- initializer: null
1093
- }), _descriptor2$1 = _applyDecoratedDescriptor(_class2$3.prototype, "email", [_dec5$3, _dec6$3], {
1094
- configurable: true,
1095
- enumerable: true,
1096
- writable: true,
1097
- initializer: null
1098
- }), _class2$3)) || _class$7) || _class$7);
1099
-
1100
- var _dec$6, _dec2$6, _dec3$2, _dec4$2, _dec5$2, _dec6$2, _class$6, _class2$2, _descriptor, _descriptor2;
1101
- let EntityTest = (_dec$6 = Entity('testVona'), _dec2$6 = BeanInfo({
1102
- module: "test-vona"
1103
- }), _dec3$2 = Api.field(), _dec4$2 = Reflect.metadata("design:type", String), _dec5$2 = Api.field(), _dec6$2 = Reflect.metadata("design:type", String), _dec$6(_class$6 = _dec2$6(_class$6 = (_class2$2 = class EntityTest extends EntityBase {
1104
- constructor(...args) {
1105
- super(...args);
1106
- _initializerDefineProperty(this, "title", _descriptor, this);
1107
- _initializerDefineProperty(this, "description", _descriptor2, this);
1108
- }
1109
- }, _descriptor = _applyDecoratedDescriptor(_class2$2.prototype, "title", [_dec3$2, _dec4$2], {
1110
- configurable: true,
1111
- enumerable: true,
1112
- writable: true,
1113
- initializer: null
1114
- }), _descriptor2 = _applyDecoratedDescriptor(_class2$2.prototype, "description", [_dec5$2, _dec6$2], {
1115
- configurable: true,
1116
- enumerable: true,
1117
- writable: true,
1118
- initializer: null
1119
- }), _class2$2)) || _class$6) || _class$6);
1120
-
1121
- var _dec$5, _dec2$5, _class$5;
1122
- let ModelTest = (_dec$5 = Model({
1123
- entity: EntityTest,
1124
- clientName: 'default'
1125
- }), _dec2$5 = BeanInfo({
1126
- module: "test-vona"
1127
- }), _dec$5(_class$5 = _dec2$5(_class$5 = class ModelTest extends BeanModelBase {}) || _class$5) || _class$5);
1128
-
1129
- var _dec$4, _dec2$4, _dec3$1, _dec4$1, _class$4, _dec5$1, _dec6$1, _dec7$1, _dec8$1, _dec9, _dec0, _dec1, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _class2$1, _class3;
1130
- let ServiceAopMethodBase = (_dec$4 = Aspect.aopMethod('test-vona:test', {
1131
- wrapper: '+'
1132
- }), _dec2$4 = Aspect.aopMethod('test-vona:test', {
1133
- wrapper: '-'
1134
- }), _dec3$1 = Reflect.metadata("design:type", Function), _dec4$1 = Reflect.metadata("design:paramtypes", []), _class$4 = class ServiceAopMethodBase extends BeanBase {
1135
- testSyncBase() {
1136
- return 'hello';
1137
- }
1138
- }, _applyDecoratedDescriptor(_class$4.prototype, "testSyncBase", [_dec$4, _dec2$4, _dec3$1, _dec4$1], Object.getOwnPropertyDescriptor(_class$4.prototype, "testSyncBase"), _class$4.prototype), _class$4);
1139
- let ServiceAopMethod = (_dec5$1 = Service(), _dec6$1 = BeanInfo({
1140
- module: "test-vona"
1141
- }), _dec7$1 = Aspect.aopMethod('test-vona:test', {
1142
- wrapper: '+'
1143
- }), _dec8$1 = Aspect.aopMethod('test-vona:test', {
1144
- wrapper: '-'
1145
- }), _dec9 = Reflect.metadata("design:type", Function), _dec0 = Reflect.metadata("design:paramtypes", []), _dec1 = Aspect.aopMethod('test-vona:test', {
1146
- wrapper: '+'
1147
- }), _dec10 = Aspect.aopMethod('test-vona:test', {
1148
- wrapper: '-'
1149
- }), _dec11 = Reflect.metadata("design:type", Function), _dec12 = Reflect.metadata("design:paramtypes", []), _dec13 = Aspect.aopMethod('test-vona:test', {
1150
- wrapper: '+'
1151
- }), _dec14 = Aspect.aopMethod('test-vona:test', {
1152
- wrapper: '-'
1153
- }), _dec15 = Reflect.metadata("design:type", Function), _dec16 = Reflect.metadata("design:paramtypes", []), _dec5$1(_class2$1 = _dec6$1(_class2$1 = (_class3 = class ServiceAopMethod extends ServiceAopMethodBase {
1154
- constructor(...args) {
1155
- super(...args);
1156
- this._name = '';
1157
- }
1158
- testSync() {
1159
- return 'hello';
1160
- }
1161
- async testAsync() {
1162
- return 'hello';
1163
- }
1164
- get name() {
1165
- return this._name;
1166
- }
1167
- set name(value) {
1168
- this._name = value;
1169
- }
1170
- }, _applyDecoratedDescriptor(_class3.prototype, "testSync", [_dec7$1, _dec8$1, _dec9, _dec0], Object.getOwnPropertyDescriptor(_class3.prototype, "testSync"), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, "testAsync", [_dec1, _dec10, _dec11, _dec12], Object.getOwnPropertyDescriptor(_class3.prototype, "testAsync"), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, "name", [_dec13, _dec14, _dec15, _dec16], Object.getOwnPropertyDescriptor(_class3.prototype, "name"), _class3.prototype), _class3)) || _class2$1) || _class2$1);
1171
-
1172
- var _dec$3, _dec2$3, _class$3;
1173
- let ServiceTestApp = (_dec$3 = Service(), _dec2$3 = BeanInfo({
1174
- module: "test-vona"
1175
- }), _dec$3(_class$3 = _dec2$3(_class$3 = class ServiceTestApp extends BeanBase {
1176
- actionSync({
1177
- a,
1178
- b
1179
- }) {
1180
- return a + b;
1181
- }
1182
- async actionAsync({
1183
- a,
1184
- b
1185
- }) {
1186
- return Promise.resolve(a + b);
1187
- }
1188
- }) || _class$3) || _class$3);
1197
+ }, _applyDecoratedDescriptor(_class2.prototype, "fields", [_dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec0, _dec1], Object.getOwnPropertyDescriptor(_class2.prototype, "fields"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "file", [_dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17], Object.getOwnPropertyDescriptor(_class2.prototype, "file"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "files", [_dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27], Object.getOwnPropertyDescriptor(_class2.prototype, "files"), _class2.prototype), _class2)) || _class$1) || _class$1);
1189
1198
 
1190
- var _dec$2, _dec2$2, _class$2;
1191
- class ClassBeanBase extends BeanBase {
1192
- actionSync({
1193
- a,
1194
- b
1195
- }) {
1196
- return a + b;
1197
- }
1199
+ function config(_app) {
1200
+ return {};
1198
1201
  }
1199
- let ServiceTestClass = (_dec$2 = Service(), _dec2$2 = BeanInfo({
1200
- module: "test-vona"
1201
- }), _dec$2(_class$2 = _dec2$2(_class$2 = class ServiceTestClass extends ClassBeanBase {
1202
- async actionAsync({
1203
- a,
1204
- b
1205
- }) {
1206
- return Promise.resolve(a + b);
1207
- }
1208
- }) || _class$2) || _class$2);
1209
1202
 
1210
- var _dec$1, _dec2$1, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class$1, _class2;
1211
- const tableNameFail = '__tempTransactionFail';
1212
- const tableNameSuccess = '__tempTransactionSuccess';
1213
- let ServiceTransaction = (_dec$1 = Service(), _dec2$1 = BeanInfo({
1214
- module: "test-vona"
1215
- }), _dec3 = Database.transaction(), _dec4 = Reflect.metadata("design:type", Function), _dec5 = Reflect.metadata("design:paramtypes", [Object]), _dec6 = Database.transaction(), _dec7 = Reflect.metadata("design:type", Function), _dec8 = Reflect.metadata("design:paramtypes", [Object]), _dec$1(_class$1 = _dec2$1(_class$1 = (_class2 = class ServiceTransaction extends BeanBase {
1216
- async fail(item) {
1217
- await this.app.bean.model.update(`${tableNameFail}`, item);
1218
- await this.app.bean.model.update(`${tableNameFail}error`, item);
1219
- }
1220
- async success(item) {
1221
- await this.app.bean.model.update(tableNameSuccess, item);
1222
- }
1223
- }, _applyDecoratedDescriptor(_class2.prototype, "fail", [_dec3, _dec4, _dec5], Object.getOwnPropertyDescriptor(_class2.prototype, "fail"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "success", [_dec6, _dec7, _dec8], Object.getOwnPropertyDescriptor(_class2.prototype, "success"), _class2.prototype), _class2)) || _class$1) || _class$1);
1203
+ var locale_en_us = {
1204
+ User: 'User',
1205
+ UserId: 'User Id',
1206
+ TestHelloWorld: 'Hello World',
1207
+ TestApples: '%d apples',
1208
+ TestApples_0: 'no apples',
1209
+ TestApples_1: 'one apple',
1210
+ TestNameApples_: '%s has %d apples',
1211
+ TestNameApples_0_1: '%s has no apples',
1212
+ TestNameApples_1_1: '%s has one apple'
1213
+ };
1214
+
1215
+ var locale_zh_cn = {
1216
+ User: '用户',
1217
+ UserId: '用户Id',
1218
+ TestHelloWorld: '您好,世界',
1219
+ TestApples: '%d个苹果',
1220
+ TestApples_0: '没有苹果',
1221
+ TestNameApples_: '%s有%d个苹果',
1222
+ TestNameApples_0_1: '%s没有苹果'
1223
+ };
1224
1224
 
1225
1225
  var _dec, _dec2, _class;
1226
1226
  const locales = {