@actiondock/builder 2.10.0 → 2.11.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/archive.js +2 -1
- package/dist/build.d.ts +25 -2
- package/dist/build.js +99 -309
- package/dist/dependency-check.js +3 -3
- package/dist/dependency-resolver.d.ts +17 -0
- package/dist/dependency-resolver.js +69 -0
- package/dist/entry-generators.d.ts +15 -0
- package/dist/entry-generators.js +211 -0
- package/dist/export-composite.js +19 -1
- package/dist/export-source.d.ts +6 -0
- package/dist/export-source.js +24 -4
- package/dist/exporter.d.ts +1 -10
- package/dist/exporter.js +1 -16
- package/dist/fs-utils.js +2 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +3 -2
- package/dist/lockfile-resolver.d.ts +9 -0
- package/dist/lockfile-resolver.js +56 -0
- package/dist/npm-pack.d.ts +6 -0
- package/dist/npm-pack.js +73 -0
- package/dist/pack.d.ts +2 -2
- package/dist/pack.js +8 -212
- package/dist/planner.js +40 -162
- package/dist/skill/custom-parser.d.ts +28 -0
- package/dist/skill/custom-parser.js +61 -0
- package/dist/skill/index.d.ts +1 -0
- package/dist/skill/index.js +1 -0
- package/dist/skill/templates.d.ts +28 -29
- package/dist/skill/templates.js +74 -144
- package/dist/skill-md.d.ts +3 -14
- package/dist/skill-md.js +5 -11
- package/dist/types.d.ts +19 -20
- package/dist/vendor.d.ts +5 -0
- package/dist/vendor.js +76 -0
- package/package.json +3 -3
- package/dist/export-batch.d.ts +0 -13
- package/dist/export-batch.js +0 -37
- package/dist/export-node.d.ts +0 -11
- package/dist/export-node.js +0 -48
package/dist/export-node.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { generateStandaloneSkillMd } from "./skill/index.js";
|
|
2
|
-
import { buildProject } from "./build.js";
|
|
3
|
-
import { collectRelativeFiles } from "./fs-utils.js";
|
|
4
|
-
import { buildConfigForTemplates, toPlaybookDefinitions, toSkillActionItems, writeSkillMd, } from "./skill-md.js";
|
|
5
|
-
import { createArchive, resolveArchiveFormat } from "./export-archive.js";
|
|
6
|
-
/**
|
|
7
|
-
* Node 目录型 Skill 导出装配层。
|
|
8
|
-
*
|
|
9
|
-
* 职责:复用 Node 目录型构建产出可执行交付目录,
|
|
10
|
-
* 并在目录内生成调用该入口的 SKILL.md 说明书。
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* 执行 Node 目录型 Skill 导出。
|
|
14
|
-
*/
|
|
15
|
-
export async function exportNodeSkill(root, targetSkillDir, plan, options, pkgSlug) {
|
|
16
|
-
await buildProject({
|
|
17
|
-
projectRoot: root,
|
|
18
|
-
outDir: targetSkillDir,
|
|
19
|
-
actions: options.actions,
|
|
20
|
-
playbooks: options.playbooks,
|
|
21
|
-
config: options.config,
|
|
22
|
-
manifest: options.manifest,
|
|
23
|
-
vendorDeps: Boolean(options.vendorDeps),
|
|
24
|
-
allowInstallScripts: options.allowInstallScripts,
|
|
25
|
-
requireReproducible: options.requireReproducible,
|
|
26
|
-
});
|
|
27
|
-
const usedExistingSkillMd = writeSkillMd(root, targetSkillDir, plan, { skipSkillMd: options.skipSkillMd, skillMdPath: options.skillMdPath, pkgSlug }, () => {
|
|
28
|
-
const configForTemplates = buildConfigForTemplates(plan, plan.actionsDir || "actions", plan.playbooksDir || "playbooks");
|
|
29
|
-
return generateStandaloneSkillMd(configForTemplates, toSkillActionItems(plan.actions), toPlaybookDefinitions(plan.playbooks), "node ./entry.mjs");
|
|
30
|
-
});
|
|
31
|
-
let archivePath;
|
|
32
|
-
if (options.archive) {
|
|
33
|
-
archivePath = await createArchive(targetSkillDir, resolveArchiveFormat(options));
|
|
34
|
-
}
|
|
35
|
-
return {
|
|
36
|
-
packageId: plan.packageId,
|
|
37
|
-
version: plan.version,
|
|
38
|
-
mode: "node",
|
|
39
|
-
skillDir: targetSkillDir,
|
|
40
|
-
archivePath,
|
|
41
|
-
actionsCount: plan.actions.length,
|
|
42
|
-
playbooksCount: plan.playbooks.length,
|
|
43
|
-
actions: plan.actions.map((a) => a.id),
|
|
44
|
-
playbooks: plan.playbooks.map((p) => p.id),
|
|
45
|
-
files: collectRelativeFiles(targetSkillDir),
|
|
46
|
-
usedExistingSkillMd,
|
|
47
|
-
};
|
|
48
|
-
}
|