gutterpress 0.10.9-beta.1 → 0.10.10-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.
- package/README.md +71 -8
- package/dist/{README-jntqyj1z.md → README-3zk4tgnj.md} +4 -4
- package/dist/{README-6c7fda1s.md → README-7x5akcns.md} +5 -4
- package/dist/api/index.d.ts +7 -4
- package/dist/api/index.js +22 -12
- package/dist/{audit-2x958vnj.js → audit-ek36tf4q.js} +5 -5
- package/dist/{build-dqv3505a.js → build-bxavfz3j.js} +6 -6
- package/dist/checks/source/dangling-links.d.ts +18 -0
- package/dist/checks/source/index.d.ts +1 -0
- package/dist/checks/source/local-ref-parser.d.ts +13 -0
- package/dist/{cli-fwh6rkev.js → cli-12epgrva.js} +1 -1
- package/dist/{cli-vhdvkqdd.js → cli-5fqr02je.js} +5480 -5182
- package/dist/{cli-bzxqtvrk.js → cli-75qkn0k5.js} +1 -1
- package/dist/{cli-bx950tb4.js → cli-k8f9eb12.js} +22 -26
- package/dist/{cli-0tgbgwnj.js → cli-tvpq2ht9.js} +1 -1
- package/dist/{cli-w692g6dx.js → cli-vje8g3w8.js} +88 -1
- package/dist/cli.js +16 -16
- package/dist/{components-0mmswvvm.yaml → components-dhgv2sm7.yaml} +2 -2
- package/dist/{doctor-55r0ghtc.js → doctor-tgmedr7g.js} +2 -2
- package/dist/{engine-d46wgg99.js → engine-pt2acjb5.js} +2 -2
- package/dist/{engine-19mshh07.js → engine-qtmvaqt7.js} +1 -1
- package/dist/{ext-04n7hydk.js → ext-jjzmafve.js} +52 -8
- package/dist/{index-zwcv1njy.js → index-5dgxeevv.js} +22 -26
- package/dist/{index-dhgzkhs7.js → index-a0e2253t.js} +1 -1
- package/dist/{index-erwh3bww.js → index-d4wrww4b.js} +1398 -1185
- package/dist/{index-dtrftayr.js → index-f833dtg9.js} +88 -1
- package/dist/index.js +102 -15
- package/dist/lib/build-error.d.ts +6 -5
- package/dist/lib/build-preflight.d.ts +11 -1
- package/dist/lib/build-runner.d.ts +49 -16
- package/dist/lib/build-staging.d.ts +36 -0
- package/dist/lib/extension-import.d.ts +4 -4
- package/dist/lib/extension-manager.d.ts +3 -3
- package/dist/lib/extension-manifest.d.ts +91 -87
- package/dist/lib/extension-scaffold.d.ts +1 -1
- package/dist/lib/extension-search.d.ts +46 -0
- package/dist/lib/host-policy.d.ts +10 -12
- package/dist/lib/lint-runner.d.ts +16 -9
- package/dist/lib/missing-asset-placeholder.d.ts +11 -0
- package/dist/lib/npm-registry.d.ts +22 -0
- package/dist/lib/source-provider.d.ts +58 -0
- package/dist/lib/validation-exec.d.ts +11 -0
- package/dist/{lint-c7a4j3ww.js → lint-5vbq6yjb.js} +5 -5
- package/dist/{new-pw3eez61.js → new-qws45t02.js} +6 -6
- package/dist/package-97gm31sg.json +10 -0
- package/dist/{package-rm9d2tht.json → package-9rv69pxm.json} +4 -1
- package/dist/package-aenwjew3.json +28 -0
- package/dist/package-gag6ykwn.json +10 -0
- package/dist/package-nrhkwf2m.json +10 -0
- package/dist/{plugin.test.js-npnfhyca.tpl → plugin.test.js-k2r87k04.tpl} +9 -8
- package/dist/{preflight-77zyws1q.js → preflight-4ywt3399.js} +5 -5
- package/dist/{preview-x7qqhmxf.js → preview-4c3tcsn4.js} +6 -6
- package/dist/{publish-ms6abf6g.js → publish-m6bme9a8.js} +5 -5
- package/dist/{source-provider-2j5x2hyw.js → source-provider-2cnc5hry.js} +7 -1
- package/dist/{source-provider-kn41jmbs.js → source-provider-y1kscr1h.js} +7 -1
- package/dist/{tokens-e4xk3x4v.css → tokens-2sracx1w.css} +1 -1
- package/dist/{validate-vw59jcq7.js → validate-avtb9drn.js} +5 -5
- package/package.json +1 -1
- package/dist/gutterpress-m98e2w2d.json +0 -8
- package/dist/gutterpress-x2ycdsb8.json +0 -17
- package/dist/theme-etj4gxck.json +0 -9
- package/dist/theme-s2rg7xe7.json +0 -9
- package/dist/theme-vktedy8q.json +0 -9
package/README.md
CHANGED
|
@@ -147,7 +147,7 @@ Scaffold a new book, plugin or theme from an embedded starter template — the f
|
|
|
147
147
|
|
|
148
148
|
`--kind book` is the default. Every new book picks the vendor preset it's designed for: `dtrpg` (DriveThruRPG print-on-demand), `book` (neutral 6x9in trade book), or `custom` (you supply the trim size in points).
|
|
149
149
|
|
|
150
|
-
`--kind plugin` and `--kind theme` scaffold an **extension package** instead — a folder with a `
|
|
150
|
+
`--kind plugin` and `--kind theme` scaffold an **extension package** instead — a folder with a `package.json` a book can load. The plugin starter carries a declarative marker table, a hand-written markdown-it rule, component CSS and a `bun test` fixture suite; the theme starter carries the six-file layered CSS architecture (tokens / base / components / page-templates / page-rules / book), each sheet opening with its own OWNS / MUST NOT CONTAIN contract header. Both include a README explaining which conventions are load-bearing. An extension needs no preset, trim size or publish target, so the book-only flags below are rejected rather than ignored when `--kind` names one — and `--prefix`/`--description` are likewise rejected for a book.
|
|
151
151
|
|
|
152
152
|
```sh
|
|
153
153
|
gutterpress new <name> [--kind <id>] [options]
|
|
@@ -194,7 +194,7 @@ gutterpress preview [input-dir] [options]
|
|
|
194
194
|
--icc <path> Path to ICC profile (required for --format pdfx)
|
|
195
195
|
--manifest <path> Path to manifest.yaml (pdf|pdfx only)
|
|
196
196
|
--strip-annotations Strip PDF annotations for PDF/X compliance (pdfx only)
|
|
197
|
-
--skip-lint Skip CSS
|
|
197
|
+
--skip-lint Skip the CSS print-safety check (pdf|pdfx only)
|
|
198
198
|
--skip-pre-validate Skip pre-build validation (pdf|pdfx only)
|
|
199
199
|
--skip-post-validate Skip post-build PDF/X validation (pdfx only)
|
|
200
200
|
--allow-shrink Build anyway when content is wider than the page content box (pdf|pdfx only)
|
|
@@ -202,7 +202,7 @@ gutterpress preview [input-dir] [options]
|
|
|
202
202
|
|
|
203
203
|
### `gutterpress build`
|
|
204
204
|
|
|
205
|
-
Build a PDF (default) or HTML output. Pipeline: `
|
|
205
|
+
Build a PDF (default) or HTML output. Pipeline: `validate:pre → convert → assets → build → validate:post`. The CSS print-safety check (remote urls, risky print effects, page-containment) runs once, inside `validate:pre`, as the `source.stylelint` check — there is no separate lint phase.
|
|
206
206
|
|
|
207
207
|
```sh
|
|
208
208
|
gutterpress build [input-dir] [options]
|
|
@@ -214,12 +214,27 @@ gutterpress build [input-dir] [options]
|
|
|
214
214
|
--icc <path> Path to ICC profile (required for --format pdfx)
|
|
215
215
|
--manifest <path> Path to manifest.yaml
|
|
216
216
|
--strip-annotations Strip PDF annotations for PDF/X compliance
|
|
217
|
-
--skip-lint Skip the CSS print-safety
|
|
217
|
+
--skip-lint Skip the CSS print-safety check (default: it runs for pdf/pdfx)
|
|
218
218
|
--skip-pre-validate Skip pre-build validation
|
|
219
219
|
--skip-post-validate Skip post-build PDF/X validation
|
|
220
220
|
--allow-shrink Build anyway when content is wider than the page content box. Chromium then scales the WHOLE book down to fit it — the build reports that whole-document scale (e.g. "about 0.72x its declared size") plus every offender, as warnings.
|
|
221
221
|
```
|
|
222
222
|
|
|
223
|
+
A `--out <dir>` is shared between formats safely: each build delivers only
|
|
224
|
+
what its own format produces, so it never disturbs another format's output
|
|
225
|
+
already sitting in that folder. `--format html` writes `book.html` (with the
|
|
226
|
+
viewer bundle), `index.html`, and referenced assets. `--format pdf`/`pdfx`
|
|
227
|
+
writes only its own PDF (e.g. `my-book-pdf.pdf`). This is what makes the
|
|
228
|
+
two-command sequence below safe:
|
|
229
|
+
|
|
230
|
+
```sh
|
|
231
|
+
gutterpress build --format html --out ./_site
|
|
232
|
+
gutterpress build --format pdf --out ./_site
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
`./_site` ends up with the paginating `book.html` from the first command
|
|
236
|
+
plus the PDF from the second — the pdf build never overwrites `book.html`.
|
|
237
|
+
|
|
223
238
|
### `gutterpress publish`
|
|
224
239
|
|
|
225
240
|
Push a built PDF/HTML artifact to a publishing platform (itch.io, DriveThruRPG, Amazon KDP, Azure Static Web Apps, Shopify, Google Drive), headlessly and CI-safely. Credentials live in a 0600 user-config store (never in the project); provider env vars override it for CI. Most providers connect with a pasted API key; Google Drive connects through your browser instead (`--connect` opens the sign-in page — nothing to paste).
|
|
@@ -269,9 +284,11 @@ gutterpress lint [files] [options]
|
|
|
269
284
|
|
|
270
285
|
Common findings include remote `url(...)` references, effects that rasterize
|
|
271
286
|
print text, and declarations on core page wrappers that could clip or trap
|
|
272
|
-
out-of-flow art.
|
|
273
|
-
|
|
274
|
-
|
|
287
|
+
out-of-flow art. Each finding is listed with its file and `line:col`, so you
|
|
288
|
+
can see exactly which selectors rasterize text; a property at its initial value
|
|
289
|
+
(`filter: none`, `will-change: auto`) is not a finding. The source-level
|
|
290
|
+
containment check is an early signal; the build-time `engine.layer.trapped`
|
|
291
|
+
diagnostic inspects the authoritative live ancestor chain.
|
|
275
292
|
|
|
276
293
|
### `gutterpress validate`
|
|
277
294
|
|
|
@@ -344,7 +361,7 @@ terminal is the same entry the GUI shows.
|
|
|
344
361
|
```sh
|
|
345
362
|
gutterpress ext
|
|
346
363
|
|
|
347
|
-
--help Show ext subcommands (list, add, remove, enable, disable)
|
|
364
|
+
--help Show ext subcommands (list, add, remove, enable, disable, search)
|
|
348
365
|
```
|
|
349
366
|
|
|
350
367
|
Every subcommand takes the project directory as an optional trailing
|
|
@@ -424,6 +441,32 @@ gutterpress ext disable markdown-it-mark ./my-book
|
|
|
424
441
|
gutterpress ext enable markdown-it-mark ./my-book
|
|
425
442
|
```
|
|
426
443
|
|
|
444
|
+
#### `gutterpress ext search`
|
|
445
|
+
|
|
446
|
+
Search **npm** for extensions — the same list the desktop app's Features view
|
|
447
|
+
shows under "Find more on npm." Not project-scoped (no `dir` argument): it
|
|
448
|
+
queries the registry for packages tagged `gutterpress` (Gutterpress
|
|
449
|
+
extensions: plugins, looks, component libraries) or `markdown-it-plugin` (the
|
|
450
|
+
markdown-it ecosystem's own tag — those work in Gutterpress unchanged), and
|
|
451
|
+
prints each match's `name@version`, which kind it is, and its description,
|
|
452
|
+
ending with the `ext add` command to install it.
|
|
453
|
+
|
|
454
|
+
```sh
|
|
455
|
+
gutterpress ext search [query]
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
```sh
|
|
459
|
+
gutterpress ext search
|
|
460
|
+
gutterpress ext search footnote
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
An empty or omitted `query` lists the most relevant tagged packages. To
|
|
464
|
+
publish an extension, `npm publish` it with `"gutterpress"` in its
|
|
465
|
+
`keywords` — there is no index to be added to and nothing to register. Set
|
|
466
|
+
`GUTTERPRESS_NPM_REGISTRY` to point at a different registry (http/https only)
|
|
467
|
+
— useful for a private mirror, or for testing; the installer uses the same
|
|
468
|
+
setting, and only accepts tarballs from that registry's own origin.
|
|
469
|
+
|
|
427
470
|
## Exit codes
|
|
428
471
|
|
|
429
472
|
Every command follows the same exit-code contract, so CI can branch on the result without parsing output:
|
|
@@ -460,6 +503,26 @@ extensions:
|
|
|
460
503
|
enabled: false # keep the entry, skip loading it
|
|
461
504
|
```
|
|
462
505
|
|
|
506
|
+
An extension folder (or npm package) describes itself in its **`package.json`** — there is no second, Gutterpress-specific manifest file. npm's own fields are read as-is, and everything Gutterpress needs sits under one optional `"gutterpress"` key:
|
|
507
|
+
|
|
508
|
+
```json
|
|
509
|
+
{
|
|
510
|
+
"name": "field-notes",
|
|
511
|
+
"description": "Margin notes and term boxes",
|
|
512
|
+
"author": "You",
|
|
513
|
+
"keywords": ["gutterpress", "markdown-it-plugin"],
|
|
514
|
+
"main": "plugin.js",
|
|
515
|
+
"gutterpress": {
|
|
516
|
+
"styles": ["styles/plugin.css"],
|
|
517
|
+
"snippets": "snippets",
|
|
518
|
+
"components": "components.yaml",
|
|
519
|
+
"tokensFile": "styles/tokens.css"
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
`main` is the markdown-it plugin — npm's own convention — so a plain markdown-it plugin package needs nothing else at all. A look needs only `gutterpress.styles` (an ordered list, relative to the folder); a component library carries both. `gutterpress.markdown` exists for the one case `main` can't express: a package whose `main` is not the plugin. Folders still carrying the removed `gutterpress.json` or `theme.json` fail to load with a message showing the package.json that replaces them.
|
|
525
|
+
|
|
463
526
|
Order is load order: a later entry's markdown runs after earlier entries' (and sees their output) and its CSS wins ties; the project's own `styles:` always load after every extension. There is no `priority` and no `path:`/`name:` wrapper — a manifest still carrying `plugins:` fails with a message that prints the same entries rewritten as `extensions:`. The `engine:` and `engineStyles:` keys are gone too (there is one engine; move any `engineStyles` entries to the end of `styles:`).
|
|
464
527
|
|
|
465
528
|
Pinned npm packages and their runtime dependencies live under `plugins/npm/`,
|
|
@@ -7,12 +7,12 @@ CSS and insertable snippets to a book.
|
|
|
7
7
|
|
|
8
8
|
```
|
|
9
9
|
{{SLUG}}/
|
|
10
|
-
├──
|
|
10
|
+
├── package.json what this package declares: `main` is the plugin,
|
|
11
|
+
│ the `gutterpress` block names the styles and snippets
|
|
11
12
|
├── plugin.js the markdown-it plugin (declarative + bespoke halves)
|
|
12
13
|
├── styles/plugin.css component CSS, with public tokens at :root
|
|
13
14
|
├── snippets/ insertable recipes, one per component
|
|
14
|
-
|
|
15
|
-
└── package.json only needed for `bun test` and publishing to npm
|
|
15
|
+
└── test/ fixture.md → expected.html, runnable with `bun test`
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Try it
|
|
@@ -32,7 +32,7 @@ extensions:
|
|
|
32
32
|
`gutterpress ext add ./plugins/{{SLUG}} <book>` writes that line for you (the
|
|
33
33
|
book directory is the second positional argument). Either way the entry names
|
|
34
34
|
the FOLDER, not `plugin.js`. That is what makes Gutterpress read
|
|
35
|
-
`
|
|
35
|
+
`package.json` and pick up the stylesheet and snippets alongside the
|
|
36
36
|
markdown behaviour — point it at the `.js` file and you get the markdown and
|
|
37
37
|
nothing else. The folder is referenced in place, never copied: keep editing it
|
|
38
38
|
and the book follows.
|
|
@@ -8,7 +8,8 @@ arrangement of the files is the part worth keeping.
|
|
|
8
8
|
|
|
9
9
|
```
|
|
10
10
|
{{SLUG}}/
|
|
11
|
-
├──
|
|
11
|
+
├── package.json what this package declares: the `gutterpress`
|
|
12
|
+
│ block names the sheets, catalog and snippets
|
|
12
13
|
├── components.yaml the catalog: what an author can opt into
|
|
13
14
|
├── snippets/ insertable recipes for the components
|
|
14
15
|
└── styles/
|
|
@@ -129,9 +130,9 @@ That asymmetry is the whole difference between the two kinds of package.
|
|
|
129
130
|
```
|
|
130
131
|
|
|
131
132
|
Each sheet then puts everything it owns inside its layer. The cascade is
|
|
132
|
-
settled by that one line rather than by which sheet `
|
|
133
|
-
`styles` lists last, so splitting a sheet or reordering that list
|
|
134
|
-
longer silently flip who wins.
|
|
133
|
+
settled by that one line rather than by which sheet `package.json`'s
|
|
134
|
+
`gutterpress.styles` lists last, so splitting a sheet or reordering that list
|
|
135
|
+
can no longer silently flip who wins.
|
|
135
136
|
|
|
136
137
|
The trap, and it catches everyone once: a rule left OUTSIDE all the layers is
|
|
137
138
|
fully unlayered, and unlayered CSS beats layered CSS at any specificity. So
|
package/dist/api/index.d.ts
CHANGED
|
@@ -39,15 +39,18 @@ export { BUNDLED_EXTENSIONS, isBundledExtension, isPathSpecifier, parseExtension
|
|
|
39
39
|
export type { ParsedExtensionSpecifier } from "../lib/extension-specifier.ts";
|
|
40
40
|
export { importExtensionFromFile, importExtensionFromUrl } from "../lib/extension-import.ts";
|
|
41
41
|
export type { ExtensionImportResult, ExtensionImportWarning } from "../lib/extension-import.ts";
|
|
42
|
-
export {
|
|
42
|
+
export { MAX_SEARCH_BYTES, SEARCH_KEYWORDS, searchNpmExtensions, } from "../lib/extension-search.ts";
|
|
43
|
+
export type { ExtensionSearchKind, NpmExtensionMatch, NpmExtensionSearchResult, SearchNpmExtensionsOptions, } from "../lib/extension-search.ts";
|
|
44
|
+
export { DEFAULT_NPM_REGISTRY, npmRegistryUrl } from "../lib/npm-registry.ts";
|
|
45
|
+
export { EXTENSION_MANIFEST_FILENAME, readExtensionMeta, extensionStyleList, extensionEntry, extensionCarries, assertExtensionContained, pathEscapesFolder, resolveExtension, } from "../lib/extension-manifest.ts";
|
|
43
46
|
export type { ExtensionMetadata, ResolvedExtension, ExtensionCarries, } from "../lib/extension-manifest.ts";
|
|
44
47
|
export { listProjectStyles, resolveActiveStyles } from "../lib/style-resolver.ts";
|
|
45
48
|
export type { ProjectStyle } from "../lib/style-resolver.ts";
|
|
46
49
|
export { readManifestFields, setManifestFields, setActiveStyles, } from "../lib/manifest-config.ts";
|
|
47
50
|
export type { ProjectConfigFields } from "../lib/manifest-config.ts";
|
|
48
|
-
export { providerFor, restoreVersionWithBackup, isNoChangesError, AUTO_SNAPSHOT_MESSAGE, RESTORE_BACKUP_MESSAGE, HISTORY_PAGE_LIMIT, } from "../lib/source-provider.ts";
|
|
49
|
-
export type { ListHistoryOptions, HistoryPage, } from "../lib/source-provider.ts";
|
|
50
|
-
export { autoSnapshotDelayMs, autoSyncDelayMs, isGitInternalPath,
|
|
51
|
+
export { providerFor, restoreVersionWithBackup, isNoChangesError, AUTO_SNAPSHOT_MESSAGE, RESTORE_BACKUP_MESSAGE, HISTORY_PAGE_LIMIT, listLocalBranches, switchBranch, SWITCH_BRANCH_SNAPSHOT_MESSAGE, } from "../lib/source-provider.ts";
|
|
52
|
+
export type { ListHistoryOptions, HistoryPage, LocalBranches, SwitchBranchOptions, SwitchBranchResult, } from "../lib/source-provider.ts";
|
|
53
|
+
export { autoSnapshotDelayMs, autoSyncDelayMs, isGitInternalPath, AUTO_SNAPSHOT_DEFAULT_MINUTES, AUTO_SYNC_MIN_MINUTES, AUTO_SYNC_MAX_MINUTES, AUTO_SYNC_DEFAULT_MINUTES, AUTO_SYNC_PUSH_INTERVAL_MINUTES, } from "../lib/host-policy.ts";
|
|
51
54
|
export type { AutoSnapshotPolicy, AutoSyncPolicy, } from "../lib/host-policy.ts";
|
|
52
55
|
export { FileTokenStore, defaultConfigDir, extractUrlCredential, } from "../lib/remote-auth/token-store.ts";
|
|
53
56
|
export type { HostCredential, TokenStore, UrlCredentialExtraction, } from "../lib/remote-auth/token-store.ts";
|
package/dist/api/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AUTO_SNAPSHOT_DEFAULT_MINUTES,
|
|
3
|
-
AUTO_SNAPSHOT_MAX_MINUTES,
|
|
4
|
-
AUTO_SNAPSHOT_MIN_MINUTES,
|
|
5
3
|
AUTO_SYNC_DEFAULT_MINUTES,
|
|
6
4
|
AUTO_SYNC_MAX_MINUTES,
|
|
7
5
|
AUTO_SYNC_MIN_MINUTES,
|
|
@@ -9,6 +7,7 @@ import {
|
|
|
9
7
|
BUILT_IN_STYLE_SET_IDS,
|
|
10
8
|
BUILT_IN_TEMPLATE_IDS,
|
|
11
9
|
BUNDLED_EXTENSIONS,
|
|
10
|
+
DEFAULT_NPM_REGISTRY,
|
|
12
11
|
EXTENSIONS_DIR,
|
|
13
12
|
EXTENSION_KINDS,
|
|
14
13
|
EXTENSION_MANIFEST_FILENAME,
|
|
@@ -18,14 +17,15 @@ import {
|
|
|
18
17
|
GOOGLE_NOT_CONFIGURED_MESSAGE,
|
|
19
18
|
GitHubAuthProvider,
|
|
20
19
|
GoogleAuthProvider,
|
|
21
|
-
LEGACY_THEME_MANIFEST_FILENAME,
|
|
22
20
|
MANIFEST_FILENAMES,
|
|
21
|
+
MAX_SEARCH_BYTES,
|
|
23
22
|
PLUGINS_DIR,
|
|
24
23
|
PRESETS,
|
|
25
24
|
PRESET_IDS,
|
|
26
25
|
PublishSelectionsStore,
|
|
27
26
|
RECOMMENDED_EXTENSIONS,
|
|
28
27
|
RESERVED_PREFIX,
|
|
28
|
+
SEARCH_KEYWORDS,
|
|
29
29
|
SNIPPETS_DIR,
|
|
30
30
|
SYNC_SNAPSHOT_MESSAGE,
|
|
31
31
|
TARGETS,
|
|
@@ -47,8 +47,8 @@ import {
|
|
|
47
47
|
disconnectPublishCredential,
|
|
48
48
|
escapeYamlScalar,
|
|
49
49
|
extensionCarries,
|
|
50
|
+
extensionEntry,
|
|
50
51
|
extensionStyleList,
|
|
51
|
-
extensionStyleListWithDefault,
|
|
52
52
|
extractUrlCredential,
|
|
53
53
|
extractVariables,
|
|
54
54
|
forgeKindForHost,
|
|
@@ -75,6 +75,7 @@ import {
|
|
|
75
75
|
listRepoBooks,
|
|
76
76
|
listSnippets,
|
|
77
77
|
loadManifestWithPath,
|
|
78
|
+
npmRegistryUrl,
|
|
78
79
|
parseExtensionSpecifier,
|
|
79
80
|
parseRemoteOrigin,
|
|
80
81
|
pathEscapesFolder,
|
|
@@ -110,6 +111,7 @@ import {
|
|
|
110
111
|
saveSnippet,
|
|
111
112
|
scaffoldExtension,
|
|
112
113
|
scaffoldProject,
|
|
114
|
+
searchNpmExtensions,
|
|
113
115
|
setActiveStyles,
|
|
114
116
|
setExtensionEnabled,
|
|
115
117
|
setManifestFields,
|
|
@@ -121,21 +123,24 @@ import {
|
|
|
121
123
|
syncProject,
|
|
122
124
|
testRemoteAccess,
|
|
123
125
|
validateProjectExtensions
|
|
124
|
-
} from "../index-
|
|
126
|
+
} from "../index-d4wrww4b.js";
|
|
125
127
|
import {
|
|
126
128
|
BuildError,
|
|
127
129
|
DEFAULT_PRINT_OPTS,
|
|
128
130
|
readyProbeExpr
|
|
129
|
-
} from "../index-
|
|
131
|
+
} from "../index-5dgxeevv.js";
|
|
130
132
|
import {
|
|
131
133
|
AUTO_SNAPSHOT_MESSAGE,
|
|
132
134
|
HISTORY_PAGE_LIMIT,
|
|
133
135
|
RESTORE_BACKUP_MESSAGE,
|
|
136
|
+
SWITCH_BRANCH_SNAPSHOT_MESSAGE,
|
|
134
137
|
isNoChangesError,
|
|
138
|
+
listLocalBranches,
|
|
135
139
|
providerFor,
|
|
136
140
|
resolveLogger,
|
|
137
|
-
restoreVersionWithBackup
|
|
138
|
-
|
|
141
|
+
restoreVersionWithBackup,
|
|
142
|
+
switchBranch
|
|
143
|
+
} from "../index-f833dtg9.js";
|
|
139
144
|
import {
|
|
140
145
|
capabilitiesFor,
|
|
141
146
|
detectProjectSource,
|
|
@@ -148,6 +153,7 @@ export {
|
|
|
148
153
|
validateProjectExtensions,
|
|
149
154
|
testRemoteAccess,
|
|
150
155
|
syncProject,
|
|
156
|
+
switchBranch,
|
|
151
157
|
substituteVariables,
|
|
152
158
|
startPreviewServer,
|
|
153
159
|
splitOutPath,
|
|
@@ -156,6 +162,7 @@ export {
|
|
|
156
162
|
setManifestFields,
|
|
157
163
|
setExtensionEnabled,
|
|
158
164
|
setActiveStyles,
|
|
165
|
+
searchNpmExtensions,
|
|
159
166
|
scaffoldProject,
|
|
160
167
|
scaffoldExtension,
|
|
161
168
|
saveSnippet,
|
|
@@ -197,6 +204,7 @@ export {
|
|
|
197
204
|
pathEscapesFolder,
|
|
198
205
|
parseRemoteOrigin,
|
|
199
206
|
parseExtensionSpecifier,
|
|
207
|
+
npmRegistryUrl,
|
|
200
208
|
loadManifestWithPath,
|
|
201
209
|
listSnippets,
|
|
202
210
|
listRepoBooks,
|
|
@@ -205,6 +213,7 @@ export {
|
|
|
205
213
|
listProjectStyles,
|
|
206
214
|
listProjectExtensions,
|
|
207
215
|
listMergedSnippets,
|
|
216
|
+
listLocalBranches,
|
|
208
217
|
listGitHubRepositories,
|
|
209
218
|
listGitHubBranches,
|
|
210
219
|
listCustomTemplates,
|
|
@@ -225,8 +234,8 @@ export {
|
|
|
225
234
|
findEnclosingRepoDir,
|
|
226
235
|
extractVariables,
|
|
227
236
|
extractUrlCredential,
|
|
228
|
-
extensionStyleListWithDefault,
|
|
229
237
|
extensionStyleList,
|
|
238
|
+
extensionEntry,
|
|
230
239
|
extensionCarries,
|
|
231
240
|
escapeYamlScalar,
|
|
232
241
|
disconnectPublishCredential,
|
|
@@ -249,7 +258,9 @@ export {
|
|
|
249
258
|
TARGET_IDS,
|
|
250
259
|
TARGETS,
|
|
251
260
|
SYNC_SNAPSHOT_MESSAGE,
|
|
261
|
+
SWITCH_BRANCH_SNAPSHOT_MESSAGE,
|
|
252
262
|
SNIPPETS_DIR,
|
|
263
|
+
SEARCH_KEYWORDS,
|
|
253
264
|
RESTORE_BACKUP_MESSAGE,
|
|
254
265
|
RESERVED_PREFIX,
|
|
255
266
|
RECOMMENDED_EXTENSIONS,
|
|
@@ -257,8 +268,8 @@ export {
|
|
|
257
268
|
PRESET_IDS,
|
|
258
269
|
PRESETS,
|
|
259
270
|
PLUGINS_DIR,
|
|
271
|
+
MAX_SEARCH_BYTES,
|
|
260
272
|
MANIFEST_FILENAMES,
|
|
261
|
-
LEGACY_THEME_MANIFEST_FILENAME,
|
|
262
273
|
HISTORY_PAGE_LIMIT,
|
|
263
274
|
GoogleAuthProvider,
|
|
264
275
|
GitHubAuthProvider,
|
|
@@ -270,6 +281,7 @@ export {
|
|
|
270
281
|
EXTENSION_KINDS,
|
|
271
282
|
EXTENSIONS_DIR,
|
|
272
283
|
DEFAULT_PRINT_OPTS,
|
|
284
|
+
DEFAULT_NPM_REGISTRY,
|
|
273
285
|
BuildError,
|
|
274
286
|
BUNDLED_EXTENSIONS,
|
|
275
287
|
BUILT_IN_TEMPLATE_IDS,
|
|
@@ -278,8 +290,6 @@ export {
|
|
|
278
290
|
AUTO_SYNC_MIN_MINUTES,
|
|
279
291
|
AUTO_SYNC_MAX_MINUTES,
|
|
280
292
|
AUTO_SYNC_DEFAULT_MINUTES,
|
|
281
|
-
AUTO_SNAPSHOT_MIN_MINUTES,
|
|
282
293
|
AUTO_SNAPSHOT_MESSAGE,
|
|
283
|
-
AUTO_SNAPSHOT_MAX_MINUTES,
|
|
284
294
|
AUTO_SNAPSHOT_DEFAULT_MINUTES
|
|
285
295
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executeAndReport
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-5fqr02je.js";
|
|
4
4
|
import {
|
|
5
5
|
log
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-12epgrva.js";
|
|
7
7
|
import {
|
|
8
8
|
UsageError,
|
|
9
9
|
rejectExtraPositionals,
|
|
10
10
|
rejectUnknownFlags
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import"./cli-
|
|
11
|
+
} from "./cli-tvpq2ht9.js";
|
|
12
|
+
import"./cli-k8f9eb12.js";
|
|
13
13
|
import"./cli-c41yr7he.js";
|
|
14
14
|
import {
|
|
15
15
|
EXIT_CODES
|
|
16
16
|
} from "./cli-46ycxe6r.js";
|
|
17
|
-
import"./cli-
|
|
17
|
+
import"./cli-vje8g3w8.js";
|
|
18
18
|
import"./cli-v5mp7a6q.js";
|
|
19
19
|
import"./cli-37x76zdn.js";
|
|
20
20
|
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runBuild,
|
|
3
3
|
splitOutPath
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-5fqr02je.js";
|
|
5
5
|
import {
|
|
6
6
|
log
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-12epgrva.js";
|
|
8
8
|
import {
|
|
9
9
|
UsageError,
|
|
10
10
|
parseFormat,
|
|
11
11
|
parsePdfxFlavor,
|
|
12
12
|
rejectExtraPositionals,
|
|
13
13
|
rejectUnknownFlags
|
|
14
|
-
} from "./cli-
|
|
15
|
-
import"./cli-
|
|
14
|
+
} from "./cli-tvpq2ht9.js";
|
|
15
|
+
import"./cli-k8f9eb12.js";
|
|
16
16
|
import"./cli-c41yr7he.js";
|
|
17
17
|
import {
|
|
18
18
|
BuildError
|
|
19
19
|
} from "./cli-46ycxe6r.js";
|
|
20
|
-
import"./cli-
|
|
20
|
+
import"./cli-vje8g3w8.js";
|
|
21
21
|
import"./cli-v5mp7a6q.js";
|
|
22
22
|
import"./cli-37x76zdn.js";
|
|
23
23
|
|
|
@@ -33,7 +33,7 @@ var commandArgs = {
|
|
|
33
33
|
icc: { type: "string", description: "Path to ICC profile (required for --format pdfx)" },
|
|
34
34
|
manifest: { type: "string", description: "Path to manifest.yaml" },
|
|
35
35
|
"strip-annotations": { type: "boolean", description: "Strip PDF annotations for PDF/X compliance" },
|
|
36
|
-
"skip-lint": { type: "boolean", description: "Skip CSS
|
|
36
|
+
"skip-lint": { type: "boolean", description: "Skip the CSS print-safety check (default: it runs for pdf/pdfx)" },
|
|
37
37
|
"skip-pre-validate": { type: "boolean", description: "Skip pre-build validation" },
|
|
38
38
|
"skip-post-validate": { type: "boolean", description: "Skip post-build PDF/X validation" },
|
|
39
39
|
"allow-shrink": { type: "boolean", description: "Build anyway when content is wider than the page content box, instead of failing. Chromium then scales the WHOLE book down to fit; each offender is reported as a warning." }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Check } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* A relative link — `[text](docs/x.md)`, `[next](./02.md)`, even one to an
|
|
4
|
+
* image the build copies — cannot be opened from the printed book: a PDF has
|
|
5
|
+
* no files beside it, and every chapter is concatenated into one document at
|
|
6
|
+
* the staging root, so the browser resolved the href to the build machine's
|
|
7
|
+
* temp dir and baked that into the PDF (#263). The build now drops such an
|
|
8
|
+
* href before print (lib/build-staging.ts `dropRelativeLinkHrefs`); this
|
|
9
|
+
* check tells the author which links that affects, at the source line, so
|
|
10
|
+
* they can choose `#anchor`, an absolute URL, or plain text instead.
|
|
11
|
+
*
|
|
12
|
+
* `source.links.local-refs` answers a different question — does the target
|
|
13
|
+
* exist on disk — and a link can pass that while still being unopenable from
|
|
14
|
+
* a PDF, which is why this is its own check (and can be switched off for an
|
|
15
|
+
* HTML-only book via `validate.checks`).
|
|
16
|
+
*/
|
|
17
|
+
declare const check: Check;
|
|
18
|
+
export default check;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { LoadedPlugin } from "../../lib/markdown/renderer";
|
|
2
|
+
import type { CheckContext, CheckResult } from "../types";
|
|
2
3
|
export type RenderedRefKind = "image" | "link";
|
|
3
4
|
export interface RenderedLocalRef {
|
|
4
5
|
ref: string;
|
|
@@ -26,3 +27,15 @@ export type RenderedLocalRefCollector = (content: string) => RenderedLocalRef[];
|
|
|
26
27
|
* source files avoids loading/applying a project plugin once per chapter.
|
|
27
28
|
*/
|
|
28
29
|
export declare function createRenderedLocalRefCollector(customPlugins?: LoadedPlugin[]): RenderedLocalRefCollector;
|
|
30
|
+
/**
|
|
31
|
+
* Every rendered link/image of every source file, with the scaffolding the
|
|
32
|
+
* link checks share: the book's plugins loaded degrade-and-report (a plugin
|
|
33
|
+
* that will not load is pushed to `results` as an inspection failure and the
|
|
34
|
+
* rest is still checked — the loader's path-module cache avoids repeating
|
|
35
|
+
* module-level plugin side effects when another check or the build already
|
|
36
|
+
* loaded the same unchanged plugin), one parser reused for every chapter, and
|
|
37
|
+
* a file that cannot be read or parsed reported rather than thrown.
|
|
38
|
+
*/
|
|
39
|
+
export declare function renderedLocalRefs(ctx: CheckContext, checkId: string, results: CheckResult[]): AsyncGenerator<RenderedLocalRef & {
|
|
40
|
+
file: string;
|
|
41
|
+
}>;
|