gutterpress 0.0.0
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 +422 -0
- package/dist/CGATS21_CRPC1-g0e3k7kr.icc +0 -0
- package/dist/api/index.d.ts +76 -0
- package/dist/api/index.js +272 -0
- package/dist/assets/preview/scripts/pagedjs-bridge.d.ts +1 -0
- package/dist/assets/preview/scripts/pagedjs-interface.d.ts +1 -0
- package/dist/assets/preview/scripts/preview-shell.d.ts +1 -0
- package/dist/audit-1jrwwacz.js +66 -0
- package/dist/build-5s92kgpc.js +77 -0
- package/dist/chapter-01-6fn9pvd0.md +31 -0
- package/dist/chapter-01-7jwqg1ct.md +20 -0
- package/dist/chapter-01-jj8ftn4c.md +29 -0
- package/dist/chapter-01-rkpyvjna.md +26 -0
- package/dist/checks/asset/approved-fonts.d.ts +3 -0
- package/dist/checks/asset/extensions.d.ts +41 -0
- package/dist/checks/asset/font-license.d.ts +3 -0
- package/dist/checks/asset/image-alpha.d.ts +3 -0
- package/dist/checks/asset/image-color-space.d.ts +3 -0
- package/dist/checks/asset/image-file-size.d.ts +3 -0
- package/dist/checks/asset/image-resolution.d.ts +3 -0
- package/dist/checks/asset/image-tac.d.ts +3 -0
- package/dist/checks/asset/index.d.ts +7 -0
- package/dist/checks/formatter.d.ts +3 -0
- package/dist/checks/heuristic/index.d.ts +4 -0
- package/dist/checks/heuristic/layer-count.d.ts +3 -0
- package/dist/checks/heuristic/placement-variance.d.ts +3 -0
- package/dist/checks/heuristic/section-density.d.ts +3 -0
- package/dist/checks/heuristic/text-density.d.ts +3 -0
- package/dist/checks/pdf/bleed.d.ts +3 -0
- package/dist/checks/pdf/bookmarks.d.ts +3 -0
- package/dist/checks/pdf/color-spaces.d.ts +3 -0
- package/dist/checks/pdf/cross-refs.d.ts +3 -0
- package/dist/checks/pdf/embedded-fonts.d.ts +3 -0
- package/dist/checks/pdf/image-resolution.d.ts +3 -0
- package/dist/checks/pdf/index.d.ts +15 -0
- package/dist/checks/pdf/ink-coverage.d.ts +3 -0
- package/dist/checks/pdf/page-labels.d.ts +3 -0
- package/dist/checks/pdf/page-size.d.ts +3 -0
- package/dist/checks/pdf/pdfx-markers.d.ts +3 -0
- package/dist/checks/pdf/pdfx-metadata.d.ts +3 -0
- package/dist/checks/pdf/pdfx-structure.d.ts +6 -0
- package/dist/checks/pdf/qpdf-structure.d.ts +3 -0
- package/dist/checks/pdf/rasterized-pages.d.ts +3 -0
- package/dist/checks/pdf/toc-links.d.ts +3 -0
- package/dist/checks/pdf/transparency.d.ts +3 -0
- package/dist/checks/policy.d.ts +61 -0
- package/dist/checks/register-builtins.d.ts +17 -0
- package/dist/checks/registry.d.ts +40 -0
- package/dist/checks/runner.d.ts +25 -0
- package/dist/checks/source/accessibility-alt-text.d.ts +3 -0
- package/dist/checks/source/accessibility-heading-order.d.ts +3 -0
- package/dist/checks/source/config-file.d.ts +8 -0
- package/dist/checks/source/htmlhint.d.ts +3 -0
- package/dist/checks/source/index.d.ts +6 -0
- package/dist/checks/source/local-refs.d.ts +3 -0
- package/dist/checks/source/markdownlint.d.ts +3 -0
- package/dist/checks/source/stylelint.d.ts +3 -0
- package/dist/checks/tool-check.d.ts +23 -0
- package/dist/checks/types.d.ts +52 -0
- package/dist/cli-1tyj4bk3.js +124 -0
- package/dist/cli-37x76zdn.js +4 -0
- package/dist/cli-506tg37g.js +26 -0
- package/dist/cli-5bxx0c4y.js +464 -0
- package/dist/cli-7ykx7pp0.js +12378 -0
- package/dist/cli-h7phg3ka.js +746 -0
- package/dist/cli-hvqjs342.js +284 -0
- package/dist/cli-yja077f6.js +92 -0
- package/dist/cli.js +157 -0
- package/dist/constants.d.ts +17 -0
- package/dist/doctor-25zjt8dz.js +57 -0
- package/dist/favicon-wkbm9cjn.ico +0 -0
- package/dist/git-http-yrb4ag6z.js +17 -0
- package/dist/index-1tyj4bk3.js +124 -0
- package/dist/index-37x76zdn.js +4 -0
- package/dist/index-3h3fef7r.js +15218 -0
- package/dist/index-5bxx0c4y.js +464 -0
- package/dist/index-yja077f6.js +92 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +310 -0
- package/dist/lib/app-heartbeat.d.ts +102 -0
- package/dist/lib/asset-inline.d.ts +73 -0
- package/dist/lib/browser-pool.d.ts +17 -0
- package/dist/lib/build-error.d.ts +52 -0
- package/dist/lib/build-fingerprint.d.ts +15 -0
- package/dist/lib/build-preflight.d.ts +43 -0
- package/dist/lib/build-runner.d.ts +161 -0
- package/dist/lib/build-staging.d.ts +64 -0
- package/dist/lib/chromium.d.ts +20 -0
- package/dist/lib/cli-args.d.ts +45 -0
- package/dist/lib/desktop.d.ts +14 -0
- package/dist/lib/diagnostics.d.ts +64 -0
- package/dist/lib/embedded-assets.d.ts +29 -0
- package/dist/lib/exec.d.ts +84 -0
- package/dist/lib/fetch-timeout.d.ts +41 -0
- package/dist/lib/ghostscript.d.ts +48 -0
- package/dist/lib/host-policy.d.ts +75 -0
- package/dist/lib/image-inspect.d.ts +32 -0
- package/dist/lib/install-hints.d.ts +21 -0
- package/dist/lib/lint-runner.d.ts +10 -0
- package/dist/lib/manifest-config.d.ts +31 -0
- package/dist/lib/manifest-doc.d.ts +25 -0
- package/dist/lib/manifest.d.ts +41 -0
- package/dist/lib/markdown/assemble.d.ts +78 -0
- package/dist/lib/markdown/chapter-id.d.ts +24 -0
- package/dist/lib/markdown/images.d.ts +34 -0
- package/dist/lib/markdown/index.d.ts +78 -0
- package/dist/lib/markdown/markdown-it-paged.d.ts +30 -0
- package/dist/lib/markdown/plugins.d.ts +69 -0
- package/dist/lib/markdown/renderer.d.ts +111 -0
- package/dist/lib/npm-plugin-installer.d.ts +33 -0
- package/dist/lib/open-path.d.ts +5 -0
- package/dist/lib/output-paths.d.ts +23 -0
- package/dist/lib/pagedjs-marker.d.ts +42 -0
- package/dist/lib/pagedjs.d.ts +26 -0
- package/dist/lib/pagination.d.ts +169 -0
- package/dist/lib/pdf-inspect.d.ts +123 -0
- package/dist/lib/pdf-parse.d.ts +57 -0
- package/dist/lib/plugin-manager.d.ts +108 -0
- package/dist/lib/plugin-vendor.d.ts +107 -0
- package/dist/lib/presets.d.ts +45 -0
- package/dist/lib/printsafe.d.ts +17 -0
- package/dist/lib/project-scaffold.d.ts +116 -0
- package/dist/lib/project-source.d.ts +140 -0
- package/dist/lib/project-templates.d.ts +49 -0
- package/dist/lib/publish/butler.d.ts +10 -0
- package/dist/lib/publish/command-runner.d.ts +18 -0
- package/dist/lib/publish/connect.d.ts +23 -0
- package/dist/lib/publish/manifest-publish.d.ts +9 -0
- package/dist/lib/publish/providers/azure-swa.d.ts +3 -0
- package/dist/lib/publish/providers/drivethrurpg.d.ts +10 -0
- package/dist/lib/publish/providers/guided.d.ts +3 -0
- package/dist/lib/publish/providers/itch.d.ts +5 -0
- package/dist/lib/publish/providers/kdp.d.ts +9 -0
- package/dist/lib/publish/providers/shopify.d.ts +5 -0
- package/dist/lib/publish/registry.d.ts +5 -0
- package/dist/lib/publish/run-publish.d.ts +30 -0
- package/dist/lib/publish/selections.d.ts +25 -0
- package/dist/lib/publish/types.d.ts +258 -0
- package/dist/lib/remote-auth/clone.d.ts +87 -0
- package/dist/lib/remote-auth/conflict-resolution.d.ts +29 -0
- package/dist/lib/remote-auth/diagnose.d.ts +77 -0
- package/dist/lib/remote-auth/generic-auth.d.ts +97 -0
- package/dist/lib/remote-auth/git-http.d.ts +85 -0
- package/dist/lib/remote-auth/github-auth.d.ts +69 -0
- package/dist/lib/remote-auth/github-repos.d.ts +64 -0
- package/dist/lib/remote-auth/operation-log.d.ts +66 -0
- package/dist/lib/remote-auth/recovery/abort-interrupted-operation.d.ts +103 -0
- package/dist/lib/remote-auth/recovery/backup.d.ts +113 -0
- package/dist/lib/remote-auth/recovery/classify.d.ts +109 -0
- package/dist/lib/remote-auth/recovery/context.d.ts +47 -0
- package/dist/lib/remote-auth/recovery/dispatch.d.ts +33 -0
- package/dist/lib/remote-auth/recovery/failsafe.d.ts +33 -0
- package/dist/lib/remote-auth/recovery/inspect.d.ts +74 -0
- package/dist/lib/remote-auth/recovery/manual-guidance.d.ts +28 -0
- package/dist/lib/remote-auth/recovery/outcome-mapping.d.ts +58 -0
- package/dist/lib/remote-auth/recovery/policy.d.ts +47 -0
- package/dist/lib/remote-auth/recovery/recover-auth.d.ts +42 -0
- package/dist/lib/remote-auth/recovery/recover-binary-conflict.d.ts +37 -0
- package/dist/lib/remote-auth/recovery/recover-corrupt-index.d.ts +40 -0
- package/dist/lib/remote-auth/recovery/recover-detached-head.d.ts +70 -0
- package/dist/lib/remote-auth/recovery/recover-interrupted-cherry-pick.d.ts +23 -0
- package/dist/lib/remote-auth/recovery/recover-interrupted-merge.d.ts +28 -0
- package/dist/lib/remote-auth/recovery/recover-interrupted-rebase.d.ts +39 -0
- package/dist/lib/remote-auth/recovery/recover-merge-conflict.d.ts +34 -0
- package/dist/lib/remote-auth/recovery/recover-missing-git-dir.d.ts +37 -0
- package/dist/lib/remote-auth/recovery/recover-missing-objects.d.ts +56 -0
- package/dist/lib/remote-auth/recovery/recover-network.d.ts +34 -0
- package/dist/lib/remote-auth/recovery/recover-non-fast-forward.d.ts +27 -0
- package/dist/lib/remote-auth/recovery/recover-stale-lock.d.ts +76 -0
- package/dist/lib/remote-auth/recovery/recover-unrelated-histories.d.ts +44 -0
- package/dist/lib/remote-auth/recovery/recover-wrong-remote.d.ts +35 -0
- package/dist/lib/remote-auth/recovery/types.d.ts +235 -0
- package/dist/lib/remote-auth/resolution-plan.d.ts +64 -0
- package/dist/lib/remote-auth/sync-messages.d.ts +26 -0
- package/dist/lib/remote-auth/sync-types.d.ts +225 -0
- package/dist/lib/remote-auth/sync.d.ts +45 -0
- package/dist/lib/remote-auth/test-access.d.ts +47 -0
- package/dist/lib/remote-auth/test-support/git-http-server.d.ts +71 -0
- package/dist/lib/remote-auth/token-store.d.ts +95 -0
- package/dist/lib/remote-auth/transport.d.ts +105 -0
- package/dist/lib/slug.d.ts +28 -0
- package/dist/lib/snippets.d.ts +39 -0
- package/dist/lib/source-provider.d.ts +244 -0
- package/dist/lib/static-serve.d.ts +54 -0
- package/dist/lib/style-resolver.d.ts +30 -0
- package/dist/lib/theme-import.d.ts +70 -0
- package/dist/lib/theme-manager.d.ts +128 -0
- package/dist/lib/tool-probe.d.ts +37 -0
- package/dist/lib/validation-exec.d.ts +47 -0
- package/dist/lib/validation-profile.d.ts +18 -0
- package/dist/lib/version.d.ts +9 -0
- package/dist/lint-f63nxjfj.js +65 -0
- package/dist/manifest-n1gh3qw5.yaml +9 -0
- package/dist/manifest-ryyg71nf.yaml +9 -0
- package/dist/manifest.schema-rn1dpdpn.json +564 -0
- package/dist/new-7b08a42h.js +105 -0
- package/dist/paged.polyfill-n95pbxfn.js +33288 -0
- package/dist/pagedjs-bridge-vn4hk9fx.js +111 -0
- package/dist/pagedjs-interface-80g3xa8p.js +498 -0
- package/dist/platform.d.ts +100 -0
- package/dist/plugin-wf2cbmwc.js +129 -0
- package/dist/preflight-tg4mpz1h.js +222 -0
- package/dist/preview/file-watcher.d.ts +174 -0
- package/dist/preview/http-server.d.ts +45 -0
- package/dist/preview/lifecycle.d.ts +67 -0
- package/dist/preview/server-context.d.ts +36 -0
- package/dist/preview-h2bwbb2x.js +102 -0
- package/dist/preview-shell-rghtfmc8.js +155 -0
- package/dist/project-source-0tg0r6vm.js +17 -0
- package/dist/publish-ztaet53r.js +233 -0
- package/dist/render.d.ts +20 -0
- package/dist/render.js +682 -0
- package/dist/repair-jkp4n3j8.js +171 -0
- package/dist/schema/manifest.types.d.ts +218 -0
- package/dist/server.d.ts +34 -0
- package/dist/source-provider-hp96b5jf.js +46 -0
- package/dist/test-helpers/testkit.d.ts +91 -0
- package/dist/theme-0yzvthe8.css +65 -0
- package/dist/theme-570zmh2t.css +58 -0
- package/dist/theme-6a2fngc8.json +6 -0
- package/dist/theme-cd6efzjw.json +6 -0
- package/dist/theme-nya4nqh6.css +70 -0
- package/dist/theme-tqfypc1w.json +6 -0
- package/dist/theme-xt0hjb1b.json +6 -0
- package/dist/theme-zz2ktzqs.css +60 -0
- package/dist/types.d.ts +31 -0
- package/dist/utils/file-utils.d.ts +53 -0
- package/dist/utils/logger.d.ts +59 -0
- package/dist/validate-k2drs19j.js +99 -0
- package/package.json +102 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import {
|
|
2
|
+
APP_HEARTBEAT_FRESH_MS,
|
|
3
|
+
AUTO_SNAPSHOT_DEFAULT_MINUTES,
|
|
4
|
+
AUTO_SNAPSHOT_MAX_MINUTES,
|
|
5
|
+
AUTO_SNAPSHOT_MIN_MINUTES,
|
|
6
|
+
AUTO_SYNC_DEFAULT_MINUTES,
|
|
7
|
+
AUTO_SYNC_MAX_MINUTES,
|
|
8
|
+
AUTO_SYNC_MIN_MINUTES,
|
|
9
|
+
BUILT_IN_TEMPLATE_IDS,
|
|
10
|
+
BUILT_IN_THEME_IDS,
|
|
11
|
+
BuildError,
|
|
12
|
+
FileTokenStore,
|
|
13
|
+
GITHUB_HOST,
|
|
14
|
+
GenericTokenAuthProvider,
|
|
15
|
+
GitHubAuthProvider,
|
|
16
|
+
MANIFEST_FILENAMES,
|
|
17
|
+
PLUGINS_DIR,
|
|
18
|
+
PublishSelectionsStore,
|
|
19
|
+
RECOMMENDED_PLUGINS,
|
|
20
|
+
RepoNeedsRecoveryError,
|
|
21
|
+
SNIPPETS_DIR,
|
|
22
|
+
SYNC_SNAPSHOT_MESSAGE,
|
|
23
|
+
THEMES_DIR,
|
|
24
|
+
addLocalPlugin,
|
|
25
|
+
addNpmPlugin,
|
|
26
|
+
adoptFolder,
|
|
27
|
+
appHeartbeatPath,
|
|
28
|
+
applyTheme,
|
|
29
|
+
autoSnapshotDelayMs,
|
|
30
|
+
autoSyncDelayMs,
|
|
31
|
+
buildPreflightDiagnostics,
|
|
32
|
+
buildRecoveryContext,
|
|
33
|
+
checkCss,
|
|
34
|
+
checkToolAvailability,
|
|
35
|
+
classifyFromHealth,
|
|
36
|
+
classifyGitError,
|
|
37
|
+
cloneRepository,
|
|
38
|
+
connectGenericHost,
|
|
39
|
+
connectPublishProvider,
|
|
40
|
+
defaultConfigDir,
|
|
41
|
+
deleteSnippet,
|
|
42
|
+
diagnoseProjectRemote,
|
|
43
|
+
escapeYamlScalar,
|
|
44
|
+
executeAndReport,
|
|
45
|
+
executeValidation,
|
|
46
|
+
extractUrlCredential,
|
|
47
|
+
extractVariables,
|
|
48
|
+
forgeKindForHost,
|
|
49
|
+
formatReport,
|
|
50
|
+
getActiveTheme,
|
|
51
|
+
getCheckById,
|
|
52
|
+
getChecks,
|
|
53
|
+
getPreviousTheme,
|
|
54
|
+
getSystemDiagnostics,
|
|
55
|
+
hasProjectManifest,
|
|
56
|
+
heartbeatTtlMs,
|
|
57
|
+
importTemplateFromFolder,
|
|
58
|
+
importThemeFromFile,
|
|
59
|
+
importThemeFromFolder,
|
|
60
|
+
importThemeFromUrl,
|
|
61
|
+
inspectImage,
|
|
62
|
+
inspectRepo,
|
|
63
|
+
isAppHeartbeatFresh,
|
|
64
|
+
isGitInternalPath,
|
|
65
|
+
isRepoNeedsRecoveryError,
|
|
66
|
+
isSshRemoteUrl,
|
|
67
|
+
isUnbornRepo,
|
|
68
|
+
knownForgeTokenUrl,
|
|
69
|
+
listBuiltInTemplates,
|
|
70
|
+
listBuiltInThemes,
|
|
71
|
+
listCustomTemplates,
|
|
72
|
+
listGitHubBranches,
|
|
73
|
+
listGitHubRepositories,
|
|
74
|
+
listProjectPlugins,
|
|
75
|
+
listProjectStyles,
|
|
76
|
+
listProjectThemes,
|
|
77
|
+
listPublishAccounts,
|
|
78
|
+
listPublishProviders,
|
|
79
|
+
listRepoBooks,
|
|
80
|
+
listSnippets,
|
|
81
|
+
loadManifest,
|
|
82
|
+
loadManifestWithPath,
|
|
83
|
+
log,
|
|
84
|
+
migrateUrlCredential,
|
|
85
|
+
normalizeForgeHost,
|
|
86
|
+
onlineCopyPath,
|
|
87
|
+
openPath,
|
|
88
|
+
parseRemoteOrigin,
|
|
89
|
+
preflightStructuralReason,
|
|
90
|
+
provenancePath,
|
|
91
|
+
publishConnectionStatus,
|
|
92
|
+
publishCredentialKey,
|
|
93
|
+
publishProviderFor,
|
|
94
|
+
pullChanges,
|
|
95
|
+
pushChanges,
|
|
96
|
+
readAppHeartbeat,
|
|
97
|
+
readManifestFields,
|
|
98
|
+
readProjectProvenance,
|
|
99
|
+
readPublishSettings,
|
|
100
|
+
readSnippet,
|
|
101
|
+
readThemeCss,
|
|
102
|
+
recover,
|
|
103
|
+
redactCredential,
|
|
104
|
+
removeAppHeartbeat,
|
|
105
|
+
removeProjectTheme,
|
|
106
|
+
reportMissingTools,
|
|
107
|
+
resolveActiveStyles,
|
|
108
|
+
resolveBuiltInTheme,
|
|
109
|
+
resolveCheckSelectors,
|
|
110
|
+
resolveConfig,
|
|
111
|
+
resolveConflicts,
|
|
112
|
+
resolveGitHubClientId,
|
|
113
|
+
resolvePublishRequest,
|
|
114
|
+
revertTheme,
|
|
115
|
+
rulePagedjsCrashSelectors,
|
|
116
|
+
ruleRemoteUrls,
|
|
117
|
+
ruleRiskyProps,
|
|
118
|
+
ruleSyntax,
|
|
119
|
+
runBuild,
|
|
120
|
+
runChecks,
|
|
121
|
+
runLint,
|
|
122
|
+
runPublish,
|
|
123
|
+
sanitizeCloneFolderName,
|
|
124
|
+
saveProjectAsTemplate,
|
|
125
|
+
saveSnippet,
|
|
126
|
+
scaffoldProject,
|
|
127
|
+
setActiveStyles,
|
|
128
|
+
setManifestFields,
|
|
129
|
+
setPluginEnabled,
|
|
130
|
+
setPublishProviderConfig,
|
|
131
|
+
slugifyProjectName,
|
|
132
|
+
splitOutPath,
|
|
133
|
+
startPreviewServer,
|
|
134
|
+
substituteVariables,
|
|
135
|
+
syncProject,
|
|
136
|
+
testRemoteAccess,
|
|
137
|
+
validateProjectPlugins,
|
|
138
|
+
verifyRepoReadable,
|
|
139
|
+
writeAppHeartbeat
|
|
140
|
+
} from "./index-3h3fef7r.js";
|
|
141
|
+
import {
|
|
142
|
+
AUTO_SNAPSHOT_MESSAGE,
|
|
143
|
+
HISTORY_PAGE_LIMIT,
|
|
144
|
+
RESTORE_BACKUP_MESSAGE,
|
|
145
|
+
isNoChangesError,
|
|
146
|
+
providerFor,
|
|
147
|
+
resolveLogger,
|
|
148
|
+
restoreVersionWithBackup,
|
|
149
|
+
shortOid
|
|
150
|
+
} from "./index-5bxx0c4y.js";
|
|
151
|
+
import {
|
|
152
|
+
capabilitiesFor,
|
|
153
|
+
detectProjectSource,
|
|
154
|
+
findEnclosingRepoDir,
|
|
155
|
+
repoSubPath
|
|
156
|
+
} from "./index-1tyj4bk3.js";
|
|
157
|
+
import"./index-yja077f6.js";
|
|
158
|
+
import"./index-37x76zdn.js";
|
|
159
|
+
export {
|
|
160
|
+
writeAppHeartbeat,
|
|
161
|
+
verifyRepoReadable,
|
|
162
|
+
validateProjectPlugins,
|
|
163
|
+
testRemoteAccess,
|
|
164
|
+
syncProject,
|
|
165
|
+
substituteVariables,
|
|
166
|
+
startPreviewServer,
|
|
167
|
+
splitOutPath,
|
|
168
|
+
slugifyProjectName,
|
|
169
|
+
shortOid,
|
|
170
|
+
setPublishProviderConfig,
|
|
171
|
+
setPluginEnabled,
|
|
172
|
+
setManifestFields,
|
|
173
|
+
setActiveStyles,
|
|
174
|
+
scaffoldProject,
|
|
175
|
+
saveSnippet,
|
|
176
|
+
saveProjectAsTemplate,
|
|
177
|
+
sanitizeCloneFolderName,
|
|
178
|
+
runPublish,
|
|
179
|
+
runLint,
|
|
180
|
+
runChecks,
|
|
181
|
+
runBuild,
|
|
182
|
+
ruleSyntax,
|
|
183
|
+
ruleRiskyProps,
|
|
184
|
+
ruleRemoteUrls,
|
|
185
|
+
rulePagedjsCrashSelectors,
|
|
186
|
+
revertTheme,
|
|
187
|
+
restoreVersionWithBackup,
|
|
188
|
+
resolvePublishRequest,
|
|
189
|
+
resolveLogger,
|
|
190
|
+
resolveGitHubClientId,
|
|
191
|
+
resolveConflicts,
|
|
192
|
+
resolveConfig,
|
|
193
|
+
resolveCheckSelectors,
|
|
194
|
+
resolveBuiltInTheme,
|
|
195
|
+
resolveActiveStyles,
|
|
196
|
+
reportMissingTools,
|
|
197
|
+
repoSubPath,
|
|
198
|
+
removeProjectTheme,
|
|
199
|
+
removeAppHeartbeat,
|
|
200
|
+
redactCredential,
|
|
201
|
+
recover,
|
|
202
|
+
readThemeCss,
|
|
203
|
+
readSnippet,
|
|
204
|
+
readPublishSettings,
|
|
205
|
+
readProjectProvenance,
|
|
206
|
+
readManifestFields,
|
|
207
|
+
readAppHeartbeat,
|
|
208
|
+
pushChanges,
|
|
209
|
+
pullChanges,
|
|
210
|
+
publishProviderFor,
|
|
211
|
+
publishCredentialKey,
|
|
212
|
+
publishConnectionStatus,
|
|
213
|
+
providerFor,
|
|
214
|
+
provenancePath,
|
|
215
|
+
preflightStructuralReason,
|
|
216
|
+
parseRemoteOrigin,
|
|
217
|
+
openPath,
|
|
218
|
+
onlineCopyPath,
|
|
219
|
+
normalizeForgeHost,
|
|
220
|
+
migrateUrlCredential,
|
|
221
|
+
log,
|
|
222
|
+
loadManifestWithPath,
|
|
223
|
+
loadManifest,
|
|
224
|
+
listSnippets,
|
|
225
|
+
listRepoBooks,
|
|
226
|
+
listPublishProviders,
|
|
227
|
+
listPublishAccounts,
|
|
228
|
+
listProjectThemes,
|
|
229
|
+
listProjectStyles,
|
|
230
|
+
listProjectPlugins,
|
|
231
|
+
listGitHubRepositories,
|
|
232
|
+
listGitHubBranches,
|
|
233
|
+
listCustomTemplates,
|
|
234
|
+
listBuiltInThemes,
|
|
235
|
+
listBuiltInTemplates,
|
|
236
|
+
knownForgeTokenUrl,
|
|
237
|
+
isUnbornRepo,
|
|
238
|
+
isSshRemoteUrl,
|
|
239
|
+
isRepoNeedsRecoveryError,
|
|
240
|
+
isNoChangesError,
|
|
241
|
+
isGitInternalPath,
|
|
242
|
+
isAppHeartbeatFresh,
|
|
243
|
+
inspectRepo,
|
|
244
|
+
inspectImage,
|
|
245
|
+
importThemeFromUrl,
|
|
246
|
+
importThemeFromFolder,
|
|
247
|
+
importThemeFromFile,
|
|
248
|
+
importTemplateFromFolder,
|
|
249
|
+
heartbeatTtlMs,
|
|
250
|
+
hasProjectManifest,
|
|
251
|
+
getSystemDiagnostics,
|
|
252
|
+
getPreviousTheme,
|
|
253
|
+
getChecks,
|
|
254
|
+
getCheckById,
|
|
255
|
+
getActiveTheme,
|
|
256
|
+
formatReport,
|
|
257
|
+
forgeKindForHost,
|
|
258
|
+
findEnclosingRepoDir,
|
|
259
|
+
extractVariables,
|
|
260
|
+
extractUrlCredential,
|
|
261
|
+
executeValidation,
|
|
262
|
+
executeAndReport,
|
|
263
|
+
escapeYamlScalar,
|
|
264
|
+
diagnoseProjectRemote,
|
|
265
|
+
detectProjectSource,
|
|
266
|
+
deleteSnippet,
|
|
267
|
+
defaultConfigDir,
|
|
268
|
+
connectPublishProvider,
|
|
269
|
+
connectGenericHost,
|
|
270
|
+
cloneRepository,
|
|
271
|
+
classifyGitError,
|
|
272
|
+
classifyFromHealth,
|
|
273
|
+
checkToolAvailability,
|
|
274
|
+
checkCss,
|
|
275
|
+
capabilitiesFor,
|
|
276
|
+
buildRecoveryContext,
|
|
277
|
+
buildPreflightDiagnostics,
|
|
278
|
+
autoSyncDelayMs,
|
|
279
|
+
autoSnapshotDelayMs,
|
|
280
|
+
applyTheme,
|
|
281
|
+
appHeartbeatPath,
|
|
282
|
+
adoptFolder,
|
|
283
|
+
addNpmPlugin,
|
|
284
|
+
addLocalPlugin,
|
|
285
|
+
THEMES_DIR,
|
|
286
|
+
SYNC_SNAPSHOT_MESSAGE,
|
|
287
|
+
SNIPPETS_DIR,
|
|
288
|
+
RepoNeedsRecoveryError,
|
|
289
|
+
RESTORE_BACKUP_MESSAGE,
|
|
290
|
+
RECOMMENDED_PLUGINS,
|
|
291
|
+
PublishSelectionsStore,
|
|
292
|
+
PLUGINS_DIR,
|
|
293
|
+
MANIFEST_FILENAMES,
|
|
294
|
+
HISTORY_PAGE_LIMIT,
|
|
295
|
+
GitHubAuthProvider,
|
|
296
|
+
GenericTokenAuthProvider,
|
|
297
|
+
GITHUB_HOST,
|
|
298
|
+
FileTokenStore,
|
|
299
|
+
BuildError,
|
|
300
|
+
BUILT_IN_THEME_IDS,
|
|
301
|
+
BUILT_IN_TEMPLATE_IDS,
|
|
302
|
+
AUTO_SYNC_MIN_MINUTES,
|
|
303
|
+
AUTO_SYNC_MAX_MINUTES,
|
|
304
|
+
AUTO_SYNC_DEFAULT_MINUTES,
|
|
305
|
+
AUTO_SNAPSHOT_MIN_MINUTES,
|
|
306
|
+
AUTO_SNAPSHOT_MESSAGE,
|
|
307
|
+
AUTO_SNAPSHOT_MAX_MINUTES,
|
|
308
|
+
AUTO_SNAPSHOT_DEFAULT_MINUTES,
|
|
309
|
+
APP_HEARTBEAT_FRESH_MS
|
|
310
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* app-heartbeat.ts — detect a running Gutterpress app before a CLI repair
|
|
3
|
+
* mutates the repo.
|
|
4
|
+
*
|
|
5
|
+
* WHY: `gutterpress repair` and the desktop's own recovery path both call into
|
|
6
|
+
* the recovery subsystem, but each runs in its own OS process. The per-repo
|
|
7
|
+
* FIFO lock (source-provider.ts) only serializes operations WITHIN a process,
|
|
8
|
+
* so `gutterpress repair` run from a terminal while the desktop has the same
|
|
9
|
+
* project open can race a live sync/snapshot. Rather than build a
|
|
10
|
+
* cross-process lock manager, the desktop leaves a small liveness marker
|
|
11
|
+
* behind while a project is open, and `repair` checks it before mutating.
|
|
12
|
+
*
|
|
13
|
+
* The marker lives at `<repoDir>/.git/gutterpress-app-heartbeat` (NOT in
|
|
14
|
+
* userData) so `repair`, given only a repo directory, can find it without any
|
|
15
|
+
* knowledge of the desktop's install. It is deliberately NOT a lock:
|
|
16
|
+
* - It never blocks the desktop itself, or any other repair run with --force.
|
|
17
|
+
* - It carries no locking semantics — just "an app touched this repo
|
|
18
|
+
* recently, maybe check before you assume it's idle".
|
|
19
|
+
* - It is written best-effort (a failed write must never surprise the
|
|
20
|
+
* author with a crash) and read best-effort (a missing/corrupt file
|
|
21
|
+
* means "no app appears to have this open", not an error).
|
|
22
|
+
*
|
|
23
|
+
* Two invariants that keep this file inert to the rest of the recovery
|
|
24
|
+
* subsystem:
|
|
25
|
+
* - Filename does not match any pattern `findLockCandidates` scans
|
|
26
|
+
* (recover-stale-lock.ts: fixed top-level `*.lock` names + `refs/**`) —
|
|
27
|
+
* so stale-lock recovery can never see or remove it.
|
|
28
|
+
* - It lives under `.git`, which `hasPendingChanges`/`listWorkdirChanges`
|
|
29
|
+
* (source-provider.ts) always ignores (`git.isIgnored` treats a `.git`
|
|
30
|
+
* path segment as ignored unconditionally) — so it can never look like an
|
|
31
|
+
* uncommitted author change.
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Fallback freshness window used only when a heartbeat carries no `ttlMs`
|
|
35
|
+
* (an older writer, or one with no cadence to report). Prefer a
|
|
36
|
+
* cadence-derived TTL — see {@link heartbeatTtlMs} — since the actual
|
|
37
|
+
* refresh cadence ranges 1 min–24 h (AUTO_SYNC_MIN/MAX_MINUTES,
|
|
38
|
+
* host-policy.ts) and a fixed 2-minute window reads a live app as "closed"
|
|
39
|
+
* for most of any longer cadence.
|
|
40
|
+
*/
|
|
41
|
+
export declare const APP_HEARTBEAT_FRESH_MS: number;
|
|
42
|
+
export interface AppHeartbeat {
|
|
43
|
+
/** PID of the process that wrote the heartbeat (diagnostic only — never
|
|
44
|
+
* used to `kill`/signal anything). */
|
|
45
|
+
pid: number;
|
|
46
|
+
/** Epoch ms the heartbeat was last (re)written. */
|
|
47
|
+
timestamp: number;
|
|
48
|
+
/**
|
|
49
|
+
* Freshness window (ms) the writer says applies to THIS heartbeat, derived
|
|
50
|
+
* from its own refresh cadence (see {@link heartbeatTtlMs}). When present,
|
|
51
|
+
* `isAppHeartbeatFresh` honors it instead of its `maxAgeMs` fallback param —
|
|
52
|
+
* the writer knows how often it actually refreshes; the reader doesn't.
|
|
53
|
+
*/
|
|
54
|
+
ttlMs?: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The freshness window a heartbeat writer should stamp for a given refresh
|
|
58
|
+
* cadence (the actual interval this writer refreshes the marker on — e.g.
|
|
59
|
+
* `autoSyncDelayMs(settings.versionHistory)`). `null` (feature disabled, no
|
|
60
|
+
* periodic refresh at all) falls back to {@link APP_HEARTBEAT_FRESH_MS}.
|
|
61
|
+
*
|
|
62
|
+
* Standard heartbeat rule: TTL should comfortably exceed the refresh period
|
|
63
|
+
* so one missed/delayed tick doesn't read as "closed". Exported so both the
|
|
64
|
+
* desktop (the writer, which knows its own cadence) and tests can compute it
|
|
65
|
+
* consistently.
|
|
66
|
+
*/
|
|
67
|
+
export declare function heartbeatTtlMs(periodicMs: number | null): number;
|
|
68
|
+
/** Absolute path to the heartbeat marker for a repo. */
|
|
69
|
+
export declare function appHeartbeatPath(repoDir: string): string;
|
|
70
|
+
/**
|
|
71
|
+
* Write/refresh the heartbeat marker. Best-effort: a failed write (missing
|
|
72
|
+
* `.git` dir, read-only filesystem, …) is swallowed — it must never surface
|
|
73
|
+
* as an error to the author, since it is only ever a background liveness
|
|
74
|
+
* signal, not a required operation.
|
|
75
|
+
*
|
|
76
|
+
* `ttlMs`, when supplied, should be {@link heartbeatTtlMs} applied to this
|
|
77
|
+
* writer's OWN actual refresh cadence — it is stamped into the marker so a
|
|
78
|
+
* reader with no knowledge of that cadence still judges freshness correctly.
|
|
79
|
+
* Omit it (or pass `undefined`) when the caller has no cadence to report; the
|
|
80
|
+
* reader then falls back to its own `maxAgeMs` default.
|
|
81
|
+
*/
|
|
82
|
+
export declare function writeAppHeartbeat(repoDir: string, now?: number, pid?: number, ttlMs?: number): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Remove the heartbeat marker (project close / app quit). Best-effort: an
|
|
85
|
+
* already-missing or unreadable file is not an error.
|
|
86
|
+
*/
|
|
87
|
+
export declare function removeAppHeartbeat(repoDir: string): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Read + parse the heartbeat marker. Returns `null` when absent, unreadable,
|
|
90
|
+
* or corrupt (never throws — a damaged heartbeat is just "no signal").
|
|
91
|
+
*/
|
|
92
|
+
export declare function readAppHeartbeat(repoDir: string): Promise<AppHeartbeat | null>;
|
|
93
|
+
/**
|
|
94
|
+
* True when a FRESH heartbeat exists for this repo — i.e. the gutterpress app
|
|
95
|
+
* appears to have this project open right now. Absent/stale/corrupt all read
|
|
96
|
+
* as "not open" (fail open: `repair` should not block on ambiguous signal).
|
|
97
|
+
*
|
|
98
|
+
* Freshness window: the heartbeat's own stamped `ttlMs` (derived from the
|
|
99
|
+
* writer's actual refresh cadence — see {@link heartbeatTtlMs}) wins when
|
|
100
|
+
* present; `maxAgeMs` is only a fallback for a heartbeat with none.
|
|
101
|
+
*/
|
|
102
|
+
export declare function isAppHeartbeatFresh(repoDir: string, now?: number, maxAgeMs?: number): Promise<boolean>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asset inlining — turns a project's stylesheets into a self-contained
|
|
3
|
+
* `<style>` block and computes the image copy plan.
|
|
4
|
+
*
|
|
5
|
+
* A `styles:` entry is a path to READ, not a file to ship: its text (plus any
|
|
6
|
+
* local `@import` closure) is inlined, so a stylesheet's location is irrelevant
|
|
7
|
+
* to the output and themes/shared design systems need no copying. Fonts become
|
|
8
|
+
* `data:` URIs — which is what guarantees the byte-identical face reaches
|
|
9
|
+
* Chromium, and therefore the PDF. Small images inline; large ones are copied.
|
|
10
|
+
*
|
|
11
|
+
* A missing stylesheet or font is a build error here, at read time, rather than
|
|
12
|
+
* a 404 during pagination that Paged.js parsed as CSS or silently replaced with
|
|
13
|
+
* a system face.
|
|
14
|
+
*
|
|
15
|
+
* Bundle-safe (CLAUDE.md §1/§3): postcss only.
|
|
16
|
+
*/
|
|
17
|
+
/** Inline images up to this size; copy larger ones (full-bleed page art). */
|
|
18
|
+
export declare const IMAGE_INLINE_MAX_BYTES: number;
|
|
19
|
+
/** One file the build must copy into the output directory. */
|
|
20
|
+
export interface AssetCopy {
|
|
21
|
+
/** Absolute path of the source file. */
|
|
22
|
+
from: string;
|
|
23
|
+
/** Output-relative destination (POSIX separators), e.g. `images/cover.png`. */
|
|
24
|
+
to: string;
|
|
25
|
+
}
|
|
26
|
+
export interface InlineStylesResult {
|
|
27
|
+
/** Combined, fully-inlined CSS ready to drop into a `<style>` element. */
|
|
28
|
+
css: string;
|
|
29
|
+
/** Files the build must copy into `outDir` (content-addressed CSS images). */
|
|
30
|
+
copies: AssetCopy[];
|
|
31
|
+
/** Non-fatal notices (e.g. a remote `url()` left untouched). */
|
|
32
|
+
warnings: string[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Decode percent-escapes so `my%20photo.png` resolves to `my photo.png`.
|
|
36
|
+
* Falls back to the raw string for a literal `%` in a filename.
|
|
37
|
+
*/
|
|
38
|
+
export declare function decodeRef(ref: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Inline the active stylesheets into one CSS string, IN ORDER — the manifest's
|
|
41
|
+
* `styles:` list is the cascade order (theme first, override second).
|
|
42
|
+
*/
|
|
43
|
+
export declare function inlineStyles(projectDir: string, stylePaths: string[]): Promise<InlineStylesResult>;
|
|
44
|
+
/**
|
|
45
|
+
* Every file the active stylesheets READ: the stylesheets themselves, their
|
|
46
|
+
* local `@import` closure, and every local `url()` target (fonts, images).
|
|
47
|
+
* Absolute paths, deduped, in no particular order.
|
|
48
|
+
*
|
|
49
|
+
* This is {@link inlineStyles}'s traversal with the work removed — it resolves
|
|
50
|
+
* the same references but never reads an asset's bytes, base64-encodes a font,
|
|
51
|
+
* or plans a copy, so it is cheap enough to re-run whenever the manifest might
|
|
52
|
+
* have changed. It is deliberately TOTAL: an unreadable stylesheet, an
|
|
53
|
+
* unparseable one, and a `url()` pointing at a file that does not exist are all
|
|
54
|
+
* skipped silently. The build reports those properly (as errors, with
|
|
55
|
+
* locations); a watcher must not throw or it stops watching everything.
|
|
56
|
+
*
|
|
57
|
+
* Used by the preview watcher to follow a book's dependencies out of its own
|
|
58
|
+
* folder — a shared theme's `url("../../fonts/Publisher.woff2")` is a file an
|
|
59
|
+
* external design tool can replace WITHOUT touching any CSS, and until it is
|
|
60
|
+
* watched, that edit leaves the "authoritative" preview stale with nothing to
|
|
61
|
+
* correct it.
|
|
62
|
+
*/
|
|
63
|
+
export declare function collectStyleDependencies(projectDir: string, stylePaths: string[]): Promise<string[]>;
|
|
64
|
+
/**
|
|
65
|
+
* Turn the renderer's recorded image references into a copy plan. Images keep
|
|
66
|
+
* their authored relative path, so the author's folder layout is what ships.
|
|
67
|
+
* A `../` reference is rejected rather than silently relocated — it has no
|
|
68
|
+
* representable path under the output root.
|
|
69
|
+
*/
|
|
70
|
+
export declare function planImageCopies(projectDir: string, refs: Iterable<string>): Promise<{
|
|
71
|
+
copies: AssetCopy[];
|
|
72
|
+
errors: string[];
|
|
73
|
+
}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Browser } from "puppeteer-core";
|
|
2
|
+
/**
|
|
3
|
+
* Start the Chromium launch in the background without awaiting it, so the cold
|
|
4
|
+
* start overlaps with other build work. Safe to call repeatedly; only the first
|
|
5
|
+
* call launches. If the launch fails, the pool resets so a later call retries.
|
|
6
|
+
*/
|
|
7
|
+
export declare function prewarmBrowser(timeoutMs: number): void;
|
|
8
|
+
/**
|
|
9
|
+
* Get the shared browser, launching (and pre-warming) on first use. Reused
|
|
10
|
+
* across renders in the same process.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getBrowser(timeoutMs: number): Promise<Browser>;
|
|
13
|
+
/**
|
|
14
|
+
* Close the shared browser. A one-shot CLI build calls this when done so the
|
|
15
|
+
* process can exit; a preview/watch server calls it on shutdown.
|
|
16
|
+
*/
|
|
17
|
+
export declare function closeBrowser(): Promise<void>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CLI's exit-code contract (UX finding M47) — ONE place the numbers are
|
|
3
|
+
* defined. Every command's process exit code means the same thing across
|
|
4
|
+
* `build`/`preview`/`lint`/`validate`/`preflight`/`audit`/`repair`/`publish`/
|
|
5
|
+
* `new`, so CI can branch on it without parsing output:
|
|
6
|
+
*
|
|
7
|
+
* 0 OK — clean run, nothing to fix.
|
|
8
|
+
* 1 FINDINGS — the command completed but reported findings/validation
|
|
9
|
+
* failures (validate/preflight/audit findings, a build's
|
|
10
|
+
* quality-gate rejection). The invocation itself was fine;
|
|
11
|
+
* the content wasn't. Standalone `gutterpress lint` uses this
|
|
12
|
+
* code for CSS lint failures too, but the `build` pipeline's
|
|
13
|
+
* own CSS-lint gate is a documented historical exception
|
|
14
|
+
* that exits 2 instead (see build-runner.ts's
|
|
15
|
+
* runQualityGates) — not a bug, just an inconsistency kept
|
|
16
|
+
* for back-compat.
|
|
17
|
+
* 2 USAGE — the invocation itself was wrong: a bad flag, positional,
|
|
18
|
+
* preset, or value. See {@link UsageError} in ./cli-args.ts.
|
|
19
|
+
* 3 PIPELINE — the build/render/export pipeline failed for a reason
|
|
20
|
+
* unrelated to CLI usage or findings (I/O error, missing
|
|
21
|
+
* tool, renderer crash, timeout). See {@link BuildError}.
|
|
22
|
+
*
|
|
23
|
+
* Commands and error classes import from here instead of hardcoding exit-code
|
|
24
|
+
* literals; `build-runner.ts` still passes an explicit code per gate (e.g.
|
|
25
|
+
* pre/post-build validation failures use `EXIT_CODES.FINDINGS`) where a
|
|
26
|
+
* specific stage needs a code other than this class's default.
|
|
27
|
+
*/
|
|
28
|
+
export declare const EXIT_CODES: {
|
|
29
|
+
readonly OK: 0;
|
|
30
|
+
readonly FINDINGS: 1;
|
|
31
|
+
readonly USAGE: 2;
|
|
32
|
+
readonly PIPELINE: 3;
|
|
33
|
+
};
|
|
34
|
+
export type ExitCode = (typeof EXIT_CODES)[keyof typeof EXIT_CODES];
|
|
35
|
+
/**
|
|
36
|
+
* BuildError — the canonical error type for build/pipeline failures.
|
|
37
|
+
*
|
|
38
|
+
* Deliberately dependency-free and in its own module: consumers that only need
|
|
39
|
+
* the error type (e.g. `utils/file-utils.ts`, used by the preview server) must
|
|
40
|
+
* NOT drag in `build-runner.ts`'s whole pipeline graph (markdown rendering,
|
|
41
|
+
* ghostscript, paged.js, the browser pool) just to reference an Error class.
|
|
42
|
+
* `build-runner.ts` re-exports this so existing `import { BuildError } from
|
|
43
|
+
* "./build-runner"` call sites keep working.
|
|
44
|
+
*
|
|
45
|
+
* Defaults to `EXIT_CODES.PIPELINE` (3) — distinct from `UsageError`'s
|
|
46
|
+
* `EXIT_CODES.USAGE` (2) default, per the contract above. Call sites that need
|
|
47
|
+
* a different code (findings-style gate failures) still pass one explicitly.
|
|
48
|
+
*/
|
|
49
|
+
export declare class BuildError extends Error {
|
|
50
|
+
exitCode: number;
|
|
51
|
+
constructor(message: string, exitCode?: number, options?: ErrorOptions);
|
|
52
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type PdfxFingerprintConfig = {
|
|
2
|
+
requestedFlavor: "x1a" | "x3" | null;
|
|
3
|
+
resolvedFlavor: "x1a" | "x3";
|
|
4
|
+
iccPath: string | null;
|
|
5
|
+
stripAnnotations: boolean | null;
|
|
6
|
+
};
|
|
7
|
+
export type BuildFingerprintInput = {
|
|
8
|
+
command: "build";
|
|
9
|
+
outputDir: string;
|
|
10
|
+
sourceDir?: string;
|
|
11
|
+
args: Record<string, unknown>;
|
|
12
|
+
pdfx: PdfxFingerprintConfig;
|
|
13
|
+
};
|
|
14
|
+
export declare function writeBuildFingerprint(input: BuildFingerprintInput): Promise<string>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { BuildFormat } from "./build-runner";
|
|
2
|
+
import type { PdfRenderer } from "./pagination";
|
|
3
|
+
/**
|
|
4
|
+
* Probe for every tool this build will actually spawn, BEFORE the pipeline
|
|
5
|
+
* starts running for real. Fails fast with one error that lists every
|
|
6
|
+
* missing tool plus per-platform install commands.
|
|
7
|
+
*
|
|
8
|
+
* Without this, the user waits for lint + render (30-90s) before hitting
|
|
9
|
+
* `spawn gs ENOENT` from deep inside the post-processing. 50ms preflight
|
|
10
|
+
* makes the failure actionable and immediate.
|
|
11
|
+
*
|
|
12
|
+
* Chromium is REQUIRED for any non-html format and surfaces the same
|
|
13
|
+
* install-instructions error from requireChromiumExecutable() if missing.
|
|
14
|
+
* Ghostscript is REQUIRED for pdfx (CMYK conversion) only — plain pdf's
|
|
15
|
+
* /Creator metadata is stamped via pdf-lib in-process (see ghostscript.ts's
|
|
16
|
+
* stampCreator) and needs no system tool at all.
|
|
17
|
+
* qpdf is REQUIRED for pdfx + stripAnnotations (default true).
|
|
18
|
+
*/
|
|
19
|
+
export declare function preflightBuildTools(format: BuildFormat, opts: {
|
|
20
|
+
stripAnnotations?: boolean;
|
|
21
|
+
pdfRenderer?: PdfRenderer;
|
|
22
|
+
}, config: {
|
|
23
|
+
pdfx: {
|
|
24
|
+
stripAnnotations: boolean;
|
|
25
|
+
};
|
|
26
|
+
}): Promise<void>;
|
|
27
|
+
export interface Gates {
|
|
28
|
+
lint: boolean;
|
|
29
|
+
preValidate: boolean;
|
|
30
|
+
postValidate: boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare function computeGates(format: BuildFormat, opts: {
|
|
33
|
+
skipLint?: boolean;
|
|
34
|
+
skipPreValidate?: boolean;
|
|
35
|
+
skipPostValidate?: boolean;
|
|
36
|
+
}, config: {
|
|
37
|
+
lint: {
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
};
|
|
40
|
+
validate: {
|
|
41
|
+
enabled: boolean;
|
|
42
|
+
};
|
|
43
|
+
}): Gates;
|