procdeck 0.1.0 → 0.3.0
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-MLKGABMK.js +9 -0
- package/dist/cli.js +28989 -445
- package/dist/public.d.ts +63 -0
- package/dist/public.js +7 -0
- package/package.json +9 -7
- package/readme.md +42 -18
- package/schema.json +212 -0
- package/dist/chunk-SBVZ6G4G.js +0 -187
- package/dist/config.d.ts +0 -147
- package/dist/config.js +0 -24
package/dist/config.d.ts
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { Effect, Schema } from "effect";
|
|
2
|
-
export declare const PreflightSchema: Schema.Struct<{
|
|
3
|
-
/** Shell command; exit 0 lets the proc spawn. */
|
|
4
|
-
readonly shell: Schema.String;
|
|
5
|
-
/**
|
|
6
|
-
* Regex that must also match the check's output. For checks that exit 0
|
|
7
|
-
* either way — `wrangler whoami` reports "not authenticated" with exit 0 —
|
|
8
|
-
* so the config doesn't need `| grep` pipelines.
|
|
9
|
-
*/
|
|
10
|
-
readonly expect: Schema.optionalKey<Schema.String>;
|
|
11
|
-
/** What the human should do when the check fails. */
|
|
12
|
-
readonly hint: Schema.optionalKey<Schema.String>;
|
|
13
|
-
}>;
|
|
14
|
-
export type Preflight = typeof PreflightSchema.Type;
|
|
15
|
-
/** A regex watched in the pane output; a match raises a badge in the UI. */
|
|
16
|
-
export declare const AlertSchema: Schema.Struct<{
|
|
17
|
-
readonly pattern: Schema.String;
|
|
18
|
-
/** Badge text. */
|
|
19
|
-
readonly label: Schema.String;
|
|
20
|
-
}>;
|
|
21
|
-
export type Alert = typeof AlertSchema.Type;
|
|
22
|
-
export declare const ProcSpecSchema: Schema.Struct<{
|
|
23
|
-
/** Stable identifier, also the tab label. */
|
|
24
|
-
readonly id: Schema.String;
|
|
25
|
-
/** Command line handed to `$SHELL -c`. */
|
|
26
|
-
readonly shell: Schema.optionalKey<Schema.String>;
|
|
27
|
-
/** argv, executed without a shell. */
|
|
28
|
-
readonly cmd: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
29
|
-
/** Working directory; defaults to the config file's directory. */
|
|
30
|
-
readonly cwd: Schema.optionalKey<Schema.String>;
|
|
31
|
-
/** Extra environment on top of the inherited one. */
|
|
32
|
-
readonly env: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
33
|
-
/** Spawn on startup. Defaults to true. */
|
|
34
|
-
readonly autostart: Schema.optionalKey<Schema.Boolean>;
|
|
35
|
-
/** URL this process serves, shown in the UI as a link. */
|
|
36
|
-
readonly url: Schema.optionalKey<Schema.String>;
|
|
37
|
-
/**
|
|
38
|
-
* Names of procs that must be ready before this one spawns. Declarative:
|
|
39
|
-
* readiness is auto-detected, no port numbers in the config.
|
|
40
|
-
*/
|
|
41
|
-
readonly needs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
42
|
-
/**
|
|
43
|
-
* What "ready" means for dependents: "listening" (default) — the process
|
|
44
|
-
* tree opened a TCP port; "started" — it merely spawned (for procs that
|
|
45
|
-
* never listen).
|
|
46
|
-
*/
|
|
47
|
-
readonly readyWhen: Schema.optionalKey<Schema.Literals<readonly ["listening", "started"]>>;
|
|
48
|
-
/** Check that must pass before this proc spawns; failure shows as "blocked". */
|
|
49
|
-
readonly preflight: Schema.optionalKey<Schema.Struct<{
|
|
50
|
-
/** Shell command; exit 0 lets the proc spawn. */
|
|
51
|
-
readonly shell: Schema.String;
|
|
52
|
-
/**
|
|
53
|
-
* Regex that must also match the check's output. For checks that exit 0
|
|
54
|
-
* either way — `wrangler whoami` reports "not authenticated" with exit 0 —
|
|
55
|
-
* so the config doesn't need `| grep` pipelines.
|
|
56
|
-
*/
|
|
57
|
-
readonly expect: Schema.optionalKey<Schema.String>;
|
|
58
|
-
/** What the human should do when the check fails. */
|
|
59
|
-
readonly hint: Schema.optionalKey<Schema.String>;
|
|
60
|
-
}>>;
|
|
61
|
-
/** Output patterns that raise a badge when they appear in the pane. */
|
|
62
|
-
readonly alerts: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
63
|
-
readonly pattern: Schema.String;
|
|
64
|
-
/** Badge text. */
|
|
65
|
-
readonly label: Schema.String;
|
|
66
|
-
}>>>;
|
|
67
|
-
}>;
|
|
68
|
-
export type ProcSpec = typeof ProcSpecSchema.Type;
|
|
69
|
-
/** Default port of the UI + proxy server. */
|
|
70
|
-
export declare const DEFAULT_UI_PORT = 4820;
|
|
71
|
-
/** Whether the spec asks procdeck to assign it a port (`${port}` anywhere). */
|
|
72
|
-
export declare const usesOwnPort: (spec: ProcSpec) => boolean;
|
|
73
|
-
/** Substitute `${port}` / `${port:id}` with the ports assigned at startup. */
|
|
74
|
-
export declare const resolveSpec: (spec: ProcSpec, assigned: Map<string, number>) => ProcSpec;
|
|
75
|
-
export declare const ProcdeckConfigSchema: Schema.Struct<{
|
|
76
|
-
/**
|
|
77
|
-
* Deck name — the tab title and the name of the installed web app.
|
|
78
|
-
* Defaults to the config directory's basename.
|
|
79
|
-
*/
|
|
80
|
-
readonly name: Schema.optionalKey<Schema.String>;
|
|
81
|
-
/** Port for the web UI. Defaults to 4820. */
|
|
82
|
-
readonly port: Schema.optionalKey<Schema.Number>;
|
|
83
|
-
readonly procs: Schema.$Array<Schema.Struct<{
|
|
84
|
-
/** Stable identifier, also the tab label. */
|
|
85
|
-
readonly id: Schema.String;
|
|
86
|
-
/** Command line handed to `$SHELL -c`. */
|
|
87
|
-
readonly shell: Schema.optionalKey<Schema.String>;
|
|
88
|
-
/** argv, executed without a shell. */
|
|
89
|
-
readonly cmd: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
90
|
-
/** Working directory; defaults to the config file's directory. */
|
|
91
|
-
readonly cwd: Schema.optionalKey<Schema.String>;
|
|
92
|
-
/** Extra environment on top of the inherited one. */
|
|
93
|
-
readonly env: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
94
|
-
/** Spawn on startup. Defaults to true. */
|
|
95
|
-
readonly autostart: Schema.optionalKey<Schema.Boolean>;
|
|
96
|
-
/** URL this process serves, shown in the UI as a link. */
|
|
97
|
-
readonly url: Schema.optionalKey<Schema.String>;
|
|
98
|
-
/**
|
|
99
|
-
* Names of procs that must be ready before this one spawns. Declarative:
|
|
100
|
-
* readiness is auto-detected, no port numbers in the config.
|
|
101
|
-
*/
|
|
102
|
-
readonly needs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
103
|
-
/**
|
|
104
|
-
* What "ready" means for dependents: "listening" (default) — the process
|
|
105
|
-
* tree opened a TCP port; "started" — it merely spawned (for procs that
|
|
106
|
-
* never listen).
|
|
107
|
-
*/
|
|
108
|
-
readonly readyWhen: Schema.optionalKey<Schema.Literals<readonly ["listening", "started"]>>;
|
|
109
|
-
/** Check that must pass before this proc spawns; failure shows as "blocked". */
|
|
110
|
-
readonly preflight: Schema.optionalKey<Schema.Struct<{
|
|
111
|
-
/** Shell command; exit 0 lets the proc spawn. */
|
|
112
|
-
readonly shell: Schema.String;
|
|
113
|
-
/**
|
|
114
|
-
* Regex that must also match the check's output. For checks that exit 0
|
|
115
|
-
* either way — `wrangler whoami` reports "not authenticated" with exit 0 —
|
|
116
|
-
* so the config doesn't need `| grep` pipelines.
|
|
117
|
-
*/
|
|
118
|
-
readonly expect: Schema.optionalKey<Schema.String>;
|
|
119
|
-
/** What the human should do when the check fails. */
|
|
120
|
-
readonly hint: Schema.optionalKey<Schema.String>;
|
|
121
|
-
}>>;
|
|
122
|
-
/** Output patterns that raise a badge when they appear in the pane. */
|
|
123
|
-
readonly alerts: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
124
|
-
readonly pattern: Schema.String;
|
|
125
|
-
/** Badge text. */
|
|
126
|
-
readonly label: Schema.String;
|
|
127
|
-
}>>>;
|
|
128
|
-
}>>;
|
|
129
|
-
}>;
|
|
130
|
-
export type ProcdeckConfig = typeof ProcdeckConfigSchema.Type;
|
|
131
|
-
/** Identity helper that gives config files their types. */
|
|
132
|
-
export declare const defineConfig: (config: ProcdeckConfig) => ProcdeckConfig;
|
|
133
|
-
export type LoadedConfig = {
|
|
134
|
-
config: ProcdeckConfig;
|
|
135
|
-
/** Directory of the config file — the default cwd for every process. */
|
|
136
|
-
root: string;
|
|
137
|
-
/** `config.name`, or the root directory's basename. */
|
|
138
|
-
name: string;
|
|
139
|
-
};
|
|
140
|
-
declare const ConfigError_base: Schema.Class<ConfigError, Schema.TaggedStruct<"ConfigError", {
|
|
141
|
-
readonly file: Schema.String;
|
|
142
|
-
readonly message: Schema.String;
|
|
143
|
-
}>, import("effect/Cause").YieldableError>;
|
|
144
|
-
export declare class ConfigError extends ConfigError_base {
|
|
145
|
-
}
|
|
146
|
-
export declare const loadConfig: (file: string) => Effect.Effect<LoadedConfig, ConfigError, never>;
|
|
147
|
-
export {};
|
package/dist/config.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AlertSchema,
|
|
3
|
-
ConfigError,
|
|
4
|
-
DEFAULT_UI_PORT,
|
|
5
|
-
PreflightSchema,
|
|
6
|
-
ProcSpecSchema,
|
|
7
|
-
ProcdeckConfigSchema,
|
|
8
|
-
defineConfig,
|
|
9
|
-
loadConfig,
|
|
10
|
-
resolveSpec,
|
|
11
|
-
usesOwnPort
|
|
12
|
-
} from "./chunk-SBVZ6G4G.js";
|
|
13
|
-
export {
|
|
14
|
-
AlertSchema,
|
|
15
|
-
ConfigError,
|
|
16
|
-
DEFAULT_UI_PORT,
|
|
17
|
-
PreflightSchema,
|
|
18
|
-
ProcSpecSchema,
|
|
19
|
-
ProcdeckConfigSchema,
|
|
20
|
-
defineConfig,
|
|
21
|
-
loadConfig,
|
|
22
|
-
resolveSpec,
|
|
23
|
-
usesOwnPort
|
|
24
|
-
};
|