@next-core/brick-utils 2.43.6 → 2.43.8
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 +287 -3
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +286 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/removeDeadConditions.d.ts +18 -0
- package/dist/types/removeDeadConditions.spec.d.ts +1 -0
- package/package.json +6 -6
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CustomTemplateConstructor, FeatureFlags, RuntimeStoryboard } from "@next-core/brick-types";
|
|
2
|
+
export interface RemoveDeadConditionsOptions {
|
|
3
|
+
constantFeatureFlags?: boolean;
|
|
4
|
+
featureFlags?: FeatureFlags;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Remove dead conditions in storyboard like `if: '<% FLAGS["your-feature-flag"] %>'` when
|
|
8
|
+
* `FLAGS["your-feature-flag"]` is falsy.
|
|
9
|
+
*/
|
|
10
|
+
export declare function removeDeadConditions(storyboard: RuntimeStoryboard, options?: RemoveDeadConditionsOptions): void;
|
|
11
|
+
/**
|
|
12
|
+
* Like `removeDeadConditions` but applied to a custom template.
|
|
13
|
+
*/
|
|
14
|
+
export declare function removeDeadConditionsInTpl(tplConstructor: CustomTemplateConstructor, options?: RemoveDeadConditionsOptions): void;
|
|
15
|
+
export interface IfContainer {
|
|
16
|
+
if?: unknown;
|
|
17
|
+
}
|
|
18
|
+
export declare function computeConstantCondition(ifContainer: IfContainer, options?: RemoveDeadConditionsOptions): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-core/brick-utils",
|
|
3
|
-
"version": "2.43.
|
|
3
|
+
"version": "2.43.8",
|
|
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",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
},
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@next-core/brick-types": "^2.79.
|
|
33
|
-
"@next-core/cook": "^1.6.
|
|
32
|
+
"@next-core/brick-types": "^2.79.5",
|
|
33
|
+
"@next-core/cook": "^1.6.62",
|
|
34
34
|
"file-saver": "^2.0.5",
|
|
35
35
|
"path-to-regexp": "^6.2.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@next-core/pipes": "^1.0.
|
|
39
|
-
"@next-core/rollup-config-factory": "^2.6.
|
|
38
|
+
"@next-core/pipes": "^1.0.10",
|
|
39
|
+
"@next-core/rollup-config-factory": "^2.6.2",
|
|
40
40
|
"js-yaml": "^3.14.1",
|
|
41
41
|
"lodash": "^4.17.21",
|
|
42
42
|
"moment": "^2.29.4"
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"lodash": "*",
|
|
48
48
|
"moment": "*"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "97c35b79ecb40f532d44f47dc438fd0f02caa05b"
|
|
51
51
|
}
|