@next-core/brick-utils 2.45.15 → 2.45.17
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.bundle.js +233 -127
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +232 -128
- package/dist/index.esm.js.map +1 -1
- package/dist/types/resolveContextConcurrently.d.ts +10 -6
- package/dist/types/track.d.ts +5 -0
- package/package.json +2 -2
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { ContextConf } from "@next-core/brick-types";
|
|
2
|
+
import { ContextUsage } from "./track";
|
|
3
|
+
export interface DeferredContext {
|
|
4
|
+
resolve(): void;
|
|
5
|
+
reject(e: unknown): void;
|
|
6
|
+
}
|
|
7
|
+
export declare function deferResolveContextConcurrently(contextConfs: ContextConf[], resolveContext: (contextConf: ContextConf) => Promise<boolean>, keyword?: string): {
|
|
8
|
+
pendingResult: Promise<void>;
|
|
9
|
+
pendingContexts: Map<string, Promise<void>>;
|
|
10
|
+
};
|
|
2
11
|
export declare function resolveContextConcurrently(contextConfs: ContextConf[], resolveContext: (contextConf: ContextConf) => Promise<boolean>, keyword?: string): Promise<void>;
|
|
3
12
|
export declare function syncResolveContextConcurrently(contextConfs: ContextConf[], resolveContext: (contextConf: ContextConf) => boolean, keyword?: string): void;
|
|
4
|
-
|
|
5
|
-
dependencies: string[];
|
|
6
|
-
includesComputed: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare function getDependencyMapOfContext(contextConfs: ContextConf[], keyword?: string): Map<ContextConf, ContextStatistics>;
|
|
9
|
-
export {};
|
|
13
|
+
export declare function getDependencyMapOfContext(contextConfs: ContextConf[], keyword?: string): Map<ContextConf, ContextUsage>;
|
package/dist/types/track.d.ts
CHANGED
|
@@ -29,3 +29,8 @@ export declare function trackState(raw: string): string[] | false;
|
|
|
29
29
|
export declare function trackFormState(raw: string): string[] | false;
|
|
30
30
|
export declare function trackUsedContext(data: unknown): string[];
|
|
31
31
|
export declare function trackUsedState(data: unknown): string[];
|
|
32
|
+
export interface ContextUsage {
|
|
33
|
+
usedContexts: string[];
|
|
34
|
+
includesComputed: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare function collectContextUsage(data: unknown, variableName: string): ContextUsage;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-core/brick-utils",
|
|
3
|
-
"version": "2.45.
|
|
3
|
+
"version": "2.45.17",
|
|
4
4
|
"description": "Pure utility functions for kernel",
|
|
5
5
|
"homepage": "https://github.com/easyops-cn/next-core/tree/master/packages/brick-utils",
|
|
6
6
|
"license": "GPL-3.0",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"lodash": "*",
|
|
49
49
|
"moment": "*"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "898a90fe4b59f4b6be3d1e3e0d67be4a6411d060"
|
|
52
52
|
}
|