@tramvai/tokens-common 2.36.0 → 2.37.1
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 +2 -1
- package/lib/bundle.d.ts +1 -1
- package/lib/cache.d.ts +1 -1
- package/lib/execution.d.ts +1 -1
- package/lib/hook.d.ts +1 -1
- package/lib/requestManager.d.ts +1 -1
- package/lib/state.d.ts +2 -1
- package/package.json +5 -5
package/lib/action.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ declare type AnyAction = Action | TramvaiAction<any, any, any>;
|
|
|
25
25
|
export interface ActionsRegistry {
|
|
26
26
|
add(type: string, actions: AnyAction | TramvaiAction<any[], any, any> | (AnyAction | TramvaiAction<any[], any, any>)[]): void;
|
|
27
27
|
get(type: string, addingActions?: (AnyAction | TramvaiAction<any[], any, any>)[]): (AnyAction | TramvaiAction<any[], any, any>)[];
|
|
28
|
-
getGlobal(): (AnyAction | TramvaiAction<any[], any, any>)[];
|
|
28
|
+
getGlobal(): (AnyAction | TramvaiAction<any[], any, any>)[] | undefined;
|
|
29
29
|
remove(type: string, actions?: AnyAction | TramvaiAction<any[], any, any> | (AnyAction | TramvaiAction<any[], any, any>)[]): void;
|
|
30
30
|
}
|
|
31
31
|
export interface ActionExecution {
|
|
@@ -33,6 +33,7 @@ export interface ActionExecution {
|
|
|
33
33
|
run<Payload, Result, Deps>(action: Action<Payload, Result, Deps>, payload: Payload): Result extends Promise<any> ? Result : Promise<Result>;
|
|
34
34
|
runInContext<Params extends any[], Result, Deps>(context: ExecutionContext | null, action: TramvaiAction<Params, Result, Deps>, ...params: Params): Result extends Promise<any> ? Result : Promise<Result>;
|
|
35
35
|
runInContext<Payload, Result, Deps>(context: ExecutionContext | null, action: Action<Payload, Result, Deps>, payload: Payload): Result extends Promise<any> ? Result : Promise<Result>;
|
|
36
|
+
execution: Map<string, Record<string, any>>;
|
|
36
37
|
}
|
|
37
38
|
export interface ActionPageRunner {
|
|
38
39
|
runActions(actions: (Action | TramvaiAction<any, any, any>)[], stopRunAtError?: (error: Error) => boolean): Promise<any>;
|
package/lib/bundle.d.ts
CHANGED
|
@@ -14,6 +14,6 @@ export declare const ADDITIONAL_BUNDLE_TOKEN: import("@tinkoff/dippy").MultiToke
|
|
|
14
14
|
}>;
|
|
15
15
|
export interface BundleManager {
|
|
16
16
|
bundles: Record<string, any>;
|
|
17
|
-
get(name: string, pageComponent: string): Promise<Bundle>;
|
|
17
|
+
get(name: string, pageComponent: string): Promise<Bundle | undefined>;
|
|
18
18
|
has(name: string, pageComponent: string): boolean;
|
|
19
19
|
}
|
package/lib/cache.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare const REGISTER_CLEAR_CACHE_TOKEN: import("@tinkoff/dippy").MultiT
|
|
|
17
17
|
*/
|
|
18
18
|
export declare const CLEAR_CACHE_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<(type?: string) => Promise<void>>;
|
|
19
19
|
export interface Cache<T = any> {
|
|
20
|
-
get(key: string): T;
|
|
20
|
+
get(key: string): T | undefined;
|
|
21
21
|
set(key: string, value: T): void;
|
|
22
22
|
has(key: string): boolean;
|
|
23
23
|
clear(): void;
|
package/lib/execution.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface ExecutionContextOptions {
|
|
|
12
12
|
values?: ExecutionContextValues;
|
|
13
13
|
}
|
|
14
14
|
export interface ExecutionContextManager {
|
|
15
|
-
withContext<T>(parentContext: ExecutionContext, nameOrOptions: string | ExecutionContextOptions, cb: (context: ExecutionContext, abortController: AbortController) => Promise<T>): Promise<T>;
|
|
15
|
+
withContext<T>(parentContext: ExecutionContext | null, nameOrOptions: string | ExecutionContextOptions, cb: (context: ExecutionContext, abortController: AbortController) => Promise<T>): Promise<T>;
|
|
16
16
|
}
|
|
17
17
|
export declare const EXECUTION_CONTEXT_MANAGER_TOKEN: import("@tinkoff/dippy").BaseTokenInterface<ExecutionContextManager>;
|
|
18
18
|
export declare const ROOT_EXECUTION_CONTEXT_TOKEN: ExecutionContext & {
|
package/lib/hook.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface Hooks {
|
|
|
12
12
|
/**
|
|
13
13
|
* Run sync hook
|
|
14
14
|
*/
|
|
15
|
-
runHooks<TPayload>(name: string, context: any, payload?: TPayload, options?: any): TPayload;
|
|
15
|
+
runHooks<TPayload>(name: string, context: any, payload?: TPayload, options?: any): TPayload | undefined;
|
|
16
16
|
/**
|
|
17
17
|
* Run async hooksЗапуск ассихронных хуков
|
|
18
18
|
*/
|
package/lib/requestManager.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface RequestManager {
|
|
|
13
13
|
getCookie(key: string): string;
|
|
14
14
|
getCookies(): Record<string, string>;
|
|
15
15
|
getHeader(key: string): string | string[] | undefined;
|
|
16
|
-
getHeaders(): Record<string, string | string[]>;
|
|
16
|
+
getHeaders(): Record<string, string | string[] | undefined>;
|
|
17
17
|
getClientIp(): string;
|
|
18
18
|
getHost(): string;
|
|
19
19
|
}
|
package/lib/state.d.ts
CHANGED
|
@@ -33,7 +33,8 @@ export declare const INITIAL_APP_STATE_TOKEN: import("@tinkoff/dippy").BaseToken
|
|
|
33
33
|
stores: Record<string, any>;
|
|
34
34
|
}>;
|
|
35
35
|
export interface Store<State = Record<string, any>> {
|
|
36
|
-
dispatch
|
|
36
|
+
dispatch<Payload>(event: Event<Payload>): Payload;
|
|
37
|
+
dispatch<Payload>(actionOrNameEvent: string | Event<Payload>, payload?: Payload): Payload;
|
|
37
38
|
subscribe(callback: (state: Record<string, any>) => void): () => void;
|
|
38
39
|
subscribe<S>(reducer: Reducer<S>, callback: (state: S) => void): () => void;
|
|
39
40
|
getState(): State;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/tokens-common",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.37.1",
|
|
4
4
|
"description": "Tramvai tokens for @tramvai/module-common",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.es.js",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@tinkoff/lru-cache-nano": "^7.8.1",
|
|
23
23
|
"@tinkoff/url": "0.8.4",
|
|
24
|
-
"@tramvai/react": "2.
|
|
25
|
-
"@tramvai/tokens-core": "2.
|
|
24
|
+
"@tramvai/react": "2.37.1",
|
|
25
|
+
"@tramvai/tokens-core": "2.37.1"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@tinkoff/dippy": "0.8.
|
|
28
|
+
"@tinkoff/dippy": "0.8.9",
|
|
29
29
|
"@tinkoff/logger": "0.10.54",
|
|
30
|
-
"@tramvai/types-actions-state-context": "2.
|
|
30
|
+
"@tramvai/types-actions-state-context": "2.37.1",
|
|
31
31
|
"react": ">=16.8",
|
|
32
32
|
"tslib": "^2.4.0"
|
|
33
33
|
},
|