gutterpress 0.11.1 → 0.11.3

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/api/index.js CHANGED
@@ -124,7 +124,7 @@ import {
124
124
  syncProject,
125
125
  testRemoteAccess,
126
126
  validateProjectExtensions
127
- } from "../index-qmvmvetj.js";
127
+ } from "../index-x6qvmp60.js";
128
128
  import {
129
129
  BuildError,
130
130
  DEFAULT_PRINT_OPTS,
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  executeAndReport
3
- } from "./cli-cwv73tkx.js";
3
+ } from "./cli-ff1kqhyv.js";
4
4
  import {
5
5
  log
6
- } from "./cli-y4vrycpn.js";
6
+ } from "./cli-ypha0473.js";
7
7
  import {
8
8
  UsageError,
9
9
  rejectExtraPositionals,
10
10
  rejectUnknownFlags
11
- } from "./cli-6gg8vwaj.js";
11
+ } from "./cli-hby7qc6t.js";
12
12
  import"./cli-sekhwex4.js";
13
13
  import"./cli-c41yr7he.js";
14
14
  import {
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  runBuild,
3
3
  splitOutPath
4
- } from "./cli-cwv73tkx.js";
4
+ } from "./cli-ff1kqhyv.js";
5
5
  import {
6
6
  log
7
- } from "./cli-y4vrycpn.js";
7
+ } from "./cli-ypha0473.js";
8
8
  import {
9
9
  UsageError,
10
10
  parseFormat,
11
11
  parsePdfxFlavor,
12
12
  rejectExtraPositionals,
13
13
  rejectUnknownFlags
14
- } from "./cli-6gg8vwaj.js";
14
+ } from "./cli-hby7qc6t.js";
15
15
  import"./cli-sekhwex4.js";
16
16
  import"./cli-c41yr7he.js";
17
17
  import {
@@ -13,12 +13,12 @@ import {
13
13
  stampCreator,
14
14
  stripAnnotations,
15
15
  warn
16
- } from "./cli-y4vrycpn.js";
16
+ } from "./cli-ypha0473.js";
17
17
  import {
18
18
  DEBOUNCE,
19
19
  UsageError,
20
20
  resolvePort
21
- } from "./cli-6gg8vwaj.js";
21
+ } from "./cli-hby7qc6t.js";
22
22
  import {
23
23
  MARGIN_BOX_IGNORED_PROPERTIES,
24
24
  RENDER_TIMEOUT_MS,
@@ -9079,6 +9079,21 @@ async function externalWatchRoots(targets) {
9079
9079
  }
9080
9080
  return [...roots];
9081
9081
  }
9082
+ async function extensionFolderFiles(dir) {
9083
+ try {
9084
+ if (!(await fsp3.stat(dir)).isDirectory())
9085
+ return [];
9086
+ } catch {
9087
+ return [];
9088
+ }
9089
+ const meta = await readExtensionMeta(dir);
9090
+ const entry = extensionEntry(meta);
9091
+ return [
9092
+ path10.join(dir, EXTENSION_MANIFEST_FILENAME),
9093
+ ...entry ? [path10.resolve(dir, entry)] : [],
9094
+ ...await collectStyleDependencies(dir, extensionStyleList(meta))
9095
+ ];
9096
+ }
9082
9097
  async function externalWatchTargets(projectDir, config) {
9083
9098
  const root = path10.resolve(projectDir);
9084
9099
  let canonicalRoot = root;
@@ -9086,9 +9101,11 @@ async function externalWatchTargets(projectDir, config) {
9086
9101
  canonicalRoot = await fsp3.realpath(root);
9087
9102
  } catch {}
9088
9103
  const styles = await resolveActiveStyles(root, config.styles);
9104
+ const extensionPaths = (config.extensions ?? []).map((p) => p.path).filter((p) => !!p).map((p) => path10.resolve(root, p));
9089
9105
  const candidates = [
9090
9106
  ...await collectStyleDependencies(root, styles),
9091
- ...(config.extensions ?? []).map((p) => p.path).filter((p) => !!p).map((p) => path10.resolve(root, p))
9107
+ ...extensionPaths,
9108
+ ...(await Promise.all(extensionPaths.map(extensionFolderFiles))).flat()
9092
9109
  ];
9093
9110
  const external = new Set;
9094
9111
  for (const abs of candidates) {
@@ -4,7 +4,7 @@ import {
4
4
  // package.json
5
5
  var package_default = {
6
6
  name: "gutterpress",
7
- version: "0.11.1",
7
+ version: "0.11.3",
8
8
  description: "Markdown-to-PDF converter for professional print layout using a native Chromium print engine and Ghostscript.",
9
9
  author: "itlackey",
10
10
  license: "MPL-2.0",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "./cli-6gg8vwaj.js";
3
+ } from "./cli-hby7qc6t.js";
4
4
  import {
5
5
  execCapture,
6
6
  findTool,
package/dist/cli.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  UsageError,
7
7
  package_default,
8
8
  rejectUnknownFlags
9
- } from "./cli-6gg8vwaj.js";
9
+ } from "./cli-hby7qc6t.js";
10
10
  import {
11
11
  EXIT_CODES
12
12
  } from "./cli-46ycxe6r.js";
@@ -18,16 +18,16 @@ import {
18
18
  import { defineCommand, parseArgs, runMain } from "citty";
19
19
  import { statSync } from "node:fs";
20
20
  var SUBCOMMANDS = {
21
- new: () => import("./new-sja9wn5c.js").then((m) => m.default),
22
- preview: () => import("./preview-vjwpj4tf.js").then((m) => m.default),
23
- build: () => import("./build-ea05bvs0.js").then((m) => m.default),
24
- publish: () => import("./publish-spej40gd.js").then((m) => m.default),
25
- lint: () => import("./lint-cwb6h2n5.js").then((m) => m.default),
26
- validate: () => import("./validate-3ppsdngq.js").then((m) => m.default),
27
- audit: () => import("./audit-9vv4ncjv.js").then((m) => m.default),
28
- preflight: () => import("./preflight-maw8h45k.js").then((m) => m.default),
29
- doctor: () => import("./doctor-k529b5et.js").then((m) => m.default),
30
- ext: () => import("./ext-hbt1sdg5.js").then((m) => m.default)
21
+ new: () => import("./new-eec5qjn3.js").then((m) => m.default),
22
+ preview: () => import("./preview-xc1s2rqk.js").then((m) => m.default),
23
+ build: () => import("./build-10mm2y0f.js").then((m) => m.default),
24
+ publish: () => import("./publish-hzc8rqrb.js").then((m) => m.default),
25
+ lint: () => import("./lint-a56dykwv.js").then((m) => m.default),
26
+ validate: () => import("./validate-6y7rwsn5.js").then((m) => m.default),
27
+ audit: () => import("./audit-80kd4rsz.js").then((m) => m.default),
28
+ preflight: () => import("./preflight-jyqz8bzg.js").then((m) => m.default),
29
+ doctor: () => import("./doctor-mv6tm97r.js").then((m) => m.default),
30
+ ext: () => import("./ext-nvtgb652.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-sja9wn5c.js");
55
+ const { newArgs } = await import("./new-eec5qjn3.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-maw8h45k.js");
67
+ const { preflightArgs } = await import("./preflight-jyqz8bzg.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-hbt1sdg5.js");
87
+ const { EXT_SUBCOMMANDS, extAddArgs, extRemoveArgs, extEnableArgs, extDisableArgs } = await import("./ext-nvtgb652.js");
88
88
  if (!EXT_SUBCOMMANDS.includes(subcommand)) {
89
89
  throw new UsageError(`gutterpress ext: unknown command "${subcommand}"`);
90
90
  }
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  getSystemDiagnostics,
3
3
  log
4
- } from "./cli-y4vrycpn.js";
4
+ } from "./cli-ypha0473.js";
5
5
  import {
6
6
  UsageError,
7
7
  rejectExtraPositionals,
8
8
  rejectUnknownFlags
9
- } from "./cli-6gg8vwaj.js";
9
+ } from "./cli-hby7qc6t.js";
10
10
  import"./cli-c41yr7he.js";
11
11
  import"./cli-46ycxe6r.js";
12
12
  import"./cli-37x76zdn.js";
@@ -10,15 +10,15 @@ import {
10
10
  removeExtension,
11
11
  searchNpmExtensions,
12
12
  setExtensionEnabled
13
- } from "./cli-cwv73tkx.js";
14
- import"./cli-y4vrycpn.js";
13
+ } from "./cli-ff1kqhyv.js";
14
+ import"./cli-ypha0473.js";
15
15
  import {
16
16
  UsageError,
17
17
  exitForUsage,
18
18
  rejectExtraPositionals,
19
19
  rejectUnknownFlags,
20
20
  resolveProjectDir
21
- } from "./cli-6gg8vwaj.js";
21
+ } from "./cli-hby7qc6t.js";
22
22
  import"./cli-sekhwex4.js";
23
23
  import"./cli-c41yr7he.js";
24
24
  import {
@@ -4874,7 +4874,7 @@ import git from "isomorphic-git";
4874
4874
  // package.json
4875
4875
  var package_default = {
4876
4876
  name: "gutterpress",
4877
- version: "0.11.1",
4877
+ version: "0.11.3",
4878
4878
  description: "Markdown-to-PDF converter for professional print layout using a native Chromium print engine and Ghostscript.",
4879
4879
  author: "itlackey",
4880
4880
  license: "MPL-2.0",
@@ -9539,6 +9539,21 @@ async function externalWatchRoots(targets) {
9539
9539
  }
9540
9540
  return [...roots];
9541
9541
  }
9542
+ async function extensionFolderFiles(dir) {
9543
+ try {
9544
+ if (!(await fsp3.stat(dir)).isDirectory())
9545
+ return [];
9546
+ } catch {
9547
+ return [];
9548
+ }
9549
+ const meta = await readExtensionMeta(dir);
9550
+ const entry = extensionEntry(meta);
9551
+ return [
9552
+ path10.join(dir, EXTENSION_MANIFEST_FILENAME),
9553
+ ...entry ? [path10.resolve(dir, entry)] : [],
9554
+ ...await collectStyleDependencies(dir, extensionStyleList(meta))
9555
+ ];
9556
+ }
9542
9557
  async function externalWatchTargets(projectDir, config) {
9543
9558
  const root = path10.resolve(projectDir);
9544
9559
  let canonicalRoot = root;
@@ -9546,9 +9561,11 @@ async function externalWatchTargets(projectDir, config) {
9546
9561
  canonicalRoot = await fsp3.realpath(root);
9547
9562
  } catch {}
9548
9563
  const styles = await resolveActiveStyles(root, config.styles);
9564
+ const extensionPaths = (config.extensions ?? []).map((p) => p.path).filter((p) => !!p).map((p) => path10.resolve(root, p));
9549
9565
  const candidates = [
9550
9566
  ...await collectStyleDependencies(root, styles),
9551
- ...(config.extensions ?? []).map((p) => p.path).filter((p) => !!p).map((p) => path10.resolve(root, p))
9567
+ ...extensionPaths,
9568
+ ...(await Promise.all(extensionPaths.map(extensionFolderFiles))).flat()
9552
9569
  ];
9553
9570
  const external = new Set;
9554
9571
  for (const abs of candidates) {
@@ -14868,7 +14885,6 @@ async function convergeMerge(params) {
14868
14885
  });
14869
14886
  const ourTip = await git5.resolveRef({ fs: gitFs, dir, ref: branch });
14870
14887
  const combined = new Set;
14871
- const driverBinary = new Set;
14872
14888
  const keptBothFiles = [];
14873
14889
  let tipBeforeMerge = ourTip;
14874
14890
  const attempt = async () => {
@@ -14885,7 +14901,6 @@ async function convergeMerge(params) {
14885
14901
  mergeDriver: ({ contents, path: filepath }) => {
14886
14902
  const [base, ours, theirsContent] = contents;
14887
14903
  if (MARKER_UNSAFE_EXT.test(filepath) || stringLooksBinary(ours) || stringLooksBinary(theirsContent) || stringLooksBinary(base)) {
14888
- driverBinary.add(filepath);
14889
14904
  return { cleanMerge: false, mergedText: ours };
14890
14905
  }
14891
14906
  combined.add(filepath);
@@ -14933,7 +14948,7 @@ async function convergeMerge(params) {
14933
14948
  } catch (e) {
14934
14949
  if (isMergeConflictError(e)) {
14935
14950
  await equalize({
14936
- binary: (e.data.bothModified ?? []).filter((p) => driverBinary.has(p)),
14951
+ binary: e.data.bothModified ?? [],
14937
14952
  deleteByUs: e.data.deleteByUs ?? [],
14938
14953
  deleteByTheirs: e.data.deleteByTheirs ?? []
14939
14954
  });
@@ -15128,8 +15143,14 @@ async function syncProject(options) {
15128
15143
  ...onAuthFor(transport.credential)
15129
15144
  });
15130
15145
  } catch (e) {
15131
- if (!isPushRejected(e))
15146
+ if (!isPushRejected(e)) {
15147
+ const err = e;
15148
+ logger.warn("sync", "push failed", {
15149
+ code: err?.code ?? err?.name,
15150
+ error: String(err?.message ?? e).replace(/\s+/g, " ").trim().replace(/\/\/[^/\s]*@/g, "//")
15151
+ });
15132
15152
  throw e;
15153
+ }
15133
15154
  logger.info("sync", `push rejected (non-fast-forward) — retrying`);
15134
15155
  if (attempt < attempts - 1 && backoffMs > 0)
15135
15156
  await sleep(backoffMs);
package/dist/index.js CHANGED
@@ -143,7 +143,7 @@ import {
143
143
  syncProject,
144
144
  testRemoteAccess,
145
145
  validateProjectExtensions
146
- } from "./index-qmvmvetj.js";
146
+ } from "./index-x6qvmp60.js";
147
147
  import {
148
148
  BUILD_DIAGNOSTIC_CODES
149
149
  } from "./index-12pvhbyz.js";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  MANIFEST_FILENAMES,
3
3
  runLint
4
- } from "./cli-cwv73tkx.js";
4
+ } from "./cli-ff1kqhyv.js";
5
5
  import {
6
6
  log
7
- } from "./cli-y4vrycpn.js";
7
+ } from "./cli-ypha0473.js";
8
8
  import {
9
9
  UsageError,
10
10
  rejectExtraPositionals,
11
11
  rejectUnknownFlags
12
- } from "./cli-6gg8vwaj.js";
12
+ } from "./cli-hby7qc6t.js";
13
13
  import"./cli-sekhwex4.js";
14
14
  import"./cli-c41yr7he.js";
15
15
  import {
@@ -7,15 +7,15 @@ import {
7
7
  TARGET_IDS,
8
8
  scaffoldExtension,
9
9
  scaffoldProject
10
- } from "./cli-cwv73tkx.js";
10
+ } from "./cli-ff1kqhyv.js";
11
11
  import {
12
12
  resolveGhostscript
13
- } from "./cli-y4vrycpn.js";
13
+ } from "./cli-ypha0473.js";
14
14
  import {
15
15
  UsageError,
16
16
  rejectExtraPositionals,
17
17
  rejectUnknownFlags
18
- } from "./cli-6gg8vwaj.js";
18
+ } from "./cli-hby7qc6t.js";
19
19
  import"./cli-sekhwex4.js";
20
20
  import {
21
21
  isToolAvailable
@@ -2,15 +2,15 @@ import {
2
2
  executeValidation,
3
3
  publishTargetFor,
4
4
  reportMissingTools
5
- } from "./cli-cwv73tkx.js";
5
+ } from "./cli-ff1kqhyv.js";
6
6
  import {
7
7
  log
8
- } from "./cli-y4vrycpn.js";
8
+ } from "./cli-ypha0473.js";
9
9
  import {
10
10
  UsageError,
11
11
  rejectExtraPositionals,
12
12
  rejectUnknownFlags
13
- } from "./cli-6gg8vwaj.js";
13
+ } from "./cli-hby7qc6t.js";
14
14
  import"./cli-sekhwex4.js";
15
15
  import"./cli-c41yr7he.js";
16
16
  import {
@@ -149,6 +149,10 @@ export declare function externalWatchRoots(targets: Iterable<string>): Promise<s
149
149
  * because a local stylesheet can reference a shared font just as easily — only
150
150
  * the results that land outside the book are added here.
151
151
  *
152
+ * An extension `path:` that names a FOLDER expands to the files the loader
153
+ * reads from it ({@link extensionFolderFiles}); the folder path on its own
154
+ * matches no file inside it.
155
+ *
152
156
  * Watching is per-FILE, never per-directory, so the set stays exact and cannot
153
157
  * accidentally pull a large sibling tree into the watcher.
154
158
  */
@@ -6,10 +6,10 @@ import {
6
6
  runBuild,
7
7
  splitOutPath,
8
8
  startPreviewServer
9
- } from "./cli-cwv73tkx.js";
9
+ } from "./cli-ff1kqhyv.js";
10
10
  import {
11
11
  log
12
- } from "./cli-y4vrycpn.js";
12
+ } from "./cli-ypha0473.js";
13
13
  import {
14
14
  UsageError,
15
15
  parseFormat,
@@ -17,7 +17,7 @@ import {
17
17
  rejectExtraPositionals,
18
18
  rejectUnknownFlags,
19
19
  resolvePort
20
- } from "./cli-6gg8vwaj.js";
20
+ } from "./cli-hby7qc6t.js";
21
21
  import"./cli-sekhwex4.js";
22
22
  import"./cli-c41yr7he.js";
23
23
  import {
@@ -11,16 +11,16 @@ import {
11
11
  publishProviderFor,
12
12
  resolvePublishFormat,
13
13
  runPublish
14
- } from "./cli-cwv73tkx.js";
14
+ } from "./cli-ff1kqhyv.js";
15
15
  import {
16
16
  FileTokenStore,
17
17
  log
18
- } from "./cli-y4vrycpn.js";
18
+ } from "./cli-ypha0473.js";
19
19
  import {
20
20
  UsageError,
21
21
  rejectExtraPositionals,
22
22
  rejectUnknownFlags
23
- } from "./cli-6gg8vwaj.js";
23
+ } from "./cli-hby7qc6t.js";
24
24
  import"./cli-sekhwex4.js";
25
25
  import"./cli-c41yr7he.js";
26
26
  import {
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  executeAndReport
3
- } from "./cli-cwv73tkx.js";
3
+ } from "./cli-ff1kqhyv.js";
4
4
  import {
5
5
  log
6
- } from "./cli-y4vrycpn.js";
6
+ } from "./cli-ypha0473.js";
7
7
  import {
8
8
  UsageError,
9
9
  rejectExtraPositionals,
10
10
  rejectUnknownFlags
11
- } from "./cli-6gg8vwaj.js";
11
+ } from "./cli-hby7qc6t.js";
12
12
  import"./cli-sekhwex4.js";
13
13
  import"./cli-c41yr7he.js";
14
14
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gutterpress",
3
- "version": "0.11.1",
3
+ "version": "0.11.3",
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",