dev-cockpit 0.2.3 → 0.2.5
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/{chunk-C4GFJDMG.js → chunk-A446TCT5.js} +2 -1
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/core/config.d.ts +16 -2
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/subprocess.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +146 -83
- package/dist/index.js.map +4 -4
- package/dist/{link-HXNII7EU.js → link-VWT2VQH6.js} +2 -2
- package/examples/cockpit.schema.json +289 -0
- package/examples/cockpit.yaml +36 -10
- package/package.json +1 -1
- /package/dist/{chunk-C4GFJDMG.js.map → chunk-A446TCT5.js.map} +0 -0
- /package/dist/{link-HXNII7EU.js.map → link-VWT2VQH6.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EACX,OAAO,EAGP,MAAM,kBAAkB,CAAC;AAoB1B,MAAM,WAAW,iBAAiB;IACjC,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAsB,UAAU,CAAC,IAAI,GAAE,iBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EACX,OAAO,EAGP,MAAM,kBAAkB,CAAC;AAoB1B,MAAM,WAAW,iBAAiB;IACjC,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAsB,UAAU,CAAC,IAAI,GAAE,iBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuU5E"}
|
package/dist/core/config.d.ts
CHANGED
|
@@ -234,7 +234,7 @@ export declare const BaseCockpitConfigSchema: z.ZodObject<{
|
|
|
234
234
|
/** Which pane the cockpit lands on when it boots. Profile may override. */
|
|
235
235
|
defaultPane: z.ZodDefault<z.ZodOptional<z.ZodEnum<["repos", "output", "health", "help"]>>>;
|
|
236
236
|
/** Named keystroke-bound shell commands surfaced via the `:` palette. */
|
|
237
|
-
actions: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
237
|
+
actions: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
238
238
|
id: z.ZodString;
|
|
239
239
|
label: z.ZodString;
|
|
240
240
|
command: z.ZodString;
|
|
@@ -255,6 +255,20 @@ export declare const BaseCockpitConfigSchema: z.ZodObject<{
|
|
|
255
255
|
cwd?: string | undefined;
|
|
256
256
|
key?: string | undefined;
|
|
257
257
|
scope?: string | undefined;
|
|
258
|
+
}>, {
|
|
259
|
+
id: string;
|
|
260
|
+
label: string;
|
|
261
|
+
command: string;
|
|
262
|
+
cwd?: string | undefined;
|
|
263
|
+
key?: string | undefined;
|
|
264
|
+
scope?: string | undefined;
|
|
265
|
+
}, {
|
|
266
|
+
id: string;
|
|
267
|
+
label: string;
|
|
268
|
+
command: string;
|
|
269
|
+
cwd?: string | undefined;
|
|
270
|
+
key?: string | undefined;
|
|
271
|
+
scope?: string | undefined;
|
|
258
272
|
}>, "many">>>;
|
|
259
273
|
/**
|
|
260
274
|
* Profile-specific config namespace. Each profile owns one key under here
|
|
@@ -276,12 +290,12 @@ export declare const BaseCockpitConfigSchema: z.ZodObject<{
|
|
|
276
290
|
onTransitionTo?: string[] | undefined;
|
|
277
291
|
} | undefined;
|
|
278
292
|
}[];
|
|
279
|
-
appName: string;
|
|
280
293
|
repos: {
|
|
281
294
|
path: string;
|
|
282
295
|
id: string;
|
|
283
296
|
label?: string | undefined;
|
|
284
297
|
}[];
|
|
298
|
+
appName: string;
|
|
285
299
|
highlights: {
|
|
286
300
|
pattern: string;
|
|
287
301
|
severity: "info" | "warn" | "error";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,mFAAmF;AACnF,eAAO,MAAM,cAAc,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/core/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,mFAAmF;AACnF,eAAO,MAAM,cAAc,IAAI,CAAC;AA+HhC,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAdlC;;;;;;WAMG;;QAEH,iDAAiD;;;;;;;;;IAwBjD,2EAA2E;;IAE3E,yEAAyE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEzE;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAIxE,qBAAa,kBAAmB,SAAQ,KAAK;aAEzB,QAAQ,EAAE,MAAM;aAChB,KAAK,EAAE,OAAO;aACd,SAAS,EAAE,MAAM;gBAFjB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,MAAM;CAOpC;AAED,qBAAa,qBAAsB,SAAQ,KAAK;aAE5B,QAAQ,EAAE,MAAM;aAChB,KAAK,EAAE,OAAO;gBADd,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,OAAO;CAKjC;AAID,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,eAAe,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IAC7C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,iBAAsB,GAC3B,iBAAiB,CA0CnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subprocess.d.ts","sourceRoot":"","sources":["../../src/core/subprocess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"subprocess.d.ts","sourceRoot":"","sources":["../../src/core/subprocess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AA6B/C,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;CACvC;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1B,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,OAAO,KAAK,IAAI,CAAC;IACxC,KAAK,EAAE,UAAU,CAAC;CACnB;AAaD,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,EACd,IAAI,GAAE,YAAiB,GACtB,aAAa,CAyDf;AAED,wDAAwD;AACxD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAEvE;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,cAAc,SAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAkB3F;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,cAAc,SAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBzE"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export { createLogger, initLogger, getLogger, type Logger } from './core/logger.
|
|
|
5
5
|
export { spawnStream, killAllSpawned, findSpawnedByTag, killSpawnedByTag, type ProcessHandle, type SpawnOptions, } from './core/subprocess.js';
|
|
6
6
|
export { detectTransitions, notify, notifyTransitions, emitEvent, type NotificationsConfig, type NotifyOptions, } from './core/notifier.js';
|
|
7
7
|
export { CONFIG_VERSION, loadConfig, BaseCockpitConfigSchema, ConfigValidationError, ConfigVersionError, type BaseCockpitConfig, type LoadConfigOptions, } from './core/config.js';
|
|
8
|
+
export { discoverConfig, DiscoveryError, type DiscoveryResult, type DiscoverySource, type DiscoverConfigOptions, } from './core/config-discovery.js';
|
|
9
|
+
export { canonical, listMappings, lookupConfig, manifestPath, readManifest, removeMapping, setMapping, type Manifest, } from './core/manifest.js';
|
|
8
10
|
export { Command } from 'commander';
|
|
9
11
|
export type { Command as CommanderCommand } from 'commander';
|
|
10
12
|
export { z } from 'zod';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,eAAe,EACf,sBAAsB,EACtB,OAAO,EACP,OAAO,EACP,IAAI,EACJ,KAAK,EACL,UAAU,EACV,SAAS,EACT,OAAO,EACP,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,SAAS,EACT,UAAU,EACV,QAAQ,EACR,UAAU,GACX,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EACV,WAAW,EACX,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,KAAK,UAAU,EACf,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEpF,OAAO,EACL,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,iBAAiB,EACjB,MAAM,EACN,iBAAiB,EACjB,SAAS,EACT,KAAK,mBAAmB,EACxB,KAAK,aAAa,GACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,cAAc,EACd,UAAU,EACV,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,eAAe,EACf,sBAAsB,EACtB,OAAO,EACP,OAAO,EACP,IAAI,EACJ,KAAK,EACL,UAAU,EACV,SAAS,EACT,OAAO,EACP,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,SAAS,EACT,UAAU,EACV,QAAQ,EACR,UAAU,GACX,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EACV,WAAW,EACX,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,KAAK,UAAU,EACf,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEpF,OAAO,EACL,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,iBAAiB,EACjB,MAAM,EACN,iBAAiB,EACjB,SAAS,EACT,KAAK,mBAAmB,EACxB,KAAK,aAAa,GACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,cAAc,EACd,UAAU,EACV,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,cAAc,EACd,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KA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;AAC1B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,mBAAmB,EACnB,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,GAC/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,qBAAqB,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,UAAU,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,WAAW,EACX,KAAK,OAAO,GACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,aAAa,EACb,SAAS,EACT,cAAc,EACd,KAAK,cAAc,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,oBAAoB,EACpB,KAAK,oBAAoB,GAC1B,MAAM,8BAA8B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -17,9 +17,13 @@ import {
|
|
|
17
17
|
} from "./chunk-VN6UILQW.js";
|
|
18
18
|
import {
|
|
19
19
|
canonical,
|
|
20
|
+
listMappings,
|
|
20
21
|
lookupConfig,
|
|
21
|
-
manifestPath
|
|
22
|
-
|
|
22
|
+
manifestPath,
|
|
23
|
+
readManifest,
|
|
24
|
+
removeMapping,
|
|
25
|
+
setMapping
|
|
26
|
+
} from "./chunk-A446TCT5.js";
|
|
23
27
|
import {
|
|
24
28
|
__commonJS,
|
|
25
29
|
__export,
|
|
@@ -79612,6 +79616,17 @@ var {
|
|
|
79612
79616
|
} = getIpcExport();
|
|
79613
79617
|
|
|
79614
79618
|
// src/core/subprocess.ts
|
|
79619
|
+
function killGroup(pid, signal) {
|
|
79620
|
+
if (pid === void 0) return;
|
|
79621
|
+
try {
|
|
79622
|
+
process.kill(-pid, signal);
|
|
79623
|
+
} catch {
|
|
79624
|
+
try {
|
|
79625
|
+
process.kill(pid, signal);
|
|
79626
|
+
} catch {
|
|
79627
|
+
}
|
|
79628
|
+
}
|
|
79629
|
+
}
|
|
79615
79630
|
var ACTIVE = /* @__PURE__ */ new Set();
|
|
79616
79631
|
var BY_TAG = /* @__PURE__ */ new Map();
|
|
79617
79632
|
function spawnStream(cmd, args, opts = {}) {
|
|
@@ -79623,7 +79638,12 @@ function spawnStream(cmd, args, opts = {}) {
|
|
|
79623
79638
|
reject: false,
|
|
79624
79639
|
stdout: "pipe",
|
|
79625
79640
|
stderr: "pipe",
|
|
79626
|
-
...opts.stdin ? { stdin: opts.stdin } : {}
|
|
79641
|
+
...opts.stdin ? { stdin: opts.stdin } : {},
|
|
79642
|
+
// Detached → child gets its own process group (pgid === pid). Lets
|
|
79643
|
+
// killGroup() reap the whole subtree, including grandchildren a shell
|
|
79644
|
+
// wrapper forked. We still keep stdio piped above, so the child can't
|
|
79645
|
+
// outlive its streams when the parent exits cleanly via killAllSpawned().
|
|
79646
|
+
detached: true
|
|
79627
79647
|
});
|
|
79628
79648
|
if (opts.onStdout && child.stdout) {
|
|
79629
79649
|
child.stdout.on("data", (chunk) => {
|
|
@@ -79645,7 +79665,7 @@ function spawnStream(cmd, args, opts = {}) {
|
|
|
79645
79665
|
const handle = {
|
|
79646
79666
|
exitCode,
|
|
79647
79667
|
kill: (signal = "SIGTERM") => {
|
|
79648
|
-
child.
|
|
79668
|
+
killGroup(child.pid, signal);
|
|
79649
79669
|
},
|
|
79650
79670
|
child
|
|
79651
79671
|
};
|
|
@@ -79700,6 +79720,17 @@ async function killAllSpawned(sigkillAfterMs = 1500) {
|
|
|
79700
79720
|
if (timer) clearTimeout(timer);
|
|
79701
79721
|
await Promise.all(reaps);
|
|
79702
79722
|
}
|
|
79723
|
+
var exitHookInstalled = false;
|
|
79724
|
+
function installExitHook() {
|
|
79725
|
+
if (exitHookInstalled) return;
|
|
79726
|
+
exitHookInstalled = true;
|
|
79727
|
+
process.once("exit", () => {
|
|
79728
|
+
for (const h2 of ACTIVE) {
|
|
79729
|
+
killGroup(h2.child.pid, "SIGKILL");
|
|
79730
|
+
}
|
|
79731
|
+
});
|
|
79732
|
+
}
|
|
79733
|
+
installExitHook();
|
|
79703
79734
|
|
|
79704
79735
|
// src/core/notifier.ts
|
|
79705
79736
|
function detectTransitions(prev, next) {
|
|
@@ -83949,6 +83980,9 @@ var ActionSchema = external_exports.object({
|
|
|
83949
83980
|
cwd: external_exports.string().optional(),
|
|
83950
83981
|
scope: external_exports.string().regex(/^(global|repos(:[\w-]+)?)$/, 'scope must be "global", "repos", or "repos:<id>"').optional(),
|
|
83951
83982
|
key: external_exports.string().min(1).max(1).optional()
|
|
83983
|
+
}).refine((a2) => !(a2.scope?.startsWith("repos") && !a2.key), {
|
|
83984
|
+
message: "actions with scope 'repos' or 'repos:<id>' require a single-character `key` (the action panel can't surface them without one)",
|
|
83985
|
+
path: ["key"]
|
|
83952
83986
|
});
|
|
83953
83987
|
var MountSettingsSchema = external_exports.object({
|
|
83954
83988
|
/**
|
|
@@ -84046,6 +84080,48 @@ function loadConfig(filePath, opts = {}) {
|
|
|
84046
84080
|
return config;
|
|
84047
84081
|
}
|
|
84048
84082
|
|
|
84083
|
+
// src/core/config-discovery.ts
|
|
84084
|
+
import fs4 from "node:fs";
|
|
84085
|
+
import path7 from "node:path";
|
|
84086
|
+
var DiscoveryError = class extends Error {
|
|
84087
|
+
constructor(workspaceRoot) {
|
|
84088
|
+
super(
|
|
84089
|
+
`dev-cockpit: no cockpit.yaml found at ${workspaceRoot}/cockpit.yaml and no entry in ${manifestPath()}. Run \`dev-cockpit link <config-path>\` from this directory to register one, or pass --config <path>.`
|
|
84090
|
+
);
|
|
84091
|
+
this.workspaceRoot = workspaceRoot;
|
|
84092
|
+
this.name = "DiscoveryError";
|
|
84093
|
+
}
|
|
84094
|
+
};
|
|
84095
|
+
function discoverConfig(opts = {}) {
|
|
84096
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
84097
|
+
const envConfig = opts.envConfig ?? process.env["DEV_COCKPIT_CONFIG"];
|
|
84098
|
+
const profileRoot = opts.workspaceDiscoverer?.()?.root;
|
|
84099
|
+
const workspaceRoot = profileRoot ? canonical(profileRoot) : canonical(cwd);
|
|
84100
|
+
if (opts.cliConfig) {
|
|
84101
|
+
return {
|
|
84102
|
+
configPath: path7.resolve(cwd, opts.cliConfig),
|
|
84103
|
+
workspaceRoot,
|
|
84104
|
+
source: "cli"
|
|
84105
|
+
};
|
|
84106
|
+
}
|
|
84107
|
+
if (envConfig) {
|
|
84108
|
+
return {
|
|
84109
|
+
configPath: path7.resolve(cwd, envConfig),
|
|
84110
|
+
workspaceRoot,
|
|
84111
|
+
source: "env"
|
|
84112
|
+
};
|
|
84113
|
+
}
|
|
84114
|
+
const localConfig = path7.join(workspaceRoot, "cockpit.yaml");
|
|
84115
|
+
if (fs4.existsSync(localConfig)) {
|
|
84116
|
+
return { configPath: localConfig, workspaceRoot, source: "workspace" };
|
|
84117
|
+
}
|
|
84118
|
+
const mapped = lookupConfig(workspaceRoot);
|
|
84119
|
+
if (mapped) {
|
|
84120
|
+
return { configPath: mapped, workspaceRoot, source: "manifest" };
|
|
84121
|
+
}
|
|
84122
|
+
throw new DiscoveryError(workspaceRoot);
|
|
84123
|
+
}
|
|
84124
|
+
|
|
84049
84125
|
// node_modules/commander/esm.mjs
|
|
84050
84126
|
var import_index = __toESM(require_commander(), 1);
|
|
84051
84127
|
var {
|
|
@@ -84634,18 +84710,18 @@ function Health() {
|
|
|
84634
84710
|
var import_react4 = __toESM(require_react(), 1);
|
|
84635
84711
|
|
|
84636
84712
|
// src/cockpit/help/loader.ts
|
|
84637
|
-
import
|
|
84638
|
-
import
|
|
84713
|
+
import fs5 from "node:fs";
|
|
84714
|
+
import path8 from "node:path";
|
|
84639
84715
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
84640
84716
|
function resolveDocsRoot(startUrl = import.meta.url) {
|
|
84641
|
-
let dir =
|
|
84642
|
-
while (dir !==
|
|
84643
|
-
const pkgJson =
|
|
84644
|
-
const docsIndex =
|
|
84645
|
-
if (
|
|
84646
|
-
return
|
|
84717
|
+
let dir = path8.dirname(fileURLToPath3(startUrl));
|
|
84718
|
+
while (dir !== path8.dirname(dir)) {
|
|
84719
|
+
const pkgJson = path8.join(dir, "package.json");
|
|
84720
|
+
const docsIndex = path8.join(dir, "docs", "index.md");
|
|
84721
|
+
if (fs5.existsSync(pkgJson) && fs5.existsSync(docsIndex)) {
|
|
84722
|
+
return path8.join(dir, "docs");
|
|
84647
84723
|
}
|
|
84648
|
-
dir =
|
|
84724
|
+
dir = path8.dirname(dir);
|
|
84649
84725
|
}
|
|
84650
84726
|
return null;
|
|
84651
84727
|
}
|
|
@@ -84661,18 +84737,18 @@ function parseIndex(indexBody) {
|
|
|
84661
84737
|
return out;
|
|
84662
84738
|
}
|
|
84663
84739
|
function loadPagesFromDir(docsRoot) {
|
|
84664
|
-
const indexPath =
|
|
84740
|
+
const indexPath = path8.join(docsRoot, "index.md");
|
|
84665
84741
|
let indexBody;
|
|
84666
84742
|
try {
|
|
84667
|
-
indexBody =
|
|
84743
|
+
indexBody = fs5.readFileSync(indexPath, "utf8");
|
|
84668
84744
|
} catch {
|
|
84669
84745
|
return [];
|
|
84670
84746
|
}
|
|
84671
84747
|
const pages = [{ slug: "index", title: "Index", path: indexPath, body: indexBody }];
|
|
84672
84748
|
for (const entry of parseIndex(indexBody)) {
|
|
84673
|
-
const pagePath =
|
|
84749
|
+
const pagePath = path8.join(docsRoot, `${entry.slug}.md`);
|
|
84674
84750
|
try {
|
|
84675
|
-
const body =
|
|
84751
|
+
const body = fs5.readFileSync(pagePath, "utf8");
|
|
84676
84752
|
pages.push({ slug: entry.slug, title: entry.title, path: pagePath, body });
|
|
84677
84753
|
} catch {
|
|
84678
84754
|
}
|
|
@@ -87884,7 +87960,7 @@ function useGlobalKeys(opts) {
|
|
|
87884
87960
|
var import_react7 = __toESM(require_react(), 1);
|
|
87885
87961
|
|
|
87886
87962
|
// src/health/scheduler.ts
|
|
87887
|
-
import
|
|
87963
|
+
import path9 from "node:path";
|
|
87888
87964
|
|
|
87889
87965
|
// src/health/runner.ts
|
|
87890
87966
|
async function runChecks(checks, triggerSet, ctx) {
|
|
@@ -87945,7 +88021,7 @@ var HealthScheduler = class {
|
|
|
87945
88021
|
}
|
|
87946
88022
|
onFsEvent(filePath) {
|
|
87947
88023
|
if (!this.running) return;
|
|
87948
|
-
const fileName =
|
|
88024
|
+
const fileName = path9.basename(filePath);
|
|
87949
88025
|
const isLockfile = this.lockfileNames.has(fileName);
|
|
87950
88026
|
const triggers = ["fsevent"];
|
|
87951
88027
|
if (isLockfile) {
|
|
@@ -88068,7 +88144,7 @@ function resolveNotify(transition, globalConfig, perItem) {
|
|
|
88068
88144
|
|
|
88069
88145
|
// src/health/builtin.ts
|
|
88070
88146
|
import net from "node:net";
|
|
88071
|
-
import
|
|
88147
|
+
import path10 from "node:path";
|
|
88072
88148
|
var containerRunning = (entry) => {
|
|
88073
88149
|
const container = entry.container;
|
|
88074
88150
|
if (!container) {
|
|
@@ -88155,7 +88231,7 @@ var fileExists = (entry) => {
|
|
|
88155
88231
|
throw new Error(`health[${entry.id}]: type 'file-exists' requires 'path'`);
|
|
88156
88232
|
}
|
|
88157
88233
|
return async (ctx) => {
|
|
88158
|
-
const resolved =
|
|
88234
|
+
const resolved = path10.isAbsolute(target) ? target : path10.join(ctx.workspaceRoot, target);
|
|
88159
88235
|
const exists = ctx.fs.existsSync(resolved);
|
|
88160
88236
|
return {
|
|
88161
88237
|
id: entry.id,
|
|
@@ -88266,7 +88342,7 @@ function safeLogger() {
|
|
|
88266
88342
|
}
|
|
88267
88343
|
|
|
88268
88344
|
// src/health/context.ts
|
|
88269
|
-
import
|
|
88345
|
+
import fs6 from "node:fs";
|
|
88270
88346
|
var defaultExec = async (cmd, args, cwd) => {
|
|
88271
88347
|
let stdout = "";
|
|
88272
88348
|
const handle = spawnStream(cmd, args, {
|
|
@@ -88279,13 +88355,13 @@ var defaultExec = async (cmd, args, cwd) => {
|
|
|
88279
88355
|
return { stdout, exitCode };
|
|
88280
88356
|
};
|
|
88281
88357
|
var defaultFs = {
|
|
88282
|
-
existsSync: (p) =>
|
|
88283
|
-
statSync: (p) =>
|
|
88358
|
+
existsSync: (p) => fs6.existsSync(p),
|
|
88359
|
+
statSync: (p) => fs6.statSync(p),
|
|
88284
88360
|
readdirSync: (p, opts) => {
|
|
88285
88361
|
if (opts?.withFileTypes) {
|
|
88286
|
-
return
|
|
88362
|
+
return fs6.readdirSync(p, { withFileTypes: true });
|
|
88287
88363
|
}
|
|
88288
|
-
return
|
|
88364
|
+
return fs6.readdirSync(p);
|
|
88289
88365
|
}
|
|
88290
88366
|
};
|
|
88291
88367
|
function buildHealthContext(workspaceRoot, appendOutput) {
|
|
@@ -88544,8 +88620,8 @@ async function restartDockerService(deps) {
|
|
|
88544
88620
|
}
|
|
88545
88621
|
|
|
88546
88622
|
// src/docker/logs.ts
|
|
88547
|
-
import
|
|
88548
|
-
import
|
|
88623
|
+
import path11 from "node:path";
|
|
88624
|
+
import fs7 from "node:fs";
|
|
88549
88625
|
var DEBOUNCE_MS = 3e4;
|
|
88550
88626
|
var SILENT_THRESHOLD_MS = 9e4;
|
|
88551
88627
|
var DockerLogTailer = class {
|
|
@@ -88572,8 +88648,8 @@ var DockerLogTailer = class {
|
|
|
88572
88648
|
*/
|
|
88573
88649
|
resolveComposeFile() {
|
|
88574
88650
|
if (this.opts.composeFile) {
|
|
88575
|
-
const abs =
|
|
88576
|
-
return
|
|
88651
|
+
const abs = path11.isAbsolute(this.opts.composeFile) ? this.opts.composeFile : path11.join(this.opts.workspaceRoot, this.opts.composeFile);
|
|
88652
|
+
return fs7.existsSync(abs) ? abs : null;
|
|
88577
88653
|
}
|
|
88578
88654
|
return null;
|
|
88579
88655
|
}
|
|
@@ -88686,8 +88762,8 @@ var DockerLogTailer = class {
|
|
|
88686
88762
|
};
|
|
88687
88763
|
|
|
88688
88764
|
// src/watchers/manager.ts
|
|
88689
|
-
import
|
|
88690
|
-
import
|
|
88765
|
+
import fs8 from "node:fs";
|
|
88766
|
+
import path13 from "node:path";
|
|
88691
88767
|
|
|
88692
88768
|
// node_modules/chokidar/index.js
|
|
88693
88769
|
import { EventEmitter as EventEmitter2 } from "node:events";
|
|
@@ -90437,7 +90513,7 @@ function mapPathToRepo(filePath, repos) {
|
|
|
90437
90513
|
}
|
|
90438
90514
|
|
|
90439
90515
|
// src/lint/reactive.ts
|
|
90440
|
-
import
|
|
90516
|
+
import path12 from "node:path";
|
|
90441
90517
|
var EXT_TO_LINT_KEY = {
|
|
90442
90518
|
".js": "js",
|
|
90443
90519
|
".jsx": "js",
|
|
@@ -90452,7 +90528,7 @@ var EXT_TO_LINT_KEY = {
|
|
|
90452
90528
|
".php": "php"
|
|
90453
90529
|
};
|
|
90454
90530
|
function selectLintCommand(filePath, lintConfig) {
|
|
90455
|
-
const ext =
|
|
90531
|
+
const ext = path12.extname(filePath).toLowerCase();
|
|
90456
90532
|
const key = EXT_TO_LINT_KEY[ext];
|
|
90457
90533
|
if (!key) return void 0;
|
|
90458
90534
|
return lintConfig[key];
|
|
@@ -90527,7 +90603,7 @@ async function runLintCmd(filePath, cmd, opts) {
|
|
|
90527
90603
|
ts: Date.now(),
|
|
90528
90604
|
source: repoName,
|
|
90529
90605
|
severity: "info",
|
|
90530
|
-
text: `lint passed for ${
|
|
90606
|
+
text: `lint passed for ${path12.basename(filePath)}`
|
|
90531
90607
|
});
|
|
90532
90608
|
onLintResult("pass");
|
|
90533
90609
|
} else {
|
|
@@ -90535,7 +90611,7 @@ async function runLintCmd(filePath, cmd, opts) {
|
|
|
90535
90611
|
ts: Date.now(),
|
|
90536
90612
|
source: repoName,
|
|
90537
90613
|
severity: "error",
|
|
90538
|
-
text: `lint FAILED for ${
|
|
90614
|
+
text: `lint FAILED for ${path12.basename(filePath)} (exit ${code})`
|
|
90539
90615
|
});
|
|
90540
90616
|
onLintResult("fail");
|
|
90541
90617
|
}
|
|
@@ -90545,7 +90621,7 @@ async function runLintCmd(filePath, cmd, opts) {
|
|
|
90545
90621
|
function detectUsePolling() {
|
|
90546
90622
|
if (process.env["DEV_COCKPIT_CHOKIDAR_POLLING"] === "1") return true;
|
|
90547
90623
|
try {
|
|
90548
|
-
const version =
|
|
90624
|
+
const version = fs8.readFileSync("/proc/version", "utf8");
|
|
90549
90625
|
return /microsoft|wsl/i.test(version);
|
|
90550
90626
|
} catch {
|
|
90551
90627
|
return false;
|
|
@@ -90577,7 +90653,7 @@ var WatcherManager = class {
|
|
|
90577
90653
|
const globs = [];
|
|
90578
90654
|
for (const [, managed] of this.repos) {
|
|
90579
90655
|
for (const pattern of managed.config.discover) {
|
|
90580
|
-
globs.push(
|
|
90656
|
+
globs.push(path13.join(managed.rootDir, pattern));
|
|
90581
90657
|
}
|
|
90582
90658
|
}
|
|
90583
90659
|
if (globs.length === 0) return;
|
|
@@ -90808,48 +90884,6 @@ function buildActionRegistry(configActions, profileActions = []) {
|
|
|
90808
90884
|
return Array.from(byId.values());
|
|
90809
90885
|
}
|
|
90810
90886
|
|
|
90811
|
-
// src/core/config-discovery.ts
|
|
90812
|
-
import fs8 from "node:fs";
|
|
90813
|
-
import path13 from "node:path";
|
|
90814
|
-
var DiscoveryError = class extends Error {
|
|
90815
|
-
constructor(workspaceRoot) {
|
|
90816
|
-
super(
|
|
90817
|
-
`dev-cockpit: no cockpit.yaml found at ${workspaceRoot}/cockpit.yaml and no entry in ${manifestPath()}. Run \`dev-cockpit link <config-path>\` from this directory to register one, or pass --config <path>.`
|
|
90818
|
-
);
|
|
90819
|
-
this.workspaceRoot = workspaceRoot;
|
|
90820
|
-
this.name = "DiscoveryError";
|
|
90821
|
-
}
|
|
90822
|
-
};
|
|
90823
|
-
function discoverConfig(opts = {}) {
|
|
90824
|
-
const cwd = opts.cwd ?? process.cwd();
|
|
90825
|
-
const envConfig = opts.envConfig ?? process.env["DEV_COCKPIT_CONFIG"];
|
|
90826
|
-
const profileRoot = opts.workspaceDiscoverer?.()?.root;
|
|
90827
|
-
const workspaceRoot = profileRoot ? canonical(profileRoot) : canonical(cwd);
|
|
90828
|
-
if (opts.cliConfig) {
|
|
90829
|
-
return {
|
|
90830
|
-
configPath: path13.resolve(cwd, opts.cliConfig),
|
|
90831
|
-
workspaceRoot,
|
|
90832
|
-
source: "cli"
|
|
90833
|
-
};
|
|
90834
|
-
}
|
|
90835
|
-
if (envConfig) {
|
|
90836
|
-
return {
|
|
90837
|
-
configPath: path13.resolve(cwd, envConfig),
|
|
90838
|
-
workspaceRoot,
|
|
90839
|
-
source: "env"
|
|
90840
|
-
};
|
|
90841
|
-
}
|
|
90842
|
-
const localConfig = path13.join(workspaceRoot, "cockpit.yaml");
|
|
90843
|
-
if (fs8.existsSync(localConfig)) {
|
|
90844
|
-
return { configPath: localConfig, workspaceRoot, source: "workspace" };
|
|
90845
|
-
}
|
|
90846
|
-
const mapped = lookupConfig(workspaceRoot);
|
|
90847
|
-
if (mapped) {
|
|
90848
|
-
return { configPath: mapped, workspaceRoot, source: "manifest" };
|
|
90849
|
-
}
|
|
90850
|
-
throw new DiscoveryError(workspaceRoot);
|
|
90851
|
-
}
|
|
90852
|
-
|
|
90853
90887
|
// src/commands/dev.ts
|
|
90854
90888
|
async function devCommand(opts = {}) {
|
|
90855
90889
|
const profile = opts.profile;
|
|
@@ -91062,6 +91096,26 @@ async function devCommand(opts = {}) {
|
|
|
91062
91096
|
for (const proc of config.processes) {
|
|
91063
91097
|
spawnProcessById(proc.id);
|
|
91064
91098
|
}
|
|
91099
|
+
let teardownStarted = false;
|
|
91100
|
+
const teardown = async (sig) => {
|
|
91101
|
+
if (teardownStarted) return;
|
|
91102
|
+
teardownStarted = true;
|
|
91103
|
+
try {
|
|
91104
|
+
if (dockerTailer) await dockerTailer.stop();
|
|
91105
|
+
if (bootResult.cleanup) await bootResult.cleanup();
|
|
91106
|
+
await killAllSpawned();
|
|
91107
|
+
} catch (err) {
|
|
91108
|
+
process.stderr.write(`dev-cockpit: cleanup error on ${sig}: ${String(err)}
|
|
91109
|
+
`);
|
|
91110
|
+
}
|
|
91111
|
+
process.exit(sig === "SIGTERM" ? 143 : sig === "SIGHUP" ? 129 : 130);
|
|
91112
|
+
};
|
|
91113
|
+
process.once("SIGTERM", () => {
|
|
91114
|
+
void teardown("SIGTERM");
|
|
91115
|
+
});
|
|
91116
|
+
process.once("SIGHUP", () => {
|
|
91117
|
+
void teardown("SIGHUP");
|
|
91118
|
+
});
|
|
91065
91119
|
const dockerServices = (config.docker?.services ?? []).filter((s) => s.tail !== false);
|
|
91066
91120
|
let dockerTailer = null;
|
|
91067
91121
|
if (dockerServices.length > 0) {
|
|
@@ -92779,15 +92833,15 @@ function buildCli(opts = {}) {
|
|
|
92779
92833
|
}
|
|
92780
92834
|
if (!hasCommand(program2, "link")) {
|
|
92781
92835
|
const linkCmd = program2.command("link").description("Register the current directory as using a cockpit.yaml that lives elsewhere").argument("<config-path>", "Path to the cockpit.yaml to associate with this directory").action(async (configPath) => {
|
|
92782
|
-
const { linkAddCommand } = await import("./link-
|
|
92836
|
+
const { linkAddCommand } = await import("./link-VWT2VQH6.js");
|
|
92783
92837
|
linkAddCommand({ configPath });
|
|
92784
92838
|
});
|
|
92785
92839
|
linkCmd.command("list").description("Print all registered project \u2192 config mappings").action(async () => {
|
|
92786
|
-
const { linkListCommand } = await import("./link-
|
|
92840
|
+
const { linkListCommand } = await import("./link-VWT2VQH6.js");
|
|
92787
92841
|
linkListCommand();
|
|
92788
92842
|
});
|
|
92789
92843
|
linkCmd.command("remove").description("Unregister the current directory from the manifest").action(async () => {
|
|
92790
|
-
const { linkRemoveCommand } = await import("./link-
|
|
92844
|
+
const { linkRemoveCommand } = await import("./link-VWT2VQH6.js");
|
|
92791
92845
|
linkRemoveCommand();
|
|
92792
92846
|
});
|
|
92793
92847
|
}
|
|
@@ -92851,6 +92905,7 @@ export {
|
|
|
92851
92905
|
DEFAULT_HIGHLIGHT_PATTERNS,
|
|
92852
92906
|
DEBOUNCE_MS as DOCKER_NOTIFY_DEBOUNCE_MS,
|
|
92853
92907
|
SILENT_THRESHOLD_MS as DOCKER_SILENT_THRESHOLD_MS,
|
|
92908
|
+
DiscoveryError,
|
|
92854
92909
|
DockerLogTailer,
|
|
92855
92910
|
FALLBACK_PAGE,
|
|
92856
92911
|
FilterModal,
|
|
@@ -92874,6 +92929,7 @@ export {
|
|
|
92874
92929
|
buildHealthContext,
|
|
92875
92930
|
buildHealthRegistry,
|
|
92876
92931
|
buildTemplate,
|
|
92932
|
+
canonical,
|
|
92877
92933
|
cockpitStore,
|
|
92878
92934
|
compileHighlights,
|
|
92879
92935
|
createLogger,
|
|
@@ -92881,6 +92937,7 @@ export {
|
|
|
92881
92937
|
detectBrokenSymlinks,
|
|
92882
92938
|
detectTransitions,
|
|
92883
92939
|
devCommand,
|
|
92940
|
+
discoverConfig,
|
|
92884
92941
|
dispatchRemediation,
|
|
92885
92942
|
doctorCommand,
|
|
92886
92943
|
emitEvent,
|
|
@@ -92896,9 +92953,12 @@ export {
|
|
|
92896
92953
|
initLogger,
|
|
92897
92954
|
killAllSpawned,
|
|
92898
92955
|
killSpawnedByTag,
|
|
92956
|
+
listMappings,
|
|
92899
92957
|
loadConfig,
|
|
92900
92958
|
loadHelpPages,
|
|
92901
92959
|
loadPagesFromDir,
|
|
92960
|
+
lookupConfig,
|
|
92961
|
+
manifestPath,
|
|
92902
92962
|
mapPathToRepo,
|
|
92903
92963
|
matchHighlights,
|
|
92904
92964
|
mergeMounts,
|
|
@@ -92910,8 +92970,10 @@ export {
|
|
|
92910
92970
|
notifyTransitions,
|
|
92911
92971
|
parseIndex,
|
|
92912
92972
|
readGitInfo,
|
|
92973
|
+
readManifest,
|
|
92913
92974
|
readMountManifest,
|
|
92914
92975
|
removeManagedSymlinks,
|
|
92976
|
+
removeMapping,
|
|
92915
92977
|
renderDockerOverlay,
|
|
92916
92978
|
renderMarkdown,
|
|
92917
92979
|
renderWizardYaml,
|
|
@@ -92927,6 +92989,7 @@ export {
|
|
|
92927
92989
|
runRemediation,
|
|
92928
92990
|
scheduleLint,
|
|
92929
92991
|
selectLintCommand,
|
|
92992
|
+
setMapping,
|
|
92930
92993
|
spawnStream,
|
|
92931
92994
|
useCockpitStore,
|
|
92932
92995
|
useGlobalKeys,
|