gutterpress 0.9.0-alpha.2 → 0.10.0-alpha.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/README.md +18 -4
- package/dist/api/index.d.ts +11 -5
- package/dist/api/index.js +20 -15
- package/dist/assets/preview/scripts/preview-bridge.d.ts +1 -0
- package/dist/assets/preview/scripts/preview-interface.d.ts +1 -0
- package/dist/{audit-nhn2pjz3.js → audit-xxegv0t0.js} +10 -7
- package/dist/{build-san7fv2z.js → build-w0vb6mgq.js} +14 -8
- package/dist/checks/source/index.d.ts +1 -0
- package/dist/checks/source/layout-markers.d.ts +3 -0
- package/dist/checks/source/local-ref-parser.d.ts +28 -0
- package/dist/cli-46ycxe6r.js +18 -0
- package/dist/{cli-k4bd06sd.js → cli-5czby0dd.js} +4986 -5889
- package/dist/cli-c41yr7he.js +241 -0
- package/dist/{cli-e5zhb0xs.js → cli-f4rcbt2t.js} +17 -24
- package/dist/{cli-najycadg.js → cli-gk3wsdpb.js} +69 -253
- package/dist/{index-yzrh708h.js → cli-k1065rkg.js} +2 -5
- package/dist/{cli-506tg37g.js → cli-revgt4pr.js} +2 -1
- package/dist/{cli-wchtvxvw.js → cli-v5mp7a6q.js} +14 -1
- package/dist/cli-yp3p0sf2.js +2343 -0
- package/dist/cli.js +20 -18
- package/dist/{doctor-hrk0kxxz.js → doctor-ctgn1dnt.js} +4 -2
- package/dist/engine/compiler/build.d.ts +139 -0
- package/dist/engine/compiler/postprocess.d.ts +23 -0
- package/dist/engine/compiler/tier2.d.ts +78 -0
- package/dist/engine/shared/cdp.d.ts +104 -0
- package/dist/engine/shared/content-value.d.ts +64 -0
- package/dist/engine/shared/gcpm-extract.d.ts +119 -0
- package/dist/engine/shared/margin-box-support.d.ts +12 -0
- package/dist/engine/shared/pdf-inspect.d.ts +24 -0
- package/dist/engine/shared/synthesis.d.ts +155 -0
- package/dist/engine-eng4xh2q.js +41 -0
- package/dist/engine-q5skhgms.js +40 -0
- package/dist/gutterpress-agent-1ctgfz92.js +576 -0
- package/dist/gutterpress-viewer-cem7dmr5.js +2349 -0
- package/dist/index-a4kr77td.js +1907 -0
- package/dist/{cli-yzrh708h.js → index-mdefp0y5.js} +1 -1
- package/dist/index-mvehxh0e.js +708 -0
- package/dist/{index-bynn850m.js → index-s416qpdv.js} +3049 -4015
- package/dist/{index-wchtvxvw.js → index-v5mp7a6q.js} +14 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +24 -17
- package/dist/lib/asset-inline.d.ts +36 -0
- package/dist/lib/browser-pool.d.ts +18 -0
- package/dist/lib/build-error.d.ts +1 -1
- package/dist/lib/build-preflight.d.ts +35 -2
- package/dist/lib/build-runner.d.ts +45 -17
- package/dist/lib/build-staging.d.ts +9 -55
- package/dist/lib/cli-args.d.ts +8 -0
- package/dist/lib/desktop.d.ts +2 -2
- package/dist/lib/embedded-assets.d.ts +1 -1
- package/dist/lib/engine.d.ts +33 -0
- package/dist/lib/ghostscript.d.ts +46 -1
- package/dist/lib/markdown/assemble.d.ts +18 -10
- package/dist/lib/markdown/gp-pin-scope.d.ts +1 -0
- package/dist/lib/markdown/gutterpress-css.d.ts +125 -0
- package/dist/lib/markdown/images.d.ts +26 -0
- package/dist/lib/markdown/index.d.ts +4 -2
- package/dist/lib/markdown/inline-source.d.ts +10 -0
- package/dist/lib/markdown/markers.d.ts +32 -0
- package/dist/lib/markdown/renderer.d.ts +8 -3
- package/dist/lib/markdown/source-range.d.ts +61 -0
- package/dist/lib/missing-asset-placeholder.d.ts +52 -0
- package/dist/lib/presets.d.ts +1 -1
- package/dist/lib/printsafe.d.ts +2 -3
- package/dist/lib/remote-auth/converge-merge.d.ts +48 -0
- package/dist/lib/remote-auth/image-clash.d.ts +17 -0
- package/dist/lib/remote-auth/recovery/classify.d.ts +55 -67
- package/dist/lib/remote-auth/recovery/inspect.d.ts +14 -13
- package/dist/lib/remote-auth/recovery/locks.d.ts +20 -0
- package/dist/lib/remote-auth/recovery/repair.d.ts +29 -0
- package/dist/lib/remote-auth/recovery/types.d.ts +8 -204
- package/dist/lib/remote-auth/sync-messages.d.ts +2 -3
- package/dist/lib/remote-auth/sync-types.d.ts +35 -63
- package/dist/lib/remote-auth/sync.d.ts +11 -18
- package/dist/lib/remote-auth/transport.d.ts +14 -7
- package/dist/lib/theme-import.d.ts +4 -5
- package/dist/{lint-96j9hrj4.js → lint-gsh6qwrq.js} +10 -7
- package/dist/{manifest.schema-z61rzw44.json → manifest.schema-zxgxnbg7.json} +21 -0
- package/dist/{new-8p38wavc.js → new-nkhycqy4.js} +12 -8
- package/dist/{plugin-ees6nhkc.js → plugin-129wcs93.js} +10 -7
- package/dist/{preflight-1q6c2edh.js → preflight-41hcejg9.js} +10 -7
- package/dist/preview/file-watcher.d.ts +13 -17
- package/dist/preview/lifecycle.d.ts +1 -1
- package/dist/{pagedjs-bridge-vn4hk9fx.js → preview-bridge-fz7vpk8m.js} +8 -0
- package/dist/preview-interface-fnqb2y4v.js +1015 -0
- package/dist/{preview-y5a2zen1.js → preview-pftsvr9z.js} +16 -9
- package/dist/preview-shell-c5mfa3q0.js +346 -0
- package/dist/{project-source-p0gn1wd5.js → project-source-ekcyp63q.js} +1 -1
- package/dist/{publish-rm9yb3wh.js → publish-dnjvb4jg.js} +10 -7
- package/dist/render.d.ts +3 -4
- package/dist/render.js +728 -64
- package/dist/{repair-zgq7q2g6.js → repair-a3enjttn.js} +45 -79
- package/dist/schema/manifest.types.d.ts +38 -0
- package/dist/{source-provider-c1rjm2c0.js → source-provider-3tcj6qg2.js} +2 -2
- package/dist/source-provider-vanafrt9.js +40 -0
- package/dist/{theme-zz2ktzqs.css → theme-h5recz6c.css} +8 -7
- package/dist/{theme-570zmh2t.css → theme-j2bagrfx.css} +8 -7
- package/dist/{theme-nya4nqh6.css → theme-nn6d53zy.css} +8 -7
- package/dist/types.d.ts +7 -0
- package/dist/{validate-nr0xa6sa.js → validate-ph1xffqy.js} +10 -7
- package/package.json +6 -6
- package/dist/cli-yja077f6.js +0 -92
- package/dist/git-http-yrb4ag6z.js +0 -17
- package/dist/index-yja077f6.js +0 -92
- package/dist/lib/markdown/markdown-it-paged.d.ts +0 -30
- package/dist/lib/pagedjs-marker.d.ts +0 -42
- package/dist/lib/pagedjs.d.ts +0 -26
- package/dist/lib/pagination.d.ts +0 -149
- package/dist/lib/remote-auth/conflict-resolution.d.ts +0 -29
- package/dist/lib/remote-auth/recovery/abort-interrupted-operation.d.ts +0 -103
- package/dist/lib/remote-auth/recovery/backup.d.ts +0 -113
- package/dist/lib/remote-auth/recovery/context.d.ts +0 -47
- package/dist/lib/remote-auth/recovery/dispatch.d.ts +0 -28
- package/dist/lib/remote-auth/recovery/failsafe.d.ts +0 -33
- package/dist/lib/remote-auth/recovery/manual-guidance.d.ts +0 -28
- package/dist/lib/remote-auth/recovery/outcome-mapping.d.ts +0 -59
- package/dist/lib/remote-auth/recovery/policy.d.ts +0 -47
- package/dist/lib/remote-auth/recovery/recover-auth.d.ts +0 -42
- package/dist/lib/remote-auth/recovery/recover-binary-conflict.d.ts +0 -37
- package/dist/lib/remote-auth/recovery/recover-corrupt-index.d.ts +0 -40
- package/dist/lib/remote-auth/recovery/recover-detached-head.d.ts +0 -70
- package/dist/lib/remote-auth/recovery/recover-interrupted-cherry-pick.d.ts +0 -23
- package/dist/lib/remote-auth/recovery/recover-interrupted-merge.d.ts +0 -28
- package/dist/lib/remote-auth/recovery/recover-interrupted-rebase.d.ts +0 -39
- package/dist/lib/remote-auth/recovery/recover-merge-conflict.d.ts +0 -34
- package/dist/lib/remote-auth/recovery/recover-missing-git-dir.d.ts +0 -37
- package/dist/lib/remote-auth/recovery/recover-missing-objects.d.ts +0 -56
- package/dist/lib/remote-auth/recovery/recover-network.d.ts +0 -34
- package/dist/lib/remote-auth/recovery/recover-non-fast-forward.d.ts +0 -27
- package/dist/lib/remote-auth/recovery/recover-stale-lock.d.ts +0 -68
- package/dist/lib/remote-auth/recovery/recover-unrelated-histories.d.ts +0 -44
- package/dist/lib/remote-auth/recovery/recover-wrong-remote.d.ts +0 -35
- package/dist/lib/remote-auth/resolution-plan.d.ts +0 -64
- package/dist/paged.polyfill-n95pbxfn.js +0 -33288
- package/dist/pagedjs-interface-qxvzgwd7.js +0 -557
- package/dist/preview-shell-6dqexx1m.js +0 -581
- /package/dist/assets/{preview/scripts/pagedjs-bridge.d.ts → engine/gutterpress-agent.d.ts} +0 -0
- /package/dist/assets/{preview/scripts/pagedjs-interface.d.ts → engine/gutterpress-viewer.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ uses its bundled browser for standard PDF export.
|
|
|
69
69
|
# Build a PDF from a project directory
|
|
70
70
|
gutterpress build ./my-book
|
|
71
71
|
|
|
72
|
-
# Live preview
|
|
72
|
+
# Live native-engine preview (automatic updates over WebSocket)
|
|
73
73
|
gutterpress preview ./my-book
|
|
74
74
|
|
|
75
75
|
# Custom output path
|
|
@@ -163,7 +163,13 @@ gutterpress new <name> --preset <id> [options]
|
|
|
163
163
|
|
|
164
164
|
### `gutterpress preview`
|
|
165
165
|
|
|
166
|
-
Live HTML preview server by default
|
|
166
|
+
Live HTML preview server by default. A single Markdown edit is rendered and
|
|
167
|
+
spliced as one chapter over WebSocket; CSS, manifest, multi-file, deletion, and
|
|
168
|
+
other structural changes reload the full document. This path is pure JS and
|
|
169
|
+
needs no external tools. Pass `--format pdf` or `--format pdfx` for a one-shot
|
|
170
|
+
build-and-open instead. `--manifest` applies only to those one-shot PDF/PDF-X
|
|
171
|
+
modes; live HTML preview discovers the project manifest from its input
|
|
172
|
+
directory.
|
|
167
173
|
|
|
168
174
|
```sh
|
|
169
175
|
gutterpress preview [input-dir] [options]
|
|
@@ -184,6 +190,7 @@ gutterpress preview [input-dir] [options]
|
|
|
184
190
|
--skip-lint Skip CSS linting (pdf|pdfx only)
|
|
185
191
|
--skip-pre-validate Skip pre-build validation (pdf|pdfx only)
|
|
186
192
|
--skip-post-validate Skip post-build PDF/X validation (pdfx only)
|
|
193
|
+
--engine <name> native (default) | paged (deprecated) [overrides the manifest's engine: field; applies to the live preview AND --format pdf|pdfx]
|
|
187
194
|
```
|
|
188
195
|
|
|
189
196
|
### `gutterpress build`
|
|
@@ -203,6 +210,7 @@ gutterpress build [input-dir] [options]
|
|
|
203
210
|
--skip-lint Skip the CSS print-safety pass (default: lint runs for pdf/pdfx)
|
|
204
211
|
--skip-pre-validate Skip pre-build validation
|
|
205
212
|
--skip-post-validate Skip post-build PDF/X validation
|
|
213
|
+
--engine <name> native (default) | paged (deprecated) [overrides the manifest's engine: field; native = the Gutterpress engine, native Chromium pagination]
|
|
206
214
|
```
|
|
207
215
|
|
|
208
216
|
### `gutterpress publish`
|
|
@@ -236,7 +244,9 @@ gutterpress publish --provider itch ./my-book
|
|
|
236
244
|
|
|
237
245
|
### `gutterpress lint`
|
|
238
246
|
|
|
239
|
-
Run Gutterpress's print-safety
|
|
247
|
+
Run Gutterpress's PostCSS-based print-safety checks, including remote URLs,
|
|
248
|
+
rasterizing effects, and source-level page-containment risks, against the
|
|
249
|
+
project's CSS files.
|
|
240
250
|
|
|
241
251
|
```sh
|
|
242
252
|
gutterpress lint [files] [options]
|
|
@@ -246,7 +256,11 @@ gutterpress lint [files] [options]
|
|
|
246
256
|
|
|
247
257
|
`files` is a positional: either a project directory containing `manifest.yaml` (its configured stylesheets are linted), or a glob pattern for CSS files to lint directly. There is no `--files` flag — pass the directory/glob as the positional.
|
|
248
258
|
|
|
249
|
-
Common
|
|
259
|
+
Common findings include remote `url(...)` references, effects that rasterize
|
|
260
|
+
print text, and declarations on core page wrappers that could clip or trap
|
|
261
|
+
out-of-flow art. The source-level containment check is an early signal; the
|
|
262
|
+
build-time `engine.layer.trapped` diagnostic inspects the authoritative live
|
|
263
|
+
ancestor chain.
|
|
250
264
|
|
|
251
265
|
### `gutterpress validate`
|
|
252
266
|
|
package/dist/api/index.d.ts
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* const { url, stop } = await startPreviewServer({ input: "./book", installSignalHandlers: false });
|
|
11
11
|
* await runBuild({ inputDir: "./book", format: "pdf", outDir: "./out", rawArgs: {} });
|
|
12
12
|
*/
|
|
13
|
-
export { runBuild, splitOutPath, BuildError, type BuildFormat, type PdfxFlavor, type BuildRunnerOptions, type BuildRunnerResult, type SplitOutPath, type
|
|
13
|
+
export { runBuild, splitOutPath, BuildError, type BuildFormat, type PdfxFlavor, type BuildRunnerOptions, type BuildRunnerResult, type SplitOutPath, type EngineBrowser, type EngineSession, } from "../lib/build-runner";
|
|
14
|
+
export { DEFAULT_PRINT_OPTS, readyProbeExpr } from "../engine/shared/cdp";
|
|
14
15
|
export { startPreviewServer, type PreviewServerHandle, type StartPreviewServerOptions, } from "../server";
|
|
15
16
|
export type { PreviewServerOptions } from "../types";
|
|
16
17
|
export { loadManifestWithPath, resolveConfig, MANIFEST_FILENAMES, hasProjectManifest, } from "../lib/manifest";
|
|
@@ -60,8 +61,9 @@ export { GenericTokenAuthProvider, connectGenericHost, knownForgeTokenUrl, norma
|
|
|
60
61
|
export type { GenericTokenConnectInput, GenericHostCallbacks, GenericAuthOptions, } from "../lib/remote-auth/generic-auth.ts";
|
|
61
62
|
export { diagnoseProjectRemote, parseRemoteOrigin, forgeKindForHost, } from "../lib/remote-auth/diagnose.ts";
|
|
62
63
|
export type { ProjectRemoteDiagnosis, DiagnoseProjectRemoteOptions, RemoteProtocol, RemoteGuidanceId, ForgeKind, } from "../lib/remote-auth/diagnose.ts";
|
|
63
|
-
export { syncProject, pullChanges, pushChanges,
|
|
64
|
-
export type { SyncOutcome, PullOutcome, PushOutcome, SyncProjectOptions,
|
|
64
|
+
export { syncProject, pullChanges, pushChanges, SYNC_SNAPSHOT_MESSAGE, } from "../lib/remote-auth/sync.ts";
|
|
65
|
+
export type { SyncOutcome, PullOutcome, PushOutcome, SyncProjectOptions, ImageClash, } from "../lib/remote-auth/sync.ts";
|
|
66
|
+
export { keepImageVersion, readImageVersion } from "../lib/remote-auth/image-clash.ts";
|
|
65
67
|
export type { SnapshotEntry, InitVersionHistoryOptions, SnapshotOptions, RestoreSnapshotOptions, RestoreVersionOptions, RestoreVersionResult, SourceProvider, } from "../lib/source-provider.ts";
|
|
66
68
|
export { runPublish, resolvePublishRequest, } from "../lib/publish/run-publish.ts";
|
|
67
69
|
export type { RunPublishOptions, RunPublishResult, } from "../lib/publish/run-publish.ts";
|
|
@@ -74,7 +76,11 @@ export { PublishSelectionsStore } from "../lib/publish/selections.ts";
|
|
|
74
76
|
export type { PublishAccountSelection } from "../lib/publish/selections.ts";
|
|
75
77
|
export { readPublishSettings, setPublishProviderConfig, } from "../lib/publish/manifest-publish.ts";
|
|
76
78
|
export type { PublishProvider, PublishProviderId, PublishProviderInfo, PublishProviderKind, PublishConfigField, PublishArtifact, PublishArtifactFormat, PublishAuthStatus, PublishDeps, PublishListingMetadata, PublishOutcome, PublishProduct, PublishProject, PublishRequest, PreflightIssue, CommandRunner, CommandResult, } from "../lib/publish/types.ts";
|
|
77
|
-
export {
|
|
79
|
+
export { repairRepo } from "../lib/remote-auth/recovery/repair.ts";
|
|
80
|
+
export type { RepairOptions, RepairResult } from "../lib/remote-auth/recovery/repair.ts";
|
|
81
|
+
export { classifyFromHealth, isLikelyRepoCorruption, RepoNeedsRecoveryError, isRepoNeedsRecoveryError, STALE_LOCK_MIN_AGE_MS, } from "../lib/remote-auth/recovery/classify.ts";
|
|
82
|
+
export type { RepairNeed } from "../lib/remote-auth/recovery/classify.ts";
|
|
83
|
+
export { inspectRepo, preflightStructuralReason, buildPreflightDiagnostics, verifyRepoReadable, isUnbornRepo, } from "../lib/remote-auth/recovery/inspect.ts";
|
|
84
|
+
export type { RepoHealth } from "../lib/remote-auth/recovery/types.ts";
|
|
78
85
|
export { resolveLogger, shortOid } from "../lib/remote-auth/operation-log.ts";
|
|
79
86
|
export type { OperationLogger, LogData } from "../lib/remote-auth/operation-log.ts";
|
|
80
|
-
export type { RecoverFn, RecoveryContext, RecoveryResult, SyncErrorKind, RecoveryRisk, ManualGuidance, RepoHealth, RecoveryBackup, RepairConfirmation, ConfirmationGate, FaultInjector, FaultPoint, } from "../lib/remote-auth/recovery/dispatch.ts";
|
package/dist/api/index.js
CHANGED
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
AUTO_SYNC_MIN_MINUTES,
|
|
9
9
|
BUILT_IN_TEMPLATE_IDS,
|
|
10
10
|
BUILT_IN_THEME_IDS,
|
|
11
|
-
BuildError,
|
|
12
11
|
FileTokenStore,
|
|
13
12
|
GITHUB_HOST,
|
|
14
13
|
GenericTokenAuthProvider,
|
|
@@ -21,6 +20,7 @@ import {
|
|
|
21
20
|
RECOMMENDED_PLUGINS,
|
|
22
21
|
RepoNeedsRecoveryError,
|
|
23
22
|
SNIPPETS_DIR,
|
|
23
|
+
STALE_LOCK_MIN_AGE_MS,
|
|
24
24
|
SYNC_SNAPSHOT_MESSAGE,
|
|
25
25
|
TARGETS,
|
|
26
26
|
TARGET_IDS,
|
|
@@ -33,9 +33,7 @@ import {
|
|
|
33
33
|
autoSnapshotDelayMs,
|
|
34
34
|
autoSyncDelayMs,
|
|
35
35
|
buildPreflightDiagnostics,
|
|
36
|
-
buildRecoveryContext,
|
|
37
36
|
classifyFromHealth,
|
|
38
|
-
classifyGitError,
|
|
39
37
|
cloneRepository,
|
|
40
38
|
connectGenericHost,
|
|
41
39
|
connectPublishProvider,
|
|
@@ -58,9 +56,11 @@ import {
|
|
|
58
56
|
inspectRepo,
|
|
59
57
|
isAppHeartbeatFresh,
|
|
60
58
|
isGitInternalPath,
|
|
59
|
+
isLikelyRepoCorruption,
|
|
61
60
|
isRepoNeedsRecoveryError,
|
|
62
61
|
isSshRemoteUrl,
|
|
63
62
|
isUnbornRepo,
|
|
63
|
+
keepImageVersion,
|
|
64
64
|
knownForgeTokenUrl,
|
|
65
65
|
listBuiltInTemplates,
|
|
66
66
|
listBuiltInThemes,
|
|
@@ -77,7 +77,6 @@ import {
|
|
|
77
77
|
loadManifestWithPath,
|
|
78
78
|
migrateUrlCredential,
|
|
79
79
|
normalizeForgeHost,
|
|
80
|
-
onlineCopyPath,
|
|
81
80
|
parseRemoteOrigin,
|
|
82
81
|
preflightStructuralReason,
|
|
83
82
|
provenancePath,
|
|
@@ -88,19 +87,19 @@ import {
|
|
|
88
87
|
pullChanges,
|
|
89
88
|
pushChanges,
|
|
90
89
|
readAppHeartbeat,
|
|
90
|
+
readImageVersion,
|
|
91
91
|
readManifestFields,
|
|
92
92
|
readProjectProvenance,
|
|
93
93
|
readPublishSettings,
|
|
94
94
|
readSnippet,
|
|
95
95
|
readThemeCss,
|
|
96
|
-
recover,
|
|
97
96
|
redactCredential,
|
|
98
97
|
removeAppHeartbeat,
|
|
99
98
|
removeProjectTheme,
|
|
99
|
+
repairRepo,
|
|
100
100
|
resolveActiveStyles,
|
|
101
101
|
resolveBuiltInTheme,
|
|
102
102
|
resolveConfig,
|
|
103
|
-
resolveConflicts,
|
|
104
103
|
resolveGitHubClientId,
|
|
105
104
|
resolvePublishRequest,
|
|
106
105
|
revertTheme,
|
|
@@ -123,7 +122,12 @@ import {
|
|
|
123
122
|
validateProjectPlugins,
|
|
124
123
|
verifyRepoReadable,
|
|
125
124
|
writeAppHeartbeat
|
|
126
|
-
} from "../index-
|
|
125
|
+
} from "../index-s416qpdv.js";
|
|
126
|
+
import {
|
|
127
|
+
BuildError,
|
|
128
|
+
DEFAULT_PRINT_OPTS,
|
|
129
|
+
readyProbeExpr
|
|
130
|
+
} from "../index-mvehxh0e.js";
|
|
127
131
|
import {
|
|
128
132
|
AUTO_SNAPSHOT_MESSAGE,
|
|
129
133
|
HISTORY_PAGE_LIMIT,
|
|
@@ -133,15 +137,14 @@ import {
|
|
|
133
137
|
resolveLogger,
|
|
134
138
|
restoreVersionWithBackup,
|
|
135
139
|
shortOid
|
|
136
|
-
} from "../index-
|
|
140
|
+
} from "../index-mdefp0y5.js";
|
|
137
141
|
import {
|
|
138
142
|
capabilitiesFor,
|
|
139
143
|
detectProjectSource,
|
|
140
144
|
findEnclosingRepoDir,
|
|
141
145
|
repoRootForSource,
|
|
142
146
|
repoSubPath
|
|
143
|
-
} from "../index-
|
|
144
|
-
import"../index-yja077f6.js";
|
|
147
|
+
} from "../index-v5mp7a6q.js";
|
|
145
148
|
import"../index-37x76zdn.js";
|
|
146
149
|
export {
|
|
147
150
|
writeAppHeartbeat,
|
|
@@ -169,21 +172,22 @@ export {
|
|
|
169
172
|
resolvePublishRequest,
|
|
170
173
|
resolveLogger,
|
|
171
174
|
resolveGitHubClientId,
|
|
172
|
-
resolveConflicts,
|
|
173
175
|
resolveConfig,
|
|
174
176
|
resolveBuiltInTheme,
|
|
175
177
|
resolveActiveStyles,
|
|
176
178
|
repoSubPath,
|
|
177
179
|
repoRootForSource,
|
|
180
|
+
repairRepo,
|
|
178
181
|
removeProjectTheme,
|
|
179
182
|
removeAppHeartbeat,
|
|
180
183
|
redactCredential,
|
|
181
|
-
|
|
184
|
+
readyProbeExpr,
|
|
182
185
|
readThemeCss,
|
|
183
186
|
readSnippet,
|
|
184
187
|
readPublishSettings,
|
|
185
188
|
readProjectProvenance,
|
|
186
189
|
readManifestFields,
|
|
190
|
+
readImageVersion,
|
|
187
191
|
readAppHeartbeat,
|
|
188
192
|
pushChanges,
|
|
189
193
|
pullChanges,
|
|
@@ -195,7 +199,6 @@ export {
|
|
|
195
199
|
provenancePath,
|
|
196
200
|
preflightStructuralReason,
|
|
197
201
|
parseRemoteOrigin,
|
|
198
|
-
onlineCopyPath,
|
|
199
202
|
normalizeForgeHost,
|
|
200
203
|
migrateUrlCredential,
|
|
201
204
|
loadManifestWithPath,
|
|
@@ -212,10 +215,12 @@ export {
|
|
|
212
215
|
listBuiltInThemes,
|
|
213
216
|
listBuiltInTemplates,
|
|
214
217
|
knownForgeTokenUrl,
|
|
218
|
+
keepImageVersion,
|
|
215
219
|
isUnbornRepo,
|
|
216
220
|
isSshRemoteUrl,
|
|
217
221
|
isRepoNeedsRecoveryError,
|
|
218
222
|
isNoChangesError,
|
|
223
|
+
isLikelyRepoCorruption,
|
|
219
224
|
isGitInternalPath,
|
|
220
225
|
isAppHeartbeatFresh,
|
|
221
226
|
inspectRepo,
|
|
@@ -240,10 +245,8 @@ export {
|
|
|
240
245
|
connectPublishProvider,
|
|
241
246
|
connectGenericHost,
|
|
242
247
|
cloneRepository,
|
|
243
|
-
classifyGitError,
|
|
244
248
|
classifyFromHealth,
|
|
245
249
|
capabilitiesFor,
|
|
246
|
-
buildRecoveryContext,
|
|
247
250
|
buildPreflightDiagnostics,
|
|
248
251
|
autoSyncDelayMs,
|
|
249
252
|
autoSnapshotDelayMs,
|
|
@@ -256,6 +259,7 @@ export {
|
|
|
256
259
|
TARGET_IDS,
|
|
257
260
|
TARGETS,
|
|
258
261
|
SYNC_SNAPSHOT_MESSAGE,
|
|
262
|
+
STALE_LOCK_MIN_AGE_MS,
|
|
259
263
|
SNIPPETS_DIR,
|
|
260
264
|
RepoNeedsRecoveryError,
|
|
261
265
|
RESTORE_BACKUP_MESSAGE,
|
|
@@ -270,6 +274,7 @@ export {
|
|
|
270
274
|
GenericTokenAuthProvider,
|
|
271
275
|
GITHUB_HOST,
|
|
272
276
|
FileTokenStore,
|
|
277
|
+
DEFAULT_PRINT_OPTS,
|
|
273
278
|
BuildError,
|
|
274
279
|
BUILT_IN_THEME_IDS,
|
|
275
280
|
BUILT_IN_TEMPLATE_IDS,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executeAndReport
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-5czby0dd.js";
|
|
4
4
|
import {
|
|
5
5
|
log
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-gk3wsdpb.js";
|
|
7
7
|
import {
|
|
8
|
-
EXIT_CODES,
|
|
9
8
|
UsageError,
|
|
10
9
|
rejectExtraPositionals,
|
|
11
10
|
rejectUnknownFlags
|
|
12
|
-
} from "./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
15
|
-
import
|
|
11
|
+
} from "./cli-f4rcbt2t.js";
|
|
12
|
+
import"./cli-yp3p0sf2.js";
|
|
13
|
+
import"./cli-c41yr7he.js";
|
|
14
|
+
import {
|
|
15
|
+
EXIT_CODES
|
|
16
|
+
} from "./cli-46ycxe6r.js";
|
|
17
|
+
import"./cli-k1065rkg.js";
|
|
18
|
+
import"./cli-v5mp7a6q.js";
|
|
16
19
|
import"./cli-37x76zdn.js";
|
|
17
20
|
|
|
18
21
|
// src/commands/audit.ts
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runBuild,
|
|
3
3
|
splitOutPath
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-5czby0dd.js";
|
|
5
5
|
import {
|
|
6
6
|
log
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-gk3wsdpb.js";
|
|
8
8
|
import {
|
|
9
|
-
BuildError,
|
|
10
9
|
UsageError,
|
|
10
|
+
parseEngine,
|
|
11
11
|
parseFormat,
|
|
12
12
|
parsePdfxFlavor,
|
|
13
13
|
rejectExtraPositionals,
|
|
14
14
|
rejectUnknownFlags
|
|
15
|
-
} from "./cli-
|
|
16
|
-
import"./cli-
|
|
17
|
-
import"./cli-
|
|
18
|
-
import
|
|
15
|
+
} from "./cli-f4rcbt2t.js";
|
|
16
|
+
import"./cli-yp3p0sf2.js";
|
|
17
|
+
import"./cli-c41yr7he.js";
|
|
18
|
+
import {
|
|
19
|
+
BuildError
|
|
20
|
+
} from "./cli-46ycxe6r.js";
|
|
21
|
+
import"./cli-k1065rkg.js";
|
|
22
|
+
import"./cli-v5mp7a6q.js";
|
|
19
23
|
import"./cli-37x76zdn.js";
|
|
20
24
|
|
|
21
25
|
// src/commands/build.ts
|
|
@@ -32,7 +36,8 @@ var commandArgs = {
|
|
|
32
36
|
"strip-annotations": { type: "boolean", description: "Strip PDF annotations for PDF/X compliance" },
|
|
33
37
|
"skip-lint": { type: "boolean", description: "Skip CSS linting (default: lint runs for pdf/pdfx)" },
|
|
34
38
|
"skip-pre-validate": { type: "boolean", description: "Skip pre-build validation" },
|
|
35
|
-
"skip-post-validate": { type: "boolean", description: "Skip post-build PDF/X validation" }
|
|
39
|
+
"skip-post-validate": { type: "boolean", description: "Skip post-build PDF/X validation" },
|
|
40
|
+
engine: { type: "string", description: "Pagination engine. Paged.js has been removed; native is the only engine. This flag is accepted but ignored (a warning fires for --engine paged)." }
|
|
36
41
|
};
|
|
37
42
|
var build_default = defineCommand({
|
|
38
43
|
meta: {
|
|
@@ -61,6 +66,7 @@ var build_default = defineCommand({
|
|
|
61
66
|
skipLint: !!args["skip-lint"],
|
|
62
67
|
skipPreValidate: !!args["skip-pre-validate"],
|
|
63
68
|
skipPostValidate: !!args["skip-post-validate"],
|
|
69
|
+
engine: parseEngine(args.engine),
|
|
64
70
|
rawArgs: args
|
|
65
71
|
});
|
|
66
72
|
} catch (error) {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { LoadedPlugin } from "../../lib/markdown/renderer";
|
|
2
|
+
export type RenderedRefKind = "image" | "link";
|
|
3
|
+
export interface RenderedLocalRef {
|
|
4
|
+
ref: string;
|
|
5
|
+
kind: RenderedRefKind;
|
|
6
|
+
/** One-based source line of the rendered link/image occurrence. */
|
|
7
|
+
line: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Extract only links and images the shipped Gutterpress grammar actually
|
|
11
|
+
* renders, with their original source lines.
|
|
12
|
+
*
|
|
13
|
+
* Complexity is O(source + tokens + refs × log(lines-per-inline)). Keeping
|
|
14
|
+
* correlation local to each parser-defined block is important because it
|
|
15
|
+
* prevents an unmatched delimiter/comment/tag from pairing across a
|
|
16
|
+
* blank/block boundary.
|
|
17
|
+
* Markdown-it normalizes CRLF and lone CR to LF before building token maps, so
|
|
18
|
+
* line counts remain exact for all three newline spellings.
|
|
19
|
+
*/
|
|
20
|
+
export type RenderedLocalRefCollector = (content: string) => RenderedLocalRef[];
|
|
21
|
+
/**
|
|
22
|
+
* Build one parser-aligned collector for a validation run.
|
|
23
|
+
*
|
|
24
|
+
* Custom plugins are applied exactly as they are for the book renderer before
|
|
25
|
+
* the inline State is instrumented. Reusing the returned closure across all
|
|
26
|
+
* source files avoids loading/applying a project plugin once per chapter.
|
|
27
|
+
*/
|
|
28
|
+
export declare function createRenderedLocalRefCollector(customPlugins?: LoadedPlugin[]): RenderedLocalRefCollector;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/lib/build-error.ts
|
|
2
|
+
var EXIT_CODES = {
|
|
3
|
+
OK: 0,
|
|
4
|
+
FINDINGS: 1,
|
|
5
|
+
USAGE: 2,
|
|
6
|
+
PIPELINE: 3
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
class BuildError extends Error {
|
|
10
|
+
exitCode;
|
|
11
|
+
constructor(message, exitCode = EXIT_CODES.PIPELINE, options) {
|
|
12
|
+
super(message, options);
|
|
13
|
+
this.name = "BuildError";
|
|
14
|
+
this.exitCode = exitCode;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { EXIT_CODES, BuildError };
|