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/dist/index.mjs CHANGED
@@ -1,6 +1,5 @@
1
- import { A as createPullRequest, B as fetchDependabotAlerts, C as parseMajorVersion, D as computeFixAndPrPlan, E as closePullRequest, F as getBranchPrStatus, H as createGitHubClient, I as isConfirmAnswer, L as listDependfixBranches, M as extractFingerprintFromBranch, N as findDependfixOpenPR, O as computeFixFingerprint, P as generatePRBody, R as pushBranch, S as overrideTransitiveDependency, T as upgradeDependency, V as mapGitHubError, _ as repairLockfile, a as RUNTIME_MODES, b as extractPrefix, c as readEnvConfig, d as resolveRepoList, f as DependfixApp, g as computeLockfileDiff, h as classifyLockfileFailure, i as DEFAULT_RUNTIME_CONFIG, j as deleteRemoteBranch, k as createFixBranch, l as resolveRuntimeConfig, m as sanitizeOutput, n as parseCliArgs, o as SEVERITY_THRESHOLDS, p as runVerification, r as runCli, s as inferRepoFromGitRemote, t as dependfixCommand, u as readReposFile, v as resolvePnpmVersion, w as readLockfileVersion, x as findDependencyVersion, y as ensurePnpmOverrides, z as stageAndCommit } from "./cli.mjs";
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()) runMain(dependfixCommand).catch((error) => {
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { pathToFileURL } from 'node:url'\nimport { runMain } from 'citty'\nimport { toAppError } from '@dependfix/core'\nimport { dependfixCommand, runCli, type CliRunResult } from './cli'\n\nexport * from '@dependfix/core'\nexport * from './app'\nexport * from './cli'\nexport * from './config'\nexport * from './fixers/dependency'\nexport * from './fixers/pnpm'\nexport * from './github'\nexport * from './runners'\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 runMain(dependfixCommand).catch((error: unknown) => {\n const appError = toAppError(error, 'CLI_EXECUTION_FAILED')\n console.error(appError.message)\n process.exitCode = 1\n })\n}\n"],"mappings":";;;;;;;;;;;AAiBA,SAAgB,KAAK,OAAiB,QAAQ,KAAK,MAAM,EAAE,EAAgB;AACvE,QAAO,OAAO,KAAK;;AAGvB,SAAS,yBAAkC;CACvC,MAAM,QAAQ,QAAQ,KAAK;AAE3B,KAAI,CAAC,MACD,QAAO;AAGX,QAAO,OAAO,KAAK,QAAQ,cAAc,MAAM,CAAC;;AAGpD,IAAI,wBAAwB,CAExB,CAAK,QAAQ,iBAAiB,CAAC,OAAO,UAAmB;CACrD,MAAM,WAAW,WAAW,OAAO,uBAAuB;AAC1D,SAAQ,MAAM,SAAS,QAAQ;AAC/B,SAAQ,WAAW;EACrB"}
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"}