dependfix 0.1.0 → 0.3.2
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/README.md +1 -1
- package/dist/bin.d.mts +1 -1
- package/dist/bin.mjs +2 -3
- package/dist/bin.mjs.map +1 -1
- package/dist/index.d.mts +294 -588
- package/dist/index.mjs +5 -4
- package/dist/index.mjs.map +1 -1
- package/dist/runner.mjs +792 -0
- package/dist/runner.mjs.map +1 -0
- package/package.json +16 -16
- package/dist/bin.cjs +0 -14
- package/dist/bin.cjs.map +0 -1
- package/dist/bin.d.cts +0 -1
- package/dist/cli.cjs +0 -2812
- package/dist/cli.cjs.map +0 -1
- package/dist/cli.mjs +0 -2530
- package/dist/cli.mjs.map +0 -1
- package/dist/index.cjs +0 -76
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -672
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as argsDef, i as createPipeline, n as runCli, o as parseCliArgs, r as runDependfixMain, t as dependfixCommand } from "./runner.mjs";
|
|
2
2
|
import { pathToFileURL } from "node:url";
|
|
3
|
-
import { runMain } from "citty";
|
|
4
3
|
import { toAppError } from "@dependfix/core";
|
|
5
4
|
|
|
6
5
|
export * from "@dependfix/core"
|
|
7
6
|
|
|
7
|
+
export * from "@dependfix/engine"
|
|
8
|
+
|
|
8
9
|
//#region src/index.ts
|
|
9
10
|
/**
|
|
10
11
|
* 简化调用的入口(内部数据处理,非 CLI 使用)。
|
|
@@ -17,12 +18,12 @@ function isExecutedAsEntryPoint() {
|
|
|
17
18
|
if (!entry) return false;
|
|
18
19
|
return import.meta.url === pathToFileURL(entry).href;
|
|
19
20
|
}
|
|
20
|
-
if (isExecutedAsEntryPoint())
|
|
21
|
+
if (isExecutedAsEntryPoint()) runDependfixMain().catch((error) => {
|
|
21
22
|
const appError = toAppError(error, "CLI_EXECUTION_FAILED");
|
|
22
23
|
console.error(appError.message);
|
|
23
24
|
process.exitCode = 1;
|
|
24
25
|
});
|
|
25
26
|
|
|
26
27
|
//#endregion
|
|
27
|
-
export {
|
|
28
|
+
export { argsDef, createPipeline, dependfixCommand, main, parseCliArgs, runCli, runDependfixMain };
|
|
28
29
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { pathToFileURL } from 'node:url'\nimport {
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { pathToFileURL } from 'node:url'\nimport { toAppError } from '@dependfix/core'\nimport { runCli, runDependfixMain, type CliRunResult } from './cli/runner'\n\nexport * from '@dependfix/core'\nexport * from './cli'\nexport * from './cli/runner'\n// engine 公共面(github/fixers/config/report/multirepo/helpers/grouping/runners/\n// alerts/ai/app——cli 的执行内核已全部收归 engine,本行是 cli 公共面的单一转发源)。\n// 技术债:engine 与 cli 自身(skills 等)同名导出会因 `export *` 静默排除\n// (ambient conflict)——出现时需改为显式选择性导出。\nexport * from '@dependfix/engine'\n// 平台化管线抽象(local 与 platform 共用编排核心;依赖 CLI 参数解析,归属 cli 层)\nexport { createPipeline } from './app/pipeline'\nexport type { Pipeline, PipelineDeps, PipelineLogger, PipelineParseResult } from './app/pipeline'\n\n/**\n * 简化调用的入口(内部数据处理,非 CLI 使用)。\n */\nexport function main(args: string[] = process.argv.slice(2)): CliRunResult {\n return runCli(args)\n}\n\nfunction isExecutedAsEntryPoint(): boolean {\n const entry = process.argv[1]\n\n if (!entry) {\n return false\n }\n\n return import.meta.url === pathToFileURL(entry).href\n}\n\nif (isExecutedAsEntryPoint()) {\n // 优先使用 citty 接管(自动 --help、子命令等)\n void runDependfixMain().catch((error: unknown) => {\n const appError = toAppError(error, 'CLI_EXECUTION_FAILED')\n console.error(appError.message)\n process.exitCode = 1\n })\n}\n"],"mappings":";;;;;;;;;;;;AAmBA,SAAgB,KAAK,OAAiB,QAAQ,KAAK,MAAM,CAAC,GAAiB;CACvE,OAAO,OAAO,IAAI;AACtB;AAEA,SAAS,yBAAkC;CACvC,MAAM,QAAQ,QAAQ,KAAK;CAE3B,IAAI,CAAC,OACD,OAAO;CAGX,OAAO,YAAY,QAAQ,cAAc,KAAK,CAAC,CAAC;AACpD;AAEA,IAAI,uBAAuB,GAEvB,AAAK,iBAAiB,CAAC,CAAC,OAAO,UAAmB;CAC9C,MAAM,WAAW,WAAW,OAAO,sBAAsB;CACzD,QAAQ,MAAM,SAAS,OAAO;CAC9B,QAAQ,WAAW;AACvB,CAAC"}
|