@theholocron/cli 5.0.0-alpha.392 → 5.0.0-alpha.393

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/cli.mjs CHANGED
@@ -15431,7 +15431,8 @@ function parseJson(raw) {
15431
15431
  *
15432
15432
  * A package is skipped only when BOTH its bound file and its bound repository (compared
15433
15433
  * case-insensitively) already match: a package folded in from another repo keeps its
15434
- * filename but is still bound to the old repo (#1221). `--dry-run` does the same read-only
15434
+ * filename but is still bound to the old repo (#1221). `--force` replaces a matching entry too, because npm
15435
+ * expires an entry that is not used for a publish soon after it is made and still lists it as matching. `--dry-run` does the same read-only
15435
15436
  * `trust list` per package and reports what the real run would do, without revoking or creating.
15436
15437
  */
15437
15438
  async function runSyncTrust(input) {
@@ -15440,6 +15441,7 @@ async function runSyncTrust(input) {
15440
15441
  const cwd = input.cwd ?? process.cwd();
15441
15442
  const repo = input.repo ?? HOLOCRON_REPO;
15442
15443
  const dryRun = input.dryRun ?? false;
15444
+ const force = input.force ?? false;
15443
15445
  const exec = input.exec ?? defaultExec$1;
15444
15446
  const packageNames = input.packages ?? discoverPublicPackages(cwd, scopeOf(input));
15445
15447
  const npm = "npx";
@@ -15505,7 +15507,7 @@ async function runSyncTrust(input) {
15505
15507
  const entry = parsed ?? {};
15506
15508
  const sameFile = entry.file === input.newFile;
15507
15509
  const sameRepo = entry.repository?.toLowerCase() === repo.toLowerCase();
15508
- if (sameFile && sameRepo) {
15510
+ if (sameFile && sameRepo && !force) {
15509
15511
  print(` already on ${repo} / ${input.newFile}, skipping`);
15510
15512
  results.push({
15511
15513
  name,
@@ -15592,6 +15594,10 @@ const publishArgs = (y) => y.option("initial", {
15592
15594
  }).option("sync-trust", {
15593
15595
  type: "array",
15594
15596
  describe: "Migrate npm Trusted Publisher config to a new workflow filename across every public package: --sync-trust <old-file> <new-file>. See issue #689 — npm requires fresh interactive 2FA per package; re-run after approving the printed authUrl if it stops early."
15597
+ }).option("force", {
15598
+ type: "boolean",
15599
+ default: false,
15600
+ describe: "--sync-trust only: revoke and recreate every package's Trusted Publisher entry even when its file and repository already match. npm expires an entry that is not used for a publish soon after it is made but still lists it as matching, so a plain run skips it."
15595
15601
  }).option("repo", {
15596
15602
  type: "string",
15597
15603
  describe: `owner/repo for Trusted Publisher config (--sync-trust). Defaults to ${HOLOCRON_REPO}.`
@@ -15631,6 +15637,7 @@ const publishCommand = {
15631
15637
  oldFile,
15632
15638
  newFile,
15633
15639
  dryRun: argv.dryRun,
15640
+ force: argv.force,
15634
15641
  ...argv.group ? { group: argv.group } : {},
15635
15642
  ...argv.excludeGroup?.length ? { excludeGroups: argv.excludeGroup } : {},
15636
15643
  ...argv.repo ? { repo: argv.repo } : {}