vona-module-test-vona 5.0.16 → 5.0.18
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 +23 -9
- package/dist/controller/guardPassport.d.ts +10 -0
- package/dist/index.js +98 -80
- package/package.json +1 -1
|
@@ -45,6 +45,8 @@ import type { IControllerOptionsCacheMem } from '../controller/cacheMem.ts';
|
|
|
45
45
|
import '../controller/cacheMem.ts';
|
|
46
46
|
import type { IControllerOptionsCacheRedis } from '../controller/cacheRedis.ts';
|
|
47
47
|
import '../controller/cacheRedis.ts';
|
|
48
|
+
import type { IControllerOptionsGuardPassport } from '../controller/guardPassport.ts';
|
|
49
|
+
import '../controller/guardPassport.ts';
|
|
48
50
|
import type { IControllerOptionsOnion } from '../controller/onion.ts';
|
|
49
51
|
import '../controller/onion.ts';
|
|
50
52
|
import type { IControllerOptionsPassport } from '../controller/passport.ts';
|
|
@@ -55,10 +57,10 @@ import type { IControllerOptionsQueue } from '../controller/queue.ts';
|
|
|
55
57
|
import '../controller/queue.ts';
|
|
56
58
|
import type { IControllerOptionsSummer } from '../controller/summer.ts';
|
|
57
59
|
import '../controller/summer.ts';
|
|
58
|
-
import type { IControllerOptionsTail } from '../controller/tail.ts';
|
|
59
|
-
import '../controller/tail.ts';
|
|
60
60
|
/** service: end */
|
|
61
61
|
/** service: begin */
|
|
62
|
+
import type { IControllerOptionsTail } from '../controller/tail.ts';
|
|
63
|
+
import '../controller/tail.ts';
|
|
62
64
|
import type { IControllerOptionsTransaction } from '../controller/transaction.ts';
|
|
63
65
|
import '../controller/transaction.ts';
|
|
64
66
|
import type { IControllerOptionsUpload } from '../controller/upload.ts';
|
|
@@ -129,7 +131,7 @@ declare module 'vona-module-test-vona' {
|
|
|
129
131
|
export * from '../bean/bean.testCtx.ts';
|
|
130
132
|
declare module 'vona-module-a-database' {
|
|
131
133
|
interface IEntityRecord {
|
|
132
|
-
'test-vona:test': IEntityOptionsTest
|
|
134
|
+
'test-vona:test': Omit<IEntityOptionsTest, '_fieldsMore_'>;
|
|
133
135
|
}
|
|
134
136
|
}
|
|
135
137
|
declare module 'vona-module-test-vona' {
|
|
@@ -141,11 +143,12 @@ export interface IModuleEntity {
|
|
|
141
143
|
/** entity: begin */
|
|
142
144
|
declare module 'vona-module-test-vona' {
|
|
143
145
|
interface EntityTest {
|
|
146
|
+
get $table(): 'testVona';
|
|
144
147
|
$column: <K extends keyof Omit<EntityTest, '$column' | '$columns' | '$table'>>(column: K) => K;
|
|
145
148
|
$columns: <K extends keyof Omit<EntityTest, '$column' | '$columns' | '$table'>>(...columns: K[]) => K[];
|
|
146
149
|
}
|
|
147
150
|
interface IEntityOptionsTest {
|
|
148
|
-
fields?: TypeEntityOptionsFields<EntityTest, IEntityOptionsTest['
|
|
151
|
+
fields?: TypeEntityOptionsFields<EntityTest, IEntityOptionsTest['_fieldsMore_']>;
|
|
149
152
|
}
|
|
150
153
|
}
|
|
151
154
|
/** bean: end */
|
|
@@ -313,25 +316,25 @@ export * from '../controller/cacheMem.ts';
|
|
|
313
316
|
export * from '../controller/cacheRedis.ts';
|
|
314
317
|
declare module 'vona-module-a-web' {
|
|
315
318
|
interface IDtoRecord {
|
|
316
|
-
'test-vona:profile': IDtoOptionsProfile
|
|
317
|
-
'test-vona:user': IDtoOptionsUser
|
|
319
|
+
'test-vona:profile': Omit<IDtoOptionsProfile, '_fieldsMore_'>;
|
|
320
|
+
'test-vona:user': Omit<IDtoOptionsUser, '_fieldsMore_'>;
|
|
318
321
|
}
|
|
319
322
|
}
|
|
320
323
|
declare module 'vona-module-test-vona' {
|
|
321
324
|
}
|
|
322
325
|
declare module 'vona-module-test-vona' {
|
|
323
326
|
interface IDtoOptionsProfile {
|
|
324
|
-
fields?: TypeEntityOptionsFields<DtoProfile, IDtoOptionsProfile['
|
|
327
|
+
fields?: TypeEntityOptionsFields<DtoProfile, IDtoOptionsProfile['_fieldsMore_']>;
|
|
325
328
|
}
|
|
326
329
|
interface IDtoOptionsUser {
|
|
327
|
-
fields?: TypeEntityOptionsFields<DtoUser, IDtoOptionsUser['
|
|
330
|
+
fields?: TypeEntityOptionsFields<DtoUser, IDtoOptionsUser['_fieldsMore_']>;
|
|
328
331
|
}
|
|
329
332
|
}
|
|
333
|
+
export * from '../controller/guardPassport.ts';
|
|
330
334
|
export * from '../controller/onion.ts';
|
|
331
335
|
export * from '../controller/passport.ts';
|
|
332
336
|
export * from '../controller/performAction.ts';
|
|
333
337
|
export * from '../controller/queue.ts';
|
|
334
|
-
export * from '../controller/summer.ts';
|
|
335
338
|
declare module 'vona-module-a-web' {
|
|
336
339
|
interface IServiceRecord {
|
|
337
340
|
'test-vona:aopMethod': never;
|
|
@@ -369,6 +372,7 @@ declare module 'vona' {
|
|
|
369
372
|
'test-vona.service.transaction': ServiceTransaction;
|
|
370
373
|
}
|
|
371
374
|
}
|
|
375
|
+
export * from '../controller/summer.ts';
|
|
372
376
|
export * from '../controller/tail.ts';
|
|
373
377
|
export * from '../controller/transaction.ts';
|
|
374
378
|
export * from '../controller/upload.ts';
|
|
@@ -393,6 +397,7 @@ declare module 'vona-module-a-web' {
|
|
|
393
397
|
'test-vona:bean': IControllerOptionsBean;
|
|
394
398
|
'test-vona:cacheMem': IControllerOptionsCacheMem;
|
|
395
399
|
'test-vona:cacheRedis': IControllerOptionsCacheRedis;
|
|
400
|
+
'test-vona:guardPassport': IControllerOptionsGuardPassport;
|
|
396
401
|
'test-vona:onion': IControllerOptionsOnion;
|
|
397
402
|
'test-vona:passport': IControllerOptionsPassport;
|
|
398
403
|
'test-vona:performAction': IControllerOptionsPerformAction;
|
|
@@ -410,6 +415,8 @@ declare module 'vona-module-test-vona' {
|
|
|
410
415
|
}
|
|
411
416
|
interface ControllerCacheRedis {
|
|
412
417
|
}
|
|
418
|
+
interface ControllerGuardPassport {
|
|
419
|
+
}
|
|
413
420
|
interface ControllerOnion {
|
|
414
421
|
}
|
|
415
422
|
interface ControllerPassport {
|
|
@@ -437,6 +444,9 @@ declare module 'vona-module-test-vona' {
|
|
|
437
444
|
interface IControllerOptionsCacheRedis {
|
|
438
445
|
actions?: TypeControllerOptionsActions<ControllerCacheRedis>;
|
|
439
446
|
}
|
|
447
|
+
interface IControllerOptionsGuardPassport {
|
|
448
|
+
actions?: TypeControllerOptionsActions<ControllerGuardPassport>;
|
|
449
|
+
}
|
|
440
450
|
interface IControllerOptionsOnion {
|
|
441
451
|
actions?: TypeControllerOptionsActions<ControllerOnion>;
|
|
442
452
|
}
|
|
@@ -466,6 +476,10 @@ declare module 'vona-module-a-web' {
|
|
|
466
476
|
interface IApiPathGetRecord {
|
|
467
477
|
'/test/vona/bean/test': undefined;
|
|
468
478
|
'/test/vona/bean/service': undefined;
|
|
479
|
+
'/test/vona/guardPassport/testUserName': undefined;
|
|
480
|
+
'/test/vona/guardPassport/testUserNameFail': undefined;
|
|
481
|
+
'/test/vona/guardPassport/testRoleName': undefined;
|
|
482
|
+
'/test/vona/guardPassport/testRoleNameFail': undefined;
|
|
469
483
|
'/': undefined;
|
|
470
484
|
'/test/vona/onion/echo3/:userId': undefined;
|
|
471
485
|
'/test/vona/onion/echo5': undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
2
|
+
import { BeanBase } from 'vona';
|
|
3
|
+
export interface IControllerOptionsGuardPassport extends IDecoratorControllerOptions {
|
|
4
|
+
}
|
|
5
|
+
export declare class ControllerGuardPassport extends BeanBase {
|
|
6
|
+
testUserName(): void;
|
|
7
|
+
testUserNameFail(): void;
|
|
8
|
+
testRoleName(): void;
|
|
9
|
+
testRoleNameFail(): void;
|
|
10
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -41,15 +41,15 @@ var locale_zh_cn = {
|
|
|
41
41
|
TestNameApples_0_1: '%s没有苹果'
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
var _dec$
|
|
45
|
-
let AopRegExp = (_dec$
|
|
44
|
+
var _dec$z, _dec2$z, _class$z;
|
|
45
|
+
let AopRegExp = (_dec$z = Aop({
|
|
46
46
|
match: [/^test-vona\.service\.test\w+$/, 'testCtx'],
|
|
47
47
|
meta: {
|
|
48
48
|
mode: 'test'
|
|
49
49
|
}
|
|
50
|
-
}), _dec2$
|
|
50
|
+
}), _dec2$z = BeanInfo({
|
|
51
51
|
module: "test-vona"
|
|
52
|
-
}), _dec$
|
|
52
|
+
}), _dec$z(_class$z = _dec2$z(_class$z = class AopRegExp extends BeanAopBase {
|
|
53
53
|
__get_name__(next) {
|
|
54
54
|
const value = next();
|
|
55
55
|
return `${value}:regexpaop`;
|
|
@@ -71,24 +71,24 @@ let AopRegExp = (_dec$y = Aop({
|
|
|
71
71
|
const result = await next();
|
|
72
72
|
return `${result}:regexpaop`;
|
|
73
73
|
}
|
|
74
|
-
}) || _class$
|
|
74
|
+
}) || _class$z) || _class$z);
|
|
75
75
|
|
|
76
|
-
var _dec$
|
|
76
|
+
var _dec$y, _dec2$y, _class$y;
|
|
77
77
|
class AopSimpleBase extends BeanAopBase {
|
|
78
78
|
actionSync(_args, next) {
|
|
79
79
|
const result = next();
|
|
80
80
|
return `${result}:simpleaop`;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
let AopSimple = (_dec$
|
|
83
|
+
let AopSimple = (_dec$y = Aop({
|
|
84
84
|
match: 'testCtx',
|
|
85
85
|
dependencies: 'test-vona:regExp',
|
|
86
86
|
meta: {
|
|
87
87
|
mode: 'test'
|
|
88
88
|
}
|
|
89
|
-
}), _dec2$
|
|
89
|
+
}), _dec2$y = BeanInfo({
|
|
90
90
|
module: "test-vona"
|
|
91
|
-
}), _dec$
|
|
91
|
+
}), _dec$y(_class$y = _dec2$y(_class$y = class AopSimple extends AopSimpleBase {
|
|
92
92
|
// magic
|
|
93
93
|
__get__(prop, next) {
|
|
94
94
|
const value = next();
|
|
@@ -128,14 +128,14 @@ let AopSimple = (_dec$x = Aop({
|
|
|
128
128
|
const result = await next();
|
|
129
129
|
return `${result}:simpleaop`;
|
|
130
130
|
}
|
|
131
|
-
}) || _class$
|
|
131
|
+
}) || _class$y) || _class$y);
|
|
132
132
|
|
|
133
|
-
var _dec$
|
|
134
|
-
let AopMethodTest = (_dec$
|
|
133
|
+
var _dec$x, _dec2$x, _class$x;
|
|
134
|
+
let AopMethodTest = (_dec$x = AopMethod({
|
|
135
135
|
wrapper: ''
|
|
136
|
-
}), _dec2$
|
|
136
|
+
}), _dec2$x = BeanInfo({
|
|
137
137
|
module: "test-vona"
|
|
138
|
-
}), _dec$
|
|
138
|
+
}), _dec$x(_class$x = _dec2$x(_class$x = class AopMethodTest extends BeanAopMethodBase {
|
|
139
139
|
get(options, next, _receiver, _prop) {
|
|
140
140
|
const res = next();
|
|
141
141
|
return this._wrapper(options.wrapper, res);
|
|
@@ -162,9 +162,9 @@ let AopMethodTest = (_dec$w = AopMethod({
|
|
|
162
162
|
if (index === data.length - wrapper.length) data = data.substring(0, index);
|
|
163
163
|
return data;
|
|
164
164
|
}
|
|
165
|
-
}) || _class$
|
|
165
|
+
}) || _class$x) || _class$x);
|
|
166
166
|
|
|
167
|
-
var _dec$
|
|
167
|
+
var _dec$w, _dec2$w, _class$w;
|
|
168
168
|
class TestCtx0 extends BeanBase {
|
|
169
169
|
constructor(...args) {
|
|
170
170
|
super(...args);
|
|
@@ -226,58 +226,58 @@ class TestCtx1 extends TestCtx0 {
|
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
let BeanTestCtx = (_dec$
|
|
229
|
+
let BeanTestCtx = (_dec$w = Bean(), _dec2$w = BeanInfo({
|
|
230
230
|
module: "test-vona"
|
|
231
|
-
}), _dec$
|
|
231
|
+
}), _dec$w(_class$w = _dec2$w(_class$w = class BeanTestCtx extends TestCtx1 {}) || _class$w) || _class$w);
|
|
232
232
|
|
|
233
|
-
var _dec$
|
|
234
|
-
let BroadcastTest = (_dec$
|
|
233
|
+
var _dec$v, _dec2$v, _class$v;
|
|
234
|
+
let BroadcastTest = (_dec$v = Broadcast(), _dec2$v = BeanInfo({
|
|
235
235
|
module: "test-vona"
|
|
236
|
-
}), _dec$
|
|
236
|
+
}), _dec$v(_class$v = _dec2$v(_class$v = class BroadcastTest extends BeanBroadcastBase {
|
|
237
237
|
async execute(data, isEmitter) {
|
|
238
238
|
// locale
|
|
239
239
|
assert.equal(this.ctx.locale, 'zh-cn');
|
|
240
240
|
// data
|
|
241
241
|
assert.equal(data.message, 'hello');
|
|
242
242
|
}
|
|
243
|
-
}) || _class$
|
|
243
|
+
}) || _class$v) || _class$v);
|
|
244
|
+
|
|
245
|
+
var _dec$u, _dec2$u, _class$u;
|
|
246
|
+
let CacheMemTest = (_dec$u = CacheMem({
|
|
247
|
+
ttl: 1 * 1000
|
|
248
|
+
}), _dec2$u = BeanInfo({
|
|
249
|
+
module: "test-vona"
|
|
250
|
+
}), _dec$u(_class$u = _dec2$u(_class$u = class CacheMemTest extends BeanCacheMemBase {}) || _class$u) || _class$u);
|
|
244
251
|
|
|
245
252
|
var _dec$t, _dec2$t, _class$t;
|
|
246
|
-
let
|
|
253
|
+
let CacheRedisTest = (_dec$t = CacheRedis({
|
|
247
254
|
ttl: 1 * 1000
|
|
248
255
|
}), _dec2$t = BeanInfo({
|
|
249
256
|
module: "test-vona"
|
|
250
|
-
}), _dec$t(_class$t = _dec2$t(_class$t = class
|
|
257
|
+
}), _dec$t(_class$t = _dec2$t(_class$t = class CacheRedisTest extends BeanCacheRedisBase {}) || _class$t) || _class$t);
|
|
251
258
|
|
|
252
259
|
var _dec$s, _dec2$s, _class$s;
|
|
253
|
-
let
|
|
254
|
-
ttl: 1 * 1000
|
|
255
|
-
}), _dec2$s = BeanInfo({
|
|
260
|
+
let EventHelloEcho = (_dec$s = Event(), _dec2$s = BeanInfo({
|
|
256
261
|
module: "test-vona"
|
|
257
|
-
}), _dec$s(_class$s = _dec2$s(_class$s = class
|
|
262
|
+
}), _dec$s(_class$s = _dec2$s(_class$s = class EventHelloEcho extends BeanEventBase {}) || _class$s) || _class$s);
|
|
258
263
|
|
|
259
264
|
var _dec$r, _dec2$r, _class$r;
|
|
260
|
-
let
|
|
261
|
-
module: "test-vona"
|
|
262
|
-
}), _dec$r(_class$r = _dec2$r(_class$r = class EventHelloEcho extends BeanEventBase {}) || _class$r) || _class$r);
|
|
263
|
-
|
|
264
|
-
var _dec$q, _dec2$q, _class$q;
|
|
265
|
-
let EventListenerHelloEcho = (_dec$q = EventListener({
|
|
265
|
+
let EventListenerHelloEcho = (_dec$r = EventListener({
|
|
266
266
|
match: 'test-vona:helloEcho'
|
|
267
|
-
}), _dec2$
|
|
267
|
+
}), _dec2$r = BeanInfo({
|
|
268
268
|
module: "test-vona"
|
|
269
|
-
}), _dec$
|
|
269
|
+
}), _dec$r(_class$r = _dec2$r(_class$r = class EventListenerHelloEcho extends BeanBase {
|
|
270
270
|
async execute(data, next) {
|
|
271
271
|
// next
|
|
272
272
|
const result = await next();
|
|
273
273
|
return `${data.text} ${result}`;
|
|
274
274
|
}
|
|
275
|
-
}) || _class$
|
|
275
|
+
}) || _class$r) || _class$r);
|
|
276
276
|
|
|
277
|
-
var _dec$
|
|
278
|
-
let MetaVersion = (_dec$
|
|
277
|
+
var _dec$q, _dec2$q, _class$q;
|
|
278
|
+
let MetaVersion = (_dec$q = Meta(), _dec2$q = BeanInfo({
|
|
279
279
|
module: "test-vona"
|
|
280
|
-
}), _dec$
|
|
280
|
+
}), _dec$q(_class$q = _dec2$q(_class$q = class MetaVersion extends BeanBase {
|
|
281
281
|
async update(options) {
|
|
282
282
|
if (options.version === 1) {
|
|
283
283
|
// testVona
|
|
@@ -289,47 +289,47 @@ let MetaVersion = (_dec$p = Meta(), _dec2$p = BeanInfo({
|
|
|
289
289
|
});
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
}) || _class$
|
|
292
|
+
}) || _class$q) || _class$q);
|
|
293
293
|
|
|
294
|
-
var _dec$
|
|
295
|
-
let QueueTest = (_dec$
|
|
294
|
+
var _dec$p, _dec2$p, _class$p;
|
|
295
|
+
let QueueTest = (_dec$p = Queue(), _dec2$p = BeanInfo({
|
|
296
296
|
module: "test-vona"
|
|
297
|
-
}), _dec$
|
|
297
|
+
}), _dec$p(_class$p = _dec2$p(_class$p = class QueueTest extends BeanQueueBase {
|
|
298
298
|
async execute(data, _options) {
|
|
299
299
|
return data.a + data.b;
|
|
300
300
|
}
|
|
301
|
-
}) || _class$
|
|
301
|
+
}) || _class$p) || _class$p);
|
|
302
302
|
|
|
303
|
-
var _dec$
|
|
304
|
-
let ScheduleTest3 = (_dec$
|
|
303
|
+
var _dec$o, _dec2$o, _class$o;
|
|
304
|
+
let ScheduleTest3 = (_dec$o = Schedule({
|
|
305
305
|
enable: false,
|
|
306
306
|
repeat: {
|
|
307
307
|
every: 5000
|
|
308
308
|
}
|
|
309
|
-
}), _dec2$
|
|
309
|
+
}), _dec2$o = BeanInfo({
|
|
310
310
|
module: "test-vona"
|
|
311
|
-
}), _dec$
|
|
311
|
+
}), _dec$o(_class$o = _dec2$o(_class$o = class ScheduleTest3 extends BeanBase {
|
|
312
312
|
async execute(job) {
|
|
313
313
|
this.$logger.silly(`Schedule Test3: iid=${this.ctx.instance.id}, every=${job?.data.options?.jobOptions?.repeat?.every}, ${new Date()}`);
|
|
314
314
|
}
|
|
315
|
-
}) || _class$
|
|
315
|
+
}) || _class$o) || _class$o);
|
|
316
316
|
|
|
317
|
-
var _dec$
|
|
318
|
-
let ScheduleTest = (_dec$
|
|
317
|
+
var _dec$n, _dec2$n, _class$n;
|
|
318
|
+
let ScheduleTest = (_dec$n = Schedule({
|
|
319
319
|
enable: false,
|
|
320
320
|
repeat: {
|
|
321
321
|
every: 3000
|
|
322
322
|
}
|
|
323
|
-
}), _dec2$
|
|
323
|
+
}), _dec2$n = BeanInfo({
|
|
324
324
|
module: "test-vona"
|
|
325
|
-
}), _dec$
|
|
325
|
+
}), _dec$n(_class$n = _dec2$n(_class$n = class ScheduleTest extends BeanBase {
|
|
326
326
|
async execute(job) {
|
|
327
327
|
this.$logger.silly(`Schedule Test: iid=${this.ctx.instance.id}, every=${job?.data.options?.jobOptions?.repeat?.every}, ${new Date()}`);
|
|
328
328
|
}
|
|
329
|
-
}) || _class$
|
|
329
|
+
}) || _class$n) || _class$n);
|
|
330
330
|
|
|
331
|
-
var _dec$
|
|
332
|
-
let SummerCacheTest = (_dec$
|
|
331
|
+
var _dec$m, _dec2$m, _class$m;
|
|
332
|
+
let SummerCacheTest = (_dec$m = SummerCache({
|
|
333
333
|
mode: 'all',
|
|
334
334
|
mem: {
|
|
335
335
|
max: 2,
|
|
@@ -338,16 +338,16 @@ let SummerCacheTest = (_dec$l = SummerCache({
|
|
|
338
338
|
redis: {
|
|
339
339
|
ttl: 3 * 1000
|
|
340
340
|
}
|
|
341
|
-
}), _dec2$
|
|
341
|
+
}), _dec2$m = BeanInfo({
|
|
342
342
|
module: "test-vona"
|
|
343
|
-
}), _dec$
|
|
343
|
+
}), _dec$m(_class$m = _dec2$m(_class$m = class SummerCacheTest extends BeanSummerCacheBase {
|
|
344
344
|
async getNative(key, _options) {
|
|
345
345
|
return {
|
|
346
346
|
id: key.id,
|
|
347
347
|
name: `name_${key.id}`
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
|
-
}) || _class$
|
|
350
|
+
}) || _class$m) || _class$m);
|
|
351
351
|
|
|
352
352
|
function config(_app) {
|
|
353
353
|
return {};
|
|
@@ -372,24 +372,24 @@ function _initializerDefineProperty(e, i, r, l) {
|
|
|
372
372
|
|
|
373
373
|
const __ThisModule__ = 'test-vona';
|
|
374
374
|
|
|
375
|
-
var _dec$
|
|
376
|
-
let ServiceTest = (_dec$
|
|
375
|
+
var _dec$l, _dec2$l, _class$l;
|
|
376
|
+
let ServiceTest = (_dec$l = Service(), _dec2$l = BeanInfo({
|
|
377
377
|
module: "test-vona"
|
|
378
|
-
}), _dec$
|
|
378
|
+
}), _dec$l(_class$l = _dec2$l(_class$l = class ServiceTest extends BeanBase {
|
|
379
379
|
get name() {
|
|
380
380
|
return 'serviceTest';
|
|
381
381
|
}
|
|
382
|
-
}) || _class$
|
|
382
|
+
}) || _class$l) || _class$l);
|
|
383
383
|
|
|
384
|
-
var _dec$
|
|
385
|
-
let ControllerBean = (_dec$
|
|
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({
|
|
386
386
|
path: 'bean',
|
|
387
387
|
meta: {
|
|
388
388
|
mode: 'test'
|
|
389
389
|
}
|
|
390
|
-
}), _dec2$
|
|
390
|
+
}), _dec2$k = Api.exclude(), _dec3$g = Passport.public(), _dec4$g = BeanInfo({
|
|
391
391
|
module: "test-vona"
|
|
392
|
-
}), _dec5$
|
|
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 {
|
|
393
393
|
async test() {
|
|
394
394
|
const a = 3;
|
|
395
395
|
const b = 4;
|
|
@@ -479,17 +479,17 @@ let ControllerBean = (_dec$j = Controller({
|
|
|
479
479
|
res = this.$scope.testVona.service.test.name;
|
|
480
480
|
assert.equal(res, 'serviceTest');
|
|
481
481
|
}
|
|
482
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
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);
|
|
483
483
|
|
|
484
|
-
var _dec$
|
|
485
|
-
let ControllerCacheMem = (_dec$
|
|
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({
|
|
486
486
|
path: 'cacheMem',
|
|
487
487
|
meta: {
|
|
488
488
|
mode: 'test'
|
|
489
489
|
}
|
|
490
|
-
}), _dec2$
|
|
490
|
+
}), _dec2$j = Api.exclude(), _dec3$f = Passport.public(), _dec4$f = BeanInfo({
|
|
491
491
|
module: "test-vona"
|
|
492
|
-
}), _dec5$
|
|
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 {
|
|
493
493
|
async mem() {
|
|
494
494
|
let res;
|
|
495
495
|
let value;
|
|
@@ -530,17 +530,17 @@ let ControllerCacheMem = (_dec$i = Controller({
|
|
|
530
530
|
assert.equal(value, undefined);
|
|
531
531
|
});
|
|
532
532
|
}
|
|
533
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
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);
|
|
534
534
|
|
|
535
|
-
var _dec$
|
|
536
|
-
let ControllerCacheRedis = (_dec$
|
|
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({
|
|
537
537
|
path: 'cacheRedis',
|
|
538
538
|
meta: {
|
|
539
539
|
mode: 'test'
|
|
540
540
|
}
|
|
541
|
-
}), _dec2$
|
|
541
|
+
}), _dec2$i = Api.exclude(), _dec3$e = Passport.public(), _dec4$e = BeanInfo({
|
|
542
542
|
module: "test-vona"
|
|
543
|
-
}), _dec5$
|
|
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 {
|
|
544
544
|
async redis() {
|
|
545
545
|
let res;
|
|
546
546
|
let value;
|
|
@@ -581,7 +581,25 @@ let ControllerCacheRedis = (_dec$h = Controller({
|
|
|
581
581
|
assert.equal(value, undefined);
|
|
582
582
|
});
|
|
583
583
|
}
|
|
584
|
-
}, _applyDecoratedDescriptor(_class2$
|
|
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);
|
|
585
|
+
|
|
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({
|
|
588
|
+
module: "test-vona"
|
|
589
|
+
}), _dec3$d = Web.get('testUserName'), _dec4$d = Passport.userName({
|
|
590
|
+
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({
|
|
592
|
+
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({
|
|
594
|
+
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({
|
|
596
|
+
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 {
|
|
598
|
+
testUserName() {}
|
|
599
|
+
testUserNameFail() {}
|
|
600
|
+
testRoleName() {}
|
|
601
|
+
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);
|
|
585
603
|
|
|
586
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;
|
|
587
605
|
let DtoUser = (_dec$g = Dto({
|
|
@@ -1217,4 +1235,4 @@ function $locale(key) {
|
|
|
1217
1235
|
}
|
|
1218
1236
|
/** scope: end */
|
|
1219
1237
|
|
|
1220
|
-
export { $locale, AopMethodTest, AopRegExp, AopSimple, BeanTestCtx, BroadcastTest, CacheMemTest, CacheRedisTest, ControllerBean, ControllerCacheMem, ControllerCacheRedis, ControllerOnion, ControllerPassport, ControllerPerformAction, ControllerQueue, ControllerSummer, ControllerTail, ControllerTransaction, ControllerUpload, DtoProfile, DtoUser, EntityTest, EventHelloEcho, EventListenerHelloEcho, MetaVersion, ModelTest, QueueTest, ScheduleTest, ScheduleTest3, ScopeModuleTestVona, ServiceAopMethod, ServiceTest, ServiceTestApp, ServiceTestClass, ServiceTransaction, SummerCacheTest, config, locales };
|
|
1238
|
+
export { $locale, AopMethodTest, AopRegExp, AopSimple, BeanTestCtx, BroadcastTest, CacheMemTest, CacheRedisTest, ControllerBean, ControllerCacheMem, ControllerCacheRedis, ControllerGuardPassport, ControllerOnion, ControllerPassport, ControllerPerformAction, ControllerQueue, ControllerSummer, ControllerTail, ControllerTransaction, ControllerUpload, DtoProfile, DtoUser, EntityTest, EventHelloEcho, EventListenerHelloEcho, MetaVersion, ModelTest, QueueTest, ScheduleTest, ScheduleTest3, ScopeModuleTestVona, ServiceAopMethod, ServiceTest, ServiceTestApp, ServiceTestClass, ServiceTransaction, SummerCacheTest, config, locales };
|