gutterpress 0.11.23-alpha.4 → 0.11.23-alpha.6
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 +1 -1
- package/dist/api/index.d.ts +5 -3
- package/dist/api/index.js +17 -7
- package/dist/{build-c48eer6f.js → build-py643c5a.js} +8 -8
- package/dist/{cli-93mkaw6v.js → cli-09jj8w5g.js} +63 -31
- package/dist/{cli-a35w7wzg.js → cli-31anr0r9.js} +107 -56
- package/dist/{cli-y6d1arem.js → cli-55br530w.js} +4 -4
- package/dist/{cli-54xt7pjg.js → cli-58fsk6d7.js} +2 -2
- package/dist/{cli-d9mm3vvh.js → cli-bnf7eb38.js} +1 -1
- package/dist/{cli-gnpea9dx.js → cli-qzkq9em8.js} +1 -1
- package/dist/{cli-pspjxnc8.js → cli-tf9tw6at.js} +1 -1
- package/dist/{cli-rqh295j9.js → cli-x777v272.js} +3 -3
- package/dist/cli.js +12 -12
- package/dist/{doctor-ptb346k8.js → doctor-tyrzqphh.js} +3 -3
- package/dist/{engine-4rzdx6af.js → engine-4rabsgwq.js} +1 -1
- package/dist/{engine-6txhxmmv.js → engine-wm4fggac.js} +2 -2
- package/dist/{ext-gy8szg3x.js → ext-70kt3eft.js} +8 -8
- package/dist/{extension-restore-m8tj43e7.js → extension-restore-fjfn1hrk.js} +4 -4
- package/dist/{extension-restore-dymzcasz.js → extension-restore-whag4sm0.js} +2 -2
- package/dist/{index-8ywkd2sv.js → index-1zqkfzcd.js} +3 -3
- package/dist/{index-5kh4c78h.js → index-2vxzxyyj.js} +2 -2
- package/dist/{index-kaks3mm2.js → index-cmakyf43.js} +3 -3
- package/dist/{index-h6yk5tjx.js → index-cw03e9p4.js} +107 -56
- package/dist/{index-ea94zbq4.js → index-ejbfetdn.js} +327 -86
- package/dist/{index-yc3xj266.js → index-wm4x7xbf.js} +1 -1
- package/dist/index.js +18 -8
- package/dist/lib/publish/connect.d.ts +8 -1
- package/dist/lib/publish/manifest-publish.d.ts +26 -2
- package/dist/lib/publish/selections.d.ts +12 -1
- package/dist/lib/publish/types.d.ts +15 -5
- package/dist/lib/remote-auth/repair.d.ts +2 -2
- package/dist/lib/remote-auth/revisions.d.ts +60 -0
- package/dist/lib/remote-auth/scorched-earth.d.ts +2 -2
- package/dist/lib/remote-auth/sync-messages.d.ts +28 -27
- package/dist/lib/remote-auth/sync-types.d.ts +3 -0
- package/dist/lib/remote-auth/sync.d.ts +7 -8
- package/dist/lib/remote-auth/transport.d.ts +8 -1
- package/dist/lib/source-provider.d.ts +80 -35
- package/dist/{manifest.schema-w86c1xw1.json → manifest.schema-93sd7zje.json} +13 -6
- package/dist/{new-t2t28ccb.js → new-b27kyr02.js} +11 -11
- package/dist/{plugins-fec8t2bh.js → plugins-racab3cj.js} +1 -1
- package/dist/{plugins-sqa4msdk.js → plugins-vpx7c53c.js} +3 -3
- package/dist/{preflight-srq8fktp.js → preflight-akdqz9v8.js} +8 -8
- package/dist/{preview-zsp9hstd.js → preview-bck9f88w.js} +8 -8
- package/dist/{preview-interface-nnmrxyqm.js → preview-interface-0xdh0r5b.js} +3 -66
- package/dist/{publish-hhy31gr9.js → publish-keyp8rh4.js} +8 -8
- package/dist/render.js +2 -2
- package/dist/schema/manifest.types.d.ts +18 -3
- package/dist/{source-provider-knmcam50.js → source-provider-n7vehh6t.js} +15 -3
- package/dist/{source-provider-98k5deda.js → source-provider-tgzet3j5.js} +15 -3
- package/dist/{validate-r9jdz85h.js → validate-z28cvr5x.js} +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -162,7 +162,7 @@ gutterpress new <name> [--kind <id>] [options]
|
|
|
162
162
|
--targets <ids> Publish targets recorded in the manifest (comma-separated: dtrpg, itch; or "none") — default: the preset's
|
|
163
163
|
--page-width <pt> Trim width in points, 72pt = 1in (required with --preset custom; optional override otherwise)
|
|
164
164
|
--page-height <pt> Trim height in points, 72pt = 1in (required with --preset custom; optional override otherwise)
|
|
165
|
-
--git
|
|
165
|
+
--git Keep version history on this computer (default: true; use --no-git to skip)
|
|
166
166
|
--no-git
|
|
167
167
|
```
|
|
168
168
|
|
package/dist/api/index.d.ts
CHANGED
|
@@ -53,8 +53,8 @@ export { readManifestFields, setManifestFields, setActiveStyles, } from "../lib/
|
|
|
53
53
|
export type { ProjectConfigFields } from "../lib/manifest-config.ts";
|
|
54
54
|
export { readPageSetup, setPageSetup } from "../lib/page-size.ts";
|
|
55
55
|
export type { PageMargin, PageSetup, PageSetupChange, PageSizeChoice, PageSizePoints } from "../lib/page-size.ts";
|
|
56
|
-
export { providerFor, restoreVersionWithBackup, isNoChangesError, countUnversionedChanges, whenGitIdle, AUTO_SNAPSHOT_MESSAGE, RESTORE_BACKUP_MESSAGE, HISTORY_PAGE_LIMIT,
|
|
57
|
-
export type { ListHistoryOptions, HistoryPage, UnversionedChanges,
|
|
56
|
+
export { providerFor, restoreVersionWithBackup, isNoChangesError, countUnversionedChanges, whenGitIdle, AUTO_SNAPSHOT_MESSAGE, RESTORE_BACKUP_MESSAGE, HISTORY_PAGE_LIMIT, listRevisions, createRevision, revisionNameFrom, switchBranch, SWITCH_BRANCH_SNAPSHOT_MESSAGE, } from "../lib/source-provider.ts";
|
|
57
|
+
export type { ListHistoryOptions, HistoryPage, UnversionedChanges, Revision, RevisionList, CreateRevisionOptions, SwitchBranchOptions, SwitchBranchResult, } from "../lib/source-provider.ts";
|
|
58
58
|
export { describeVersions, listOnlineVersions, compareVersionFile, exportVersionTree, VERSION_CHANGES_SHOWN, } from "../lib/version-changes.ts";
|
|
59
59
|
export type { VersionEntry, VersionFileChange, CompareRow } from "../lib/version-changes.ts";
|
|
60
60
|
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";
|
|
@@ -80,6 +80,8 @@ export type { GenericTokenConnectInput, GenericAuthOptions, } from "../lib/remot
|
|
|
80
80
|
export { diagnoseProjectRemote, parseRemoteOrigin, forgeKindForHost, } from "../lib/remote-auth/diagnose.ts";
|
|
81
81
|
export type { ProjectRemoteDiagnosis, DiagnoseProjectRemoteOptions, RemoteProtocol, RemoteGuidanceId, ForgeKind, } from "../lib/remote-auth/diagnose.ts";
|
|
82
82
|
export { syncProject, refreshRemoteCopies, checkRemoteUpdates, SYNC_SNAPSHOT_MESSAGE, } from "../lib/remote-auth/sync.ts";
|
|
83
|
+
export { renameRevision, deleteRevision } from "../lib/remote-auth/revisions.ts";
|
|
84
|
+
export type { RenameRevisionOptions, DeleteRevisionOptions } from "../lib/remote-auth/revisions.ts";
|
|
83
85
|
export { repairOnlineBackup, REPAIR_SNAPSHOT_MESSAGE, type RepairOnlineBackupOptions, type RepairOnlineBackupResult, } from "../lib/remote-auth/repair.ts";
|
|
84
86
|
export { scorchedEarth, type ScorchedEarthOptions, type ScorchedEarthResult, } from "../lib/remote-auth/scorched-earth.ts";
|
|
85
87
|
export type { SyncOutcome, SyncProjectOptions, KeptBothFile, } from "../lib/remote-auth/sync.ts";
|
|
@@ -95,7 +97,7 @@ export { publishConnectionStatus, publishCredentialKey, listPublishAccounts, } f
|
|
|
95
97
|
export type { PublishSavedAccount } from "../lib/publish/types.ts";
|
|
96
98
|
export { PublishSelectionsStore } from "../lib/publish/selections.ts";
|
|
97
99
|
export type { PublishAccountSelection } from "../lib/publish/selections.ts";
|
|
98
|
-
export { readPublishSettings, setPublishProviderConfig, } from "../lib/publish/manifest-publish.ts";
|
|
100
|
+
export { readPublishSettings, savePublishSettings, setPublishProviderConfig, } from "../lib/publish/manifest-publish.ts";
|
|
99
101
|
export type { PublishProvider, PublishProviderId, PublishProviderInfo, PublishProviderKind, PublishConfigField, PublishArtifact, PublishArtifactFormat, PublishAuthStatus, PublishDeps, PublishListingMetadata, PublishOutcome, PublishProduct, PublishProject, PublishRequest, PreflightIssue, CommandRunner, CommandResult, PublishPluginContext, PublishPluginFunction, PublishPluginResult, } from "../lib/publish/types.ts";
|
|
100
102
|
export { resolveLogger } from "../lib/remote-auth/operation-log.ts";
|
|
101
103
|
export type { OperationLogger, LogData } from "../lib/remote-auth/operation-log.ts";
|
package/dist/api/index.js
CHANGED
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
connectGoogleDrive,
|
|
31
31
|
connectPublishProvider,
|
|
32
32
|
defaultConfigDir,
|
|
33
|
+
deleteRevision,
|
|
33
34
|
deleteSnippet,
|
|
34
35
|
describeVersions,
|
|
35
36
|
diagnoseProjectRemote,
|
|
@@ -70,6 +71,7 @@ import {
|
|
|
70
71
|
readPageSetup,
|
|
71
72
|
readPublishSettings,
|
|
72
73
|
refreshRemoteCopies,
|
|
74
|
+
renameRevision,
|
|
73
75
|
repairOnlineBackup,
|
|
74
76
|
requireGoogleClientCredentials,
|
|
75
77
|
resolveActiveStyles,
|
|
@@ -85,6 +87,7 @@ import {
|
|
|
85
87
|
runPublish,
|
|
86
88
|
sanitizeCloneFolderName,
|
|
87
89
|
saveProjectAsTemplate,
|
|
90
|
+
savePublishSettings,
|
|
88
91
|
saveSnippet,
|
|
89
92
|
scaffoldExtension,
|
|
90
93
|
scaffoldProject,
|
|
@@ -101,7 +104,7 @@ import {
|
|
|
101
104
|
substituteVariables,
|
|
102
105
|
syncProject,
|
|
103
106
|
testRemoteAccess
|
|
104
|
-
} from "../index-
|
|
107
|
+
} from "../index-ejbfetdn.js";
|
|
105
108
|
import {
|
|
106
109
|
DEFAULT_NPM_REGISTRY,
|
|
107
110
|
MANIFEST_FILENAMES,
|
|
@@ -130,7 +133,7 @@ import {
|
|
|
130
133
|
setExtensionEnabled,
|
|
131
134
|
updateExtensions,
|
|
132
135
|
validateProjectExtensions
|
|
133
|
-
} from "../index-
|
|
136
|
+
} from "../index-cmakyf43.js";
|
|
134
137
|
import {
|
|
135
138
|
BUNDLED_EXTENSIONS,
|
|
136
139
|
EXTENSION_MANIFEST_FILENAME,
|
|
@@ -145,9 +148,9 @@ import {
|
|
|
145
148
|
pathEscapesFolder,
|
|
146
149
|
readExtensionMeta,
|
|
147
150
|
resolveExtension
|
|
148
|
-
} from "../index-
|
|
151
|
+
} from "../index-1zqkfzcd.js";
|
|
149
152
|
import"../index-ht1bcqdd.js";
|
|
150
|
-
import"../index-
|
|
153
|
+
import"../index-2vxzxyyj.js";
|
|
151
154
|
import {
|
|
152
155
|
BuildError
|
|
153
156
|
} from "../index-46ycxe6r.js";
|
|
@@ -163,14 +166,16 @@ import {
|
|
|
163
166
|
RESTORE_BACKUP_MESSAGE,
|
|
164
167
|
SWITCH_BRANCH_SNAPSHOT_MESSAGE,
|
|
165
168
|
countUnversionedChanges,
|
|
169
|
+
createRevision,
|
|
166
170
|
isNoChangesError,
|
|
167
|
-
|
|
171
|
+
listRevisions,
|
|
168
172
|
providerFor,
|
|
169
173
|
resolveLogger,
|
|
170
174
|
restoreVersionWithBackup,
|
|
175
|
+
revisionNameFrom,
|
|
171
176
|
switchBranch,
|
|
172
177
|
whenGitIdle
|
|
173
|
-
} from "../index-
|
|
178
|
+
} from "../index-cw03e9p4.js";
|
|
174
179
|
import {
|
|
175
180
|
EXTENSIONS_DIR
|
|
176
181
|
} from "../index-5x42amh8.js";
|
|
@@ -204,12 +209,14 @@ export {
|
|
|
204
209
|
scaffoldProject,
|
|
205
210
|
scaffoldExtension,
|
|
206
211
|
saveSnippet,
|
|
212
|
+
savePublishSettings,
|
|
207
213
|
saveProjectAsTemplate,
|
|
208
214
|
sanitizeCloneFolderName,
|
|
209
215
|
sameExtension,
|
|
210
216
|
runPublish,
|
|
211
217
|
runBuild,
|
|
212
218
|
revokeGoogleCredential,
|
|
219
|
+
revisionNameFrom,
|
|
213
220
|
restoreVersionWithBackup,
|
|
214
221
|
restorePinnedExtensions,
|
|
215
222
|
restoreFailureMessage,
|
|
@@ -229,6 +236,7 @@ export {
|
|
|
229
236
|
repoRootForSource,
|
|
230
237
|
repairOnlineBackup,
|
|
231
238
|
reorderExtensions,
|
|
239
|
+
renameRevision,
|
|
232
240
|
removeExtension,
|
|
233
241
|
refreshRemoteCopies,
|
|
234
242
|
readyProbeExpr,
|
|
@@ -249,6 +257,7 @@ export {
|
|
|
249
257
|
npmRegistryUrl,
|
|
250
258
|
loadManifestWithPath,
|
|
251
259
|
listSnippets,
|
|
260
|
+
listRevisions,
|
|
252
261
|
listRepoBooks,
|
|
253
262
|
listPublishProviders,
|
|
254
263
|
listPublishAccounts,
|
|
@@ -259,7 +268,6 @@ export {
|
|
|
259
268
|
listMergedSnippets,
|
|
260
269
|
listMarkerComponents,
|
|
261
270
|
listLocationVariants,
|
|
262
|
-
listLocalBranches,
|
|
263
271
|
listGitHubRepositories,
|
|
264
272
|
listGitHubBranches,
|
|
265
273
|
listCustomTemplates,
|
|
@@ -294,7 +302,9 @@ export {
|
|
|
294
302
|
describeVersions,
|
|
295
303
|
describeExtension,
|
|
296
304
|
deleteSnippet,
|
|
305
|
+
deleteRevision,
|
|
297
306
|
defaultConfigDir,
|
|
307
|
+
createRevision,
|
|
298
308
|
countUnversionedChanges,
|
|
299
309
|
connectPublishProvider,
|
|
300
310
|
connectGoogleDrive,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runBuild,
|
|
3
3
|
splitOutPath
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-09jj8w5g.js";
|
|
5
|
+
import"./cli-bnf7eb38.js";
|
|
6
6
|
import"./cli-ht1bcqdd.js";
|
|
7
|
-
import"./cli-
|
|
7
|
+
import"./cli-58fsk6d7.js";
|
|
8
8
|
import"./cli-5crpmz42.js";
|
|
9
9
|
import"./cli-eyyggect.js";
|
|
10
10
|
import"./cli-asap4t1z.js";
|
|
11
|
-
import"./cli-
|
|
11
|
+
import"./cli-31anr0r9.js";
|
|
12
12
|
import"./cli-v5mp7a6q.js";
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
13
|
+
import"./cli-55br530w.js";
|
|
14
|
+
import"./cli-x777v272.js";
|
|
15
15
|
import {
|
|
16
16
|
log
|
|
17
|
-
} from "./cli-
|
|
17
|
+
} from "./cli-tf9tw6at.js";
|
|
18
18
|
import {
|
|
19
19
|
UsageError,
|
|
20
20
|
parseFormat,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
rejectExtraPositionals,
|
|
23
23
|
rejectUnknownFlags
|
|
24
24
|
} from "./cli-d8xjns66.js";
|
|
25
|
-
import"./cli-
|
|
25
|
+
import"./cli-qzkq9em8.js";
|
|
26
26
|
import {
|
|
27
27
|
BuildError
|
|
28
28
|
} from "./cli-46ycxe6r.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
stampCreator,
|
|
9
9
|
stripAnnotations,
|
|
10
10
|
transparentPages
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-bnf7eb38.js";
|
|
12
12
|
import {
|
|
13
13
|
blackTextToGray
|
|
14
14
|
} from "./cli-ht1bcqdd.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
MARGIN_BOX_IGNORED_PROPERTIES,
|
|
18
18
|
getAssetPath,
|
|
19
19
|
lastPageMode
|
|
20
|
-
} from "./cli-
|
|
20
|
+
} from "./cli-58fsk6d7.js";
|
|
21
21
|
import {
|
|
22
22
|
countLinkAnnotations,
|
|
23
23
|
getImageResolutions,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
import {
|
|
43
43
|
hasUncommittedChanges,
|
|
44
44
|
listWorkdirChanges
|
|
45
|
-
} from "./cli-
|
|
45
|
+
} from "./cli-31anr0r9.js";
|
|
46
46
|
import {
|
|
47
47
|
detectProjectSource,
|
|
48
48
|
repoSubPath
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
uniqueExtensionId,
|
|
76
76
|
withFetchTimeout,
|
|
77
77
|
writeManifestDoc
|
|
78
|
-
} from "./cli-
|
|
78
|
+
} from "./cli-55br530w.js";
|
|
79
79
|
import {
|
|
80
80
|
EXTENSION_MANIFEST_FILENAME,
|
|
81
81
|
GUTTERPRESS_CSS,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
readExtensionMeta,
|
|
97
97
|
resolveDeclaredStyles,
|
|
98
98
|
slugify
|
|
99
|
-
} from "./cli-
|
|
99
|
+
} from "./cli-x777v272.js";
|
|
100
100
|
import {
|
|
101
101
|
PACKAGE_META,
|
|
102
102
|
PACKAGE_VERSION,
|
|
@@ -106,7 +106,7 @@ import {
|
|
|
106
106
|
log,
|
|
107
107
|
setLogLevel,
|
|
108
108
|
warn
|
|
109
|
-
} from "./cli-
|
|
109
|
+
} from "./cli-tf9tw6at.js";
|
|
110
110
|
import {
|
|
111
111
|
DEBOUNCE,
|
|
112
112
|
UsageError,
|
|
@@ -3024,8 +3024,8 @@ function withoutOnlineTag(relPath) {
|
|
|
3024
3024
|
}
|
|
3025
3025
|
var check27 = {
|
|
3026
3026
|
id: "source.sync.merge-markers",
|
|
3027
|
-
name: "Combined
|
|
3028
|
-
description: "Finds passages and files still holding two
|
|
3027
|
+
name: "Combined Takes",
|
|
3028
|
+
description: "Finds passages and files still holding two takes (yours and the online copy's) after getting the latest changes",
|
|
3029
3029
|
category: "source",
|
|
3030
3030
|
phase: "pre-build",
|
|
3031
3031
|
async run(ctx) {
|
|
@@ -3051,7 +3051,7 @@ var check27 = {
|
|
|
3051
3051
|
results.push(finding(check27.id, {
|
|
3052
3052
|
severity: "error",
|
|
3053
3053
|
code: "two-versions-passage",
|
|
3054
|
-
message: "This passage has two
|
|
3054
|
+
message: "This passage has two takes — yours and the online copy's. Choose one in the editor's Two takes panel, or keep the text you want and delete the marker lines.",
|
|
3055
3055
|
file,
|
|
3056
3056
|
line: i + 1
|
|
3057
3057
|
}));
|
|
@@ -3060,7 +3060,7 @@ var check27 = {
|
|
|
3060
3060
|
results.push(finding(check27.id, {
|
|
3061
3061
|
severity: "error",
|
|
3062
3062
|
code: "leftover-version-marker",
|
|
3063
|
-
message: "This marker line is left over from combining two
|
|
3063
|
+
message: "This marker line is left over from combining two takes — delete it.",
|
|
3064
3064
|
file,
|
|
3065
3065
|
line: i + 1
|
|
3066
3066
|
}));
|
|
@@ -3081,7 +3081,7 @@ var check27 = {
|
|
|
3081
3081
|
results.push(finding(check27.id, {
|
|
3082
3082
|
severity: "warning",
|
|
3083
3083
|
code: "kept-both-versions",
|
|
3084
|
-
message: `Two
|
|
3084
|
+
message: `Two takes of ${withoutOnlineTag(rel)} are in your book — keep the one you want, then delete the other.`,
|
|
3085
3085
|
file: sibling
|
|
3086
3086
|
}));
|
|
3087
3087
|
}
|
|
@@ -5056,7 +5056,7 @@ class PdfOutput {
|
|
|
5056
5056
|
const rawPdf = pdfxMode ? path7.join(stage, "raw.pdf") : path7.resolve(pdfFile);
|
|
5057
5057
|
await fsp2.mkdir(path7.dirname(path7.resolve(pdfFile)), { recursive: true });
|
|
5058
5058
|
log.info("Rendering HTML to PDF via the Gutterpress engine (native Chromium pagination)");
|
|
5059
|
-
const { buildNativePdf } = await import("./engine-
|
|
5059
|
+
const { buildNativePdf } = await import("./engine-4rabsgwq.js");
|
|
5060
5060
|
const engineDiagnostics = await buildNativePdf(htmlFile, rawPdf, {
|
|
5061
5061
|
title: config.title,
|
|
5062
5062
|
author: config.authors.length > 0 ? config.authors.join(", ") : undefined,
|
|
@@ -6524,7 +6524,7 @@ async function scaffoldProject(options) {
|
|
|
6524
6524
|
let versionHistoryError;
|
|
6525
6525
|
if (requested === "local-git") {
|
|
6526
6526
|
try {
|
|
6527
|
-
const { providerFor } = await import("./source-provider-
|
|
6527
|
+
const { providerFor } = await import("./source-provider-n7vehh6t.js");
|
|
6528
6528
|
const provider = providerFor({ type: "local-folder", path: projectDir });
|
|
6529
6529
|
await provider.initVersionHistory({
|
|
6530
6530
|
projectDir,
|
|
@@ -6536,7 +6536,7 @@ async function scaffoldProject(options) {
|
|
|
6536
6536
|
versionHistory = "none";
|
|
6537
6537
|
const { findEnclosingRepoDir } = await import("./project-source-ekcyp63q.js");
|
|
6538
6538
|
const enclosingRepoDir = await findEnclosingRepoDir(projectDir);
|
|
6539
|
-
versionHistoryError = enclosingRepoDir ? `This book was added to ${path12.basename(enclosingRepoDir)}'s shared version history; save a
|
|
6539
|
+
versionHistoryError = enclosingRepoDir ? `This book was added to ${path12.basename(enclosingRepoDir)}'s shared version history; save a version to record it.` : e instanceof Error ? e.message : String(e);
|
|
6540
6540
|
}
|
|
6541
6541
|
}
|
|
6542
6542
|
const result = {
|
|
@@ -8822,7 +8822,7 @@ function publishProviderFor(id) {
|
|
|
8822
8822
|
}
|
|
8823
8823
|
|
|
8824
8824
|
// src/lib/publish/plugin-provider.ts
|
|
8825
|
-
var RESERVED_SETTINGS = new Set(["format", "credential"]);
|
|
8825
|
+
var RESERVED_SETTINGS = new Set(["format", "credential", "enabled"]);
|
|
8826
8826
|
var isBuiltIn = (id) => listPublishProviders().some((p) => p.id === id);
|
|
8827
8827
|
var messageOf = (e) => e instanceof Error ? e.message : String(e);
|
|
8828
8828
|
async function bookExtensions(book) {
|
|
@@ -8878,7 +8878,7 @@ async function resolvePublishProvider(id, book) {
|
|
|
8878
8878
|
const ext = await bookExtensions(book);
|
|
8879
8879
|
const npmEntry = ext.extensions.some((c) => !c.path && c.name === id);
|
|
8880
8880
|
if (npmEntry) {
|
|
8881
|
-
const { restoreForCommand: restoreForCommand2 } = await import("./extension-restore-
|
|
8881
|
+
const { restoreForCommand: restoreForCommand2 } = await import("./extension-restore-fjfn1hrk.js");
|
|
8882
8882
|
await restoreForCommand2(book.projectDir, { manifestPath: book.manifestPath, failFast: true });
|
|
8883
8883
|
}
|
|
8884
8884
|
const publishers = await discover(ext);
|
|
@@ -8916,7 +8916,7 @@ function infoFor(p) {
|
|
|
8916
8916
|
}
|
|
8917
8917
|
function pluginProvider(p) {
|
|
8918
8918
|
let loading;
|
|
8919
|
-
const load = () => loading ??= import("./plugins-
|
|
8919
|
+
const load = () => loading ??= import("./plugins-vpx7c53c.js").then((m) => m.loadPublishFunction(p));
|
|
8920
8920
|
return {
|
|
8921
8921
|
info: infoFor(p),
|
|
8922
8922
|
async authenticate() {
|
|
@@ -8985,7 +8985,10 @@ async function requestFor(provider, options, deps) {
|
|
|
8985
8985
|
const { manifest, manifestDir } = await loadManifestWithPath(options.manifestPath ?? options.projectDir, { explicit: options.manifestPath !== undefined });
|
|
8986
8986
|
const config = resolveConfig({}, manifest);
|
|
8987
8987
|
const publishSettings = manifest.publish ?? {};
|
|
8988
|
-
const providerConfig =
|
|
8988
|
+
const providerConfig = {
|
|
8989
|
+
...publishSettings[provider.info.id] ?? {},
|
|
8990
|
+
...(await deps.selections?.settings(options.projectDir))?.[provider.info.id] ?? {}
|
|
8991
|
+
};
|
|
8989
8992
|
const bookAccount = typeof providerConfig.credential === "string" ? providerConfig.credential.trim() : "";
|
|
8990
8993
|
const effectiveAccount = bookAccount || deps.credentialAccount;
|
|
8991
8994
|
const effectiveDeps = effectiveAccount ? { ...deps, credentialAccount: effectiveAccount } : deps;
|
|
@@ -9162,11 +9165,20 @@ async function connectPublishProvider(options, deps) {
|
|
|
9162
9165
|
label: account || info10.label,
|
|
9163
9166
|
createdAt: Date.now()
|
|
9164
9167
|
};
|
|
9165
|
-
const
|
|
9168
|
+
const shop = (options.shop ?? "").trim();
|
|
9169
|
+
if (!options.projectDir && info10.id === "shopify" && !shop) {
|
|
9170
|
+
throw new Error("Enter your Shopify store's address (like my-store.myshopify.com) to check the key.");
|
|
9171
|
+
}
|
|
9172
|
+
const req = options.projectDir ? await resolvePublishRequest({
|
|
9166
9173
|
projectDir: options.projectDir,
|
|
9167
9174
|
providerId: info10.id,
|
|
9168
9175
|
...options.manifestPath ? { manifestPath: options.manifestPath } : {}
|
|
9169
|
-
}, deps)
|
|
9176
|
+
}, deps) : {
|
|
9177
|
+
project: { projectDir: "", title: "", authors: [] },
|
|
9178
|
+
config: shop ? { shop } : {},
|
|
9179
|
+
artifact: { path: "", format: info10.format },
|
|
9180
|
+
deps
|
|
9181
|
+
};
|
|
9170
9182
|
const trialDeps = {
|
|
9171
9183
|
...deps,
|
|
9172
9184
|
env: {},
|
|
@@ -9309,10 +9321,12 @@ import git7 from "isomorphic-git";
|
|
|
9309
9321
|
// src/lib/remote-auth/test-access.ts
|
|
9310
9322
|
import git8 from "isomorphic-git";
|
|
9311
9323
|
import httpNode2 from "isomorphic-git/http/node";
|
|
9312
|
-
// src/lib/remote-auth/
|
|
9324
|
+
// src/lib/remote-auth/revisions.ts
|
|
9313
9325
|
import git9 from "isomorphic-git";
|
|
9314
|
-
// src/lib/remote-auth/
|
|
9326
|
+
// src/lib/remote-auth/repair.ts
|
|
9315
9327
|
import git10 from "isomorphic-git";
|
|
9328
|
+
// src/lib/remote-auth/scorched-earth.ts
|
|
9329
|
+
import git11 from "isomorphic-git";
|
|
9316
9330
|
// src/lib/publish/selections.ts
|
|
9317
9331
|
import { chmod as chmod2, mkdir as mkdir10, readFile as readFile26, writeFile as writeFile11 } from "node:fs/promises";
|
|
9318
9332
|
import path21 from "node:path";
|
|
@@ -9354,7 +9368,7 @@ class PublishSelectionsStore {
|
|
|
9354
9368
|
resolve(providerId, projectDir) {
|
|
9355
9369
|
return this.enqueue(async () => {
|
|
9356
9370
|
const data = await this.read();
|
|
9357
|
-
const proj = projectDir ? data.projects[normalizeProjectKey(projectDir)]?.[providerId] : undefined;
|
|
9371
|
+
const proj = projectDir ? data.projects[normalizeProjectKey(projectDir)]?.[providerId]?.credential : undefined;
|
|
9358
9372
|
return proj && proj.trim() || data.global[providerId]?.trim() || undefined;
|
|
9359
9373
|
});
|
|
9360
9374
|
}
|
|
@@ -9362,7 +9376,7 @@ class PublishSelectionsStore {
|
|
|
9362
9376
|
return this.enqueue(async () => {
|
|
9363
9377
|
const data = await this.read();
|
|
9364
9378
|
const global = data.global[providerId];
|
|
9365
|
-
const project = projectDir ? data.projects[normalizeProjectKey(projectDir)]?.[providerId] : undefined;
|
|
9379
|
+
const project = projectDir ? data.projects[normalizeProjectKey(projectDir)]?.[providerId]?.credential : undefined;
|
|
9366
9380
|
return {
|
|
9367
9381
|
...project ? { project } : {},
|
|
9368
9382
|
...global ? { global } : {}
|
|
@@ -9381,17 +9395,35 @@ class PublishSelectionsStore {
|
|
|
9381
9395
|
});
|
|
9382
9396
|
}
|
|
9383
9397
|
setProject(projectDir, providerId, account) {
|
|
9398
|
+
return this.setSettings(projectDir, providerId, { credential: account });
|
|
9399
|
+
}
|
|
9400
|
+
settings(projectDir) {
|
|
9401
|
+
return this.enqueue(async () => {
|
|
9402
|
+
const data = await this.read();
|
|
9403
|
+
return data.projects[normalizeProjectKey(projectDir)] ?? {};
|
|
9404
|
+
});
|
|
9405
|
+
}
|
|
9406
|
+
setSettings(projectDir, providerId, values) {
|
|
9384
9407
|
return this.enqueue(async () => {
|
|
9385
9408
|
const data = await this.read();
|
|
9386
9409
|
const key = normalizeProjectKey(projectDir);
|
|
9387
|
-
const
|
|
9388
|
-
const
|
|
9389
|
-
|
|
9390
|
-
|
|
9410
|
+
const book = data.projects[key] ?? {};
|
|
9411
|
+
const mine = { ...book[providerId] };
|
|
9412
|
+
for (const [k, v] of Object.entries(values)) {
|
|
9413
|
+
const text = (v ?? "").trim();
|
|
9414
|
+
if (text)
|
|
9415
|
+
mine[k] = text;
|
|
9416
|
+
else
|
|
9417
|
+
delete mine[k];
|
|
9418
|
+
}
|
|
9419
|
+
if (JSON.stringify(mine) === JSON.stringify(book[providerId] ?? {}))
|
|
9420
|
+
return;
|
|
9421
|
+
if (Object.keys(mine).length > 0)
|
|
9422
|
+
book[providerId] = mine;
|
|
9391
9423
|
else
|
|
9392
|
-
delete
|
|
9393
|
-
if (Object.keys(
|
|
9394
|
-
data.projects[key] =
|
|
9424
|
+
delete book[providerId];
|
|
9425
|
+
if (Object.keys(book).length > 0)
|
|
9426
|
+
data.projects[key] = book;
|
|
9395
9427
|
else
|
|
9396
9428
|
delete data.projects[key];
|
|
9397
9429
|
await this.write(data);
|