gutterpress 0.11.23-alpha.4 → 0.11.23-alpha.6

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.
Files changed (52) hide show
  1. package/README.md +1 -1
  2. package/dist/api/index.d.ts +5 -3
  3. package/dist/api/index.js +17 -7
  4. package/dist/{build-c48eer6f.js → build-py643c5a.js} +8 -8
  5. package/dist/{cli-93mkaw6v.js → cli-09jj8w5g.js} +63 -31
  6. package/dist/{cli-a35w7wzg.js → cli-31anr0r9.js} +107 -56
  7. package/dist/{cli-y6d1arem.js → cli-55br530w.js} +4 -4
  8. package/dist/{cli-54xt7pjg.js → cli-58fsk6d7.js} +2 -2
  9. package/dist/{cli-d9mm3vvh.js → cli-bnf7eb38.js} +1 -1
  10. package/dist/{cli-gnpea9dx.js → cli-qzkq9em8.js} +1 -1
  11. package/dist/{cli-pspjxnc8.js → cli-tf9tw6at.js} +1 -1
  12. package/dist/{cli-rqh295j9.js → cli-x777v272.js} +3 -3
  13. package/dist/cli.js +12 -12
  14. package/dist/{doctor-ptb346k8.js → doctor-tyrzqphh.js} +3 -3
  15. package/dist/{engine-4rzdx6af.js → engine-4rabsgwq.js} +1 -1
  16. package/dist/{engine-6txhxmmv.js → engine-wm4fggac.js} +2 -2
  17. package/dist/{ext-gy8szg3x.js → ext-70kt3eft.js} +8 -8
  18. package/dist/{extension-restore-m8tj43e7.js → extension-restore-fjfn1hrk.js} +4 -4
  19. package/dist/{extension-restore-dymzcasz.js → extension-restore-whag4sm0.js} +2 -2
  20. package/dist/{index-8ywkd2sv.js → index-1zqkfzcd.js} +3 -3
  21. package/dist/{index-5kh4c78h.js → index-2vxzxyyj.js} +2 -2
  22. package/dist/{index-kaks3mm2.js → index-cmakyf43.js} +3 -3
  23. package/dist/{index-h6yk5tjx.js → index-cw03e9p4.js} +107 -56
  24. package/dist/{index-ea94zbq4.js → index-ejbfetdn.js} +327 -86
  25. package/dist/{index-yc3xj266.js → index-wm4x7xbf.js} +1 -1
  26. package/dist/index.js +18 -8
  27. package/dist/lib/publish/connect.d.ts +8 -1
  28. package/dist/lib/publish/manifest-publish.d.ts +26 -2
  29. package/dist/lib/publish/selections.d.ts +12 -1
  30. package/dist/lib/publish/types.d.ts +15 -5
  31. package/dist/lib/remote-auth/repair.d.ts +2 -2
  32. package/dist/lib/remote-auth/revisions.d.ts +60 -0
  33. package/dist/lib/remote-auth/scorched-earth.d.ts +2 -2
  34. package/dist/lib/remote-auth/sync-messages.d.ts +28 -27
  35. package/dist/lib/remote-auth/sync-types.d.ts +3 -0
  36. package/dist/lib/remote-auth/sync.d.ts +7 -8
  37. package/dist/lib/remote-auth/transport.d.ts +8 -1
  38. package/dist/lib/source-provider.d.ts +80 -35
  39. package/dist/{manifest.schema-w86c1xw1.json → manifest.schema-93sd7zje.json} +13 -6
  40. package/dist/{new-t2t28ccb.js → new-b27kyr02.js} +11 -11
  41. package/dist/{plugins-fec8t2bh.js → plugins-racab3cj.js} +1 -1
  42. package/dist/{plugins-sqa4msdk.js → plugins-vpx7c53c.js} +3 -3
  43. package/dist/{preflight-srq8fktp.js → preflight-akdqz9v8.js} +8 -8
  44. package/dist/{preview-zsp9hstd.js → preview-bck9f88w.js} +8 -8
  45. package/dist/{preview-interface-nnmrxyqm.js → preview-interface-0xdh0r5b.js} +3 -66
  46. package/dist/{publish-hhy31gr9.js → publish-keyp8rh4.js} +8 -8
  47. package/dist/render.js +2 -2
  48. package/dist/schema/manifest.types.d.ts +18 -3
  49. package/dist/{source-provider-knmcam50.js → source-provider-n7vehh6t.js} +15 -3
  50. package/dist/{source-provider-98k5deda.js → source-provider-tgzet3j5.js} +15 -3
  51. package/dist/{validate-r9jdz85h.js → validate-z28cvr5x.js} +8 -8
  52. package/package.json +1 -1
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  capabilitiesFor,
3
3
  detectProjectSource,
4
- findEnclosingRepoDir
4
+ findEnclosingRepoDir,
5
+ syncRemoteFor
5
6
  } from "./cli-v5mp7a6q.js";
6
7
  import {
7
8
  EXTENSIONS_DIR,
@@ -163,6 +164,7 @@ function gitScopeFor(source) {
163
164
  return source.repoRoot || source.path;
164
165
  }
165
166
  var HISTORY_PAGE_LIMIT = 100;
167
+ var NO_VERSION_HISTORY = "This book isn't keeping version history yet. Turn on version history first.";
166
168
  var DEFAULT_AUTHOR = "gutterpress";
167
169
  var DEFAULT_EMAIL = "noreply@gutterpress.local";
168
170
  var DEFAULT_BRANCH = "main";
@@ -334,7 +336,7 @@ class LocalFolderSourceProvider {
334
336
  async initVersionHistory(options) {
335
337
  const dir = options.projectDir;
336
338
  if (await findEnclosingRepoDir(dir) !== undefined) {
337
- throw new Error("This folder is already inside a versioned book, so gutterpress " + "won't create a separate history here.");
339
+ throw new Error("This folder is already inside a book that keeps version history, so " + "Gutterpress won't start a separate one here.");
338
340
  }
339
341
  return withRepoLock(dir, async () => {
340
342
  const cache = {};
@@ -358,7 +360,7 @@ class LocalFolderSourceProvider {
358
360
  });
359
361
  }
360
362
  snapshot() {
361
- return Promise.reject(new Error("This book has no version history yet. Enable version history first."));
363
+ return Promise.reject(new Error(NO_VERSION_HISTORY));
362
364
  }
363
365
  listHistory() {
364
366
  return Promise.resolve([]);
@@ -367,7 +369,7 @@ class LocalFolderSourceProvider {
367
369
  return Promise.resolve({ entries: [], hasMore: false });
368
370
  }
369
371
  restore() {
370
- return Promise.reject(new Error("This book has no version history yet. Enable version history first."));
372
+ return Promise.reject(new Error(NO_VERSION_HISTORY));
371
373
  }
372
374
  }
373
375
 
@@ -466,7 +468,7 @@ async function snapshotWorkingTreeUnlocked(options) {
466
468
  const workdirClean = changes.adds.length === 0 && changes.removes.length === 0;
467
469
  if (workdirClean && !staleStaging) {
468
470
  logger.debug("snapshot", "no changes — skipping");
469
- throw new Error("No changes since the last snapshot — there is nothing new to save.");
471
+ throw new Error("Nothing new to save — your last version already has everything.");
470
472
  }
471
473
  if (workdirClean && staleStaging && await stageMatchesHead(dir, cache)) {
472
474
  logger.debug("snapshot", "stale marker outlived a completed commit — clearing, not recommitting");
@@ -504,7 +506,7 @@ async function snapshotWorkingTreeUnlocked(options) {
504
506
  };
505
507
  }
506
508
  function isNoChangesError(e) {
507
- return e instanceof Error && /no changes since the last snapshot/i.test(e.message);
509
+ return e instanceof Error && /nothing new to save/i.test(e.message);
508
510
  }
509
511
  async function countUnversionedChanges(projectDir) {
510
512
  const source = await detectProjectSource(projectDir);
@@ -535,14 +537,13 @@ function gitDirFor(projectDir) {
535
537
  function snapshotStagingMarkerPath(projectDir) {
536
538
  return path2.join(gitDirFor(projectDir), SNAPSHOT_STAGING_MARKER);
537
539
  }
538
- var RESTORE_BACKUP_MESSAGE = "Automatic backup before restoring an earlier version";
539
- var AUTO_SNAPSHOT_MESSAGE = "Automatic snapshot";
540
+ var RESTORE_BACKUP_MESSAGE = "Automatic version before restoring";
541
+ var AUTO_SNAPSHOT_MESSAGE = "Automatic version";
540
542
  async function restoreVersionWithBackup(options) {
541
543
  const { projectDir, id, authorName, authorEmail } = options;
542
544
  const source = await detectProjectSource(projectDir);
543
- if (source.type !== "local-git-folder") {
544
- throw new Error("This book has no version history yet. Enable version history first.");
545
- }
545
+ if (source.type !== "local-git-folder")
546
+ throw new Error(NO_VERSION_HISTORY);
546
547
  const provider = new LocalGitSourceProvider(source);
547
548
  const repoDir = gitScopeFor(source);
548
549
  return withRepoLock(repoDir, async () => {
@@ -559,42 +560,105 @@ async function restoreVersionWithBackup(options) {
559
560
  try {
560
561
  await provider.restoreUnlocked({ projectDir, id });
561
562
  } catch (cause) {
562
- throw new Error(backupId ? "The restore could not be completed, but your work is safe — it was " + `automatically saved as a backup snapshot (${backupId.slice(0, 7)}) ` + "and appears in your version history." : "The restore could not be completed. Your book files were not changed.", { cause });
563
+ throw new Error(backupId ? "Going back to that version didn't finish, but your work is safe — it was " + "saved as an automatic version and appears in your version history." : "Going back to that version didn't finish. Your book files were not changed.", { cause });
563
564
  }
564
565
  return { restoredId: id, backupId };
565
566
  });
566
567
  }
567
- var SWITCH_BRANCH_SNAPSHOT_MESSAGE = "Saved before switching copy";
568
- async function listLocalBranches(dir) {
569
- const source = await detectProjectSource(dir);
570
- if (source.type !== "local-git-folder")
571
- return null;
572
- const repoDir = gitScopeFor(source);
573
- const [local, current, remotes] = await Promise.all([
574
- git.listBranches({ fs: gitFs, dir: repoDir }),
575
- git.currentBranch({ fs: gitFs, dir: repoDir, fullname: false }).catch(() => {
568
+ var SWITCH_BRANCH_SNAPSHOT_MESSAGE = "Saved before switching revision";
569
+ async function readRevisionRefs(dir) {
570
+ const [names, current, remote] = await Promise.all([
571
+ git.listBranches({ fs: gitFs, dir }),
572
+ git.currentBranch({ fs: gitFs, dir, fullname: false }).catch(() => {
576
573
  return;
577
574
  }),
578
- git.listRemotes({ fs: gitFs, dir: repoDir }).catch(() => [])
575
+ syncRemoteFor(dir)
579
576
  ]);
580
- const localNames = new Set(local);
581
- const remoteOnly = new Set;
582
- for (const { remote } of remotes) {
583
- const names = await git.listBranches({ fs: gitFs, dir: repoDir, remote }).catch(() => []);
584
- for (const name of names) {
585
- if (name === "HEAD")
586
- continue;
587
- if (!localNames.has(name))
588
- remoteOnly.add(name);
589
- }
590
- }
577
+ const tips = async (branches, prefix) => new Map(await Promise.all(branches.map(async (name) => [name, await git.resolveRef({ fs: gitFs, dir, ref: `${prefix}${name}` })])));
578
+ const onlineNames = remote ? (await git.listBranches({ fs: gitFs, dir, remote: remote.remote }).catch(() => [])).filter((name) => name !== "HEAD") : [];
591
579
  return {
592
580
  current: current ?? null,
593
- branches: [...localNames, ...remoteOnly].sort(),
594
- remoteOnly: [...remoteOnly].sort()
581
+ local: await tips(names, "refs/heads/"),
582
+ online: await tips(onlineNames, `refs/remotes/${remote?.remote}/`)
595
583
  };
596
584
  }
597
- async function resolveCopy(repoDir, branch) {
585
+ var ANCESTRY_DEPTH = 1000;
586
+ async function isContained(dir, tip, inTip, cache) {
587
+ if (tip === inTip)
588
+ return true;
589
+ return git.isDescendent({ fs: gitFs, dir, cache, oid: inTip, ancestor: tip, depth: ANCESTRY_DEPTH }).catch(() => false);
590
+ }
591
+ async function listRevisions(dir) {
592
+ const source = await detectProjectSource(dir);
593
+ if (source.type !== "local-git-folder")
594
+ return null;
595
+ const repoDir = gitScopeFor(source);
596
+ const { current, local, online } = await readRevisionRefs(repoDir);
597
+ const cache = {};
598
+ const names = [...new Set([...local.keys(), ...online.keys()])].sort((a, b) => a.localeCompare(b));
599
+ const revisions = await Promise.all(names.map(async (name) => {
600
+ const here = local.get(name);
601
+ const there = online.get(name);
602
+ return {
603
+ name,
604
+ current: name === current,
605
+ where: here && there ? "online" : here ? "this-computer" : "online-only",
606
+ notBackedUp: Boolean(here && there && !await isContained(repoDir, here, there, cache))
607
+ };
608
+ }));
609
+ return { current, revisions };
610
+ }
611
+ function revisionNameFrom(input) {
612
+ return input.trim().replace(/\s+/g, "-");
613
+ }
614
+ var UNUSABLE_REVISION_NAME = /[\u0000- \u007f~^:?*[\\/<>"|]|\.\.|@\{|^[-.]|\.$|\.lock$|^@$/;
615
+ var REVISION_NAME_MAX = 100;
616
+ async function assertFreeRevisionName(repoDir, name) {
617
+ if (!name)
618
+ throw new Error("Give the revision a name.");
619
+ if (name.length > REVISION_NAME_MAX || UNUSABLE_REVISION_NAME.test(name)) {
620
+ throw new Error(`"${name}" can't be a revision name. Use plain words, numbers and dashes, up to ${REVISION_NAME_MAX} characters.`);
621
+ }
622
+ const { local, online } = await readRevisionRefs(repoDir);
623
+ const taken = (names) => [...names].find((n) => n.toLowerCase() === name.toLowerCase());
624
+ const here = taken(local.keys());
625
+ if (here)
626
+ throw new Error(`There's already a revision called "${here}". Pick a different name.`);
627
+ const there = taken(online.keys());
628
+ if (there) {
629
+ throw new Error(`"${there}" is already a revision in the online copy. Switch to it, or pick a different name.`);
630
+ }
631
+ }
632
+ async function saveUnsavedWork(options, cache) {
633
+ try {
634
+ await snapshotWorkingTreeUnlocked({
635
+ projectDir: options.projectDir,
636
+ repoRoot: options.repoDir,
637
+ message: SWITCH_BRANCH_SNAPSHOT_MESSAGE,
638
+ authorName: options.authorName,
639
+ authorEmail: options.authorEmail,
640
+ cache
641
+ });
642
+ } catch (e) {
643
+ if (!isNoChangesError(e))
644
+ throw e;
645
+ }
646
+ }
647
+ async function createRevision(options) {
648
+ const { projectDir, authorName, authorEmail } = options;
649
+ const source = await detectProjectSource(projectDir);
650
+ if (source.type !== "local-git-folder")
651
+ throw new Error(NO_VERSION_HISTORY);
652
+ const repoDir = gitScopeFor(source);
653
+ const name = revisionNameFrom(options.name);
654
+ return withRepoLock(repoDir, async () => {
655
+ await assertFreeRevisionName(repoDir, name);
656
+ await saveUnsavedWork({ projectDir, repoDir, authorName, authorEmail }, {});
657
+ await git.branch({ fs: gitFs, dir: repoDir, ref: name, checkout: true });
658
+ return { current: name };
659
+ });
660
+ }
661
+ async function resolveRevision(repoDir, branch) {
598
662
  const local = await git.resolveRef({ fs: gitFs, dir: repoDir, ref: `refs/heads/${branch}` }).catch(() => {
599
663
  return;
600
664
  });
@@ -608,7 +672,7 @@ async function resolveCopy(repoDir, branch) {
608
672
  if (oid)
609
673
  return { oid, remote };
610
674
  }
611
- throw new Error(`Couldn't find a copy named "${branch}" — it may have been renamed or deleted.`);
675
+ throw new Error(`Couldn't find a revision named "${branch}" — it may have been renamed or deleted.`);
612
676
  }
613
677
  function isCheckoutConflictError(e) {
614
678
  return e?.code === "CheckoutConflictError";
@@ -645,29 +709,16 @@ async function diffCommitPaths(dir, fromOid, toOid, cache) {
645
709
  async function switchBranch(options) {
646
710
  const { projectDir, branch, authorName, authorEmail } = options;
647
711
  const source = await detectProjectSource(projectDir);
648
- if (source.type !== "local-git-folder") {
649
- throw new Error("This book has no version history yet. Enable version history first.");
650
- }
712
+ if (source.type !== "local-git-folder")
713
+ throw new Error(NO_VERSION_HISTORY);
651
714
  const repoDir = gitScopeFor(source);
652
715
  return withRepoLock(repoDir, async () => {
653
716
  const cache = {};
654
- try {
655
- await snapshotWorkingTreeUnlocked({
656
- projectDir,
657
- repoRoot: repoDir,
658
- message: SWITCH_BRANCH_SNAPSHOT_MESSAGE,
659
- authorName,
660
- authorEmail,
661
- cache
662
- });
663
- } catch (e) {
664
- if (!isNoChangesError(e))
665
- throw e;
666
- }
717
+ await saveUnsavedWork({ projectDir, repoDir, authorName, authorEmail }, cache);
667
718
  const fromOid = await git.resolveRef({ fs: gitFs, dir: repoDir, ref: "HEAD" }).catch(() => {
668
719
  return;
669
720
  });
670
- const { oid: toOid, remote } = await resolveCopy(repoDir, branch);
721
+ const { oid: toOid, remote } = await resolveRevision(repoDir, branch);
671
722
  try {
672
723
  await git.checkout({
673
724
  fs: gitFs,
@@ -679,7 +730,7 @@ async function switchBranch(options) {
679
730
  });
680
731
  } catch (e) {
681
732
  if (isCheckoutConflictError(e)) {
682
- throw new Error("Couldn't switch copies — some files changed on disk right as the switch " + "started. Try again.", { cause: e });
733
+ throw new Error("Couldn't switch revisions — some files changed on disk right as the switch " + "started. Try again.", { cause: e });
683
734
  }
684
735
  throw e;
685
736
  }
@@ -691,4 +742,4 @@ async function switchBranch(options) {
691
742
  });
692
743
  }
693
744
 
694
- export { gitScopeFor, HISTORY_PAGE_LIMIT, withRepoLock, whenGitIdle, __repoLockQueueSizeForTests, resolveGitAuthor, listWorkdirChanges, stageChanges, hasPendingChanges, hasUncommittedChanges, snapshotWorkingTreeUnlocked, isNoChangesError, countUnversionedChanges, providerFor, gitDirFor, snapshotStagingMarkerPath, RESTORE_BACKUP_MESSAGE, AUTO_SNAPSHOT_MESSAGE, restoreVersionWithBackup, SWITCH_BRANCH_SNAPSHOT_MESSAGE, listLocalBranches, switchBranch };
745
+ export { gitScopeFor, HISTORY_PAGE_LIMIT, NO_VERSION_HISTORY, withRepoLock, whenGitIdle, __repoLockQueueSizeForTests, resolveGitAuthor, listWorkdirChanges, stageChanges, hasPendingChanges, hasUncommittedChanges, snapshotWorkingTreeUnlocked, isNoChangesError, countUnversionedChanges, providerFor, gitDirFor, snapshotStagingMarkerPath, RESTORE_BACKUP_MESSAGE, AUTO_SNAPSHOT_MESSAGE, restoreVersionWithBackup, SWITCH_BRANCH_SNAPSHOT_MESSAGE, readRevisionRefs, isContained, listRevisions, revisionNameFrom, assertFreeRevisionName, createRevision, switchBranch };
@@ -11,10 +11,10 @@ import {
11
11
  prettify,
12
12
  readExtensionMeta,
13
13
  slugify
14
- } from "./cli-rqh295j9.js";
14
+ } from "./cli-x777v272.js";
15
15
  import {
16
16
  log
17
- } from "./cli-pspjxnc8.js";
17
+ } from "./cli-tf9tw6at.js";
18
18
  import {
19
19
  UsageError
20
20
  } from "./cli-d8xjns66.js";
@@ -562,7 +562,7 @@ async function loadManifestWithPath(pathOrDir, opts) {
562
562
  if (existsSync(p) && statSync(p).isFile()) {
563
563
  const raw = await readFile(p, "utf8");
564
564
  if (raw.split(/\r?\n/).includes(TWO_VERSIONS_OPEN)) {
565
- throw new UsageError(`"${p}" has two versions of a setting — yours and the online version — left by a sync. Open it, keep the one you want and delete the marker lines.`);
565
+ throw new UsageError(`"${p}" has two takes of a setting — yours and the online copy's — left by getting the latest changes. Open it, keep the one you want and delete the marker lines.`);
566
566
  }
567
567
  try {
568
568
  const parsed = parseYaml(raw) ?? {};
@@ -1916,7 +1916,7 @@ async function vendorNpmExtension(projectDir, input, exportName, options, commit
1916
1916
  }
1917
1917
  const warnings = [...installed.warnings];
1918
1918
  await finalizeNpmPluginInstall(installed).catch((error) => {
1919
- warnings.push(`The extension was installed, but an old backup could not be removed: ` + `${error instanceof Error ? error.message : String(error)}`);
1919
+ warnings.push(`The extension was installed, but an old download could not be removed: ` + `${error instanceof Error ? error.message : String(error)}`);
1920
1920
  });
1921
1921
  warnings.push(...await retireLegacyCopies(projectDir, installed.name));
1922
1922
  try {
@@ -1140,10 +1140,10 @@ import { fileURLToPath } from "node:url";
1140
1140
  var favicon_default = "./favicon-272ga6y0.ico";
1141
1141
 
1142
1142
  // src/assets/manifest.schema.json
1143
- var manifest_schema_default = "./manifest.schema-w86c1xw1.json";
1143
+ var manifest_schema_default = "./manifest.schema-93sd7zje.json";
1144
1144
 
1145
1145
  // src/assets/preview/scripts/preview-interface.js
1146
- var preview_interface_default = "./preview-interface-nnmrxyqm.js";
1146
+ var preview_interface_default = "./preview-interface-0xdh0r5b.js";
1147
1147
 
1148
1148
  // src/assets/preview/scripts/preview-bridge.js
1149
1149
  var preview_bridge_default = "./preview-bridge-8wjcjec3.js";
@@ -14,7 +14,7 @@ import {
14
14
  import {
15
15
  PACKAGE_VERSION,
16
16
  log
17
- } from "./cli-pspjxnc8.js";
17
+ } from "./cli-tf9tw6at.js";
18
18
  import {
19
19
  __require
20
20
  } from "./cli-37x76zdn.js";
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "gutterpress",
4
- version: "0.11.23-alpha.4",
4
+ version: "0.11.23-alpha.6",
5
5
  description: "Markdown-to-PDF converter for professional print layout using a native Chromium print engine and Ghostscript.",
6
6
  author: "itlackey",
7
7
  license: "MPL-2.0",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "./cli-gnpea9dx.js";
3
+ } from "./cli-qzkq9em8.js";
4
4
 
5
5
  // src/utils/logger.ts
6
6
  var currentLevel = "INFO";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  PACKAGE_VERSION,
3
3
  debug
4
- } from "./cli-pspjxnc8.js";
4
+ } from "./cli-tf9tw6at.js";
5
5
  import {
6
6
  isExactNpmVersion,
7
7
  isValidNpmPackageName,
@@ -2691,8 +2691,8 @@ function twoVersions(state, startLine, endLine, silent) {
2691
2691
  open.attrSet("class", "gp-two-versions");
2692
2692
  open.map = [startLine, closer + 1];
2693
2693
  open.block = true;
2694
- pushVersion(state, "yours", "Your version", startLine + 1, separator);
2695
- pushVersion(state, "online", "Online version", separator + 1, closer);
2694
+ pushVersion(state, "yours", "Your take", startLine + 1, separator);
2695
+ pushVersion(state, "online", "Online take", separator + 1, closer);
2696
2696
  const close = state.push("two_versions_close", "div", -1);
2697
2697
  close.block = true;
2698
2698
  state.parentType = oldParent;
package/dist/cli.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  } from "./cli-d8xjns66.js";
9
9
  import {
10
10
  package_default
11
- } from "./cli-gnpea9dx.js";
11
+ } from "./cli-qzkq9em8.js";
12
12
  import {
13
13
  EXIT_CODES
14
14
  } from "./cli-46ycxe6r.js";
@@ -20,14 +20,14 @@ import {
20
20
  import { defineCommand, parseArgs, runMain } from "citty";
21
21
  import { statSync } from "node:fs";
22
22
  var SUBCOMMANDS = {
23
- new: () => import("./new-t2t28ccb.js").then((m) => m.default),
24
- preview: () => import("./preview-zsp9hstd.js").then((m) => m.default),
25
- build: () => import("./build-c48eer6f.js").then((m) => m.default),
26
- publish: () => import("./publish-hhy31gr9.js").then((m) => m.default),
27
- validate: () => import("./validate-r9jdz85h.js").then((m) => m.default),
28
- preflight: () => import("./preflight-srq8fktp.js").then((m) => m.default),
29
- doctor: () => import("./doctor-ptb346k8.js").then((m) => m.default),
30
- ext: () => import("./ext-gy8szg3x.js").then((m) => m.default)
23
+ new: () => import("./new-b27kyr02.js").then((m) => m.default),
24
+ preview: () => import("./preview-bck9f88w.js").then((m) => m.default),
25
+ build: () => import("./build-py643c5a.js").then((m) => m.default),
26
+ publish: () => import("./publish-keyp8rh4.js").then((m) => m.default),
27
+ validate: () => import("./validate-z28cvr5x.js").then((m) => m.default),
28
+ preflight: () => import("./preflight-akdqz9v8.js").then((m) => m.default),
29
+ doctor: () => import("./doctor-tyrzqphh.js").then((m) => m.default),
30
+ ext: () => import("./ext-70kt3eft.js").then((m) => m.default)
31
31
  };
32
32
  var VERSION = package_default.version;
33
33
  var main = defineCommand({
@@ -52,7 +52,7 @@ async function preflightRequiredInvocations(rawArgs) {
52
52
  const [command, ...commandArgs] = rawArgs;
53
53
  try {
54
54
  if (command === "new") {
55
- const { newArgs } = await import("./new-t2t28ccb.js");
55
+ const { newArgs } = await import("./new-b27kyr02.js");
56
56
  rejectUnknownFlags(commandArgs, newArgs, "new");
57
57
  const parsed = parseArgs(commandArgs, {
58
58
  ...newArgs,
@@ -64,7 +64,7 @@ async function preflightRequiredInvocations(rawArgs) {
64
64
  return;
65
65
  }
66
66
  if (command === "preflight") {
67
- const { preflightArgs } = await import("./preflight-srq8fktp.js");
67
+ const { preflightArgs } = await import("./preflight-akdqz9v8.js");
68
68
  rejectUnknownFlags(commandArgs, preflightArgs, "preflight");
69
69
  const parsed = parseArgs(commandArgs, {
70
70
  ...preflightArgs,
@@ -84,7 +84,7 @@ async function preflightRequiredInvocations(rawArgs) {
84
84
  }
85
85
  if (subcommand.startsWith("-"))
86
86
  return;
87
- const { EXT_SUBCOMMANDS, extAddArgs, extRemoveArgs, extEnableArgs, extDisableArgs } = await import("./ext-gy8szg3x.js");
87
+ const { EXT_SUBCOMMANDS, extAddArgs, extRemoveArgs, extEnableArgs, extDisableArgs } = await import("./ext-70kt3eft.js");
88
88
  if (!EXT_SUBCOMMANDS.includes(subcommand)) {
89
89
  throw new UsageError(`gutterpress ext: unknown command "${subcommand}"`);
90
90
  }
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  getSystemDiagnostics
3
- } from "./cli-d9mm3vvh.js";
3
+ } from "./cli-bnf7eb38.js";
4
4
  import"./cli-5crpmz42.js";
5
5
  import"./cli-asap4t1z.js";
6
6
  import {
7
7
  log
8
- } from "./cli-pspjxnc8.js";
8
+ } from "./cli-tf9tw6at.js";
9
9
  import {
10
10
  UsageError,
11
11
  rejectExtraPositionals,
12
12
  rejectUnknownFlags
13
13
  } from "./cli-d8xjns66.js";
14
- import"./cli-gnpea9dx.js";
14
+ import"./cli-qzkq9em8.js";
15
15
  import"./cli-46ycxe6r.js";
16
16
  import"./cli-37x76zdn.js";
17
17
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  build
3
- } from "./cli-54xt7pjg.js";
3
+ } from "./cli-58fsk6d7.js";
4
4
  import"./cli-eyyggect.js";
5
5
  import"./cli-asap4t1z.js";
6
6
  import {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  build
3
- } from "./index-yc3xj266.js";
4
- import"./index-5kh4c78h.js";
3
+ } from "./index-wm4x7xbf.js";
4
+ import"./index-2vxzxyyj.js";
5
5
  import {
6
6
  BuildError
7
7
  } from "./index-46ycxe6r.js";
@@ -2,14 +2,14 @@ import {
2
2
  importExtensionFromFile,
3
3
  importExtensionFromUrl,
4
4
  searchNpmExtensions
5
- } from "./cli-93mkaw6v.js";
6
- import"./cli-d9mm3vvh.js";
5
+ } from "./cli-09jj8w5g.js";
6
+ import"./cli-bnf7eb38.js";
7
7
  import"./cli-ht1bcqdd.js";
8
- import"./cli-54xt7pjg.js";
8
+ import"./cli-58fsk6d7.js";
9
9
  import"./cli-5crpmz42.js";
10
10
  import"./cli-eyyggect.js";
11
11
  import"./cli-asap4t1z.js";
12
- import"./cli-a35w7wzg.js";
12
+ import"./cli-31anr0r9.js";
13
13
  import"./cli-v5mp7a6q.js";
14
14
  import {
15
15
  addExtension,
@@ -18,12 +18,12 @@ import {
18
18
  removeExtension,
19
19
  setExtensionEnabled,
20
20
  updateExtensions
21
- } from "./cli-y6d1arem.js";
21
+ } from "./cli-55br530w.js";
22
22
  import {
23
23
  isPathSpecifier,
24
24
  parseExtensionSpecifier
25
- } from "./cli-rqh295j9.js";
26
- import"./cli-pspjxnc8.js";
25
+ } from "./cli-x777v272.js";
26
+ import"./cli-tf9tw6at.js";
27
27
  import {
28
28
  UsageError,
29
29
  exitForUsage,
@@ -31,7 +31,7 @@ import {
31
31
  rejectUnknownFlags,
32
32
  resolveProjectDir
33
33
  } from "./cli-d8xjns66.js";
34
- import"./cli-gnpea9dx.js";
34
+ import"./cli-qzkq9em8.js";
35
35
  import {
36
36
  EXIT_CODES
37
37
  } from "./cli-46ycxe6r.js";
@@ -3,11 +3,11 @@ import {
3
3
  restoreForCommand,
4
4
  restoreOfflineMessage,
5
5
  restorePinnedExtensions
6
- } from "./cli-y6d1arem.js";
7
- import"./cli-rqh295j9.js";
8
- import"./cli-pspjxnc8.js";
6
+ } from "./cli-55br530w.js";
7
+ import"./cli-x777v272.js";
8
+ import"./cli-tf9tw6at.js";
9
9
  import"./cli-d8xjns66.js";
10
- import"./cli-gnpea9dx.js";
10
+ import"./cli-qzkq9em8.js";
11
11
  import"./cli-46ycxe6r.js";
12
12
  import"./cli-y28j019d.js";
13
13
  import"./cli-37x76zdn.js";
@@ -3,8 +3,8 @@ import {
3
3
  restoreForCommand,
4
4
  restoreOfflineMessage,
5
5
  restorePinnedExtensions
6
- } from "./index-kaks3mm2.js";
7
- import"./index-8ywkd2sv.js";
6
+ } from "./index-cmakyf43.js";
7
+ import"./index-1zqkfzcd.js";
8
8
  import"./index-46ycxe6r.js";
9
9
  import"./index-5x42amh8.js";
10
10
  import"./index-37x76zdn.js";
@@ -398,7 +398,7 @@ import { satisfies, validRange } from "semver";
398
398
  // package.json
399
399
  var package_default = {
400
400
  name: "gutterpress",
401
- version: "0.11.23-alpha.4",
401
+ version: "0.11.23-alpha.6",
402
402
  description: "Markdown-to-PDF converter for professional print layout using a native Chromium print engine and Ghostscript.",
403
403
  author: "itlackey",
404
404
  license: "MPL-2.0",
@@ -2863,8 +2863,8 @@ function twoVersions(state, startLine, endLine, silent) {
2863
2863
  open.attrSet("class", "gp-two-versions");
2864
2864
  open.map = [startLine, closer + 1];
2865
2865
  open.block = true;
2866
- pushVersion(state, "yours", "Your version", startLine + 1, separator);
2867
- pushVersion(state, "online", "Online version", separator + 1, closer);
2866
+ pushVersion(state, "yours", "Your take", startLine + 1, separator);
2867
+ pushVersion(state, "online", "Online take", separator + 1, closer);
2868
2868
  const close = state.push("two_versions_close", "div", -1);
2869
2869
  close.block = true;
2870
2870
  state.parentType = oldParent;
@@ -697,10 +697,10 @@ import { fileURLToPath } from "node:url";
697
697
  var favicon_default = "./favicon-272ga6y0.ico";
698
698
 
699
699
  // src/assets/manifest.schema.json
700
- var manifest_schema_default = "./manifest.schema-w86c1xw1.json";
700
+ var manifest_schema_default = "./manifest.schema-93sd7zje.json";
701
701
 
702
702
  // src/assets/preview/scripts/preview-interface.js
703
- var preview_interface_default = "./preview-interface-nnmrxyqm.js";
703
+ var preview_interface_default = "./preview-interface-0xdh0r5b.js";
704
704
 
705
705
  // src/assets/preview/scripts/preview-bridge.js
706
706
  var preview_bridge_default = "./preview-bridge-8wjcjec3.js";
@@ -14,7 +14,7 @@ import {
14
14
  readExtensionMeta,
15
15
  resolveExtension,
16
16
  slugify
17
- } from "./index-8ywkd2sv.js";
17
+ } from "./index-1zqkfzcd.js";
18
18
  import {
19
19
  BuildError,
20
20
  EXIT_CODES
@@ -599,7 +599,7 @@ async function loadManifestWithPath(pathOrDir, opts) {
599
599
  if (existsSync(p) && statSync(p).isFile()) {
600
600
  const raw = await readFile(p, "utf8");
601
601
  if (raw.split(/\r?\n/).includes(TWO_VERSIONS_OPEN)) {
602
- throw new UsageError(`"${p}" has two versions of a setting — yours and the online version — left by a sync. Open it, keep the one you want and delete the marker lines.`);
602
+ throw new UsageError(`"${p}" has two takes of a setting — yours and the online copy's — left by getting the latest changes. Open it, keep the one you want and delete the marker lines.`);
603
603
  }
604
604
  try {
605
605
  const parsed = parseYaml(raw) ?? {};
@@ -1983,7 +1983,7 @@ async function vendorNpmExtension(projectDir, input, exportName, options, commit
1983
1983
  }
1984
1984
  const warnings = [...installed.warnings];
1985
1985
  await finalizeNpmPluginInstall(installed).catch((error) => {
1986
- warnings.push(`The extension was installed, but an old backup could not be removed: ` + `${error instanceof Error ? error.message : String(error)}`);
1986
+ warnings.push(`The extension was installed, but an old download could not be removed: ` + `${error instanceof Error ? error.message : String(error)}`);
1987
1987
  });
1988
1988
  warnings.push(...await retireLegacyCopies(projectDir, installed.name));
1989
1989
  try {