@paleo/workspace 0.11.0 → 0.11.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/dist/cli.js CHANGED
@@ -177,6 +177,7 @@ export function printWorkspaceHelp() {
177
177
  " Set up the local environment. With <branch>, create a sibling worktree for it",
178
178
  " (add -c to create the branch first). Without, set up the current worktree",
179
179
  " (idempotent; bootstrap and retry path).",
180
+ " Finalize runs in the background; add --wait to block until it reaches READY.",
180
181
  " remove [<branch>] [--no-remote-check]",
181
182
  " Remove a worktree by branch, or the current one when omitted.",
182
183
  " list",
package/dist/helpers.d.ts CHANGED
@@ -16,16 +16,16 @@ export interface CopyAndPatchCtx {
16
16
  log: (msg: string) => void;
17
17
  }
18
18
  export declare function copyAndPatchFile(ctx: CopyAndPatchCtx, relPath: string, patchFn: (content: string) => string, label: string, force: boolean, optional?: boolean): void;
19
- /**
20
- * Detects common fatal JS startup failures in a log buffer. Returns a short marker string
21
- * naming the matched pattern, or `false` when none match. Used as the default `detectError`
22
- * for spawn servers that don't supply one. A custom `detectError` can compose with this:
23
- * `detectError: (log) => myDetector(log) || helpers.detectCommonJsError(log)`.
24
- */
25
19
  /**
26
20
  * Formats a millisecond duration as the two largest units among `d`/`h`/`m`/`s`.
27
21
  * Drops the smaller unit when zero (`5d` instead of `5d 0h`). Sub-second values
28
22
  * round up to `1s` (zero stays `0s`). Negative input returns `0s`.
29
23
  */
30
24
  export declare function formatDuration(ms: number): string;
25
+ /**
26
+ * Detects common fatal JS startup failures in a log buffer. Returns a short marker string
27
+ * naming the matched pattern, or `false` when none match. Used as the default `detectError`
28
+ * for spawn servers that don't supply one. A custom `detectError` can compose with this:
29
+ * `detectError: (log) => myDetector(log) || helpers.detectCommonJsError(log)`.
30
+ */
31
31
  export declare function detectCommonJsError(log: string): string | false;
package/dist/helpers.js CHANGED
@@ -82,12 +82,6 @@ export function copyAndPatchFile(ctx, relPath, patchFn, label, force, optional =
82
82
  writeFileSync(targetPath, patched);
83
83
  ctx.log(`${alreadyExists ? "Overwritten" : "Created"} ${label}.`);
84
84
  }
85
- /**
86
- * Detects common fatal JS startup failures in a log buffer. Returns a short marker string
87
- * naming the matched pattern, or `false` when none match. Used as the default `detectError`
88
- * for spawn servers that don't supply one. A custom `detectError` can compose with this:
89
- * `detectError: (log) => myDetector(log) || helpers.detectCommonJsError(log)`.
90
- */
91
85
  /**
92
86
  * Formats a millisecond duration as the two largest units among `d`/`h`/`m`/`s`.
93
87
  * Drops the smaller unit when zero (`5d` instead of `5d 0h`). Sub-second values
@@ -118,6 +112,12 @@ export function formatDuration(ms) {
118
112
  return `${topVal}${topLabel}`;
119
113
  return `${topVal}${topLabel} ${next[1]}${next[0]}`;
120
114
  }
115
+ /**
116
+ * Detects common fatal JS startup failures in a log buffer. Returns a short marker string
117
+ * naming the matched pattern, or `false` when none match. Used as the default `detectError`
118
+ * for spawn servers that don't supply one. A custom `detectError` can compose with this:
119
+ * `detectError: (log) => myDetector(log) || helpers.detectCommonJsError(log)`.
120
+ */
121
121
  export function detectCommonJsError(log) {
122
122
  if (log.includes("[nodemon] app crashed"))
123
123
  return "[nodemon] app crashed";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paleo/workspace",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Run multiple git-worktree dev environments side by side.",
5
5
  "keywords": [
6
6
  "workspace",