dev-cockpit 0.2.9 → 0.3.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.
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Reusable health check: detects IDE-facing dev-mount symlinks whose targets
3
+ * have gone missing (the host clone was moved/deleted, or `mount` wrote a
4
+ * symlink at the wrong place).
5
+ *
6
+ * Generic to the dev-cockpit mount subsystem — works for any profile that
7
+ * supplies a `mountSymlinks` strategy. The legacy awc-cockpit predicate
8
+ * (re-wiring the same primitives) is now a one-line registration that
9
+ * passes its strategy to this factory.
10
+ *
11
+ * The factory resolves the manifest path the same way `mountCommand` does:
12
+ * stateDir keyed on cockpit.yaml `appName`, filename from
13
+ * `config.mount.manifestFile`. Profiles that surface manifests at a
14
+ * different path can pre-load the manifest and call `detectBrokenSymlinks`
15
+ * directly instead.
16
+ *
17
+ * Severity semantics:
18
+ * - no cockpit.yaml found → ok ("no active mounts")
19
+ * - manifest unreadable → warn
20
+ * - no mounts active → ok
21
+ * - broken / not-applied → error, with names in the detail
22
+ */
23
+ import type { HealthCheck, Remediation, TriggerKind } from '../health/types.js';
24
+ import type { Severity } from '../core/types.js';
25
+ import type { MountSymlinkStrategy } from './types.js';
26
+ export interface CreateMountBrokenSymlinkCheckOptions {
27
+ /** Profile-supplied strategy that resolves where each mount's IDE symlink should live. */
28
+ symlinks: MountSymlinkStrategy;
29
+ /** Default `'mount-broken-symlink'`. */
30
+ id?: string;
31
+ /** Default `'Mount symlinks'`. */
32
+ label?: string;
33
+ /** Default `'error'`. */
34
+ severity?: Severity;
35
+ /** Default `['startup', 'fsevent']`. */
36
+ triggers?: TriggerKind[];
37
+ /** Default: `{ key: 'F', label: 'mount apply', command: 'dev-cockpit mount' }`. */
38
+ remediation?: Remediation;
39
+ }
40
+ export declare function createMountBrokenSymlinkCheck(opts: CreateMountBrokenSymlinkCheckOptions): HealthCheck;
41
+ //# sourceMappingURL=health-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-check.d.ts","sourceRoot":"","sources":["../../src/mount/health-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAQH,OAAO,KAAK,EAAE,WAAW,EAAiB,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC/F,OAAO,KAAK,EAAE,QAAQ,EAAgB,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,WAAW,oCAAoC;IACnD,0FAA0F;IAC1F,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,wCAAwC;IACxC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB,mFAAmF;IACnF,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAQD,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,oCAAoC,GACzC,WAAW,CA8Eb"}
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/mount/manifest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAI7C;AAED,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAU5E;AAED,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,GAAG,IAAI,CAGtF;AAED,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAIjE;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,OAAO,GACX,OAAO,CAAC,GAAG,IAAI,aAAa,CA4B9B"}
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/mount/manifest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAI7C;AAED,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAU5E;AAED,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,GAAG,IAAI,CAGtF;AAED,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAIjE;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,OAAO,GACX,OAAO,CAAC,GAAG,IAAI,aAAa,CAkC9B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev-cockpit",
3
- "version": "0.2.9",
3
+ "version": "0.3.1",
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": {