dev-cockpit 0.2.2 → 0.2.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.
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Resolve where the docker-compose overlay file should be written for a
3
+ * workspace.
4
+ *
5
+ * Default (no `mount.overlayPath` in cockpit.yaml):
6
+ * <stateDir>/dev-mount-overlay.yml
7
+ * — sibling to `mount.manifest.json`. Keeps the wrapper repo clean of
8
+ * per-developer state; aligns the overlay's lifecycle with the
9
+ * manifest's.
10
+ *
11
+ * Override (cockpit.yaml `mount.overlayPath` is set):
12
+ * - Workspace-relative paths resolve against `workspaceRoot`.
13
+ * - Absolute paths are honoured verbatim.
14
+ *
15
+ * Pure: no I/O. Tested in isolation.
16
+ */
17
+ export interface ResolveOverlayPathOptions {
18
+ /** Cockpit state dir for this workspace. */
19
+ stateDir: string;
20
+ /** Workspace root, used to resolve relative `configOverride`. */
21
+ workspaceRoot: string;
22
+ /** Optional `mount.overlayPath` value from cockpit.yaml. */
23
+ configOverride?: string | undefined;
24
+ }
25
+ export declare function resolveOverlayPath(opts: ResolveOverlayPathOptions): string;
26
+ //# sourceMappingURL=overlay-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overlay-path.d.ts","sourceRoot":"","sources":["../../src/mount/overlay-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,MAAM,WAAW,yBAAyB;IACxC,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,aAAa,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,yBAAyB,GAAG,MAAM,CAM1E"}
@@ -14,7 +14,7 @@ A `cockpit.yaml` lives at the root of your project. The cockpit reads it on star
14
14
  | `highlights` | array | no | Regex patterns applied to all output streams (process + docker). Each can carry an explicit `severity:` (else inferred). |
15
15
  | `health` | array | no | Health check declarations — see `health:` below. |
16
16
  | `actions` | array | no | Named, optionally key-bound shell commands surfaced via the `:` palette and the Targets pane. |
17
- | `mount` | object | no | `overlayPath`, `manifestFile` overrides. Defaults: `docker-compose.dev-cockpit.yml`, `mount.manifest.json`. |
17
+ | `mount` | object | no | `overlayPath`, `manifestFile` overrides. Defaults: `<stateDir>/dev-mount-overlay.yml` (sibling to the manifest, keeps the wrapper repo clean), `mount.manifest.json`. |
18
18
  | `mounts` | array | no | Explicit `{hostPath, containerPath, meta?}` entries for `dev-cockpit mount`. |
19
19
  | `help` | object | no | Extra `sources[]` + `defaultPage`. |
20
20
  | `notifications` | object | no | `enabled`, `onTransitionTo[]`, `exclude[]`. |
@@ -84,8 +84,9 @@ health:
84
84
  ## `mount:` + `mounts:`
85
85
 
86
86
  ```yaml
87
- mount: # path overrides
88
- overlayPath: docker-compose.dev-cockpit.yml # workspace-relative
87
+ mount: # path overrides — omit for defaults
88
+ # overlayPath: docker-compose.dev-cockpit.yml # default: <stateDir>/dev-mount-overlay.yml
89
+ # set to keep the overlay in-repo (workspace-relative or absolute)
89
90
  manifestFile: mount.manifest.json # basename within stateDir
90
91
 
91
92
  mounts: # explicit candidates
package/docs/mount.md CHANGED
@@ -26,22 +26,22 @@ dev-cockpit mount status # active mounts with branch / dirty / broken-sy
26
26
  dev-cockpit mount clear # remove overlay + manifest + symlinks
27
27
  ```
28
28
 
29
- Apply the generated overlay alongside your existing compose file:
29
+ Apply the generated overlay alongside your existing compose file (the path is printed by `dev-cockpit mount` — copy it from there):
30
30
 
31
31
  ```sh
32
- docker compose -f docker-compose.yml -f docker-compose.dev-cockpit.yml up -d
32
+ docker compose -f docker-compose.yml -f <stateDir>/dev-mount-overlay.yml up -d
33
33
  ```
34
34
 
35
35
  ## What gets written
36
36
 
37
37
  | File | Default path | Configurable via |
38
38
  |---|---|---|
39
- | Compose overlay | `<workspace>/docker-compose.dev-cockpit.yml` | `config.mount.overlayPath` |
39
+ | Compose overlay | `<stateDir>/dev-mount-overlay.yml` | `config.mount.overlayPath` |
40
40
  | Manifest | `<stateDir>/mount.manifest.json` | `config.mount.manifestFile` |
41
41
 
42
- `<stateDir>` lives under `$XDG_STATE_HOME/<appName>/<workspace-hash>/`. The manifest tracks what was applied and when, and is the source of truth for `status` and `clear`.
42
+ `<stateDir>` lives under `$XDG_STATE_HOME/<appName>/<workspace-hash>/`. Both files share that location, so anything cockpit knows about *this workspace's mounts* sits in one dir — clean wrapper repo, no per-developer artefacts to gitignore.
43
43
 
44
- Override the paths when the wrapper has its own conventions:
44
+ Override the overlay path when the wrapper has its own conventions (workspace-relative or absolute):
45
45
 
46
46
  ```yaml
47
47
  mount:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev-cockpit",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "A reusable, domain-neutral terminal UI dev cockpit — tabbed pane shell, watcher streaming, optional Docker log tail with highlights, health framework with one-keystroke remediations, transition-only OS notifications, live-markdown Help. Profiles extend it with project-specific commands, repos, and health checks.",
5
5
  "license": "MIT",
6
6
  "repository": {