dependfix 0.1.0 → 0.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/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 +818 -27
- package/dist/index.mjs +3 -4
- package/dist/index.mjs.map +1 -1
- package/dist/runner.mjs +7402 -0
- package/dist/runner.mjs.map +1 -0
- package/package.json +17 -15
- 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,6 +1,5 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { $ as RUNTIME_MODES, A as getBranchPrStatus, B as matchesRepoExclude, C as computeFixFingerprint, D as extractFingerprintFromBranch, E as deleteRemoteBranch, F as fetchDependabotAlerts, G as mapGitHubError, H as matchesRepoInclude, I as discoverRepositories, J as argsDef, K as computeRetryDelayMs, L as mergeRepositories, M as listDependfixBranches, N as pushBranch, O as findDependfixOpenPR, P as stageAndCommit, Q as ENV_PREFIX, R as MAX_GLOB_PATTERN_LENGTH, S as computeFixAndPrPlan, T as createPullRequest, U as matchesTopicsExclude, V as matchesRepoGlob, W as repoGlobToRegExp, X as ALERT_SOURCES, Y as parseCliArgs, Z as DEFAULT_RUNTIME_CONFIG, _ as parseMajorVersion, a as DependfixApp, at as classifyLockfileFailure, b as upgradeDependency, c as applyVersionedOverrides, ct as isValidPnpmVersion, d as ensurePnpmOverrides, dt as readReposFile, et as SEVERITY_THRESHOLDS, f as extractPrefix, ft as resolveRepoList, g as overrideTransitiveDependency, h as isNonSemverDeclaration, i as createPipeline, it as resolveRuntimeConfig, j as isConfirmAnswer, k as generatePRBody, l as compareSemver, lt as repairLockfile, m as isCrossMajorFixRequired, n as runCli, nt as readEnv, o as runVerification, ot as computeLockfileDiff, p as findDependencyVersion, q as createGitHubClient, r as runDependfixMain, rt as readEnvConfig, s as sanitizeOutput, st as extractLockfileVersion, t as dependfixCommand, tt as inferRepoFromGitRemote, u as detectPnpmMajor, ut as resolvePnpmVersion, v as readLockfileVersion, w as createFixBranch, x as closePullRequest, y as readLockfileVersions, z as filterExplicitRepositories } 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"
|
|
@@ -17,12 +16,12 @@ function isExecutedAsEntryPoint() {
|
|
|
17
16
|
if (!entry) return false;
|
|
18
17
|
return import.meta.url === pathToFileURL(entry).href;
|
|
19
18
|
}
|
|
20
|
-
if (isExecutedAsEntryPoint())
|
|
19
|
+
if (isExecutedAsEntryPoint()) runDependfixMain().catch((error) => {
|
|
21
20
|
const appError = toAppError(error, "CLI_EXECUTION_FAILED");
|
|
22
21
|
console.error(appError.message);
|
|
23
22
|
process.exitCode = 1;
|
|
24
23
|
});
|
|
25
24
|
|
|
26
25
|
//#endregion
|
|
27
|
-
export { DEFAULT_RUNTIME_CONFIG, DependfixApp, RUNTIME_MODES, SEVERITY_THRESHOLDS, classifyLockfileFailure, closePullRequest, computeFixAndPrPlan, computeFixFingerprint, computeLockfileDiff, createFixBranch, createGitHubClient, createPullRequest, deleteRemoteBranch, dependfixCommand, ensurePnpmOverrides, extractFingerprintFromBranch, extractPrefix, fetchDependabotAlerts, findDependencyVersion, findDependfixOpenPR, generatePRBody, getBranchPrStatus, inferRepoFromGitRemote, isConfirmAnswer, listDependfixBranches, main, mapGitHubError, overrideTransitiveDependency, parseCliArgs, parseMajorVersion, pushBranch, readEnvConfig, readLockfileVersion, readReposFile, repairLockfile, resolvePnpmVersion, resolveRepoList, resolveRuntimeConfig, runCli, runVerification, sanitizeOutput, stageAndCommit, upgradeDependency };
|
|
26
|
+
export { ALERT_SOURCES, DEFAULT_RUNTIME_CONFIG, DependfixApp, ENV_PREFIX, MAX_GLOB_PATTERN_LENGTH, RUNTIME_MODES, SEVERITY_THRESHOLDS, applyVersionedOverrides, argsDef, classifyLockfileFailure, closePullRequest, compareSemver, computeFixAndPrPlan, computeFixFingerprint, computeLockfileDiff, computeRetryDelayMs, createFixBranch, createGitHubClient, createPipeline, createPullRequest, deleteRemoteBranch, dependfixCommand, detectPnpmMajor, discoverRepositories, ensurePnpmOverrides, extractFingerprintFromBranch, extractLockfileVersion, extractPrefix, fetchDependabotAlerts, filterExplicitRepositories, findDependencyVersion, findDependfixOpenPR, generatePRBody, getBranchPrStatus, inferRepoFromGitRemote, isConfirmAnswer, isCrossMajorFixRequired, isNonSemverDeclaration, isValidPnpmVersion, listDependfixBranches, main, mapGitHubError, matchesRepoExclude, matchesRepoGlob, matchesRepoInclude, matchesTopicsExclude, mergeRepositories, overrideTransitiveDependency, parseCliArgs, parseMajorVersion, pushBranch, readEnv, readEnvConfig, readLockfileVersion, readLockfileVersions, readReposFile, repairLockfile, repoGlobToRegExp, resolvePnpmVersion, resolveRepoList, resolveRuntimeConfig, runCli, runDependfixMain, runVerification, sanitizeOutput, stageAndCommit, upgradeDependency };
|
|
28
27
|
//# 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 './app'\nexport * from './cli'\nexport * from './cli/runner'\nexport * from './config'\nexport * from './fixers/dependency'\nexport * from './fixers/pnpm'\nexport * from './github'\nexport * from './runners'\n// 平台化管线抽象(独立平台前置):local 与 platform 共用编排核心\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":";;;;;;;;;;AAoBA,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"}
|