gutterpress 0.11.6-alpha.1 → 0.11.6-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/dist/api/index.js +3 -3
- package/dist/{audit-bhxh0bbf.js → audit-t4r954ff.js} +5 -5
- package/dist/{build-sqdahz2j.js → build-8gx90w22.js} +5 -5
- package/dist/{cli-cghcd60p.js → cli-5c2xfsmz.js} +1 -1
- package/dist/{cli-sekhwex4.js → cli-5vdgncmm.js} +2 -2
- package/dist/{cli-c9h2bk2k.js → cli-c5360prx.js} +7 -7
- package/dist/{cli-q696mp75.js → cli-g6vshy3f.js} +27 -27
- package/dist/{cli-jp97snns.js → cli-rra50cp6.js} +1 -1
- package/dist/cli.js +14 -14
- package/dist/{doctor-gj8gtgec.js → doctor-b1awtn7m.js} +2 -2
- package/dist/{engine-w5ed5hmb.js → engine-15dfcy85.js} +2 -2
- package/dist/{engine-cbc17ne4.js → engine-amxqsfka.js} +1 -1
- package/dist/{ext-xhtta4bh.js → ext-mxxz3p8t.js} +7 -7
- package/dist/{gutterpress-viewer-k0xrt5hw.js → gutterpress-viewer-swz6bwfa.js} +25 -3
- package/dist/{index-cwhgq7tq.js → index-0h00ve4y.js} +38 -38
- package/dist/{index-c5ev4r1y.js → index-8xkw284t.js} +7 -7
- package/dist/{index-6n15e1ze.js → index-gf1shk3y.js} +1 -1
- package/dist/{index-12pvhbyz.js → index-yeej2vhs.js} +2 -2
- package/dist/index.js +4 -4
- package/dist/lib/extension-manager.d.ts +3 -1
- package/dist/lib/remote-auth/sync-messages.d.ts +7 -7
- package/dist/{lint-t0tj3psc.js → lint-vyxf5zmw.js} +5 -5
- package/dist/{new-s256mmkt.js → new-r3s74yfv.js} +7 -7
- package/dist/{preflight-5y10233n.js → preflight-j9e9m4ea.js} +5 -5
- package/dist/{preview-j2rvdhg1.js → preview-aprv0c49.js} +6 -6
- package/dist/{publish-6px5snad.js → publish-4y1kztbd.js} +6 -6
- package/dist/{source-provider-54a52bpd.js → source-provider-exy1wakv.js} +1 -1
- package/dist/{source-provider-a458mmec.js → source-provider-y9ktprbx.js} +1 -1
- package/dist/{validate-f0m0d2zs.js → validate-sf6hga9e.js} +5 -5
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
resolveChromiumExecutable,
|
|
19
19
|
run,
|
|
20
20
|
spawnCapture
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-gf1shk3y.js";
|
|
22
22
|
import {
|
|
23
23
|
errorLogData,
|
|
24
24
|
gitFs,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
snapshotStagingMarkerPath,
|
|
32
32
|
snapshotWorkingTreeUnlocked,
|
|
33
33
|
withRepoLock
|
|
34
|
-
} from "./index-
|
|
34
|
+
} from "./index-8xkw284t.js";
|
|
35
35
|
import {
|
|
36
36
|
detectProjectSource,
|
|
37
37
|
repoSubPath,
|
|
@@ -434,7 +434,7 @@ async function resolveVendoredPluginInstallRoot(projectDir, expectedName, expect
|
|
|
434
434
|
realpath(requestedInstallRoot)
|
|
435
435
|
]);
|
|
436
436
|
if (!isContained(realProjectRoot, installRoot)) {
|
|
437
|
-
throw new Error("Vendor install root resolves outside the
|
|
437
|
+
throw new Error("Vendor install root resolves outside the book folder.");
|
|
438
438
|
}
|
|
439
439
|
return installRoot;
|
|
440
440
|
}
|
|
@@ -1224,13 +1224,13 @@ var MSG_SYNCED = "Your changes are online.";
|
|
|
1224
1224
|
var MSG_SYNCED_MERGED = "Your changes are online, combined with changes from the online copy.";
|
|
1225
1225
|
var MSG_OFFLINE = "Your changes are saved on this computer. gutterpress couldn't reach the online repository — try syncing again when you're back online.";
|
|
1226
1226
|
var MSG_AUTH = "The online repository didn't accept the saved connection. Reconnect and try again.";
|
|
1227
|
-
var MSG_INSECURE_TRANSPORT = "This
|
|
1227
|
+
var MSG_INSECURE_TRANSPORT = "This book's online address isn't secure, so the saved connection wasn't sent — connections are never sent over an insecure address. Switch the address to a secure one (starting with https), or to a local loopback address for a server on this computer, to sync.";
|
|
1228
1228
|
var MSG_BUSY = "The online copy is changing very quickly right now. Your work is saved on this computer — try Sync again in a moment.";
|
|
1229
|
-
var MSG_HISTORY_UNREADABLE = "This
|
|
1230
|
-
var MSG_UNRELATED = "This
|
|
1231
|
-
var MSG_NO_REMOTE = "This
|
|
1232
|
-
var MSG_SSH_REMOTE = "This
|
|
1233
|
-
var MSG_NO_BRANCH = "This
|
|
1229
|
+
var MSG_HISTORY_UNREADABLE = "This book's version history can't be read, so syncing can't continue. Your writing is safe — every file is still here on this computer. To get history and syncing working again, download a fresh copy of the book from online, then move any recent changes into it.";
|
|
1230
|
+
var MSG_UNRELATED = "This book and the online copy have no history in common, so they can't be combined. Either the online address points at a different book, or this book's own history was lost and started over. Your writing is safe — every file is still here on this computer. Check the online address; if it is correct, download a fresh copy from online and move any recent changes into it.";
|
|
1231
|
+
var MSG_NO_REMOTE = "This book isn't connected to an online repository yet.";
|
|
1232
|
+
var MSG_SSH_REMOTE = "This book's online address uses SSH (git@…), which gutterpress can't sync to. Switch it to the web (HTTPS) address to sync from here.";
|
|
1233
|
+
var MSG_NO_BRANCH = "This book's version history isn't on a named branch, so it can't be synced right now.";
|
|
1234
1234
|
var SYNC_SNAPSHOT_MESSAGE = "Automatic backup of your work";
|
|
1235
1235
|
var SYNC_LATE_EDIT_MESSAGE = "Saved the edit you made while syncing";
|
|
1236
1236
|
function onlineSiblingPath(filepath) {
|
|
@@ -3368,12 +3368,12 @@ function escapesProjectRoot(projectDir, absPath) {
|
|
|
3368
3368
|
function proseImageRefError(ref, projectDir) {
|
|
3369
3369
|
const cleaned = stripUrlSuffix(decodeRef(ref));
|
|
3370
3370
|
if (/^file:/i.test(cleaned) || path3.isAbsolute(cleaned)) {
|
|
3371
|
-
return `Image reference must be relative to the
|
|
3372
|
-
` + ` Copy the file into your
|
|
3371
|
+
return `Image reference must be relative to the book folder: ${ref}
|
|
3372
|
+
` + ` Copy the file into your book folder and reference it from there.`;
|
|
3373
3373
|
}
|
|
3374
3374
|
if (escapesProjectRoot(projectDir, path3.resolve(projectDir, cleaned))) {
|
|
3375
|
-
return `Image reference points outside the
|
|
3376
|
-
` + ` Copy the file into your
|
|
3375
|
+
return `Image reference points outside the book folder: ${ref}
|
|
3376
|
+
` + ` Copy the file into your book folder and reference it from there.`;
|
|
3377
3377
|
}
|
|
3378
3378
|
return null;
|
|
3379
3379
|
}
|
|
@@ -3445,7 +3445,7 @@ async function inlineOne(cssPath, copies, warnings, seen) {
|
|
|
3445
3445
|
if (seen.has(abs))
|
|
3446
3446
|
return "";
|
|
3447
3447
|
seen.add(abs);
|
|
3448
|
-
const source = await readOrThrow(abs, "stylesheet", "the
|
|
3448
|
+
const source = await readOrThrow(abs, "stylesheet", "the book manifest");
|
|
3449
3449
|
const cssDir = path3.dirname(abs);
|
|
3450
3450
|
let root;
|
|
3451
3451
|
try {
|
|
@@ -4338,7 +4338,7 @@ async function loadNpmPackage(packageName, baseDir, version) {
|
|
|
4338
4338
|
} catch {}
|
|
4339
4339
|
const looksLikeJsFilename = /\.(m?js|cjs)$/i.test(packageName);
|
|
4340
4340
|
const suggestedPath = looksLikeJsFilename ? `./${packageName}` : `./plugins/${packageName}.js`;
|
|
4341
|
-
throw new Error(`Extension "${packageName}" not found. Install it with \`gutterpress ext add ${packageName}\` (or
|
|
4341
|
+
throw new Error(`Extension "${packageName}" not found. Install it with \`gutterpress ext add ${packageName}\` (or Book settings > Features > Advanced in the desktop app),
|
|
4342
4342
|
or reference a local file under \`extensions:\`:
|
|
4343
4343
|
extensions:
|
|
4344
4344
|
- ${suggestedPath}`);
|
|
@@ -4875,7 +4875,7 @@ import git from "isomorphic-git";
|
|
|
4875
4875
|
// package.json
|
|
4876
4876
|
var package_default = {
|
|
4877
4877
|
name: "gutterpress",
|
|
4878
|
-
version: "0.11.6-alpha.
|
|
4878
|
+
version: "0.11.6-alpha.3",
|
|
4879
4879
|
description: "Markdown-to-PDF converter for professional print layout using a native Chromium print engine and Ghostscript.",
|
|
4880
4880
|
author: "itlackey",
|
|
4881
4881
|
license: "MPL-2.0",
|
|
@@ -5329,7 +5329,7 @@ async function uncommittedAmong(inputDir, files) {
|
|
|
5329
5329
|
async function applyMarkdownlintFixes(ctx) {
|
|
5330
5330
|
const sourceConfig = ctx.config.validate.source;
|
|
5331
5331
|
if (sourceConfig.markdownlint === false) {
|
|
5332
|
-
log.warn("--fix: source.markdownlint is disabled for this
|
|
5332
|
+
log.warn("--fix: source.markdownlint is disabled for this book — no files were fixed.");
|
|
5333
5333
|
return [];
|
|
5334
5334
|
}
|
|
5335
5335
|
const files = ctx.markdownFiles;
|
|
@@ -7760,7 +7760,7 @@ var check25 = {
|
|
|
7760
7760
|
results.push(finding(check25.id, {
|
|
7761
7761
|
severity: "warning",
|
|
7762
7762
|
code: "kept-both-versions",
|
|
7763
|
-
message: `Two versions of ${withoutOnlineTag(rel)} are in your
|
|
7763
|
+
message: `Two versions of ${withoutOnlineTag(rel)} are in your book — keep the one you want, then delete the other.`,
|
|
7764
7764
|
file: sibling
|
|
7765
7765
|
}));
|
|
7766
7766
|
}
|
|
@@ -9031,7 +9031,7 @@ async function resolveBuildContext(opts) {
|
|
|
9031
9031
|
const inputDir = path9.resolve(opts.inputDir);
|
|
9032
9032
|
const { manifest, manifestDir, manifestPath } = await loadManifestWithPath(opts.manifestPath ?? inputDir, { explicit: opts.manifestPath !== undefined });
|
|
9033
9033
|
if (manifestPath === null) {
|
|
9034
|
-
throw new UsageError(`No
|
|
9034
|
+
throw new UsageError(`No book manifest found in ${inputDir}. Looked for ${MANIFEST_FILENAMES.join(" or ")}. ` + "Run from your book folder or pass that folder with `gutterpress build <book-dir>`. " + "For a custom manifest filename, pass `--manifest <path>`.");
|
|
9035
9035
|
}
|
|
9036
9036
|
const pdfxConfigOverride = format === "pdfx" ? {
|
|
9037
9037
|
flavor: opts.pdfxFlavor,
|
|
@@ -9258,7 +9258,7 @@ class PdfOutput {
|
|
|
9258
9258
|
const rawPdf = pdfxMode ? path9.join(stage, "raw.pdf") : path9.resolve(pdfFile);
|
|
9259
9259
|
await fsp2.mkdir(path9.dirname(path9.resolve(pdfFile)), { recursive: true });
|
|
9260
9260
|
log.info("Rendering HTML to PDF via the Gutterpress engine (native Chromium pagination)");
|
|
9261
|
-
const { buildNativePdf } = await import("./engine-
|
|
9261
|
+
const { buildNativePdf } = await import("./engine-15dfcy85.js");
|
|
9262
9262
|
const engineDiagnostics = await buildNativePdf(htmlFile, rawPdf, {
|
|
9263
9263
|
title: config.title,
|
|
9264
9264
|
author: config.authors.length > 0 ? config.authors.join(", ") : undefined,
|
|
@@ -11066,7 +11066,7 @@ function resolveScaffoldTargets(requested, preset) {
|
|
|
11066
11066
|
async function scaffoldProject(options) {
|
|
11067
11067
|
const name = (options.name ?? "").trim();
|
|
11068
11068
|
if (!name) {
|
|
11069
|
-
throw new CreateProjectErrorImpl("invalid-name", "A
|
|
11069
|
+
throw new CreateProjectErrorImpl("invalid-name", "A book name is required.");
|
|
11070
11070
|
}
|
|
11071
11071
|
const slug = slugifyProjectName(name);
|
|
11072
11072
|
const folderName = (options.folderName ?? slug).trim();
|
|
@@ -11116,7 +11116,7 @@ async function scaffoldProject(options) {
|
|
|
11116
11116
|
await writeFile8(path16.join(projectDir, "styles", "book.css"), starterOverridesCss(), "utf8");
|
|
11117
11117
|
}
|
|
11118
11118
|
} catch (e) {
|
|
11119
|
-
throw new CreateProjectErrorImpl("scaffold-io", `Could not create the
|
|
11119
|
+
throw new CreateProjectErrorImpl("scaffold-io", `Could not create the book files: ${e instanceof Error ? e.message : String(e)}`);
|
|
11120
11120
|
}
|
|
11121
11121
|
try {
|
|
11122
11122
|
await ensureGitignoreHasDist(projectDir);
|
|
@@ -11153,14 +11153,14 @@ async function scaffoldProject(options) {
|
|
|
11153
11153
|
openFile = path16.join(projectDir, firstSource);
|
|
11154
11154
|
await fillTemplateFile(openFile, { "{{TITLE}}": name }).catch(() => {});
|
|
11155
11155
|
} catch (e) {
|
|
11156
|
-
throw new CreateProjectErrorImpl("scaffold-io", `Could not
|
|
11156
|
+
throw new CreateProjectErrorImpl("scaffold-io", `Could not finalize the book files: ${e instanceof Error ? e.message : String(e)}`);
|
|
11157
11157
|
}
|
|
11158
11158
|
const requested = options.versionHistory ?? "local-git";
|
|
11159
11159
|
let versionHistory = "none";
|
|
11160
11160
|
let versionHistoryError;
|
|
11161
11161
|
if (requested === "local-git") {
|
|
11162
11162
|
try {
|
|
11163
|
-
const { providerFor } = await import("./source-provider-
|
|
11163
|
+
const { providerFor } = await import("./source-provider-y9ktprbx.js");
|
|
11164
11164
|
const provider = providerFor({ type: "local-folder", path: projectDir });
|
|
11165
11165
|
await provider.initVersionHistory({
|
|
11166
11166
|
projectDir,
|
|
@@ -11205,7 +11205,7 @@ async function adoptFolder(options) {
|
|
|
11205
11205
|
throw new CreateProjectErrorImpl("scaffold-io", `Not a folder: ${dir}`);
|
|
11206
11206
|
}
|
|
11207
11207
|
if (MANIFEST_FILENAMES.some((name) => existsSync12(path16.join(dir, name)))) {
|
|
11208
|
-
throw new CreateProjectErrorImpl("target-exists", "This folder is already a Gutterpress
|
|
11208
|
+
throw new CreateProjectErrorImpl("target-exists", "This folder is already a Gutterpress book.");
|
|
11209
11209
|
}
|
|
11210
11210
|
const template = options.template ?? "book";
|
|
11211
11211
|
const title = (options.title ?? "").trim() || prettifyFolderName(path16.basename(dir));
|
|
@@ -11252,7 +11252,7 @@ styles:
|
|
|
11252
11252
|
let versionHistoryError;
|
|
11253
11253
|
if (requested === "local-git") {
|
|
11254
11254
|
try {
|
|
11255
|
-
const { providerFor } = await import("./source-provider-
|
|
11255
|
+
const { providerFor } = await import("./source-provider-y9ktprbx.js");
|
|
11256
11256
|
const provider = providerFor({ type: "local-folder", path: dir });
|
|
11257
11257
|
await provider.initVersionHistory({
|
|
11258
11258
|
projectDir: dir,
|
|
@@ -12301,7 +12301,7 @@ async function prepareVendorParent(projectDir, name) {
|
|
|
12301
12301
|
realpath2(packageParent)
|
|
12302
12302
|
]);
|
|
12303
12303
|
if (!isContained2(projectDir, realNpm) || !isContained2(projectDir, realPackageParent)) {
|
|
12304
|
-
throw new Error("Plugin install path resolves outside the
|
|
12304
|
+
throw new Error("Plugin install path resolves outside the book folder.");
|
|
12305
12305
|
}
|
|
12306
12306
|
return realNpm;
|
|
12307
12307
|
}
|
|
@@ -12383,7 +12383,7 @@ async function installNpmPlugin(projectDirInput, packageSpec, options = {}) {
|
|
|
12383
12383
|
finalRoot = vendoredNpmPluginRoot(projectDir, rootRecord.name, rootRecord.version);
|
|
12384
12384
|
const realFinalParent = await realpath2(path19.dirname(finalRoot));
|
|
12385
12385
|
if (!isContained2(projectDir, realFinalParent)) {
|
|
12386
|
-
throw new Error("Plugin install destination resolves outside the
|
|
12386
|
+
throw new Error("Plugin install destination resolves outside the book folder.");
|
|
12387
12387
|
}
|
|
12388
12388
|
try {
|
|
12389
12389
|
await lstat2(finalRoot);
|
|
@@ -12433,27 +12433,27 @@ var RECOMMENDED_EXTENSIONS = [
|
|
|
12433
12433
|
{
|
|
12434
12434
|
use: "markdown-it-mark",
|
|
12435
12435
|
label: "Highlight",
|
|
12436
|
-
description: "
|
|
12436
|
+
description: "Highlight text by wrapping it in `==double equals==`."
|
|
12437
12437
|
},
|
|
12438
12438
|
{
|
|
12439
12439
|
use: "markdown-it-sub",
|
|
12440
12440
|
label: "Subscript",
|
|
12441
|
-
description: "
|
|
12441
|
+
description: "Lower text below the line, like the 2 in `H~2~O`."
|
|
12442
12442
|
},
|
|
12443
12443
|
{
|
|
12444
12444
|
use: "markdown-it-sup",
|
|
12445
12445
|
label: "Superscript",
|
|
12446
|
-
description: "
|
|
12446
|
+
description: "Raise text above the line, like the th in `29^th^`."
|
|
12447
12447
|
},
|
|
12448
12448
|
{
|
|
12449
12449
|
use: "markdown-it-abbr",
|
|
12450
12450
|
label: "Abbreviations",
|
|
12451
|
-
description: "Define `*[
|
|
12451
|
+
description: "Explain an abbreviation when readers hover over it. Define it once, like `*[GPS]: Global Positioning System`."
|
|
12452
12452
|
},
|
|
12453
12453
|
{
|
|
12454
12454
|
use: "gutterpress-gfm-alerts",
|
|
12455
12455
|
label: "Callouts",
|
|
12456
|
-
description: "
|
|
12456
|
+
description: "Turn a quote into a boxed note: start it with `> [!NOTE]` (or `TIP`, `IMPORTANT`, `WARNING`, `CAUTION`)."
|
|
12457
12457
|
}
|
|
12458
12458
|
];
|
|
12459
12459
|
var BUILT_IN_STYLE_SET_IDS = ["clean-book", "zine", "technical-doc"];
|
|
@@ -12523,7 +12523,7 @@ function indexOfUse(seq, use) {
|
|
|
12523
12523
|
function manifestPathFor(projectDir, abs) {
|
|
12524
12524
|
const rel = path20.relative(path20.resolve(projectDir), abs).split(path20.sep).join("/");
|
|
12525
12525
|
if (rel === "") {
|
|
12526
|
-
throw new Error("An extension cannot be the
|
|
12526
|
+
throw new Error("An extension cannot be the book folder itself.");
|
|
12527
12527
|
}
|
|
12528
12528
|
if (isPathSpecifier(rel))
|
|
12529
12529
|
return rel;
|
|
@@ -14449,7 +14449,7 @@ async function assertCloneTarget(dir) {
|
|
|
14449
14449
|
try {
|
|
14450
14450
|
const entries = await readdir9(dir);
|
|
14451
14451
|
if (entries.length > 0) {
|
|
14452
|
-
throw new Error("That folder already has files in it. Choose an empty folder for the
|
|
14452
|
+
throw new Error("That folder already has files in it. Choose an empty folder for the book.");
|
|
14453
14453
|
}
|
|
14454
14454
|
} catch (e) {
|
|
14455
14455
|
if (e.code === "ENOENT")
|
|
@@ -14474,7 +14474,7 @@ function friendlyCloneError(e) {
|
|
|
14474
14474
|
if (e instanceof Error && /already has files/i.test(e.message)) {
|
|
14475
14475
|
return e;
|
|
14476
14476
|
}
|
|
14477
|
-
return new Error("The
|
|
14477
|
+
return new Error("The book couldn't be downloaded from GitHub. Please try again.", { cause: e });
|
|
14478
14478
|
}
|
|
14479
14479
|
async function cloneRepository(options) {
|
|
14480
14480
|
const { dir, onProgress, tokenStore } = options;
|
|
@@ -14550,7 +14550,7 @@ var FAILURE_MESSAGES = {
|
|
|
14550
14550
|
auth: "The Git server didn't accept the saved connection. Reconnect to this server with a current access token and try again.",
|
|
14551
14551
|
"not-found": "The server answered, but no repository was found at that address. It may have been moved, renamed, or you may no longer have access.",
|
|
14552
14552
|
unreachable: "Couldn't reach the Git server. Check your internet connection (and VPN, if this is a private server), then try again.",
|
|
14553
|
-
"ssh-unsupported": "This
|
|
14553
|
+
"ssh-unsupported": "This book's online address uses SSH (git@…), which gutterpress can't check or sync with. Everything on this computer still works — sync with your usual Git tool.",
|
|
14554
14554
|
"insecure-transport": "This address isn't secure, so the saved connection wasn't sent — connections are never sent over an insecure address. Switch the address to a secure one (starting with https), or to a local loopback address for a server on this computer, to use a saved connection.",
|
|
14555
14555
|
tls: "The server's security certificate couldn't be verified. If this is a private server with its own certificate, ask its administrator about trusting it (NODE_EXTRA_CA_CERTS).",
|
|
14556
14556
|
unknown: "The connection test failed unexpectedly. The server may not be a Git server, or it may be temporarily unavailable."
|
|
@@ -15237,7 +15237,7 @@ async function syncProject(options) {
|
|
|
15237
15237
|
if (setupMsg)
|
|
15238
15238
|
return { status: "error", message: setupMsg, ...base() };
|
|
15239
15239
|
if (await historyUnreadable(dir)) {
|
|
15240
|
-
logger.error("sync", "the
|
|
15240
|
+
logger.error("sync", "the book's history could not be read");
|
|
15241
15241
|
return { status: "error", message: MSG_HISTORY_UNREADABLE, ...base() };
|
|
15242
15242
|
}
|
|
15243
15243
|
return { ...failureOutcome(e, snapshotId), ...filesChanged ? { filesChanged: true } : {} };
|
|
@@ -349,7 +349,7 @@ class LocalFolderSourceProvider {
|
|
|
349
349
|
async initVersionHistory(options) {
|
|
350
350
|
const dir = options.projectDir;
|
|
351
351
|
if (await findEnclosingRepoDir(dir) !== undefined) {
|
|
352
|
-
throw new Error("This folder is already inside a versioned
|
|
352
|
+
throw new Error("This folder is already inside a versioned book, so gutterpress " + "won't create a separate history here.");
|
|
353
353
|
}
|
|
354
354
|
return withRepoLock(dir, async () => {
|
|
355
355
|
const cache = {};
|
|
@@ -373,7 +373,7 @@ class LocalFolderSourceProvider {
|
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
snapshot() {
|
|
376
|
-
return Promise.reject(new Error("This
|
|
376
|
+
return Promise.reject(new Error("This book has no version history yet. Enable version history first."));
|
|
377
377
|
}
|
|
378
378
|
listHistory() {
|
|
379
379
|
return Promise.resolve([]);
|
|
@@ -382,7 +382,7 @@ class LocalFolderSourceProvider {
|
|
|
382
382
|
return Promise.resolve({ entries: [], hasMore: false });
|
|
383
383
|
}
|
|
384
384
|
restore() {
|
|
385
|
-
return Promise.reject(new Error("This
|
|
385
|
+
return Promise.reject(new Error("This book has no version history yet. Enable version history first."));
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
388
|
|
|
@@ -528,7 +528,7 @@ function providerFor(source) {
|
|
|
528
528
|
case "local-git-folder":
|
|
529
529
|
return new LocalGitSourceProvider(source);
|
|
530
530
|
case "managed-github":
|
|
531
|
-
throw new Error("Managed GitHub
|
|
531
|
+
throw new Error("Managed GitHub books are not supported yet (#15/#16).");
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
534
|
function gitDirFor(projectDir) {
|
|
@@ -543,7 +543,7 @@ async function restoreVersionWithBackup(options) {
|
|
|
543
543
|
const { projectDir, id, authorName, authorEmail } = options;
|
|
544
544
|
const source = await detectProjectSource(projectDir);
|
|
545
545
|
if (source.type !== "local-git-folder") {
|
|
546
|
-
throw new Error("This
|
|
546
|
+
throw new Error("This book has no version history yet. Enable version history first.");
|
|
547
547
|
}
|
|
548
548
|
const provider = new LocalGitSourceProvider(source);
|
|
549
549
|
const repoDir = gitScopeFor(source);
|
|
@@ -561,7 +561,7 @@ async function restoreVersionWithBackup(options) {
|
|
|
561
561
|
try {
|
|
562
562
|
await provider.restoreUnlocked({ projectDir, id });
|
|
563
563
|
} catch (cause) {
|
|
564
|
-
throw new Error(backupId ? "The restore could not be completed, but your work is safe — it was " + `automatically saved as a backup snapshot (${backupId.slice(0, 7)}) ` + "and appears in your version history." : "The restore could not be completed. Your
|
|
564
|
+
throw new Error(backupId ? "The restore could not be completed, but your work is safe — it was " + `automatically saved as a backup snapshot (${backupId.slice(0, 7)}) ` + "and appears in your version history." : "The restore could not be completed. Your book files were not changed.", { cause });
|
|
565
565
|
}
|
|
566
566
|
return { restoredId: id, backupId };
|
|
567
567
|
});
|
|
@@ -648,7 +648,7 @@ async function switchBranch(options) {
|
|
|
648
648
|
const { projectDir, branch, authorName, authorEmail } = options;
|
|
649
649
|
const source = await detectProjectSource(projectDir);
|
|
650
650
|
if (source.type !== "local-git-folder") {
|
|
651
|
-
throw new Error("This
|
|
651
|
+
throw new Error("This book has no version history yet. Enable version history first.");
|
|
652
652
|
}
|
|
653
653
|
const repoDir = gitScopeFor(source);
|
|
654
654
|
return withRepoLock(repoDir, async () => {
|
|
@@ -608,7 +608,7 @@ var preview_shell_default = "./preview-shell-gqnc5xxe.js";
|
|
|
608
608
|
var CGATS21_CRPC1_default = "./CGATS21_CRPC1-g0e3k7kr.icc";
|
|
609
609
|
|
|
610
610
|
// src/assets/engine/gutterpress-viewer.js
|
|
611
|
-
var gutterpress_viewer_default = "./gutterpress-viewer-
|
|
611
|
+
var gutterpress_viewer_default = "./gutterpress-viewer-swz6bwfa.js";
|
|
612
612
|
|
|
613
613
|
// src/assets/engine/gutterpress-agent.js
|
|
614
614
|
var gutterpress_agent_default = "./gutterpress-agent-cazqstr1.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
launchChromium,
|
|
5
5
|
marginBoxAlign,
|
|
6
6
|
marginBoxRectPt
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-gf1shk3y.js";
|
|
8
8
|
|
|
9
9
|
// src/engine/compiler/build.ts
|
|
10
10
|
import { readFile } from "node:fs/promises";
|
|
@@ -1985,7 +1985,7 @@ ${mapCss}`;
|
|
|
1985
1985
|
if (layerTraps.length)
|
|
1986
1986
|
log(`audit: ${layerTraps.length} trapped layer warning(s)`);
|
|
1987
1987
|
for (const hit of pageBackgrounds)
|
|
1988
|
-
diagnose("engine.page-background.unreferenced", `"${hit.url}" is only referenced from "${hit.where}", and Chromium will not print an image referenced nowhere else — the page prints with its background
|
|
1988
|
+
diagnose("engine.page-background.unreferenced", `"${hit.url}" is only referenced from "${hit.where}", and Chromium will not print an image referenced nowhere else — the page prints with its background color alone, with no error. Gutterpress stages and preloads every image your book's stylesheets reference, so this one is outside that: it is remote (a url(https://...), which is never staged), or it comes from CSS that does not pass through your stylesheets, or an element in the document uses the same URL as its src, which drops it on its own. Use a local image, referenced from one of your book's stylesheets, and not also used as an <img>.`);
|
|
1989
1989
|
if (pageBackgrounds.length)
|
|
1990
1990
|
log(`audit: ${pageBackgrounds.length} unreferenced @page background image(s)`);
|
|
1991
1991
|
for (const d of multicol)
|
package/dist/index.js
CHANGED
|
@@ -143,15 +143,15 @@ import {
|
|
|
143
143
|
syncProject,
|
|
144
144
|
testRemoteAccess,
|
|
145
145
|
validateProjectExtensions
|
|
146
|
-
} from "./index-
|
|
146
|
+
} from "./index-0h00ve4y.js";
|
|
147
147
|
import {
|
|
148
148
|
BUILD_DIAGNOSTIC_CODES
|
|
149
|
-
} from "./index-
|
|
149
|
+
} from "./index-yeej2vhs.js";
|
|
150
150
|
import {
|
|
151
151
|
BuildError,
|
|
152
152
|
DEFAULT_PRINT_OPTS,
|
|
153
153
|
readyProbeExpr
|
|
154
|
-
} from "./index-
|
|
154
|
+
} from "./index-gf1shk3y.js";
|
|
155
155
|
import {
|
|
156
156
|
AUTO_SNAPSHOT_MESSAGE,
|
|
157
157
|
HISTORY_PAGE_LIMIT,
|
|
@@ -163,7 +163,7 @@ import {
|
|
|
163
163
|
resolveLogger,
|
|
164
164
|
restoreVersionWithBackup,
|
|
165
165
|
switchBranch
|
|
166
|
-
} from "./index-
|
|
166
|
+
} from "./index-8xkw284t.js";
|
|
167
167
|
import {
|
|
168
168
|
capabilitiesFor,
|
|
169
169
|
detectProjectSource,
|
|
@@ -60,7 +60,9 @@ export interface RecommendedExtension {
|
|
|
60
60
|
use: string;
|
|
61
61
|
/** Short, plain-language feature name shown as the row title. */
|
|
62
62
|
label: string;
|
|
63
|
-
/** One-line author-friendly description.
|
|
63
|
+
/** One-line author-friendly description in plain words. Backtick spans mark
|
|
64
|
+
* "what to type" (the desktop sets them in code type), so keep them paired
|
|
65
|
+
* and keep HTML tag names out of the prose. */
|
|
64
66
|
description: string;
|
|
65
67
|
}
|
|
66
68
|
/**
|
|
@@ -10,19 +10,19 @@ export declare const MSG_SYNCED = "Your changes are online.";
|
|
|
10
10
|
export declare const MSG_SYNCED_MERGED = "Your changes are online, combined with changes from the online copy.";
|
|
11
11
|
export declare const MSG_OFFLINE = "Your changes are saved on this computer. gutterpress couldn't reach the online repository \u2014 try syncing again when you're back online.";
|
|
12
12
|
export declare const MSG_AUTH = "The online repository didn't accept the saved connection. Reconnect and try again.";
|
|
13
|
-
export declare const MSG_INSECURE_TRANSPORT = "This
|
|
13
|
+
export declare const MSG_INSECURE_TRANSPORT = "This book's online address isn't secure, so the saved connection wasn't sent \u2014 connections are never sent over an insecure address. Switch the address to a secure one (starting with https), or to a local loopback address for a server on this computer, to sync.";
|
|
14
14
|
export declare const MSG_BUSY = "The online copy is changing very quickly right now. Your work is saved on this computer \u2014 try Sync again in a moment.";
|
|
15
15
|
/**
|
|
16
|
-
* The
|
|
16
|
+
* The book's own version history is unreadable — a damaged or missing
|
|
17
17
|
* `.git`. Says the three things that are actually true and useful: the writing
|
|
18
18
|
* is safe, the HISTORY is what broke, and (sync always has a remote, so this
|
|
19
19
|
* always applies here) a fresh copy from online is the way back.
|
|
20
20
|
*/
|
|
21
|
-
export declare const MSG_HISTORY_UNREADABLE = "This
|
|
22
|
-
export declare const MSG_UNRELATED = "This
|
|
23
|
-
export declare const MSG_NO_REMOTE = "This
|
|
24
|
-
export declare const MSG_SSH_REMOTE = "This
|
|
25
|
-
export declare const MSG_NO_BRANCH = "This
|
|
21
|
+
export declare const MSG_HISTORY_UNREADABLE = "This book's version history can't be read, so syncing can't continue. Your writing is safe \u2014 every file is still here on this computer. To get history and syncing working again, download a fresh copy of the book from online, then move any recent changes into it.";
|
|
22
|
+
export declare const MSG_UNRELATED = "This book and the online copy have no history in common, so they can't be combined. Either the online address points at a different book, or this book's own history was lost and started over. Your writing is safe \u2014 every file is still here on this computer. Check the online address; if it is correct, download a fresh copy from online and move any recent changes into it.";
|
|
23
|
+
export declare const MSG_NO_REMOTE = "This book isn't connected to an online repository yet.";
|
|
24
|
+
export declare const MSG_SSH_REMOTE = "This book's online address uses SSH (git@\u2026), which gutterpress can't sync to. Switch it to the web (HTTPS) address to sync from here.";
|
|
25
|
+
export declare const MSG_NO_BRANCH = "This book's version history isn't on a named branch, so it can't be synced right now.";
|
|
26
26
|
/** Message recorded on the automatic pre-sync snapshot (D5 invariant).
|
|
27
27
|
* Pre-0.10.1 history carries the old spelling "Snapshot before syncing". */
|
|
28
28
|
export declare const SYNC_SNAPSHOT_MESSAGE = "Automatic backup of your work";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MANIFEST_FILENAMES,
|
|
3
3
|
runLint
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-g6vshy3f.js";
|
|
5
5
|
import {
|
|
6
6
|
log
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-rra50cp6.js";
|
|
8
8
|
import {
|
|
9
9
|
UsageError,
|
|
10
10
|
rejectExtraPositionals,
|
|
11
11
|
rejectUnknownFlags
|
|
12
|
-
} from "./cli-
|
|
13
|
-
import"./cli-
|
|
12
|
+
} from "./cli-5c2xfsmz.js";
|
|
13
|
+
import"./cli-5vdgncmm.js";
|
|
14
14
|
import"./cli-c41yr7he.js";
|
|
15
15
|
import {
|
|
16
16
|
EXIT_CODES
|
|
17
17
|
} from "./cli-46ycxe6r.js";
|
|
18
|
-
import"./cli-
|
|
18
|
+
import"./cli-c5360prx.js";
|
|
19
19
|
import"./cli-v5mp7a6q.js";
|
|
20
20
|
import"./cli-37x76zdn.js";
|
|
21
21
|
|
|
@@ -7,23 +7,23 @@ import {
|
|
|
7
7
|
TARGET_IDS,
|
|
8
8
|
scaffoldExtension,
|
|
9
9
|
scaffoldProject
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-g6vshy3f.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveGhostscript
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-rra50cp6.js";
|
|
14
14
|
import {
|
|
15
15
|
UsageError,
|
|
16
16
|
rejectExtraPositionals,
|
|
17
17
|
rejectUnknownFlags
|
|
18
|
-
} from "./cli-
|
|
19
|
-
import"./cli-
|
|
18
|
+
} from "./cli-5c2xfsmz.js";
|
|
19
|
+
import"./cli-5vdgncmm.js";
|
|
20
20
|
import {
|
|
21
21
|
isToolAvailable
|
|
22
22
|
} from "./cli-c41yr7he.js";
|
|
23
23
|
import {
|
|
24
24
|
EXIT_CODES
|
|
25
25
|
} from "./cli-46ycxe6r.js";
|
|
26
|
-
import"./cli-
|
|
26
|
+
import"./cli-c5360prx.js";
|
|
27
27
|
import"./cli-v5mp7a6q.js";
|
|
28
28
|
import"./cli-37x76zdn.js";
|
|
29
29
|
|
|
@@ -252,7 +252,7 @@ var new_default = defineCommand({
|
|
|
252
252
|
versionHistory: args.git === false ? "none" : "local-git"
|
|
253
253
|
});
|
|
254
254
|
const effectiveTargets = targets ?? [...PRESETS[preset].defaultTargets];
|
|
255
|
-
console.log(`Created
|
|
255
|
+
console.log(`Created book: ${result.projectDir}`);
|
|
256
256
|
console.log(` manifest: ${result.manifestPath}`);
|
|
257
257
|
console.log(` publish targets: ${effectiveTargets.length > 0 ? effectiveTargets.join(", ") : "none"}`);
|
|
258
258
|
console.log(` start writing in: ${result.openFile}`);
|
|
@@ -282,7 +282,7 @@ var new_default = defineCommand({
|
|
|
282
282
|
} catch (e) {
|
|
283
283
|
const err = e;
|
|
284
284
|
const code = err && typeof err.code === "string" ? err.code : "scaffold-io";
|
|
285
|
-
console.error(`Could not create
|
|
285
|
+
console.error(`Could not create book: ${err?.message ?? String(e)}`);
|
|
286
286
|
process.exit(code === "scaffold-io" ? EXIT_CODES.PIPELINE : EXIT_CODES.USAGE);
|
|
287
287
|
}
|
|
288
288
|
}
|
|
@@ -2,21 +2,21 @@ import {
|
|
|
2
2
|
executeValidation,
|
|
3
3
|
publishTargetFor,
|
|
4
4
|
reportMissingTools
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-g6vshy3f.js";
|
|
6
6
|
import {
|
|
7
7
|
log
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-rra50cp6.js";
|
|
9
9
|
import {
|
|
10
10
|
UsageError,
|
|
11
11
|
rejectExtraPositionals,
|
|
12
12
|
rejectUnknownFlags
|
|
13
|
-
} from "./cli-
|
|
14
|
-
import"./cli-
|
|
13
|
+
} from "./cli-5c2xfsmz.js";
|
|
14
|
+
import"./cli-5vdgncmm.js";
|
|
15
15
|
import"./cli-c41yr7he.js";
|
|
16
16
|
import {
|
|
17
17
|
EXIT_CODES
|
|
18
18
|
} from "./cli-46ycxe6r.js";
|
|
19
|
-
import"./cli-
|
|
19
|
+
import"./cli-c5360prx.js";
|
|
20
20
|
import"./cli-v5mp7a6q.js";
|
|
21
21
|
import"./cli-37x76zdn.js";
|
|
22
22
|
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
runBuild,
|
|
7
7
|
splitOutPath,
|
|
8
8
|
startPreviewServer
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-g6vshy3f.js";
|
|
10
10
|
import {
|
|
11
11
|
log
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-rra50cp6.js";
|
|
13
13
|
import {
|
|
14
14
|
UsageError,
|
|
15
15
|
parseFormat,
|
|
@@ -17,13 +17,13 @@ import {
|
|
|
17
17
|
rejectExtraPositionals,
|
|
18
18
|
rejectUnknownFlags,
|
|
19
19
|
resolvePort
|
|
20
|
-
} from "./cli-
|
|
21
|
-
import"./cli-
|
|
20
|
+
} from "./cli-5c2xfsmz.js";
|
|
21
|
+
import"./cli-5vdgncmm.js";
|
|
22
22
|
import"./cli-c41yr7he.js";
|
|
23
23
|
import {
|
|
24
24
|
BuildError
|
|
25
25
|
} from "./cli-46ycxe6r.js";
|
|
26
|
-
import"./cli-
|
|
26
|
+
import"./cli-c5360prx.js";
|
|
27
27
|
import"./cli-v5mp7a6q.js";
|
|
28
28
|
import"./cli-37x76zdn.js";
|
|
29
29
|
|
|
@@ -49,7 +49,7 @@ var preview_default = defineCommand({
|
|
|
49
49
|
const openFlag = args.open;
|
|
50
50
|
if (format === "html") {
|
|
51
51
|
if (typeof args.manifest === "string") {
|
|
52
|
-
throw new UsageError("--manifest is only supported by preview --format pdf or pdfx; live HTML preview discovers the
|
|
52
|
+
throw new UsageError("--manifest is only supported by preview --format pdf or pdfx; live HTML preview discovers the book manifest from its input directory.");
|
|
53
53
|
}
|
|
54
54
|
await startPreviewServer({
|
|
55
55
|
input: inputPath,
|
|
@@ -11,22 +11,22 @@ import {
|
|
|
11
11
|
publishProviderFor,
|
|
12
12
|
resolvePublishFormat,
|
|
13
13
|
runPublish
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-g6vshy3f.js";
|
|
15
15
|
import {
|
|
16
16
|
FileTokenStore,
|
|
17
17
|
log
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-rra50cp6.js";
|
|
19
19
|
import {
|
|
20
20
|
UsageError,
|
|
21
21
|
rejectExtraPositionals,
|
|
22
22
|
rejectUnknownFlags
|
|
23
|
-
} from "./cli-
|
|
24
|
-
import"./cli-
|
|
23
|
+
} from "./cli-5c2xfsmz.js";
|
|
24
|
+
import"./cli-5vdgncmm.js";
|
|
25
25
|
import"./cli-c41yr7he.js";
|
|
26
26
|
import {
|
|
27
27
|
EXIT_CODES
|
|
28
28
|
} from "./cli-46ycxe6r.js";
|
|
29
|
-
import"./cli-
|
|
29
|
+
import"./cli-c5360prx.js";
|
|
30
30
|
import"./cli-v5mp7a6q.js";
|
|
31
31
|
import"./cli-37x76zdn.js";
|
|
32
32
|
|
|
@@ -251,7 +251,7 @@ Create one at: ${provider.info.credential.tokenUrl}` : ""));
|
|
|
251
251
|
log.error(e instanceof Error ? e.message : String(e));
|
|
252
252
|
process.exit(e instanceof UsageError ? e.exitCode : EXIT_CODES.FINDINGS);
|
|
253
253
|
}
|
|
254
|
-
log.success(`Connected ${provider.info.label}${account ? ` (${account})` : ""}. The key is stored in your user config, not the
|
|
254
|
+
log.success(`Connected ${provider.info.label}${account ? ` (${account})` : ""}. The key is stored in your user config, not the book.`);
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
257
|
let result;
|