gutterpress 0.11.21 → 0.11.22-alpha.1

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 (51) hide show
  1. package/README.md +11 -0
  2. package/dist/api/index.d.ts +5 -1
  3. package/dist/api/index.js +67 -46
  4. package/dist/{build-0neyk5h6.js → build-se85j9ec.js} +16 -10
  5. package/dist/cli-5553w972.js +75 -0
  6. package/dist/{cli-b57adna7.js → cli-8hccw62p.js} +9 -201
  7. package/dist/cli-9vy4b6ec.js +2089 -0
  8. package/dist/{cli-sqkccnm7.js → cli-d8xjns66.js} +1 -102
  9. package/dist/{cli-j0drzb6f.js → cli-fbwqv7p4.js} +720 -5428
  10. package/dist/cli-gc9av5hs.js +103 -0
  11. package/dist/cli-gmm3bdeq.js +196 -0
  12. package/dist/cli-h3phdstf.js +200 -0
  13. package/dist/{index-qf7y4d85.js → cli-habkc5ng.js} +12 -258
  14. package/dist/cli-pfrg1r9x.js +3073 -0
  15. package/dist/{cli-j79451n6.js → cli-yejbb9f8.js} +5 -76
  16. package/dist/cli.js +15 -13
  17. package/dist/{doctor-fptq8tvn.js → doctor-bv2t82zd.js} +7 -4
  18. package/dist/{engine-x07q927h.js → engine-h4ehmrvf.js} +4 -3
  19. package/dist/{engine-0b8bt05n.js → engine-qwkyhrej.js} +3 -2
  20. package/dist/{ext-gp624t5c.js → ext-a8ndp142.js} +21 -14
  21. package/dist/extension-restore-926mv2qk.js +16 -0
  22. package/dist/extension-restore-q1f7njec.js +20 -0
  23. package/dist/index-38e18a7j.js +3244 -0
  24. package/dist/{index-mr72vt8n.js → index-5h9a38jn.js} +1 -213
  25. package/dist/{cli-5qr3z0qa.js → index-93pqkvty.js} +63 -207
  26. package/dist/index-dhknsvfz.js +213 -0
  27. package/dist/index-dm7hx46j.js +2208 -0
  28. package/dist/{index-t7r8g75c.js → index-gmfh6n05.js} +4 -2
  29. package/dist/index-r7jcsk6h.js +200 -0
  30. package/dist/{index-mr7zs8mv.js → index-tkjvs1gf.js} +4774 -9354
  31. package/dist/index.js +70 -49
  32. package/dist/lib/extension-manifest.d.ts +22 -1
  33. package/dist/lib/markdown/plugins.d.ts +20 -0
  34. package/dist/lib/markdown/two-versions.d.ts +32 -0
  35. package/dist/lib/publish/plugin-provider.d.ts +16 -0
  36. package/dist/lib/publish/run-publish.d.ts +13 -5
  37. package/dist/lib/publish/types.d.ts +34 -2
  38. package/dist/lib/text-diff.d.ts +43 -0
  39. package/dist/lib/two-versions-markers.d.ts +26 -0
  40. package/dist/lib/version-changes.d.ts +87 -0
  41. package/dist/{new-dre6aw05.js → new-nadp2hvb.js} +23 -16
  42. package/dist/plugins-gy4q9vaa.js +26 -0
  43. package/dist/plugins-yeh4shd7.js +24 -0
  44. package/dist/{preflight-1k1zkg1p.js → preflight-c6q25xqa.js} +18 -11
  45. package/dist/{preview-dtrksvxf.js → preview-y8chv4cb.js} +19 -13
  46. package/dist/{publish-g1ytnrmr.js → publish-3qwvxsxa.js} +40 -23
  47. package/dist/render.js +120 -0
  48. package/dist/{source-provider-pzmz0br9.js → source-provider-2r74a7wp.js} +2 -1
  49. package/dist/{source-provider-qbthnmqw.js → source-provider-qbfknhyy.js} +2 -1
  50. package/dist/{validate-yrrq8639.js → validate-w108kk87.js} +16 -10
  51. package/package.json +1 -1
@@ -1,6 +1,3 @@
1
- import {
2
- package_default
3
- } from "./cli-sqkccnm7.js";
4
1
  import {
5
2
  enhancedPath,
6
3
  execCapture,
@@ -11,72 +8,14 @@ import {
11
8
  run,
12
9
  spawnCapture
13
10
  } from "./cli-asap4t1z.js";
11
+ import {
12
+ PACKAGE_VERSION,
13
+ log
14
+ } from "./cli-5553w972.js";
14
15
  import {
15
16
  __require
16
17
  } from "./cli-37x76zdn.js";
17
18
 
18
- // src/utils/logger.ts
19
- var currentLevel = "INFO";
20
- var LEVELS = {
21
- DEBUG: 0,
22
- INFO: 1,
23
- WARN: 2,
24
- ERROR: 3
25
- };
26
- function setLogLevel(level) {
27
- currentLevel = level;
28
- }
29
- function emit(level, message, ...args) {
30
- if (LEVELS[level] < LEVELS[currentLevel])
31
- return;
32
- const colors = {
33
- DEBUG: "\x1B[36m",
34
- INFO: "\x1B[32m",
35
- WARN: "\x1B[33m",
36
- ERROR: "\x1B[31m"
37
- };
38
- const reset = "\x1B[0m";
39
- const timestamp = new Date().toISOString().slice(11, 19);
40
- const prefix = `${colors[level]}[${timestamp}] ${level}${reset}:`;
41
- if (level === "ERROR") {
42
- console.error(prefix, message, ...args);
43
- } else {
44
- console.log(prefix, message, ...args);
45
- }
46
- }
47
- function debug(message, ...args) {
48
- emit("DEBUG", message, ...args);
49
- }
50
- function info(message, ...args) {
51
- emit("INFO", message, ...args);
52
- }
53
- function warn(message, ...args) {
54
- emit("WARN", message, ...args);
55
- }
56
- function error(message, ...args) {
57
- emit("ERROR", message, ...args);
58
- }
59
- var RESET = "\x1B[0m";
60
- var BOLD = "\x1B[1m";
61
- var RED = "\x1B[31m";
62
- var YELLOW = "\x1B[33m";
63
- var GREEN = "\x1B[32m";
64
- var CYAN = "\x1B[36m";
65
- var log = {
66
- info(msg, ...args) {
67
- console.log(`${CYAN}info${RESET} ${msg}`, ...args);
68
- },
69
- warn(msg, ...args) {
70
- console.warn(`${YELLOW}warn${RESET} ${msg}`, ...args);
71
- },
72
- error(msg, ...args) {
73
- console.error(`${RED}${BOLD}error${RESET} ${msg}`, ...args);
74
- },
75
- success(msg, ...args) {
76
- console.log(`${GREEN}ok${RESET} ${msg}`, ...args);
77
- }
78
- };
79
-
80
19
  // src/lib/ghostscript.ts
81
20
  import { existsSync } from "node:fs";
82
21
  import { readFile, writeFile, unlink, rename, readdir } from "node:fs/promises";
@@ -575,16 +514,6 @@ function normalizeHost(host) {
575
514
 
576
515
  // src/lib/diagnostics.ts
577
516
  import { platform, arch, release } from "node:os";
578
-
579
- // src/lib/version.ts
580
- var PACKAGE_META = {
581
- version: package_default.version ?? "unknown",
582
- dependencies: package_default.dependencies ?? {},
583
- devDependencies: package_default.devDependencies ?? {}
584
- };
585
- var PACKAGE_VERSION = PACKAGE_META.version;
586
-
587
- // src/lib/diagnostics.ts
588
517
  var INSTALL_HINTS = {
589
518
  chromium: `${fullInstallHint("chromium")}
590
519
  Or set CHROMIUM_PATH=/path/to/chrome`,
@@ -685,4 +614,4 @@ async function getSystemDiagnostics() {
685
614
  };
686
615
  }
687
616
 
688
- export { setLogLevel, debug, info, warn, error, log, PACKAGE_META, PACKAGE_VERSION, resolveGhostscript, transparentPages, findPostScriptShadingPages, stripAnnotations, planTransparentPages, flattenTransparentPages, stampCreator, convertToPdfxCmyk, defaultConfigDir, FileTokenStore, getSystemDiagnostics };
617
+ export { resolveGhostscript, transparentPages, findPostScriptShadingPages, stripAnnotations, planTransparentPages, flattenTransparentPages, stampCreator, convertToPdfxCmyk, defaultConfigDir, FileTokenStore, getSystemDiagnostics };
package/dist/cli.js CHANGED
@@ -4,9 +4,11 @@ import {
4
4
  } from "./cli-75qkn0k5.js";
5
5
  import {
6
6
  UsageError,
7
- package_default,
8
7
  rejectUnknownFlags
9
- } from "./cli-sqkccnm7.js";
8
+ } from "./cli-d8xjns66.js";
9
+ import {
10
+ package_default
11
+ } from "./cli-gc9av5hs.js";
10
12
  import {
11
13
  EXIT_CODES
12
14
  } from "./cli-46ycxe6r.js";
@@ -18,14 +20,14 @@ import {
18
20
  import { defineCommand, parseArgs, runMain } from "citty";
19
21
  import { statSync } from "node:fs";
20
22
  var SUBCOMMANDS = {
21
- new: () => import("./new-dre6aw05.js").then((m) => m.default),
22
- preview: () => import("./preview-dtrksvxf.js").then((m) => m.default),
23
- build: () => import("./build-0neyk5h6.js").then((m) => m.default),
24
- publish: () => import("./publish-g1ytnrmr.js").then((m) => m.default),
25
- validate: () => import("./validate-yrrq8639.js").then((m) => m.default),
26
- preflight: () => import("./preflight-1k1zkg1p.js").then((m) => m.default),
27
- doctor: () => import("./doctor-fptq8tvn.js").then((m) => m.default),
28
- ext: () => import("./ext-gp624t5c.js").then((m) => m.default)
23
+ new: () => import("./new-nadp2hvb.js").then((m) => m.default),
24
+ preview: () => import("./preview-y8chv4cb.js").then((m) => m.default),
25
+ build: () => import("./build-se85j9ec.js").then((m) => m.default),
26
+ publish: () => import("./publish-3qwvxsxa.js").then((m) => m.default),
27
+ validate: () => import("./validate-w108kk87.js").then((m) => m.default),
28
+ preflight: () => import("./preflight-c6q25xqa.js").then((m) => m.default),
29
+ doctor: () => import("./doctor-bv2t82zd.js").then((m) => m.default),
30
+ ext: () => import("./ext-a8ndp142.js").then((m) => m.default)
29
31
  };
30
32
  var VERSION = package_default.version;
31
33
  var main = defineCommand({
@@ -50,7 +52,7 @@ async function preflightRequiredInvocations(rawArgs) {
50
52
  const [command, ...commandArgs] = rawArgs;
51
53
  try {
52
54
  if (command === "new") {
53
- const { newArgs } = await import("./new-dre6aw05.js");
55
+ const { newArgs } = await import("./new-nadp2hvb.js");
54
56
  rejectUnknownFlags(commandArgs, newArgs, "new");
55
57
  const parsed = parseArgs(commandArgs, {
56
58
  ...newArgs,
@@ -62,7 +64,7 @@ async function preflightRequiredInvocations(rawArgs) {
62
64
  return;
63
65
  }
64
66
  if (command === "preflight") {
65
- const { preflightArgs } = await import("./preflight-1k1zkg1p.js");
67
+ const { preflightArgs } = await import("./preflight-c6q25xqa.js");
66
68
  rejectUnknownFlags(commandArgs, preflightArgs, "preflight");
67
69
  const parsed = parseArgs(commandArgs, {
68
70
  ...preflightArgs,
@@ -82,7 +84,7 @@ async function preflightRequiredInvocations(rawArgs) {
82
84
  }
83
85
  if (subcommand.startsWith("-"))
84
86
  return;
85
- const { EXT_SUBCOMMANDS, extAddArgs, extRemoveArgs, extEnableArgs, extDisableArgs } = await import("./ext-gp624t5c.js");
87
+ const { EXT_SUBCOMMANDS, extAddArgs, extRemoveArgs, extEnableArgs, extDisableArgs } = await import("./ext-a8ndp142.js");
86
88
  if (!EXT_SUBCOMMANDS.includes(subcommand)) {
87
89
  throw new UsageError(`gutterpress ext: unknown command "${subcommand}"`);
88
90
  }
@@ -1,14 +1,17 @@
1
1
  import {
2
- getSystemDiagnostics,
2
+ getSystemDiagnostics
3
+ } from "./cli-yejbb9f8.js";
4
+ import"./cli-asap4t1z.js";
5
+ import {
3
6
  log
4
- } from "./cli-j79451n6.js";
7
+ } from "./cli-5553w972.js";
5
8
  import {
6
9
  UsageError,
7
10
  rejectExtraPositionals,
8
11
  rejectUnknownFlags
9
- } from "./cli-sqkccnm7.js";
12
+ } from "./cli-d8xjns66.js";
13
+ import"./cli-gc9av5hs.js";
10
14
  import"./cli-46ycxe6r.js";
11
- import"./cli-asap4t1z.js";
12
15
  import"./cli-37x76zdn.js";
13
16
 
14
17
  // src/commands/doctor.ts
@@ -1,11 +1,12 @@
1
1
  import {
2
2
  build
3
- } from "./cli-b57adna7.js";
3
+ } from "./cli-8hccw62p.js";
4
+ import"./cli-eyyggect.js";
5
+ import"./cli-asap4t1z.js";
6
+ import"./cli-gmm3bdeq.js";
4
7
  import {
5
8
  BuildError
6
9
  } from "./cli-46ycxe6r.js";
7
- import"./cli-eyyggect.js";
8
- import"./cli-asap4t1z.js";
9
10
  import"./cli-37x76zdn.js";
10
11
 
11
12
  // src/lib/engine.ts
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  build
3
- } from "./index-t7r8g75c.js";
3
+ } from "./index-gmfh6n05.js";
4
+ import"./index-5h9a38jn.js";
4
5
  import {
5
6
  BuildError
6
- } from "./index-mr72vt8n.js";
7
+ } from "./index-dhknsvfz.js";
7
8
  import"./index-bt0qws5c.js";
8
9
  import"./index-37x76zdn.js";
9
10
 
@@ -1,36 +1,43 @@
1
+ import {
2
+ importExtensionFromFile,
3
+ importExtensionFromUrl,
4
+ searchNpmExtensions
5
+ } from "./cli-fbwqv7p4.js";
6
+ import"./cli-yejbb9f8.js";
7
+ import"./cli-ht1bcqdd.js";
8
+ import"./cli-8hccw62p.js";
9
+ import"./cli-sth219v1.js";
10
+ import"./cli-eyyggect.js";
11
+ import"./cli-asap4t1z.js";
12
+ import"./cli-habkc5ng.js";
13
+ import"./cli-v5mp7a6q.js";
1
14
  import {
2
15
  BUILT_IN_STYLE_SET_IDS,
3
16
  addBuiltInStyleSet,
4
17
  addExtension,
5
18
  checkExtensionUpdates,
6
- importExtensionFromFile,
7
- importExtensionFromUrl,
8
19
  isPathSpecifier,
9
20
  listProjectExtensions,
10
21
  parseExtensionSpecifier,
11
22
  removeExtension,
12
- searchNpmExtensions,
13
23
  setExtensionEnabled,
14
24
  updateExtensions
15
- } from "./cli-j0drzb6f.js";
16
- import"./cli-j79451n6.js";
25
+ } from "./cli-9vy4b6ec.js";
26
+ import"./cli-pfrg1r9x.js";
27
+ import"./cli-5553w972.js";
17
28
  import {
18
29
  UsageError,
19
30
  exitForUsage,
20
31
  rejectExtraPositionals,
21
32
  rejectUnknownFlags,
22
33
  resolveProjectDir
23
- } from "./cli-sqkccnm7.js";
24
- import"./cli-ht1bcqdd.js";
25
- import"./cli-b57adna7.js";
34
+ } from "./cli-d8xjns66.js";
35
+ import"./cli-gc9av5hs.js";
36
+ import"./cli-gmm3bdeq.js";
26
37
  import {
27
38
  EXIT_CODES
28
39
  } from "./cli-46ycxe6r.js";
29
- import"./cli-sth219v1.js";
30
- import"./cli-eyyggect.js";
31
- import"./cli-asap4t1z.js";
32
- import"./cli-5qr3z0qa.js";
33
- import"./cli-v5mp7a6q.js";
40
+ import"./cli-h3phdstf.js";
34
41
  import"./cli-37x76zdn.js";
35
42
 
36
43
  // src/commands/ext.ts
@@ -116,7 +123,7 @@ async function requireProjectDir(dir, verb) {
116
123
  return projectDir;
117
124
  }
118
125
  function carriesLabel(entry) {
119
- const parts = ["markdown", "styles", "snippets", "components"].filter((k) => entry.carries[k]);
126
+ const parts = ["markdown", "styles", "snippets", "components", "publish"].filter((k) => entry.carries[k]);
120
127
  return parts.length > 0 ? parts.join(", ") : "nothing declared";
121
128
  }
122
129
  function describeLine(entry) {
@@ -0,0 +1,16 @@
1
+ import {
2
+ restoreFailureMessage,
3
+ restoreForCommand,
4
+ restoreOfflineMessage,
5
+ restorePinnedExtensions
6
+ } from "./index-dm7hx46j.js";
7
+ import"./index-38e18a7j.js";
8
+ import"./index-dhknsvfz.js";
9
+ import"./index-r7jcsk6h.js";
10
+ import"./index-37x76zdn.js";
11
+ export {
12
+ restorePinnedExtensions,
13
+ restoreOfflineMessage,
14
+ restoreForCommand,
15
+ restoreFailureMessage
16
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ restoreFailureMessage,
3
+ restoreForCommand,
4
+ restoreOfflineMessage,
5
+ restorePinnedExtensions
6
+ } from "./cli-9vy4b6ec.js";
7
+ import"./cli-pfrg1r9x.js";
8
+ import"./cli-5553w972.js";
9
+ import"./cli-d8xjns66.js";
10
+ import"./cli-gc9av5hs.js";
11
+ import"./cli-gmm3bdeq.js";
12
+ import"./cli-46ycxe6r.js";
13
+ import"./cli-h3phdstf.js";
14
+ import"./cli-37x76zdn.js";
15
+ export {
16
+ restorePinnedExtensions,
17
+ restoreOfflineMessage,
18
+ restoreForCommand,
19
+ restoreFailureMessage
20
+ };