gutterpress 0.11.6-alpha.3 → 0.11.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/dist/index.js CHANGED
@@ -7,7 +7,6 @@ import {
7
7
  BUILT_IN_STYLE_SET_IDS,
8
8
  BUILT_IN_TEMPLATE_IDS,
9
9
  BUNDLED_EXTENSIONS,
10
- DEFAULT_NPM_REGISTRY,
11
10
  EXTENSIONS_DIR,
12
11
  EXTENSION_KINDS,
13
12
  EXTENSION_MANIFEST_FILENAME,
@@ -19,7 +18,6 @@ import {
19
18
  GoogleAuthProvider,
20
19
  MANIFEST_FILENAMES,
21
20
  MAX_SEARCH_BYTES,
22
- PLUGINS_DIR,
23
21
  PRESETS,
24
22
  PRESET_IDS,
25
23
  PublishSelectionsStore,
@@ -47,6 +45,7 @@ import {
47
45
  describeExtension,
48
46
  diagnoseProjectRemote,
49
47
  disconnectPublishCredential,
48
+ ensureGitignoreHasDist,
50
49
  escapeYamlScalar,
51
50
  executeAndReport,
52
51
  executeValidation,
@@ -86,7 +85,6 @@ import {
86
85
  loadManifestWithPath,
87
86
  loadPluginsWithCss,
88
87
  log,
89
- npmRegistryUrl,
90
88
  openPath,
91
89
  parseExtensionSpecifier,
92
90
  parseRemoteOrigin,
@@ -143,7 +141,7 @@ import {
143
141
  syncProject,
144
142
  testRemoteAccess,
145
143
  validateProjectExtensions
146
- } from "./index-0h00ve4y.js";
144
+ } from "./index-yzcd0ezr.js";
147
145
  import {
148
146
  BUILD_DIAGNOSTIC_CODES
149
147
  } from "./index-yeej2vhs.js";
@@ -154,16 +152,20 @@ import {
154
152
  } from "./index-gf1shk3y.js";
155
153
  import {
156
154
  AUTO_SNAPSHOT_MESSAGE,
155
+ DEFAULT_NPM_REGISTRY,
157
156
  HISTORY_PAGE_LIMIT,
157
+ PLUGINS_DIR,
158
158
  RESTORE_BACKUP_MESSAGE,
159
159
  SWITCH_BRANCH_SNAPSHOT_MESSAGE,
160
+ countUnversionedChanges,
160
161
  isNoChangesError,
161
162
  listLocalBranches,
163
+ npmRegistryUrl,
162
164
  providerFor,
163
165
  resolveLogger,
164
166
  restoreVersionWithBackup,
165
167
  switchBranch
166
- } from "./index-8xkw284t.js";
168
+ } from "./index-7mqst9tg.js";
167
169
  import {
168
170
  capabilitiesFor,
169
171
  detectProjectSource,
@@ -354,12 +356,14 @@ export {
354
356
  executeValidation,
355
357
  executeAndReport,
356
358
  escapeYamlScalar,
359
+ ensureGitignoreHasDist,
357
360
  disconnectPublishCredential,
358
361
  diagnoseProjectRemote,
359
362
  detectProjectSource,
360
363
  describeExtension,
361
364
  deleteSnippet,
362
365
  defaultConfigDir,
366
+ countUnversionedChanges,
363
367
  connectPublishProvider,
364
368
  connectGoogleDrive,
365
369
  connectGenericHost,
@@ -151,3 +151,23 @@ export interface AdoptFolderOptions {
151
151
  * `styles/book.css`, `.gitignore`, or any markdown file.
152
152
  */
153
153
  export declare function adoptFolder(options: AdoptFolderOptions): Promise<CreateProjectResult>;
154
+ /**
155
+ * Ensure `<projectDir>/.gitignore` excludes the build output directory
156
+ * (`dist/` — lib/output-paths.ts's `DIST_DIRNAME`).
157
+ *
158
+ * Confirmed bug this closes: no scaffolded project ever got a `.gitignore`,
159
+ * and gutterpress's auto-snapshot feature is ON BY DEFAULT and auto-pushes.
160
+ * Every `gutterpress build` writes a fresh, incompressible PDF (plus any copied
161
+ * assets) into `dist/<title-slug>/`; without an ignore rule, the very next
162
+ * snapshot commits and pushes it. That grows `.git` by a full PDF on every
163
+ * build and, once a single artifact crosses GitHub's 100MB per-file limit,
164
+ * the push is rejected outright — for a non-technical author with no way to
165
+ * `git filter-repo` their way out.
166
+ *
167
+ * NEVER overwrites an existing `.gitignore` (global never-delete-user-data
168
+ * rule): if the file already excludes `dist/` in some common spelling
169
+ * (`dist`, `dist/`, `/dist/`, …) it is left untouched; otherwise the line is
170
+ * APPENDED, not prepended or reformatted, so any content the author already
171
+ * has stays exactly as they wrote it.
172
+ */
173
+ export declare function ensureGitignoreHasDist(projectDir: string): Promise<void>;
@@ -190,6 +190,30 @@ export declare function snapshotWorkingTreeUnlocked(options: SnapshotOptions): P
190
190
  * swallow the expected clean-tree rejection without string-matching itself.
191
191
  */
192
192
  export declare function isNoChangesError(e: unknown): boolean;
193
+ /** What "Save a version" would capture in the open book right now. */
194
+ export interface UnversionedChanges {
195
+ /**
196
+ * Files of THIS book (its folder inside the repo) that changed since the
197
+ * last version — writer work only: app-written files (the vendored plugin
198
+ * folder and its install receipt) are not counted.
199
+ */
200
+ changedFiles: number;
201
+ /**
202
+ * A previous version attempt died after staging (its crash marker is still
203
+ * present), so the index may hold work HEAD doesn't have even when the
204
+ * working tree looks clean. The count can't be trusted to be 0 then.
205
+ */
206
+ stale: boolean;
207
+ }
208
+ /**
209
+ * How many files of the open book changed since the last version (snapshot).
210
+ * `null` when the project has no version history (a plain folder). Uses the
211
+ * same workdir-vs-index walk a snapshot uses to decide "nothing new to save".
212
+ * A book inside a larger repo (`subPath`) is counted on its own folder only.
213
+ * Queued behind the repo lock so it never reads the index mid-snapshot;
214
+ * otherwise a lock-free walk that reads no history.
215
+ */
216
+ export declare function countUnversionedChanges(projectDir: string): Promise<UnversionedChanges | null>;
193
217
  /**
194
218
  * Select the {@link SourceProvider} implementation for a classified source.
195
219
  * `managed-github` (#15/#16) is not implemented yet — it throws if reached.
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  MANIFEST_FILENAMES,
3
3
  runLint
4
- } from "./cli-g6vshy3f.js";
4
+ } from "./cli-02sh3r8x.js";
5
5
  import {
6
6
  log
7
- } from "./cli-rra50cp6.js";
7
+ } from "./cli-emp8wz36.js";
8
8
  import {
9
9
  UsageError,
10
10
  rejectExtraPositionals,
11
11
  rejectUnknownFlags
12
- } from "./cli-5c2xfsmz.js";
12
+ } from "./cli-1bccnym3.js";
13
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-c5360prx.js";
18
+ import"./cli-4tx0szk7.js";
19
19
  import"./cli-v5mp7a6q.js";
20
20
  import"./cli-37x76zdn.js";
21
21
 
@@ -7,15 +7,15 @@ import {
7
7
  TARGET_IDS,
8
8
  scaffoldExtension,
9
9
  scaffoldProject
10
- } from "./cli-g6vshy3f.js";
10
+ } from "./cli-02sh3r8x.js";
11
11
  import {
12
12
  resolveGhostscript
13
- } from "./cli-rra50cp6.js";
13
+ } from "./cli-emp8wz36.js";
14
14
  import {
15
15
  UsageError,
16
16
  rejectExtraPositionals,
17
17
  rejectUnknownFlags
18
- } from "./cli-5c2xfsmz.js";
18
+ } from "./cli-1bccnym3.js";
19
19
  import"./cli-5vdgncmm.js";
20
20
  import {
21
21
  isToolAvailable
@@ -23,7 +23,7 @@ import {
23
23
  import {
24
24
  EXIT_CODES
25
25
  } from "./cli-46ycxe6r.js";
26
- import"./cli-c5360prx.js";
26
+ import"./cli-4tx0szk7.js";
27
27
  import"./cli-v5mp7a6q.js";
28
28
  import"./cli-37x76zdn.js";
29
29
 
@@ -2,21 +2,21 @@ import {
2
2
  executeValidation,
3
3
  publishTargetFor,
4
4
  reportMissingTools
5
- } from "./cli-g6vshy3f.js";
5
+ } from "./cli-02sh3r8x.js";
6
6
  import {
7
7
  log
8
- } from "./cli-rra50cp6.js";
8
+ } from "./cli-emp8wz36.js";
9
9
  import {
10
10
  UsageError,
11
11
  rejectExtraPositionals,
12
12
  rejectUnknownFlags
13
- } from "./cli-5c2xfsmz.js";
13
+ } from "./cli-1bccnym3.js";
14
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-c5360prx.js";
19
+ import"./cli-4tx0szk7.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-g6vshy3f.js";
9
+ } from "./cli-02sh3r8x.js";
10
10
  import {
11
11
  log
12
- } from "./cli-rra50cp6.js";
12
+ } from "./cli-emp8wz36.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-5c2xfsmz.js";
20
+ } from "./cli-1bccnym3.js";
21
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-c5360prx.js";
26
+ import"./cli-4tx0szk7.js";
27
27
  import"./cli-v5mp7a6q.js";
28
28
  import"./cli-37x76zdn.js";
29
29
 
@@ -11,22 +11,22 @@ import {
11
11
  publishProviderFor,
12
12
  resolvePublishFormat,
13
13
  runPublish
14
- } from "./cli-g6vshy3f.js";
14
+ } from "./cli-02sh3r8x.js";
15
15
  import {
16
16
  FileTokenStore,
17
17
  log
18
- } from "./cli-rra50cp6.js";
18
+ } from "./cli-emp8wz36.js";
19
19
  import {
20
20
  UsageError,
21
21
  rejectExtraPositionals,
22
22
  rejectUnknownFlags
23
- } from "./cli-5c2xfsmz.js";
23
+ } from "./cli-1bccnym3.js";
24
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-c5360prx.js";
29
+ import"./cli-4tx0szk7.js";
30
30
  import"./cli-v5mp7a6q.js";
31
31
  import"./cli-37x76zdn.js";
32
32
 
@@ -4,6 +4,7 @@ import {
4
4
  RESTORE_BACKUP_MESSAGE,
5
5
  SWITCH_BRANCH_SNAPSHOT_MESSAGE,
6
6
  __repoLockQueueSizeForTests,
7
+ countUnversionedChanges,
7
8
  gitDirFor,
8
9
  gitScopeFor,
9
10
  hasPendingChanges,
@@ -19,7 +20,7 @@ import {
19
20
  stageChanges,
20
21
  switchBranch,
21
22
  withRepoLock
22
- } from "./cli-c5360prx.js";
23
+ } from "./cli-4tx0szk7.js";
23
24
  import"./cli-v5mp7a6q.js";
24
25
  import"./cli-37x76zdn.js";
25
26
  export {
@@ -38,6 +39,7 @@ export {
38
39
  hasPendingChanges,
39
40
  gitScopeFor,
40
41
  gitDirFor,
42
+ countUnversionedChanges,
41
43
  __repoLockQueueSizeForTests,
42
44
  SWITCH_BRANCH_SNAPSHOT_MESSAGE,
43
45
  RESTORE_BACKUP_MESSAGE,
@@ -4,6 +4,7 @@ import {
4
4
  RESTORE_BACKUP_MESSAGE,
5
5
  SWITCH_BRANCH_SNAPSHOT_MESSAGE,
6
6
  __repoLockQueueSizeForTests,
7
+ countUnversionedChanges,
7
8
  gitDirFor,
8
9
  gitScopeFor,
9
10
  hasPendingChanges,
@@ -19,7 +20,7 @@ import {
19
20
  stageChanges,
20
21
  switchBranch,
21
22
  withRepoLock
22
- } from "./index-8xkw284t.js";
23
+ } from "./index-7mqst9tg.js";
23
24
  import"./index-v5mp7a6q.js";
24
25
  import"./index-37x76zdn.js";
25
26
  export {
@@ -38,6 +39,7 @@ export {
38
39
  hasPendingChanges,
39
40
  gitScopeFor,
40
41
  gitDirFor,
42
+ countUnversionedChanges,
41
43
  __repoLockQueueSizeForTests,
42
44
  SWITCH_BRANCH_SNAPSHOT_MESSAGE,
43
45
  RESTORE_BACKUP_MESSAGE,
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  executeAndReport
3
- } from "./cli-g6vshy3f.js";
3
+ } from "./cli-02sh3r8x.js";
4
4
  import {
5
5
  log
6
- } from "./cli-rra50cp6.js";
6
+ } from "./cli-emp8wz36.js";
7
7
  import {
8
8
  UsageError,
9
9
  rejectExtraPositionals,
10
10
  rejectUnknownFlags
11
- } from "./cli-5c2xfsmz.js";
11
+ } from "./cli-1bccnym3.js";
12
12
  import"./cli-5vdgncmm.js";
13
13
  import"./cli-c41yr7he.js";
14
14
  import {
15
15
  EXIT_CODES
16
16
  } from "./cli-46ycxe6r.js";
17
- import"./cli-c5360prx.js";
17
+ import"./cli-4tx0szk7.js";
18
18
  import"./cli-v5mp7a6q.js";
19
19
  import"./cli-37x76zdn.js";
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gutterpress",
3
- "version": "0.11.6-alpha.3",
3
+ "version": "0.11.6",
4
4
  "description": "Markdown-to-PDF converter for professional print layout using a native Chromium print engine and Ghostscript.",
5
5
  "author": "itlackey",
6
6
  "license": "MPL-2.0",