@next-core/brick-utils 2.48.1 → 2.49.0
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 +220 -7
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +216 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/snippetEvaluate.d.ts +17 -0
- package/dist/types/snippetEvaluate.spec.d.ts +1 -0
- package/dist/types/visitStoryboard.d.ts +1 -0
- package/package.json +3 -3
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BrickConf, ContextConf } from "@next-core/brick-types";
|
|
2
|
+
export interface SnippetParamField {
|
|
3
|
+
type: string;
|
|
4
|
+
defaultValue?: unknown;
|
|
5
|
+
}
|
|
6
|
+
export declare type DeclareParams = Record<string, SnippetParamField>;
|
|
7
|
+
export declare type RuntimeSnipeConf = BrickConf & {
|
|
8
|
+
data: ContextConf[];
|
|
9
|
+
params: DeclareParams;
|
|
10
|
+
};
|
|
11
|
+
interface RuntimeContext {
|
|
12
|
+
rootType?: string;
|
|
13
|
+
inputParams?: Record<string, unknown>;
|
|
14
|
+
declareParams?: DeclareParams;
|
|
15
|
+
}
|
|
16
|
+
export declare function snippetEvaluate(brickConf: RuntimeSnipeConf, context: RuntimeContext): unknown;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,6 +5,7 @@ interface VisitStoryboardExpressionsOptions {
|
|
|
5
5
|
matchExpressionString: (v: string) => boolean;
|
|
6
6
|
visitNonExpressionString?: (v: string) => unknown;
|
|
7
7
|
visitObject?: (v: unknown[] | Record<string, unknown>) => unknown;
|
|
8
|
+
customIsEvaluable?: (v: string) => boolean;
|
|
8
9
|
}
|
|
9
10
|
export declare function visitStoryboardExpressions(data: unknown, beforeVisitGlobal: PrecookHooks["beforeVisitGlobal"], options: string | VisitStoryboardExpressionsOptions): void;
|
|
10
11
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-core/brick-utils",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.49.0",
|
|
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",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@next-core/brick-types": "^2.86.0",
|
|
33
|
-
"@next-core/cook": "^1.
|
|
33
|
+
"@next-core/cook": "^1.9.0",
|
|
34
34
|
"@next-core/storyboard": "^0.5.2",
|
|
35
35
|
"file-saver": "^2.0.5",
|
|
36
36
|
"path-to-regexp": "^6.2.1"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"lodash": "*",
|
|
49
49
|
"moment": "*"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "d4c5d0e0508479194159307e4142a0314e9f152a"
|
|
52
52
|
}
|