@next-core/brick-utils 2.44.7 → 2.45.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.
@@ -19,7 +19,7 @@ export * from "./cook";
19
19
  export * from "./resolveContextConcurrently";
20
20
  export * from "./scanCustomApisInStoryboard";
21
21
  export * from "./smartDisplayForEvaluableString";
22
- export { scanStoryboard, collectBricksByCustomTemplates, } from "./scanStoryboard";
22
+ export { scanStoryboard, scanStoryboardAst, collectBricksByCustomTemplates, } from "./scanStoryboard";
23
23
  export * from "./JsonStorage";
24
24
  export * from "./builder";
25
25
  export * from "./deepFreeze";
@@ -29,3 +29,4 @@ export * from "./debounceByAnimationFrame";
29
29
  export * from "./scanInstalledAppsInStoryboard";
30
30
  export * from "./makeThrottledAggregation";
31
31
  export * from "./removeDeadConditions";
32
+ export * from "@next-core/storyboard";
@@ -1,2 +1,2 @@
1
- import { Storyboard, RouteAliasMap } from "@next-core/brick-types";
1
+ import type { Storyboard, RouteAliasMap } from "@next-core/brick-types";
2
2
  export declare function scanRouteAliasInStoryboard(storyboard: Storyboard): RouteAliasMap;
@@ -11,4 +11,4 @@ export interface ScanBricksOptions {
11
11
  * @param collectionOfCustomApi - You can pass an empty array to collect custom api.
12
12
  */
13
13
  export declare function scanBricksInStoryboard(storyboard: Storyboard, options?: boolean | ScanBricksOptions): string[];
14
- export declare function scanBricksInBrickConf(brickConf: BrickConf, isUniq?: boolean): string[];
14
+ export declare function scanBricksInBrickConf(brickConf: BrickConf): string[];
@@ -1,4 +1,5 @@
1
- import { Storyboard, BrickConf, CustomTemplate } from "@next-core/brick-types";
1
+ import type { Storyboard, BrickConf, CustomTemplate } from "@next-core/brick-types";
2
+ import { StoryboardNodeRoot } from ".";
2
3
  export interface ScanBricksOptions {
3
4
  keepDuplicates?: boolean;
4
5
  ignoreBricksInUnusedCustomTemplates?: boolean;
@@ -13,5 +14,15 @@ export declare function scanStoryboard(storyboard: Storyboard, options?: boolean
13
14
  bricks: string[];
14
15
  customApis: string[];
15
16
  };
16
- export declare function collectBricksInBrickConf(brickConf: BrickConf, collection: string[]): void;
17
+ /**
18
+ * Scan bricks and custom apis in storyboard.
19
+ *
20
+ * @param storyboard - Storyboard.
21
+ * @param options - If options is a boolean, it means `isUniq` or `de-duplicate`.
22
+ */
23
+ export declare function scanStoryboardAst(ast: StoryboardNodeRoot, options?: boolean | ScanBricksOptions): {
24
+ bricks: string[];
25
+ customApis: string[];
26
+ };
27
+ export declare function collectBricksInBrickConf(brickConf: BrickConf): string[];
17
28
  export declare function collectBricksByCustomTemplates(customTemplates: CustomTemplate[]): Map<string, string[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-core/brick-utils",
3
- "version": "2.44.7",
3
+ "version": "2.45.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",
@@ -29,8 +29,9 @@
29
29
  },
30
30
  "sideEffects": false,
31
31
  "dependencies": {
32
- "@next-core/brick-types": "^2.81.5",
33
- "@next-core/cook": "^1.6.69",
32
+ "@next-core/brick-types": "^2.81.6",
33
+ "@next-core/cook": "^1.6.70",
34
+ "@next-core/storyboard": "^0.1.0",
34
35
  "file-saver": "^2.0.5",
35
36
  "path-to-regexp": "^6.2.1"
36
37
  },
@@ -47,5 +48,5 @@
47
48
  "lodash": "*",
48
49
  "moment": "*"
49
50
  },
50
- "gitHead": "b704ce0dbb1544136e241d40c92816420d81cc9e"
51
+ "gitHead": "88ef2ab6c4dbeb53e96ac1edbc93030f847ccf49"
51
52
  }