dev-cockpit 0.1.0 → 0.2.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/README.md +64 -29
- package/bin/dev-cockpit.mjs +26 -4
- package/dist/actions/builtin.d.ts +25 -0
- package/dist/actions/builtin.d.ts.map +1 -0
- package/dist/actions/dispatch.d.ts +21 -0
- package/dist/actions/dispatch.d.ts.map +1 -0
- package/dist/actions/registry.d.ts +11 -0
- package/dist/actions/registry.d.ts.map +1 -0
- package/dist/actions/types.d.ts +76 -0
- package/dist/actions/types.d.ts.map +1 -0
- package/dist/buildCli.d.ts.map +1 -1
- package/dist/chunk-6XGHLLYT.js +46 -0
- package/dist/chunk-6XGHLLYT.js.map +7 -0
- package/dist/chunk-Q6677JQF.js +32609 -0
- package/dist/chunk-Q6677JQF.js.map +7 -0
- package/dist/chunk-VN6UILQW.js +1460 -0
- package/dist/chunk-VN6UILQW.js.map +7 -0
- package/dist/cockpit/Cockpit.d.ts +6 -0
- package/dist/cockpit/Cockpit.d.ts.map +1 -1
- package/dist/cockpit/Footer.d.ts +6 -4
- package/dist/cockpit/Footer.d.ts.map +1 -1
- package/dist/cockpit/TabBar.d.ts.map +1 -1
- package/dist/cockpit/hooks/useGlobalKeys.d.ts +15 -15
- package/dist/cockpit/hooks/useGlobalKeys.d.ts.map +1 -1
- package/dist/cockpit/hooks/useTerminalWidth.d.ts +12 -0
- package/dist/cockpit/hooks/useTerminalWidth.d.ts.map +1 -0
- package/dist/cockpit/panes/CommandModal.d.ts +18 -0
- package/dist/cockpit/panes/CommandModal.d.ts.map +1 -0
- package/dist/cockpit/panes/Help.d.ts.map +1 -1
- package/dist/cockpit/panes/Output.d.ts +7 -0
- package/dist/cockpit/panes/Output.d.ts.map +1 -1
- package/dist/cockpit/panes/Repos.d.ts.map +1 -1
- package/dist/cockpit/state/store.d.ts +14 -11
- package/dist/cockpit/state/store.d.ts.map +1 -1
- package/dist/cockpit/tab-state.d.ts +12 -0
- package/dist/cockpit/tab-state.d.ts.map +1 -1
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/init-config-wizard.d.ts +103 -2
- package/dist/commands/init-config-wizard.d.ts.map +1 -1
- package/dist/commands/init-config.d.ts.map +1 -1
- package/dist/commands/migrate-config.d.ts +18 -0
- package/dist/commands/migrate-config.d.ts.map +1 -0
- package/dist/commands/mount.d.ts +17 -32
- package/dist/commands/mount.d.ts.map +1 -1
- package/dist/core/config.d.ts +73 -5
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/migrations.d.ts +33 -0
- package/dist/core/migrations.d.ts.map +1 -0
- package/dist/core/subprocess.d.ts +20 -0
- package/dist/core/subprocess.d.ts.map +1 -1
- package/dist/core/types.d.ts +36 -12
- package/dist/core/types.d.ts.map +1 -1
- package/dist/devtools-YXMW6JJ6.js +3720 -0
- package/dist/devtools-YXMW6JJ6.js.map +7 -0
- package/dist/docker/highlights.d.ts +14 -4
- package/dist/docker/highlights.d.ts.map +1 -1
- package/dist/docker/logs.d.ts +3 -2
- package/dist/docker/logs.d.ts.map +1 -1
- package/dist/health/builtin.d.ts.map +1 -1
- package/dist/index.d.ts +14 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +92837 -53
- package/dist/index.js.map +7 -0
- package/dist/ink.js +38 -1
- package/dist/ink.js.map +7 -0
- package/dist/mount/compose.d.ts +21 -0
- package/dist/mount/compose.d.ts.map +1 -0
- package/dist/mount/discovery.d.ts +35 -0
- package/dist/mount/discovery.d.ts.map +1 -0
- package/dist/mount/git-status.d.ts +12 -0
- package/dist/mount/git-status.d.ts.map +1 -0
- package/dist/mount/manifest.d.ts +16 -0
- package/dist/mount/manifest.d.ts.map +1 -0
- package/dist/mount/symlinks.d.ts +30 -0
- package/dist/mount/symlinks.d.ts.map +1 -0
- package/dist/mount/types.d.ts +60 -0
- package/dist/mount/types.d.ts.map +1 -0
- package/dist/react.js +35 -1
- package/dist/react.js.map +7 -0
- package/dist/runCockpit.d.ts +3 -0
- package/dist/runCockpit.d.ts.map +1 -1
- package/docs/commands.md +29 -16
- package/docs/config-reference.md +115 -11
- package/docs/getting-started.md +9 -6
- package/docs/index.md +5 -1
- package/docs/init-config.md +34 -8
- package/docs/mount.md +198 -25
- package/docs/notifications.md +14 -13
- package/docs/panes.md +36 -15
- package/docs/processes.md +42 -0
- package/package.json +93 -90
- package/dist/buildCli.js +0 -107
- package/dist/cli.js +0 -2
- package/dist/cockpit/Cockpit.js +0 -73
- package/dist/cockpit/Footer.js +0 -33
- package/dist/cockpit/TabBar.js +0 -12
- package/dist/cockpit/help/content.js +0 -22
- package/dist/cockpit/help/loader.js +0 -118
- package/dist/cockpit/help/renderer.js +0 -35
- package/dist/cockpit/help/types.js +0 -1
- package/dist/cockpit/hooks/useCockpitStore.js +0 -5
- package/dist/cockpit/hooks/useGlobalKeys.js +0 -173
- package/dist/cockpit/panes/FilterModal.js +0 -22
- package/dist/cockpit/panes/Health.js +0 -30
- package/dist/cockpit/panes/Help.js +0 -81
- package/dist/cockpit/panes/Output.js +0 -108
- package/dist/cockpit/panes/Repos.js +0 -48
- package/dist/cockpit/panes/SearchModal.js +0 -31
- package/dist/cockpit/state/store.js +0 -111
- package/dist/cockpit/tab-state.js +0 -7
- package/dist/commands/dev.js +0 -158
- package/dist/commands/doctor.js +0 -66
- package/dist/commands/init-config-wizard.js +0 -818
- package/dist/commands/init-config.js +0 -131
- package/dist/commands/mount.js +0 -150
- package/dist/core/config.js +0 -152
- package/dist/core/logger.js +0 -38
- package/dist/core/notifier.js +0 -100
- package/dist/core/paths.js +0 -18
- package/dist/core/subprocess.js +0 -82
- package/dist/core/types.js +0 -1
- package/dist/docker/highlights.js +0 -79
- package/dist/docker/logs.js +0 -172
- package/dist/docker/restart.js +0 -45
- package/dist/docker/stack-trace.js +0 -44
- package/dist/health/builtin.js +0 -144
- package/dist/health/context.js +0 -31
- package/dist/health/notify-resolver.js +0 -28
- package/dist/health/registry.js +0 -64
- package/dist/health/remediations.js +0 -41
- package/dist/health/runner.js +0 -22
- package/dist/health/scheduler.js +0 -107
- package/dist/health/types.js +0 -1
- package/dist/health/useHealth.js +0 -122
- package/dist/lint/reactive.js +0 -131
- package/dist/runCockpit.js +0 -75
- package/dist/watchers/manager.js +0 -239
- package/dist/watchers/path-mapper.js +0 -29
- package/dist/watchers/types.js +0 -9
- package/docs/watchers.md +0 -27
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure function: maps an absolute file path to the name of the owning repo.
|
|
3
|
-
*
|
|
4
|
-
* Strategy: longest-prefix match against each repo's root directory.
|
|
5
|
-
* Returns null if no repo claims the path.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Finds the repo that owns `filePath` by longest-prefix match on `rootDir`.
|
|
9
|
-
*
|
|
10
|
-
* Rules:
|
|
11
|
-
* - `rootDir` must be a prefix of `filePath` with a path-separator boundary
|
|
12
|
-
* (avoids `/foo-bar` matching `/foo`).
|
|
13
|
-
* - When multiple repos match, the one with the longest `rootDir` wins.
|
|
14
|
-
*
|
|
15
|
-
* @returns the owning repo name, or null if no repo matches.
|
|
16
|
-
*/
|
|
17
|
-
export function mapPathToRepo(filePath, repos) {
|
|
18
|
-
let bestMatch = null;
|
|
19
|
-
for (const repo of repos) {
|
|
20
|
-
const prefix = repo.rootDir.endsWith('/') ? repo.rootDir : `${repo.rootDir}/`;
|
|
21
|
-
const isMatch = filePath === repo.rootDir || filePath.startsWith(prefix);
|
|
22
|
-
if (isMatch) {
|
|
23
|
-
if (bestMatch === null || repo.rootDir.length > bestMatch.rootDir.length) {
|
|
24
|
-
bestMatch = repo;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return bestMatch?.name ?? null;
|
|
29
|
-
}
|
package/dist/watchers/types.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Watcher subsystem types.
|
|
3
|
-
*
|
|
4
|
-
* The watcher manager works on a *normalized* repo config — a per-repo
|
|
5
|
-
* declaration that says where the repo lives, which paths trigger work,
|
|
6
|
-
* and what commands to run. Profiles produce these from their own config
|
|
7
|
-
* shapes before constructing a WatcherManager.
|
|
8
|
-
*/
|
|
9
|
-
export {};
|
package/docs/watchers.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Watchers
|
|
2
|
-
|
|
3
|
-
A watcher is a long-running command (typically `tsc --watch`, `vitest --watch`, `eslint --watch`) declared in `cockpit.yaml` under `watchers:`. The cockpit spawns each watcher lazily on first focus and streams its stdout/stderr into the Output pane, prefixed by source id.
|
|
4
|
-
|
|
5
|
-
## Config shape
|
|
6
|
-
|
|
7
|
-
```yaml
|
|
8
|
-
watchers:
|
|
9
|
-
- id: typecheck
|
|
10
|
-
label: tsc --watch
|
|
11
|
-
command: npx tsc --watch --noEmit
|
|
12
|
-
color: cyan
|
|
13
|
-
- id: test
|
|
14
|
-
label: vitest
|
|
15
|
-
command: npx vitest --watch
|
|
16
|
-
color: magenta
|
|
17
|
-
notify: false # mute notifications for this watcher
|
|
18
|
-
restartOn:
|
|
19
|
-
- package.json
|
|
20
|
-
- tsconfig.json
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
- `id` is required; it appears as the source prefix on every emitted line.
|
|
24
|
-
- `restartOn` lets you re-spawn the watcher when specific files change.
|
|
25
|
-
- `notify` overrides the global notifications policy for this watcher (see notifications.md).
|
|
26
|
-
|
|
27
|
-
This page is a stub — full watcher behavior is fleshed out in subsequent phases.
|