vona-module-test-vona 5.0.86 → 5.0.88

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.
@@ -1740,44 +1740,9 @@ declare module 'vona-module-a-web' {
1740
1740
  /** config: begin */
1741
1741
  export * from '../config/config.ts';
1742
1742
  import type { config } from '../config/config.ts';
1743
- export declare const locales: {
1744
- 'en-us': {
1745
- Name: string;
1746
- User: string;
1747
- UserId: string;
1748
- Test: string;
1749
- TestHelloWorld: string;
1750
- TestApples_: string;
1751
- TestApples_0: string;
1752
- TestApples_1: string;
1753
- TestNameApples_: string;
1754
- TestNameApples_0_1: string;
1755
- TestNameApples_1_1: string;
1756
- Order: string;
1757
- OrderNo: string;
1758
- Remark: string;
1759
- Price: string;
1760
- Quantity: string;
1761
- Amount: string;
1762
- };
1763
- 'zh-cn': {
1764
- Name: string;
1765
- User: string;
1766
- UserId: string;
1767
- Test: string;
1768
- TestHelloWorld: string;
1769
- TestApples_: string;
1770
- TestApples_0: string;
1771
- TestNameApples_: string;
1772
- TestNameApples_0_1: string;
1773
- Order: string;
1774
- OrderNo: string;
1775
- Remark: string;
1776
- Price: string;
1777
- Quantity: string;
1778
- Amount: string;
1779
- };
1780
- };
1743
+ /** config: end */
1744
+ /** locale: begin */
1745
+ import { locales } from './locales.ts';
1781
1746
  /** locale: end */
1782
1747
  /** scope: begin */
1783
1748
  import { BeanScopeBase, type BeanScopeUtil, type TypeModuleConfig, type TypeModuleLocales, type TypeLocaleBase } from 'vona';
@@ -1814,5 +1779,4 @@ declare module 'vona' {
1814
1779
  'test-vona': (typeof locales)[TypeLocaleBase];
1815
1780
  }
1816
1781
  }
1817
- export declare function $locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K): `test-vona::${K}`;
1818
1782
  /** scope: end */
@@ -0,0 +1,40 @@
1
+ import type { TypeLocaleBase } from 'vona';
2
+ export declare const locales: {
3
+ 'en-us': {
4
+ Name: string;
5
+ User: string;
6
+ UserId: string;
7
+ Test: string;
8
+ TestHelloWorld: string;
9
+ TestApples_: string;
10
+ TestApples_0: string;
11
+ TestApples_1: string;
12
+ TestNameApples_: string;
13
+ TestNameApples_0_1: string;
14
+ TestNameApples_1_1: string;
15
+ Order: string;
16
+ OrderNo: string;
17
+ Remark: string;
18
+ Price: string;
19
+ Quantity: string;
20
+ Amount: string;
21
+ };
22
+ 'zh-cn': {
23
+ Name: string;
24
+ User: string;
25
+ UserId: string;
26
+ Test: string;
27
+ TestHelloWorld: string;
28
+ TestApples_: string;
29
+ TestApples_0: string;
30
+ TestNameApples_: string;
31
+ TestNameApples_0_1: string;
32
+ Order: string;
33
+ OrderNo: string;
34
+ Remark: string;
35
+ Price: string;
36
+ Quantity: string;
37
+ Amount: string;
38
+ };
39
+ };
40
+ export declare function $locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K): `test-vona::${K}`;
@@ -1,6 +1,5 @@
1
1
  import type { IDecoratorControllerOptions } from 'vona-module-a-web';
2
2
  import { BeanBase } from 'vona';
3
- import '../.metadata/index.ts';
4
3
  import { DtoUser } from '../dto/user.ts';
5
4
  export interface IControllerOptionsOnion extends IDecoratorControllerOptions {
6
5
  }
@@ -1,6 +1,5 @@
1
1
  import type { TableIdentity } from 'table-identity';
2
2
  import type { IDecoratorDtoOptions } from 'vona-module-a-web';
3
- import '../.metadata/index.ts';
4
3
  export interface IDtoOptionsUser extends IDecoratorDtoOptions {
5
4
  }
6
5
  export declare class DtoUser {
@@ -1,7 +1,6 @@
1
1
  import type { TableIdentity } from 'table-identity';
2
2
  import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
3
3
  import { EntityBase } from 'vona-module-a-orm';
4
- import '../.metadata/index.ts';
5
4
  export interface IEntityOptionsOrder extends IDecoratorEntityOptions {
6
5
  }
7
6
  export declare class EntityOrder extends EntityBase {
@@ -1,7 +1,6 @@
1
1
  import type { TableIdentity } from 'table-identity';
2
2
  import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
3
3
  import { EntityBase } from 'vona-module-a-orm';
4
- import '../.metadata/index.ts';
5
4
  export interface IEntityOptionsProduct extends IDecoratorEntityOptions {
6
5
  }
7
6
  export declare class EntityProduct extends EntityBase {
@@ -1,6 +1,5 @@
1
1
  import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
2
2
  import { EntityBase } from 'vona-module-a-orm';
3
- import '../.metadata/index.ts';
4
3
  export interface IEntityOptionsTest extends IDecoratorEntityOptions {
5
4
  }
6
5
  export declare class EntityTest extends EntityBase {
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './.metadata/index.ts';
2
+ export * from './.metadata/locales.ts';
2
3
  export * from './lib/index.ts';
3
4
  export * from './types/index.ts';
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ import { Entity, EntityBase, Model, $relation, BeanModelBase, $relationDynamic,
5
5
  import { ModelCategoryChain as ModelCategoryChain$1, ModelOrder as ModelOrder$1 } from 'vona-module-test-vona';
6
6
  import { DateTime } from 'luxon';
7
7
  import { Bean, Service, Scope } from 'vona-module-a-bean';
8
+ import { cel, sleep } from '@cabloy/utils';
8
9
  import { Caching } from 'vona-module-a-caching';
9
10
  import assert from 'node:assert';
10
11
  import { Core } from 'vona-module-a-core';
@@ -20,7 +21,6 @@ import { SummerCache, BeanSummerCacheBase } from 'vona-module-a-summer';
20
21
  import { Dto, Controller, Web, Arg } from 'vona-module-a-web';
21
22
  import z, { z as z$1 } from 'zod';
22
23
  import { Passport } from 'vona-module-a-user';
23
- import { sleep } from '@cabloy/utils';
24
24
  import { DtoJwtToken } from 'vona-module-a-jwt';
25
25
  import { SymbolUploadValue } from 'vona-module-a-upload';
26
26
 
@@ -28,7 +28,7 @@ var _dec$1t, _dec2$1t, _class$1t;
28
28
  let AopRegExp = (_dec$1t = Aop({
29
29
  match: [/^test-vona\.service\.test\w+$/, 'testCtx'],
30
30
  meta: {
31
- mode: 'test'
31
+ mode: ['test', 'dev']
32
32
  }
33
33
  }), _dec2$1t = BeanInfo({
34
34
  module: "test-vona"
@@ -73,7 +73,7 @@ let AopSimple = (_dec$1s = Aop({
73
73
  match: 'testCtx',
74
74
  dependencies: 'test-vona:regExp',
75
75
  meta: {
76
- mode: 'test'
76
+ mode: ['test', 'dev']
77
77
  }
78
78
  }), _dec2$1s = BeanInfo({
79
79
  module: "test-vona"
@@ -199,6 +199,52 @@ let EntityCategory = (_dec$1q = Entity('testVonaCategory'), _dec2$1q = BeanInfo(
199
199
  initializer: null
200
200
  }), _class2$E)) || _class$1q) || _class$1q);
201
201
 
202
+ var locale_en_us = {
203
+ Name: 'Name',
204
+ User: 'User',
205
+ UserId: 'User ID',
206
+ Test: 'Test',
207
+ TestHelloWorld: 'Hello World',
208
+ TestApples_: '%d apples',
209
+ TestApples_0: 'no apples',
210
+ TestApples_1: 'one apple',
211
+ TestNameApples_: '%s has %d apples',
212
+ TestNameApples_0_1: '%s has no apples',
213
+ TestNameApples_1_1: '%s has one apple',
214
+ Order: 'Order',
215
+ OrderNo: 'Order No',
216
+ Remark: 'Remark',
217
+ Price: 'Price',
218
+ Quantity: 'Quantity',
219
+ Amount: 'Amount'
220
+ };
221
+
222
+ var locale_zh_cn = {
223
+ Name: '名称',
224
+ User: '用户',
225
+ UserId: '用户ID',
226
+ Test: '测试',
227
+ TestHelloWorld: '您好,世界',
228
+ TestApples_: '%d个苹果',
229
+ TestApples_0: '没有苹果',
230
+ TestNameApples_: '%s有%d个苹果',
231
+ TestNameApples_0_1: '%s没有苹果',
232
+ Order: '订单',
233
+ OrderNo: '订单号',
234
+ Remark: '备注',
235
+ Price: '单价',
236
+ Quantity: '数量',
237
+ Amount: '金额'
238
+ };
239
+
240
+ const locales = {
241
+ 'en-us': locale_en_us,
242
+ 'zh-cn': locale_zh_cn
243
+ };
244
+ function $locale(key) {
245
+ return `test-vona::${key}`;
246
+ }
247
+
202
248
  var _dec$1p, _dec2$1p, _dec3$D, _dec4$D, _dec5$A, _dec6$z, _dec7$t, _dec8$p, _class$1p, _class2$D, _descriptor$i, _descriptor2$f, _descriptor3$9;
203
249
  let EntityOrder = (_dec$1p = Entity('testVonaOrder', {
204
250
  openapi: {
@@ -761,7 +807,7 @@ let ServiceCaching = (_dec$11 = Service(), _dec2$11 = BeanInfo({
761
807
  cacheKeyFn
762
808
  }), _dec7$n = Reflect.metadata("design:type", Function), _dec8$j = Reflect.metadata("design:paramtypes", [Number]), _dec9$c = Caching.get({
763
809
  cacheName: 'test-vona:caching',
764
- cacheKey: 'cel://args[0]'
810
+ cacheKey: cel('args[0]')
765
811
  }), _dec0$c = Reflect.metadata("design:type", Function), _dec1$c = Reflect.metadata("design:paramtypes", [Number]), _dec10$a = Caching.get({
766
812
  cacheName: 'test-vona:caching'
767
813
  }), _dec11$a = Reflect.metadata("design:type", Function), _dec12$a = Reflect.metadata("design:paramtypes", [Number]), _dec13$a = Caching.set({
@@ -770,8 +816,8 @@ let ServiceCaching = (_dec$11 = Service(), _dec2$11 = BeanInfo({
770
816
  cacheValueFn: 'cacheValue'
771
817
  }), _dec14$9 = Reflect.metadata("design:type", Function), _dec15$9 = Reflect.metadata("design:paramtypes", [Number, typeof TSummerCacheTestData === "undefined" ? Object : TSummerCacheTestData]), _dec16$9 = Caching.set({
772
818
  cacheName: 'test-vona:caching',
773
- cacheKey: 'cel://args[0]',
774
- cacheValue: 'cel://{"id": args[1].id, "name": args[1].name}'
819
+ cacheKey: cel('args[0]'),
820
+ cacheValue: cel('{"id": args[1].id, "name": args[1].name}')
775
821
  }), _dec17$8 = Reflect.metadata("design:type", Function), _dec18$8 = Reflect.metadata("design:paramtypes", [Number, typeof TSummerCacheTestData === "undefined" ? Object : TSummerCacheTestData]), _dec19$8 = Caching.set({
776
822
  cacheName: 'test-vona:caching',
777
823
  cacheKeyFn: 'cacheKey'
@@ -3124,55 +3170,11 @@ function config(_app) {
3124
3170
  return {};
3125
3171
  }
3126
3172
 
3127
- var locale_en_us = {
3128
- Name: 'Name',
3129
- User: 'User',
3130
- UserId: 'User ID',
3131
- Test: 'Test',
3132
- TestHelloWorld: 'Hello World',
3133
- TestApples_: '%d apples',
3134
- TestApples_0: 'no apples',
3135
- TestApples_1: 'one apple',
3136
- TestNameApples_: '%s has %d apples',
3137
- TestNameApples_0_1: '%s has no apples',
3138
- TestNameApples_1_1: '%s has one apple',
3139
- Order: 'Order',
3140
- OrderNo: 'Order No',
3141
- Remark: 'Remark',
3142
- Price: 'Price',
3143
- Quantity: 'Quantity',
3144
- Amount: 'Amount'
3145
- };
3146
-
3147
- var locale_zh_cn = {
3148
- Name: '名称',
3149
- User: '用户',
3150
- UserId: '用户ID',
3151
- Test: '测试',
3152
- TestHelloWorld: '您好,世界',
3153
- TestApples_: '%d个苹果',
3154
- TestApples_0: '没有苹果',
3155
- TestNameApples_: '%s有%d个苹果',
3156
- TestNameApples_0_1: '%s没有苹果',
3157
- Order: '订单',
3158
- OrderNo: '订单号',
3159
- Remark: '备注',
3160
- Price: '单价',
3161
- Quantity: '数量',
3162
- Amount: '金额'
3163
- };
3164
-
3165
3173
  var _dec, _dec2, _class;
3166
- const locales = {
3167
- 'en-us': locale_en_us,
3168
- 'zh-cn': locale_zh_cn
3169
- };
3170
3174
  let ScopeModuleTestVona = (_dec = Scope(), _dec2 = BeanInfo({
3171
3175
  module: "test-vona"
3172
3176
  }), _dec(_class = _dec2(_class = class ScopeModuleTestVona extends BeanScopeBase {}) || _class) || _class);
3173
- function $locale(key) {
3174
- return `test-vona::${key}`;
3175
- }
3177
+
3176
3178
  /** scope: end */
3177
3179
 
3178
3180
  export { $locale, AopMethodTest, AopRegExp, AopSimple, BeanTestCtx, BroadcastTest, CacheMemTest, CacheRedisPost, CacheRedisTest, ControllerBean, ControllerCacheMem, ControllerCacheRedis, ControllerCaptcha, ControllerDtoTest, ControllerGuardPassport, ControllerOnion, ControllerOrder, ControllerPassport, ControllerPerformAction, ControllerPost, ControllerQueue, ControllerSerializer, ControllerSummer, ControllerTail, ControllerTransaction, ControllerUpload, DtoCategoryTree, DtoOrderCreate, DtoOrderQuery, DtoOrderQueryPage, DtoOrderResult, DtoOrderResultPage, DtoOrderUpdate, DtoPostAggregate, DtoPostCreate, DtoPostGroup, DtoPostQuery, DtoPostQueryRes, DtoProfile, DtoRoleLazy, DtoSerializerArray, DtoSerializerLazy, DtoSerializerSimple, DtoSignin, DtoUser, DtoUserCreate, DtoUserLazy, DtoUserUpdate, EntityCategory, EntityOrder, EntityPost, EntityPostContent, EntityProduct, EntityRole, EntityRoleUser, EntityTest, EntityUser, EventHelloEcho, EventListenerHelloEcho, MetaAsset, MetaStatic, MetaVersion, ModelCategory, ModelCategoryChain, ModelOrder, ModelOrderStats, ModelPost, ModelPostContent, ModelProduct, ModelRole, ModelRoleUser, ModelTest, ModelTestDynamicTable, ModelUser, ModelUserStats, ModelUserStatsGroup, QueueTest, ScheduleTest, ScheduleTest3, ScopeModuleTestVona, SensitiveEmail, SerializerTransformEmail, ServiceAopMethod, ServiceCaching, ServiceCategory, ServiceOrder, ServicePost, ServiceProduct, ServiceTest, ServiceTestApp, ServiceTestClass, ServiceTestData, ServiceTransaction, ServiceUser, SummerCacheCaching, SummerCacheTest, config, locales };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-module-test-vona",
3
3
  "type": "module",
4
- "version": "5.0.86",
4
+ "version": "5.0.88",
5
5
  "title": "test-vona",
6
6
  "vonaModule": {
7
7
  "fileVersion": 1,
@@ -2124,12 +2124,7 @@ export * from '../config/config.ts';
2124
2124
  import type { config } from '../config/config.ts';
2125
2125
  /** config: end */
2126
2126
  /** locale: begin */
2127
- import locale_en_us from '../config/locale/en-us.ts';
2128
- import locale_zh_cn from '../config/locale/zh-cn.ts';
2129
- export const locales = {
2130
- 'en-us': locale_en_us,
2131
- 'zh-cn': locale_zh_cn,
2132
- };
2127
+ import { locales } from './locales.ts'
2133
2128
  /** locale: end */
2134
2129
  /** scope: begin */
2135
2130
  import { BeanScopeBase, type BeanScopeUtil, type TypeModuleConfig, type TypeModuleLocales, type TypeLocaleBase } from 'vona';
@@ -2175,8 +2170,4 @@ declare module 'vona' {
2175
2170
 
2176
2171
 
2177
2172
  }
2178
-
2179
- export function $locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K): `test-vona::${K}` {
2180
- return `test-vona::${key}`;
2181
- }
2182
2173
  /** scope: end */
@@ -0,0 +1,12 @@
1
+ import type { TypeLocaleBase } from 'vona';
2
+ import locale_en_us from '../config/locale/en-us.ts';
3
+ import locale_zh_cn from '../config/locale/zh-cn.ts';
4
+
5
+ export const locales = {
6
+ 'en-us': locale_en_us,
7
+ 'zh-cn': locale_zh_cn,
8
+ };
9
+
10
+ export function $locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K): `test-vona::${K}` {
11
+ return `test-vona::${key}`;
12
+ }
@@ -3,7 +3,7 @@ import type { BeanTestCtx } from './bean.testCtx.ts';
3
3
  import { BeanAopBase } from 'vona';
4
4
  import { Aop } from 'vona-module-a-aspect';
5
5
 
6
- @Aop({ match: [/^test-vona\.service\.test\w+$/, 'testCtx'], meta: { mode: 'test' } })
6
+ @Aop({ match: [/^test-vona\.service\.test\w+$/, 'testCtx'], meta: { mode: ['test', 'dev'] } })
7
7
  export class AopRegExp extends BeanAopBase {
8
8
  protected __get_name__: AopActionGetter<BeanTestCtx, 'name'> = function (next, _receiver) {
9
9
  const value = next();
@@ -16,7 +16,7 @@ class AopSimpleBase extends BeanAopBase {
16
16
  };
17
17
  }
18
18
 
19
- @Aop({ match: 'testCtx', dependencies: 'test-vona:regExp', meta: { mode: 'test' } })
19
+ @Aop({ match: 'testCtx', dependencies: 'test-vona:regExp', meta: { mode: ['test', 'dev'] } })
20
20
  export class AopSimple extends AopSimpleBase {
21
21
  protected __get__: AopActionGet<BeanTestCtx> = (prop, next, _receiver) => {
22
22
  const value = next();
@@ -6,7 +6,7 @@ import { Api, v } from 'vona-module-a-openapiutils';
6
6
  import { Passport } from 'vona-module-a-user';
7
7
  import { Arg, Controller, Web } from 'vona-module-a-web';
8
8
  import { z } from 'zod';
9
- import { $locale } from '../.metadata/index.ts';
9
+ import { $locale } from '../.metadata/locales.ts';
10
10
  import { DtoUser } from '../dto/user.ts';
11
11
 
12
12
  export interface IControllerOptionsOnion extends IDecoratorControllerOptions {}
package/src/dto/user.ts CHANGED
@@ -2,7 +2,7 @@ import type { TableIdentity } from 'table-identity';
2
2
  import type { IDecoratorDtoOptions } from 'vona-module-a-web';
3
3
  import { Api, v } from 'vona-module-a-openapiutils';
4
4
  import { Dto } from 'vona-module-a-web';
5
- import { $locale } from '../.metadata/index.ts';
5
+ import { $locale } from '../.metadata/locales.ts';
6
6
 
7
7
  export interface IDtoOptionsUser extends IDecoratorDtoOptions {}
8
8
 
@@ -2,7 +2,7 @@ import type { TableIdentity } from 'table-identity';
2
2
  import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
3
3
  import { Api, v } from 'vona-module-a-openapiutils';
4
4
  import { Entity, EntityBase } from 'vona-module-a-orm';
5
- import { $locale } from '../.metadata/index.ts';
5
+ import { $locale } from '../.metadata/locales.ts';
6
6
 
7
7
  export interface IEntityOptionsOrder extends IDecoratorEntityOptions {}
8
8
 
@@ -2,7 +2,7 @@ import type { TableIdentity } from 'table-identity';
2
2
  import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
3
3
  import { Api, v } from 'vona-module-a-openapiutils';
4
4
  import { Entity, EntityBase } from 'vona-module-a-orm';
5
- import { $locale } from '../.metadata/index.ts';
5
+ import { $locale } from '../.metadata/locales.ts';
6
6
 
7
7
  export interface IEntityOptionsProduct extends IDecoratorEntityOptions {}
8
8
 
@@ -1,7 +1,7 @@
1
1
  import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
2
2
  import { Api, v } from 'vona-module-a-openapiutils';
3
3
  import { Entity, EntityBase } from 'vona-module-a-orm';
4
- import { $locale } from '../.metadata/index.ts';
4
+ import { $locale } from '../.metadata/locales.ts';
5
5
 
6
6
  export interface IEntityOptionsTest extends IDecoratorEntityOptions {}
7
7
 
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './.metadata/index.ts';
2
+ export * from './.metadata/locales.ts';
2
3
  export * from './lib/index.ts';
3
4
  export * from './types/index.ts';
@@ -1,5 +1,6 @@
1
1
  import type { ICachingActionKeyInfo, ICachingActionValueInfo, TypeCachingActionOptions } from 'vona-module-a-caching';
2
2
  import type { TSummerCacheTestData } from '../bean/summerCache.test.ts';
3
+ import { cel } from '@cabloy/utils';
3
4
  import { BeanBase } from 'vona';
4
5
  import { Service } from 'vona-module-a-bean';
5
6
  import { Caching } from 'vona-module-a-caching';
@@ -31,7 +32,7 @@ export class ServiceCaching extends BeanBase {
31
32
  return undefined as any;
32
33
  }
33
34
 
34
- @Caching.get({ cacheName: 'test-vona:caching', cacheKey: 'cel://args[0]' })
35
+ @Caching.get({ cacheName: 'test-vona:caching', cacheKey: cel('args[0]') })
35
36
  async get3(_id: number): Promise<TSummerCacheTestData> {
36
37
  return undefined as any;
37
38
  }
@@ -48,7 +49,7 @@ export class ServiceCaching extends BeanBase {
48
49
  }
49
50
 
50
51
  //
51
- @Caching.set({ cacheName: 'test-vona:caching', cacheKey: 'cel://args[0]', cacheValue: 'cel://{"id": args[1].id, "name": args[1].name}' })
52
+ @Caching.set({ cacheName: 'test-vona:caching', cacheKey: cel('args[0]'), cacheValue: cel('{"id": args[1].id, "name": args[1].name}') })
52
53
  async set2(_id: number, _value: TSummerCacheTestData): Promise<void> {
53
54
  // do nothing
54
55
  }
@@ -1,6 +1,6 @@
1
1
  import assert from 'node:assert';
2
2
  import { describe, it } from 'node:test';
3
- import { evaluateExpressions } from '@cabloy/utils';
3
+ import { cel, evaluateExpressions } from '@cabloy/utils';
4
4
  import { cast } from 'vona';
5
5
  import { app } from 'vona-mock';
6
6
 
@@ -9,18 +9,18 @@ describe('celjs.test.ts', () => {
9
9
  await app.bean.executor.mockCtx(async () => {
10
10
  //
11
11
  const beanJwt = app.bean.jwt;
12
- assert.equal(evaluateExpressions('cel://self.app.config.server.workers', { self: beanJwt, app: cast(beanJwt).app, ctx: cast(beanJwt).ctx }) > 0, true);
13
- assert.equal(evaluateExpressions('cel://app.config.server.workers', { self: beanJwt, app: cast(beanJwt).app, ctx: cast(beanJwt).ctx }) > 0, true);
14
- assert.equal(evaluateExpressions('cel://ctx.app.config.server.workers', { self: beanJwt, app: cast(beanJwt).app, ctx: cast(beanJwt).ctx }) > 0, true);
12
+ assert.equal(evaluateExpressions(cel('self.app.config.server.workers'), { self: beanJwt, app: cast(beanJwt).app, ctx: cast(beanJwt).ctx }) > 0, true);
13
+ assert.equal(evaluateExpressions(cel('app.config.server.workers'), { self: beanJwt, app: cast(beanJwt).app, ctx: cast(beanJwt).ctx }) > 0, true);
14
+ assert.equal(evaluateExpressions(cel('ctx.app.config.server.workers'), { self: beanJwt, app: cast(beanJwt).app, ctx: cast(beanJwt).ctx }) > 0, true);
15
15
  // map
16
- assert.deepEqual(evaluateExpressions('cel://{"a": 1, "b": true}'), { a: 1, b: true });
17
- assert.deepEqual(evaluateExpressions('cel://{"id": 1, "name": "tom"}'), { id: 1, name: 'tom' });
16
+ assert.deepEqual(evaluateExpressions(cel('{"a": 1, "b": true}')), { a: 1, b: true });
17
+ assert.deepEqual(evaluateExpressions(cel('{"id": 1, "name": "tom"}')), { id: 1, name: 'tom' });
18
18
  // array
19
- assert.deepEqual(evaluateExpressions('cel://concat(1,[2,3],4)'), [1, 2, 3, 4]);
20
- assert.deepEqual(evaluateExpressions('cel://join(concat(1,[2,3],4),"_")'), '1_2_3_4');
19
+ assert.deepEqual(evaluateExpressions(cel('concat(1,[2,3],4)')), [1, 2, 3, 4]);
20
+ assert.deepEqual(evaluateExpressions(cel('join(concat(1,[2,3],4),"_")')), '1_2_3_4');
21
21
  // +
22
- assert.equal(evaluateExpressions('cel://1+"a"'), '1a');
23
- assert.equal(evaluateExpressions('cel://"a"+1'), 'a1');
22
+ assert.equal(evaluateExpressions(cel('1+"a"')), '1a');
23
+ assert.equal(evaluateExpressions(cel('"a"+1')), 'a1');
24
24
  });
25
25
  });
26
26
  });