gutterpress 0.11.16-alpha.4 → 0.11.16-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 (32) hide show
  1. package/README.md +36 -4
  2. package/dist/api/index.d.ts +4 -1
  3. package/dist/api/index.js +8 -4
  4. package/dist/{build-mcfqc88s.js → build-bk0rw638.js} +8 -6
  5. package/dist/{cli-281af80x.js → cli-ac7zs8sp.js} +9790 -9562
  6. package/dist/{cli-0rnwy2sm.js → cli-n9e1mzb7.js} +1 -1
  7. package/dist/{cli-20d4bh4m.js → cli-nzzsyw1e.js} +2 -1
  8. package/dist/{cli-8597az31.js → cli-wqy8hnnh.js} +2 -2
  9. package/dist/cli.js +12 -12
  10. package/dist/{doctor-mgczpcay.js → doctor-qmd7gjwt.js} +2 -2
  11. package/dist/{engine-6jnxqfsm.js → engine-j5h953pg.js} +1 -1
  12. package/dist/{engine-5b92gk8n.js → engine-w17dbt4f.js} +2 -2
  13. package/dist/{ext-qxtng677.js → ext-j28pn3ng.js} +4 -4
  14. package/dist/{index-w1qk3tap.js → index-ee7wp8q3.js} +2 -2
  15. package/dist/{index-zb48zwcq.js → index-qep93v0z.js} +1 -1
  16. package/dist/{index-22dmrjts.js → index-ss8dv3zf.js} +7917 -7687
  17. package/dist/index.js +9 -5
  18. package/dist/lib/extension-manager.d.ts +13 -0
  19. package/dist/lib/extension-restore.d.ts +74 -0
  20. package/dist/lib/npm-plugin-installer.d.ts +8 -0
  21. package/dist/lib/project-gitignore.d.ts +10 -0
  22. package/dist/lib/project-scaffold.d.ts +2 -22
  23. package/dist/lib/validation-exec.d.ts +3 -2
  24. package/dist/{new-7ah0sg6k.js → new-rxkqh5t2.js} +4 -4
  25. package/dist/{preflight-xmz79sn6.js → preflight-wm3seg5z.js} +6 -5
  26. package/dist/{preview-7vegws9x.js → preview-55jbgv9p.js} +8 -5
  27. package/dist/{preview-interface-twd6nsf5.js → preview-interface-5wnzrvhf.js} +5 -1
  28. package/dist/{preview-shell-y8yrm3f0.js → preview-shell-xwn84kqr.js} +2 -1
  29. package/dist/{publish-p72b4j6n.js → publish-mv3kcwwn.js} +8 -6
  30. package/dist/render.js +5 -2
  31. package/dist/{validate-bkcz3jsy.js → validate-bhn2tjsw.js} +6 -5
  32. package/package.json +2 -1
package/dist/index.js CHANGED
@@ -48,7 +48,7 @@ import {
48
48
  describeExtension,
49
49
  diagnoseProjectRemote,
50
50
  disconnectPublishCredential,
51
- ensureGitignoreHasDist,
51
+ ensureProjectGitignore,
52
52
  escapeYamlScalar,
53
53
  executeAndReport,
54
54
  executeValidation,
@@ -119,6 +119,8 @@ import {
119
119
  resolveGoogleClientSecret,
120
120
  resolvePublishFormat,
121
121
  resolvePublishRequest,
122
+ restoreFailureMessage,
123
+ restorePinnedExtensions,
122
124
  revokeGoogleCredential,
123
125
  ruleRemoteUrls,
124
126
  ruleRiskyProps,
@@ -146,13 +148,13 @@ import {
146
148
  testRemoteAccess,
147
149
  updateExtensions,
148
150
  validateProjectExtensions
149
- } from "./index-22dmrjts.js";
151
+ } from "./index-ss8dv3zf.js";
150
152
  import {
151
153
  BUILD_DIAGNOSTIC_CODES
152
- } from "./index-zb48zwcq.js";
154
+ } from "./index-qep93v0z.js";
153
155
  import {
154
156
  BuildError
155
- } from "./index-w1qk3tap.js";
157
+ } from "./index-ee7wp8q3.js";
156
158
  import {
157
159
  DEFAULT_PRINT_OPTS,
158
160
  assertMilestone,
@@ -212,6 +214,8 @@ export {
212
214
  ruleRemoteUrls,
213
215
  revokeGoogleCredential,
214
216
  restoreVersionWithBackup,
217
+ restorePinnedExtensions,
218
+ restoreFailureMessage,
215
219
  resolvePublishRequest,
216
220
  resolvePublishFormat,
217
221
  resolveLogger,
@@ -290,7 +294,7 @@ export {
290
294
  executeValidation,
291
295
  executeAndReport,
292
296
  escapeYamlScalar,
293
- ensureGitignoreHasDist,
297
+ ensureProjectGitignore,
294
298
  disconnectPublishCredential,
295
299
  diagnoseProjectRemote,
296
300
  detectProjectSource,
@@ -82,6 +82,8 @@ export interface BuiltInStyleSet {
82
82
  name: string;
83
83
  description: string;
84
84
  }
85
+ /** One key per book folder, however the path is spelled (Windows paths are case-insensitive). */
86
+ export declare function projectKey(projectDir: string): string;
85
87
  /**
86
88
  * Two specifiers name the same extension when they are equal, or when both
87
89
  * are npm specifiers for the same package (a re-install re-pins the version
@@ -146,6 +148,17 @@ export interface AddExtensionOptions extends NpmPluginInstallOptions {
146
148
  * Returns the described entry.
147
149
  */
148
150
  export declare function addExtension(projectDir: string, specifier: string, options?: AddExtensionOptions): Promise<ProjectExtensionEntry>;
151
+ /**
152
+ * Download one pinned npm extension again (`name@<exact version>`): the same
153
+ * verified transaction as {@link addExtension}, minus the manifest write — the
154
+ * pin is already there and is never changed. Returns the install's warnings.
155
+ */
156
+ export declare function restoreNpmExtension(projectDir: string, name: string, version: string, exportName: string | undefined, options?: NpmPluginInstallOptions & {
157
+ /** Every version of `name` an enabled manifest entry pins — never pruned. */
158
+ keepVersions?: readonly string[];
159
+ }): Promise<string[]>;
160
+ /** True when `plugins/npm/<name>/<version>/` is absent or has no loadable entry — what the loader calls "not installed" or "incomplete". */
161
+ export declare function vendoredCopyNeedsInstall(projectDir: string, name: string, version: string): Promise<boolean>;
149
162
  /** One pinned npm extension against npm's `latest` tag. */
150
163
  export interface ExtensionUpdateCheck {
151
164
  /** The specifier as written in the manifest (`name@current`). */
@@ -0,0 +1,74 @@
1
+ import type { NpmPluginInstallOptions } from "./npm-plugin-installer.ts";
2
+ export interface RestorePinnedOptions extends NpmPluginInstallOptions {
3
+ /** An explicit `--manifest` file; the book folder is then that file's folder. */
4
+ manifestPath?: string;
5
+ /**
6
+ * Progress for a UI: nothing is reported when every copy is present; else a
7
+ * `start` (the packages to download), one `package` event as each starts
8
+ * and ends, and an `end`. A caller that joins a run already in flight for
9
+ * the same book gets that run's result but no events.
10
+ */
11
+ onProgress?: (event: RestoreProgress) => void;
12
+ }
13
+ /** One step of a restore, for a progress indicator. `spec` is `name@version`. */
14
+ export type RestoreProgress = {
15
+ type: "start";
16
+ specs: string[];
17
+ } | {
18
+ type: "package";
19
+ spec: string;
20
+ index: number;
21
+ total: number;
22
+ state: "downloading" | "done" | "failed";
23
+ message?: string;
24
+ } | {
25
+ type: "end";
26
+ installed: string[];
27
+ failed: RestoreFailure[];
28
+ };
29
+ export interface RestoreFailure {
30
+ /** `name@version`, as pinned. */
31
+ use: string;
32
+ message: string;
33
+ }
34
+ export interface RestoreResult {
35
+ /** File name of the manifest the pins were read from (`manifest.yaml`), or null when the folder has none. */
36
+ manifestFile: string | null;
37
+ /** `name@version` of each package downloaded. */
38
+ installed: string[];
39
+ failed: RestoreFailure[];
40
+ warnings: string[];
41
+ /** npm could not be reached, so every package still missing was reported as failed without being tried. */
42
+ offline: boolean;
43
+ }
44
+ /**
45
+ * Download every pinned npm extension of the book whose copy is missing or
46
+ * incomplete. Never throws for a failed download — failures come back in
47
+ * `failed` so each caller can decide (the CLI fails fast, preview and the
48
+ * desktop degrade). An unreadable manifest restores nothing: whoever reads it
49
+ * next reports the real problem.
50
+ */
51
+ export declare function restorePinnedExtensions(projectDir: string, options?: RestorePinnedOptions): Promise<RestoreResult>;
52
+ /** What went wrong, which extension, and how to retry — one failure as a sentence. */
53
+ export declare function restoreFailureMessage(failure: RestoreFailure, manifestFile: string | null): string;
54
+ /**
55
+ * One sentence for a restore that could not reach npm: which extensions are
56
+ * missing, and that they have to be installed while online — after which the
57
+ * book works offline.
58
+ */
59
+ export declare function restoreOfflineMessage(failed: RestoreFailure[], manifestFile: string | null): string;
60
+ /**
61
+ * The restore step every command and host path that loads a book's plugins
62
+ * runs first: restore, print one line per downloaded package, and either fail
63
+ * fast (build, export, validate and the checks: a final artifact must never
64
+ * silently omit author-configured formatting) or, for the live preview, warn
65
+ * and carry on so one missing package cannot blank the whole preview.
66
+ *
67
+ * It is called from the shared "load the book's plugins" seams themselves
68
+ * (`loadBuildPlugins`, `executeValidation`), not from each command, so a new
69
+ * command that builds or checks cannot forget it. The loader stays offline.
70
+ */
71
+ export declare function restoreForCommand(dir: string, options: {
72
+ manifestPath?: string;
73
+ failFast: boolean;
74
+ }): Promise<void>;
@@ -22,8 +22,16 @@ export interface InstalledNpmPlugin {
22
22
  installRoot: string;
23
23
  /** Previous same-version directory held until the manifest commits. */
24
24
  backupRoot: string | null;
25
+ /** Folders THIS install created (`plugins/`, `plugins/npm/`, `plugins/npm/<name>/`), outermost first. */
26
+ createdDirs: string[];
25
27
  warnings: string[];
26
28
  }
29
+ /**
30
+ * Remove folders a failed install created — innermost first, and only while
31
+ * they are still empty, so a folder that gained anything else (a local plugin
32
+ * in `plugins/`, another package's copy) is never touched.
33
+ */
34
+ export declare function removeEmptyDirs(dirs: readonly string[]): Promise<void>;
27
35
  /**
28
36
  * Download and publish a fresh vendor tree for one npm plugin. Never reuses
29
37
  * bytes: a same-version reinstall downloads again and replaces the tree (the
@@ -0,0 +1,10 @@
1
+ /** Entries every book ignores, in the order they are appended. */
2
+ export declare const PROJECT_GITIGNORE_ENTRIES: readonly ["dist/", "plugins/npm/"];
3
+ /**
4
+ * Make sure `<projectDir>/.gitignore` ignores `dist/` and `plugins/npm/`,
5
+ * creating the file or appending what is missing. Returns the entries the
6
+ * author's own rules re-include (left alone) so a caller can warn.
7
+ */
8
+ export declare function ensureProjectGitignore(projectDir: string): Promise<{
9
+ negated: string[];
10
+ }>;
@@ -143,31 +143,11 @@ export interface AdoptFolderOptions {
143
143
  * Adopt an EXISTING folder as a gutterpress project, in place (no new subfolder).
144
144
  * Writes a `manifest.yaml` (using the folder's existing top-level `.md` files as
145
145
  * `source.files`, or scaffolding a `chapter-01.md` when there are none), copies
146
- * a starter `styles/book.css`, ensures `dist/` is gitignored (see
147
- * `ensureGitignoreHasDist`), and optionally initialises local version history.
146
+ * a starter `styles/book.css`, ensures `dist/` and `plugins/npm/` are gitignored
147
+ * (see `ensureProjectGitignore`), and optionally initialises local version history.
148
148
  *
149
149
  * NON-DESTRUCTIVE (global never-overwrite rule): refuses if the folder is
150
150
  * already a project, and never overwrites an existing `manifest.yaml`,
151
151
  * `styles/book.css`, `.gitignore`, or any markdown file.
152
152
  */
153
153
  export declare function adoptFolder(options: AdoptFolderOptions): Promise<CreateProjectResult>;
154
- /**
155
- * Ensure `<projectDir>/.gitignore` excludes the build output directory
156
- * (`dist/` — lib/output-paths.ts's `DIST_DIRNAME`).
157
- *
158
- * Confirmed bug this closes: no scaffolded project ever got a `.gitignore`,
159
- * and gutterpress's auto-snapshot feature is ON BY DEFAULT and auto-pushes.
160
- * Every `gutterpress build` writes a fresh, incompressible PDF (plus any copied
161
- * assets) into `dist/<title-slug>/`; without an ignore rule, the very next
162
- * snapshot commits and pushes it. That grows `.git` by a full PDF on every
163
- * build and, once a single artifact crosses GitHub's 100MB per-file limit,
164
- * the push is rejected outright — for a non-technical author with no way to
165
- * `git filter-repo` their way out.
166
- *
167
- * NEVER overwrites an existing `.gitignore` (global never-delete-user-data
168
- * rule): if the file already excludes `dist/` in some common spelling
169
- * (`dist`, `dist/`, `/dist/`, …) it is left untouched; otherwise the line is
170
- * APPENDED, not prepended or reformatted, so any content the author already
171
- * has stays exactly as they wrote it.
172
- */
173
- export declare function ensureGitignoreHasDist(projectDir: string): Promise<void>;
@@ -20,8 +20,9 @@ export interface ValidationExecutionArgs {
20
20
  * `runQualityGates`, via `loadBuildPlugins`) so this run does not load
21
21
  * plugins itself when the build already has. `undefined` (the default —
22
22
  * every standalone `validate`/`preflight` invocation, and the desktop
23
- * Problems panel) makes {@link executeValidation} load plugins itself,
24
- * degrade-and-report. An explicit `[]` is honored as-is, not treated as
23
+ * Problems panel) makes {@link executeValidation} restore the book's
24
+ * missing pinned extensions (failing the run if it cannot) and then load
25
+ * plugins itself, degrade-and-report. An explicit `[]` is honored as-is, not treated as
25
26
  * "unset".
26
27
  */
27
28
  pluginStylePaths?: string[];
@@ -7,16 +7,16 @@ import {
7
7
  TARGET_IDS,
8
8
  scaffoldExtension,
9
9
  scaffoldProject
10
- } from "./cli-281af80x.js";
10
+ } from "./cli-ac7zs8sp.js";
11
11
  import {
12
12
  resolveGhostscript
13
- } from "./cli-0rnwy2sm.js";
13
+ } from "./cli-n9e1mzb7.js";
14
14
  import {
15
15
  UsageError,
16
16
  rejectExtraPositionals,
17
17
  rejectUnknownFlags
18
- } from "./cli-20d4bh4m.js";
19
- import"./cli-8597az31.js";
18
+ } from "./cli-nzzsyw1e.js";
19
+ import"./cli-wqy8hnnh.js";
20
20
  import {
21
21
  EXIT_CODES
22
22
  } from "./cli-46ycxe6r.js";
@@ -2,17 +2,18 @@ import {
2
2
  executeValidation,
3
3
  publishTargetFor,
4
4
  reportMissingTools
5
- } from "./cli-281af80x.js";
5
+ } from "./cli-ac7zs8sp.js";
6
6
  import {
7
7
  log
8
- } from "./cli-0rnwy2sm.js";
8
+ } from "./cli-n9e1mzb7.js";
9
9
  import {
10
10
  UsageError,
11
11
  rejectExtraPositionals,
12
12
  rejectUnknownFlags
13
- } from "./cli-20d4bh4m.js";
14
- import"./cli-8597az31.js";
13
+ } from "./cli-nzzsyw1e.js";
14
+ import"./cli-wqy8hnnh.js";
15
15
  import {
16
+ BuildError,
16
17
  EXIT_CODES
17
18
  } from "./cli-46ycxe6r.js";
18
19
  import"./cli-kkzka31p.js";
@@ -190,7 +191,7 @@ var preflight_default = defineCommand({
190
191
  });
191
192
  } catch (error) {
192
193
  log.error(error instanceof Error ? error.message : String(error));
193
- process.exit(error instanceof UsageError ? error.exitCode : EXIT_CODES.USAGE);
194
+ process.exit(error instanceof UsageError || error instanceof BuildError ? error.exitCode : EXIT_CODES.USAGE);
194
195
  }
195
196
  if (!execution)
196
197
  return;
@@ -3,13 +3,14 @@ import {
3
3
  } from "./cli-75qkn0k5.js";
4
4
  import {
5
5
  openPath,
6
+ restoreForCommand,
6
7
  runBuild,
7
8
  splitOutPath,
8
9
  startPreviewServer
9
- } from "./cli-281af80x.js";
10
+ } from "./cli-ac7zs8sp.js";
10
11
  import {
11
12
  log
12
- } from "./cli-0rnwy2sm.js";
13
+ } from "./cli-n9e1mzb7.js";
13
14
  import {
14
15
  UsageError,
15
16
  parseFormat,
@@ -17,8 +18,8 @@ import {
17
18
  rejectExtraPositionals,
18
19
  rejectUnknownFlags,
19
20
  resolvePort
20
- } from "./cli-20d4bh4m.js";
21
- import"./cli-8597az31.js";
21
+ } from "./cli-nzzsyw1e.js";
22
+ import"./cli-wqy8hnnh.js";
22
23
  import {
23
24
  BuildError
24
25
  } from "./cli-46ycxe6r.js";
@@ -52,6 +53,7 @@ var preview_default = defineCommand({
52
53
  if (typeof args.manifest === "string") {
53
54
  throw new UsageError("--manifest is only supported by preview --format pdf or pdfx; live HTML preview discovers the book manifest from its input directory.");
54
55
  }
56
+ await restoreForCommand(inputPath ?? process.cwd(), { failFast: false });
55
57
  await startPreviewServer({
56
58
  input: inputPath,
57
59
  port: resolvePort(args.port),
@@ -68,6 +70,7 @@ var preview_default = defineCommand({
68
70
  }
69
71
  const pdfxFlavor = parsePdfxFlavor(args["pdfx-flavor"], format);
70
72
  const { outDir, pdfFileOverride } = splitOutPath(typeof args.out === "string" ? args.out : undefined, format);
73
+ const manifestPath = typeof args.manifest === "string" ? args.manifest : undefined;
71
74
  const result = await runBuild({
72
75
  inputDir: inputPath,
73
76
  format,
@@ -75,7 +78,7 @@ var preview_default = defineCommand({
75
78
  pdfFileOverride,
76
79
  pdfxFlavor,
77
80
  iccPath: typeof args.icc === "string" ? args.icc : undefined,
78
- manifestPath: typeof args.manifest === "string" ? args.manifest : undefined,
81
+ manifestPath,
79
82
  stripAnnotations: typeof args["strip-annotations"] === "boolean" ? args["strip-annotations"] : undefined,
80
83
  skipLint: !!args["skip-lint"],
81
84
  skipPreValidate: !!args["skip-pre-validate"],
@@ -1027,12 +1027,16 @@
1027
1027
  });
1028
1028
  if (!silent) return api.notifyPageChange();
1029
1029
  },
1030
- setZoom: function (z, silent) {
1030
+ setZoom: function (z, silent, fit) {
1031
1031
  preserveViewport(function () {
1032
1032
  // Embedded previews have one zoom owner. Clear the standalone
1033
1033
  // viewer's narrow-screen fit before applying the host scale.
1034
1034
  document.body.style.removeProperty('--gutterpress-fit-zoom');
1035
1035
  document.documentElement.style.setProperty('--gutterpress-zoom', z);
1036
+ // A host "fit to width" scale means nothing should scroll sideways.
1037
+ // Device-pixel rounding (fractional OS scaling) or art reaching past
1038
+ // the sheet can still overflow by a hair; clip it in fit mode only.
1039
+ document.documentElement.style.overflowX = fit ? 'hidden' : '';
1036
1040
  });
1037
1041
  if (!silent) api.notifyPageChange();
1038
1042
  },
@@ -108,7 +108,8 @@
108
108
  if (sourceBody.classList.contains('debug')) api.toggleDebugMode();
109
109
  }
110
110
  var zoom = source.documentElement.style.getPropertyValue('--gutterpress-zoom');
111
- if (api && zoom) api.setZoom(zoom, true);
111
+ // Carry the fit flag too (setZoom's third argument clips sideways overflow).
112
+ if (api && zoom) api.setZoom(zoom, true, source.documentElement.style.overflowX === 'hidden');
112
113
  }
113
114
 
114
115
  function onReady(frame, callback, onTimeout, timeoutMs) {
@@ -11,17 +11,17 @@ import {
11
11
  publishProviderFor,
12
12
  resolvePublishFormat,
13
13
  runPublish
14
- } from "./cli-281af80x.js";
14
+ } from "./cli-ac7zs8sp.js";
15
15
  import {
16
16
  FileTokenStore,
17
17
  log
18
- } from "./cli-0rnwy2sm.js";
18
+ } from "./cli-n9e1mzb7.js";
19
19
  import {
20
20
  UsageError,
21
21
  rejectExtraPositionals,
22
22
  rejectUnknownFlags
23
- } from "./cli-20d4bh4m.js";
24
- import"./cli-8597az31.js";
23
+ } from "./cli-nzzsyw1e.js";
24
+ import"./cli-wqy8hnnh.js";
25
25
  import {
26
26
  EXIT_CODES
27
27
  } from "./cli-46ycxe6r.js";
@@ -55,7 +55,8 @@ function stdinLooksPiped() {
55
55
  }
56
56
  function emitResult(result, json) {
57
57
  if (json) {
58
- console.log(JSON.stringify(result, null, 2));
58
+ process.stdout.write(JSON.stringify(result, null, 2) + `
59
+ `);
59
60
  return;
60
61
  }
61
62
  for (const issue of result.issues) {
@@ -173,7 +174,8 @@ var publish_default = defineCommand({
173
174
  };
174
175
  }));
175
176
  if (json) {
176
- console.log(JSON.stringify(rows, null, 2));
177
+ process.stdout.write(JSON.stringify(rows, null, 2) + `
178
+ `);
177
179
  } else {
178
180
  for (const r of rows) {
179
181
  const status = r.kind === "guided" ? "no key needed" : r.connected ? "connected" : "not connected";
package/dist/render.js CHANGED
@@ -531,6 +531,9 @@ function scanForUnknownDeclaredMarkers(state, declaredMarkers) {
531
531
  }
532
532
  }
533
533
  }
534
+ function variantClassFor(decl, word) {
535
+ return word && decl.variants && Object.hasOwn(decl.variants, word) ? decl.variants[word] : "";
536
+ }
534
537
  function warnUnknownVariant(env, meta, decl) {
535
538
  const word = meta.name;
536
539
  if (!word)
@@ -659,7 +662,7 @@ function plugin(md, pluginOptions = {}) {
659
662
  attrs: meta.attrs || {},
660
663
  labelled: false
661
664
  };
662
- const variantClass = variant && decl.variants && decl.variants[variant] || "";
665
+ const variantClass = variantClassFor(decl, variant);
663
666
  const baseClass = [decl.classBase, variantClass].filter(Boolean).join(" ");
664
667
  addClasses(t, baseClass, meta.attrs && meta.attrs.class ? meta.attrs.class : "");
665
668
  attachDataAttrs(t, decl.baseKind, variant, meta.attrs || {});
@@ -770,7 +773,7 @@ function plugin(md, pluginOptions = {}) {
770
773
  const attrs = meta.attrs || {};
771
774
  const variant = meta.name || decl.presetVariant || null;
772
775
  warnUnknownVariant(state.env, meta, decl);
773
- const variantClass = variant && decl.variants && decl.variants[variant] || "";
776
+ const variantClass = variantClassFor(decl, variant);
774
777
  const cls = [decl.classBase, variantClass, attrs.class].filter(Boolean).join(" ");
775
778
  return {
776
779
  kind: "section",
@@ -1,16 +1,17 @@
1
1
  import {
2
2
  executeAndReport
3
- } from "./cli-281af80x.js";
3
+ } from "./cli-ac7zs8sp.js";
4
4
  import {
5
5
  log
6
- } from "./cli-0rnwy2sm.js";
6
+ } from "./cli-n9e1mzb7.js";
7
7
  import {
8
8
  UsageError,
9
9
  rejectExtraPositionals,
10
10
  rejectUnknownFlags
11
- } from "./cli-20d4bh4m.js";
12
- import"./cli-8597az31.js";
11
+ } from "./cli-nzzsyw1e.js";
12
+ import"./cli-wqy8hnnh.js";
13
13
  import {
14
+ BuildError,
14
15
  EXIT_CODES
15
16
  } from "./cli-46ycxe6r.js";
16
17
  import"./cli-kkzka31p.js";
@@ -96,7 +97,7 @@ var validate_default = defineCommand({
96
97
  }, format);
97
98
  } catch (error) {
98
99
  log.error(error instanceof Error ? error.message : String(error));
99
- process.exit(error instanceof UsageError ? error.exitCode : EXIT_CODES.USAGE);
100
+ process.exit(error instanceof UsageError || error instanceof BuildError ? error.exitCode : EXIT_CODES.USAGE);
100
101
  }
101
102
  if (!result.ok) {
102
103
  process.exit(EXIT_CODES.FINDINGS);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gutterpress",
3
- "version": "0.11.16-alpha.4",
3
+ "version": "0.11.16-alpha.6",
4
4
  "description": "Markdown-to-PDF converter for professional print layout using a native Chromium print engine and Ghostscript.",
5
5
  "author": "itlackey",
6
6
  "license": "MPL-2.0",
@@ -66,6 +66,7 @@
66
66
  "fflate": "0.8.3",
67
67
  "glob": "^13.0.0",
68
68
  "htmlhint": "^1.9.2",
69
+ "ignore": "^5.3.2",
69
70
  "isomorphic-git": "^1.38.4",
70
71
  "markdown-it": "^14.3.2",
71
72
  "markdown-it-abbr": "^2.0.0",