@actiondock/builder 2.0.12 → 2.2.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/planner.d.ts CHANGED
@@ -1,26 +1,68 @@
1
- import type { BuildPlan, BuildPlannerOptions } from "./types";
1
+ import type { SelectionPlan, SelectionPlannerOptions } from "./types.js";
2
2
  /**
3
- * 构建规划器。
4
- * 纯声明式解析 actiondock.manifest.json 与配置,绝不执行 Action 业务代码。
3
+ * 声明式选择集与构建规划器 (SelectionPlanner)。
4
+ * 仅读取 actiondock.json、锁文件与显式构建参数,彻底移除 TypeScript AST 源码扫描。
5
5
  */
6
- export declare class BuildPlanner {
6
+ export declare class SelectionPlanner {
7
7
  private projectRoot;
8
8
  constructor(options?: {
9
9
  projectRoot?: string;
10
10
  });
11
+ /**
12
+ * 解析项目配置:优先使用传入对象,缺失则读取 actiondock.json。
13
+ */
14
+ private resolveConfig;
15
+ /**
16
+ * 解析声明式清单:优先使用传入清单,缺失则读取 actiondock.json,仍未提供则采用安全备用清单。
17
+ */
18
+ private resolveManifest;
19
+ /**
20
+ * 收集 Playbook 规程定义(统一复用 core 的 loadPlaybooks,清单为唯一事实源)。
21
+ */
22
+ private collectPlaybooks;
23
+ /**
24
+ * 计算初始 Action 与 Playbook 集合(显式声明过滤、uses 顶层依赖与默认全集)。
25
+ */
26
+ private resolveInitialSelection;
27
+ /**
28
+ * 进行依赖闭包(uses)解析计算,自动处理环形依赖与传递依赖(支持当前清单与已链接外部包)。
29
+ */
30
+ private resolveClosure;
31
+ /**
32
+ * 构造 Action 依赖结构(闭包结果物化为 ActionDependency 列表)。
33
+ */
34
+ private buildActionDependencies;
35
+ /**
36
+ * 收集声明式文件与资产依赖结构(仅依据显式声明,杜绝 AST 依赖扫描与未声明模块猜测)。
37
+ */
38
+ private collectDeclaredFilesAndAssets;
11
39
  /**
12
40
  * 执行依赖闭包裁剪与构建规划。
41
+ * 主流程仅做编排,各阶段职责由私有方法承担。
13
42
  *
14
43
  * @param options 规划参数
15
- * @returns 完整的 BuildPlan 结构
44
+ * @returns 完整的 SelectionPlan / BuildPlan 结构
16
45
  */
17
- plan(options?: BuildPlannerOptions): BuildPlan;
46
+ plan(options?: SelectionPlannerOptions): SelectionPlan;
18
47
  /**
19
48
  * 静态辅助调用方法。
20
49
  */
21
- static plan(options: BuildPlannerOptions): BuildPlan;
50
+ static plan(options: SelectionPlannerOptions): SelectionPlan;
22
51
  }
23
52
  /**
24
- * 快捷构建规划函数。
53
+ * 构建规划器标准导出。
54
+ * @deprecated SelectionPlanner 的历史别名,请直接使用 SelectionPlanner,将在两个版本后移除。
55
+ */
56
+ export declare const BuildPlanner: typeof SelectionPlanner;
57
+ /** @deprecated SelectionPlanner 类型的历史别名,请直接使用 SelectionPlanner 类型。 */
58
+ export type BuildPlanner = SelectionPlanner;
59
+ /**
60
+ * 快捷选择规划函数。
61
+ * @deprecated 便捷快捷函数,请直接使用 SelectionPlanner.plan,将在两个版本后移除。
62
+ */
63
+ export declare function selectionPlan(options: SelectionPlannerOptions): SelectionPlan;
64
+ /**
65
+ * 快捷构建规划函数标准导出。
66
+ * @deprecated selectionPlan 的历史别名,请改用 SelectionPlanner.plan,将在两个版本后移除。
25
67
  */
26
- export declare function buildPlan(options: BuildPlannerOptions): BuildPlan;
68
+ export declare const buildPlan: typeof selectionPlan;