@tramvai/tokens-common 2.125.3 → 2.130.4

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/lib/action.d.ts CHANGED
@@ -37,6 +37,9 @@ export interface ActionsRegistry {
37
37
  getGlobal(): PageAction[] | undefined;
38
38
  remove(type: string, actions?: PageAction[]): void;
39
39
  }
40
+ export interface ActionPageRunner {
41
+ runActions(actions: (Action | TramvaiAction<any, any, any>)[], stopRunAtError?: (error: Error) => boolean): Promise<any>;
42
+ }
40
43
  export interface ActionExecution {
41
44
  run<Params extends any[], Result, Deps>(action: TramvaiAction<Params, Result, Deps>, ...params: Params): Result extends Promise<any> ? Result : Promise<Result>;
42
45
  run<Payload, Result, Deps>(action: Action<Payload, Result, Deps>, payload: Payload): Result extends Promise<any> ? Result : Promise<Result>;
@@ -44,9 +47,6 @@ export interface ActionExecution {
44
47
  runInContext<Payload, Result, Deps>(context: ExecutionContext | null, action: Action<Payload, Result, Deps>, payload: Payload): Result extends Promise<any> ? Result : Promise<Result>;
45
48
  execution: Map<string, Record<string, any>>;
46
49
  }
47
- export interface ActionPageRunner {
48
- runActions(actions: (Action | TramvaiAction<any, any, any>)[], stopRunAtError?: (error: Error) => boolean): Promise<any>;
49
- }
50
50
  export interface ActionConditionChecker<State = any> {
51
51
  payload: any;
52
52
  parameters: any;
package/lib/cache.d.ts CHANGED
@@ -29,8 +29,9 @@ export interface Cache<T = any> {
29
29
  delete(key: string): boolean;
30
30
  clear(): void;
31
31
  }
32
- export type CacheType = 'memory';
32
+ export type CacheType = 'memory' | 'memory-lfu';
33
33
  export interface CacheOptionsByType<T> {
34
34
  memory: [Options<string, T> | undefined] | [];
35
+ ['memory-lfu']: [Options<string, T> | undefined] | [];
35
36
  }
36
37
  export type CacheFactory = <T, Type extends CacheType = 'memory'>(type?: Type, ...args: CacheOptionsByType<T>[Type]) => Cache<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/tokens-common",
3
- "version": "2.125.3",
3
+ "version": "2.130.4",
4
4
  "description": "Tramvai tokens for @tramvai/module-common",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.es.js",
@@ -20,14 +20,14 @@
20
20
  "dependencies": {
21
21
  "@tinkoff/lru-cache-nano": "^7.8.1",
22
22
  "@tinkoff/url": "0.8.6",
23
- "@tramvai/react": "2.125.3",
24
- "@tramvai/tokens-core": "2.125.3",
23
+ "@tramvai/react": "2.130.4",
24
+ "@tramvai/tokens-core": "2.130.4",
25
25
  "node-abort-controller": "^3.0.1"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@tinkoff/dippy": "0.8.15",
29
- "@tinkoff/logger": "0.10.64",
30
- "@tramvai/types-actions-state-context": "2.125.3",
29
+ "@tinkoff/logger": "0.10.65",
30
+ "@tramvai/types-actions-state-context": "2.130.4",
31
31
  "react": ">=16.8",
32
32
  "tslib": "^2.4.0"
33
33
  },