@lo1/cli 0.2.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/README.md +46 -0
- package/dist/cli/commands/down.d.ts +3 -0
- package/dist/cli/commands/down.d.ts.map +1 -0
- package/dist/cli/commands/hosts.d.ts +3 -0
- package/dist/cli/commands/hosts.d.ts.map +1 -0
- package/dist/cli/commands/init.d.ts +3 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/logs.d.ts +3 -0
- package/dist/cli/commands/logs.d.ts.map +1 -0
- package/dist/cli/commands/status.d.ts +27 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/tls-setup.d.ts +10 -0
- package/dist/cli/commands/tls-setup.d.ts.map +1 -0
- package/dist/cli/commands/up.d.ts +3 -0
- package/dist/cli/commands/up.d.ts.map +1 -0
- package/dist/cli/index.d.ts +5 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/compose/generate.d.ts +36 -0
- package/dist/compose/generate.d.ts.map +1 -0
- package/dist/config/loader.d.ts +8 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/dag/index.d.ts +12 -0
- package/dist/dag/index.d.ts.map +1 -0
- package/dist/debug.d.ts +3 -0
- package/dist/debug.d.ts.map +1 -0
- package/dist/discovery/registry.d.ts +19 -0
- package/dist/discovery/registry.d.ts.map +1 -0
- package/dist/errors.d.ts +7 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/hooks/executor.d.ts +27 -0
- package/dist/hooks/executor.d.ts.map +1 -0
- package/dist/hosts/index.d.ts +11 -0
- package/dist/hosts/index.d.ts.map +1 -0
- package/dist/lo1.js +12110 -0
- package/dist/logs/writer.d.ts +4 -0
- package/dist/logs/writer.d.ts.map +1 -0
- package/dist/orchestrator/filter.d.ts +7 -0
- package/dist/orchestrator/filter.d.ts.map +1 -0
- package/dist/orchestrator/service.d.ts +43 -0
- package/dist/orchestrator/service.d.ts.map +1 -0
- package/dist/orchestrator/start.d.ts +7 -0
- package/dist/orchestrator/start.d.ts.map +1 -0
- package/dist/orchestrator/state.d.ts +5 -0
- package/dist/orchestrator/state.d.ts.map +1 -0
- package/dist/orchestrator/stop.d.ts +19 -0
- package/dist/orchestrator/stop.d.ts.map +1 -0
- package/dist/orchestrator/types.d.ts +105 -0
- package/dist/orchestrator/types.d.ts.map +1 -0
- package/dist/output/format.d.ts +4 -0
- package/dist/output/format.d.ts.map +1 -0
- package/dist/output/line-buffer.d.ts +7 -0
- package/dist/output/line-buffer.d.ts.map +1 -0
- package/dist/plugin/loader.d.ts +13 -0
- package/dist/plugin/loader.d.ts.map +1 -0
- package/dist/proxy/caddyfile.d.ts +8 -0
- package/dist/proxy/caddyfile.d.ts.map +1 -0
- package/dist/proxy/domains.d.ts +7 -0
- package/dist/proxy/domains.d.ts.map +1 -0
- package/dist/readiness/probe.d.ts +19 -0
- package/dist/readiness/probe.d.ts.map +1 -0
- package/dist/repos/init.d.ts +24 -0
- package/dist/repos/init.d.ts.map +1 -0
- package/dist/runner/compose.d.ts +76 -0
- package/dist/runner/compose.d.ts.map +1 -0
- package/dist/runner/container.d.ts +33 -0
- package/dist/runner/container.d.ts.map +1 -0
- package/dist/runner/process.d.ts +32 -0
- package/dist/runner/process.d.ts.map +1 -0
- package/dist/tls/setup.d.ts +25 -0
- package/dist/tls/setup.d.ts.map +1 -0
- package/package.json +31 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function logDir(workspaceDir?: string): string;
|
|
2
|
+
export declare function initLogDir(workspaceDir?: string): Promise<void>;
|
|
3
|
+
export declare function appendLog(workspaceDir: string, category: string, text: string): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=writer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../src/logs/writer.ts"],"names":[],"mappings":"AAKA,wBAAgB,MAAM,CAAC,YAAY,SAAM,GAAG,MAAM,CAEjD;AAED,wBAAsB,UAAU,CAAC,YAAY,SAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIlE;AAED,wBAAsB,SAAS,CAC7B,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAIf"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WorkspaceConfig } from "@lo1/sdk";
|
|
2
|
+
import { Lo1Error } from "../errors";
|
|
3
|
+
export declare class FilterError extends Lo1Error {
|
|
4
|
+
constructor(message: string);
|
|
5
|
+
}
|
|
6
|
+
export declare function resolveServiceFilter(requested: string[], config: WorkspaceConfig): Set<string>;
|
|
7
|
+
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/orchestrator/filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,qBAAa,WAAY,SAAQ,QAAQ;gBAC3B,OAAO,EAAE,MAAM;CAI5B;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,eAAe,GAAG,GAAG,CAAC,MAAM,CAAC,CAuB9F"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Plugin, WorkspaceConfig, ServiceConfig } from "@lo1/sdk";
|
|
2
|
+
import { Lo1Error } from "../errors";
|
|
3
|
+
import type { EndpointRegistry } from "../discovery/registry";
|
|
4
|
+
import type { OutputLine } from "../runner/process";
|
|
5
|
+
import type { HookOutput } from "../hooks/executor";
|
|
6
|
+
import { startProcess as defaultStartProcess } from "../runner/process";
|
|
7
|
+
import { startContainer as defaultStartContainer } from "../runner/container";
|
|
8
|
+
import { executeHook as defaultExecuteHook } from "../hooks/executor";
|
|
9
|
+
import { buildServiceEnv as defaultBuildServiceEnv } from "../discovery/registry";
|
|
10
|
+
import { waitForReady as defaultWaitForReady } from "../readiness/probe";
|
|
11
|
+
export declare class ServiceStartError extends Lo1Error {
|
|
12
|
+
constructor(message: string);
|
|
13
|
+
}
|
|
14
|
+
export type ServiceHandle = {
|
|
15
|
+
serviceName: string;
|
|
16
|
+
type: "process" | "container" | "compose";
|
|
17
|
+
pid?: number;
|
|
18
|
+
containerId?: string;
|
|
19
|
+
running: boolean;
|
|
20
|
+
stop(timeoutMs?: number): Promise<void>;
|
|
21
|
+
};
|
|
22
|
+
export type StartServiceOptions = {
|
|
23
|
+
serviceName: string;
|
|
24
|
+
serviceConfig: ServiceConfig;
|
|
25
|
+
config: WorkspaceConfig;
|
|
26
|
+
plugin: Plugin | undefined;
|
|
27
|
+
registry: EndpointRegistry;
|
|
28
|
+
pluginEnvVars: Record<string, string>;
|
|
29
|
+
workspaceDir: string;
|
|
30
|
+
signal?: AbortSignal;
|
|
31
|
+
onOutput?: (line: OutputLine) => void;
|
|
32
|
+
onHookOutput?: (output: HookOutput) => void;
|
|
33
|
+
};
|
|
34
|
+
export type StartServiceDeps = {
|
|
35
|
+
startProcess: typeof defaultStartProcess;
|
|
36
|
+
startContainer: typeof defaultStartContainer;
|
|
37
|
+
executeHook: typeof defaultExecuteHook;
|
|
38
|
+
buildServiceEnv: typeof defaultBuildServiceEnv;
|
|
39
|
+
waitForReady: typeof defaultWaitForReady;
|
|
40
|
+
};
|
|
41
|
+
export declare const BUILTIN_TYPES: Set<string>;
|
|
42
|
+
export declare function startService(options: StartServiceOptions, deps?: StartServiceDeps): Promise<ServiceHandle>;
|
|
43
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/orchestrator/service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,aAAa,EAAkB,MAA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;IACrB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,YAAY,EAAE,OAAO,mBAAmB,CAAC;IACzC,cAAc,EAAE,OAAO,qBAAqB,CAAC;IAC7C,WAAW,EAAE,OAAO,kBAAkB,CAAC;IACvC,eAAe,EAAE,OAAO,sBAAsB,CAAC;IAC/C,YAAY,EAAE,OAAO,mBAAmB,CAAC;CAC1C,CAAC;AAUF,eAAO,MAAM,aAAa,aAA8B,CAAC;AAEzD,wBAAsB,YAAY,CAChC,OAAO,EAAE,mBAAmB,EAC5B,IAAI,GAAE,gBAA8B,GACnC,OAAO,CAAC,aAAa,CAAC,CAuExB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Lo1Error } from "../errors";
|
|
2
|
+
import type { OrchestratorDeps, StartOptions, StartResult } from "./types";
|
|
3
|
+
export declare class OrchestratorError extends Lo1Error {
|
|
4
|
+
constructor(message: string);
|
|
5
|
+
}
|
|
6
|
+
export declare function startWorkspace(options: StartOptions, overrides?: Partial<OrchestratorDeps>): Promise<StartResult>;
|
|
7
|
+
//# sourceMappingURL=start.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/orchestrator/start.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AA0BrC,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,WAAW,EAGZ,MAAM,SAAS,CAAC;AAGjB,qBAAa,iBAAkB,SAAQ,QAAQ;gBACjC,OAAO,EAAE,MAAM;CAI5B;AAmED,wBAAsB,cAAc,CAClC,OAAO,EAAE,YAAY,EACrB,SAAS,GAAE,OAAO,CAAC,gBAAgB,CAAM,GACxC,OAAO,CAAC,WAAW,CAAC,CAqFtB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WorkspaceState } from "./types";
|
|
2
|
+
export declare function writeState(state: WorkspaceState, workspaceDir?: string): Promise<void>;
|
|
3
|
+
export declare function readState(workspaceDir?: string): Promise<WorkspaceState | null>;
|
|
4
|
+
export declare function removeState(workspaceDir?: string): Promise<void>;
|
|
5
|
+
//# sourceMappingURL=state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/orchestrator/state.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAQ9C,wBAAsB,UAAU,CAAC,KAAK,EAAE,cAAc,EAAE,YAAY,SAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIzF;AAED,wBAAsB,SAAS,CAAC,YAAY,SAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAOlF;AAED,wBAAsB,WAAW,CAAC,YAAY,SAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMnE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ServiceHandle } from "./service";
|
|
2
|
+
import type { OrchestratorDeps, StopOptions, WorkspaceState } from "./types";
|
|
3
|
+
export type StopDeps = Pick<OrchestratorDeps, "loadConfig" | "composeDown" | "executeHook" | "readState" | "removeState"> & {
|
|
4
|
+
exec?: (cmd: string, args: string[]) => Promise<{
|
|
5
|
+
stdout: string;
|
|
6
|
+
stderr: string;
|
|
7
|
+
}>;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Reconstruct ServiceHandles from persisted WorkspaceState.
|
|
11
|
+
* Used for recovery (e.g. `lo1 down` from a separate terminal) or
|
|
12
|
+
* stale-workspace cleanup before a fresh `lo1 up`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function hydrateHandles(state: WorkspaceState, exec?: (cmd: string, args: string[]) => Promise<{
|
|
15
|
+
stdout: string;
|
|
16
|
+
stderr: string;
|
|
17
|
+
}>): ServiceHandle[];
|
|
18
|
+
export declare function stopWorkspace(options: StopOptions, overrides?: Partial<StopDeps>): Promise<void>;
|
|
19
|
+
//# sourceMappingURL=stop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stop.d.ts","sourceRoot":"","sources":["../../src/orchestrator/stop.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAgB,cAAc,EAAE,MAAM,SAAS,CAAC;AAI3F,MAAM,MAAM,QAAQ,GAAG,IAAI,CACzB,gBAAgB,EAChB,YAAY,GAAG,aAAa,GAAG,aAAa,GAAG,WAAW,GAAG,aAAa,CAC3E,GAAG;IACF,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrF,CAAC;AAaF;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,cAAc,EACrB,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,GAClF,aAAa,EAAE,CAKjB;AA0DD,wBAAsB,aAAa,CACjC,OAAO,EAAE,WAAW,EACpB,SAAS,GAAE,OAAO,CAAC,QAAQ,CAAM,GAChC,OAAO,CAAC,IAAI,CAAC,CAuDf"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { Plugin, PluginContext, WorkspaceConfig, ComposeContribution } from "@lo1/sdk";
|
|
2
|
+
import type { EndpointRegistry } from "../discovery/registry";
|
|
3
|
+
import type { DagResult } from "../dag/index";
|
|
4
|
+
import type { ComposeResult } from "../compose/generate";
|
|
5
|
+
import type { CaddyfileResult } from "../proxy/caddyfile";
|
|
6
|
+
import type { OutputLine } from "../runner/process";
|
|
7
|
+
import type { HookOutput, HookResult } from "../hooks/executor";
|
|
8
|
+
import type { ComposeExecOptions, ComposeWaitOptions, ComposeServiceStatus, ComposeLogLine, ComposeLogsHandle } from "../runner/compose";
|
|
9
|
+
import type { ServiceHandle, StartServiceOptions } from "./service";
|
|
10
|
+
export type OrchestratorEvent = {
|
|
11
|
+
kind: "phase";
|
|
12
|
+
phase: string;
|
|
13
|
+
} | {
|
|
14
|
+
kind: "service";
|
|
15
|
+
service: string;
|
|
16
|
+
status: "starting" | "started" | "stopping" | "stopped";
|
|
17
|
+
} | {
|
|
18
|
+
kind: "hook";
|
|
19
|
+
hook: string;
|
|
20
|
+
output: HookOutput;
|
|
21
|
+
} | {
|
|
22
|
+
kind: "output";
|
|
23
|
+
line: OutputLine;
|
|
24
|
+
} | {
|
|
25
|
+
kind: "probe";
|
|
26
|
+
service: string;
|
|
27
|
+
status: "polling" | "ready" | "failed";
|
|
28
|
+
attempt?: number;
|
|
29
|
+
} | {
|
|
30
|
+
kind: "error";
|
|
31
|
+
message: string;
|
|
32
|
+
};
|
|
33
|
+
export type OrchestratorDeps = {
|
|
34
|
+
loadConfig: (configPath?: string) => Promise<WorkspaceConfig>;
|
|
35
|
+
loadPlugins: (declarations: Record<string, string>, context: PluginContext) => Promise<Map<string, Plugin>>;
|
|
36
|
+
buildDag: (config: WorkspaceConfig) => DagResult;
|
|
37
|
+
buildEndpointRegistry: (config: WorkspaceConfig) => EndpointRegistry;
|
|
38
|
+
generateCompose: (config: WorkspaceConfig, contributions?: ComposeContribution[]) => ComposeResult;
|
|
39
|
+
writeComposeFile: (yaml: string, workspaceDir?: string) => Promise<string>;
|
|
40
|
+
generateCaddyfile: (config: WorkspaceConfig) => CaddyfileResult;
|
|
41
|
+
writeCaddyfile: (content: string, workspaceDir?: string) => Promise<string>;
|
|
42
|
+
generateHostsBlock: (domains: string[]) => string;
|
|
43
|
+
applyHosts: (block: string) => Promise<void>;
|
|
44
|
+
removeHosts: () => Promise<void>;
|
|
45
|
+
composeUp: (options: ComposeExecOptions) => Promise<void>;
|
|
46
|
+
composeWait: (options: ComposeWaitOptions) => Promise<void>;
|
|
47
|
+
composeLogs: (options: ComposeExecOptions, onLog: (line: ComposeLogLine) => void) => ComposeLogsHandle;
|
|
48
|
+
discoverExtraComposeServices: (path: string, workspaceDir?: string) => Promise<string[]>;
|
|
49
|
+
composeDown: (options: ComposeExecOptions & {
|
|
50
|
+
clean?: boolean;
|
|
51
|
+
}) => Promise<void>;
|
|
52
|
+
composePs: (options: ComposeExecOptions) => Promise<ComposeServiceStatus[]>;
|
|
53
|
+
startService: (options: StartServiceOptions) => Promise<ServiceHandle>;
|
|
54
|
+
executeHook: (hookName: string, command: string, options: {
|
|
55
|
+
cwd: string;
|
|
56
|
+
env: Record<string, string>;
|
|
57
|
+
signal?: AbortSignal;
|
|
58
|
+
onOutput?: (output: HookOutput) => void;
|
|
59
|
+
}) => Promise<HookResult>;
|
|
60
|
+
trustCaddyCa: (containerName: string, workspaceDir: string) => Promise<void>;
|
|
61
|
+
readState: (workspaceDir?: string) => Promise<WorkspaceState | null>;
|
|
62
|
+
writeState: (state: WorkspaceState, workspaceDir?: string) => Promise<void>;
|
|
63
|
+
removeState: (workspaceDir?: string) => Promise<void>;
|
|
64
|
+
};
|
|
65
|
+
export type StartOptions = {
|
|
66
|
+
configPath?: string;
|
|
67
|
+
workspaceDir?: string;
|
|
68
|
+
serviceFilter?: string[];
|
|
69
|
+
modeOverride?: "dev" | "container";
|
|
70
|
+
signal?: AbortSignal;
|
|
71
|
+
onEvent?: (event: OrchestratorEvent) => void;
|
|
72
|
+
};
|
|
73
|
+
export type StartResult = {
|
|
74
|
+
handles: ServiceHandle[];
|
|
75
|
+
composeOptions: ComposeExecOptions;
|
|
76
|
+
config: WorkspaceConfig;
|
|
77
|
+
/** Handle for the long-running `docker compose logs -f` process.
|
|
78
|
+
* Caller should kill it during shutdown. */
|
|
79
|
+
logsHandle: {
|
|
80
|
+
kill: () => void;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export type StopOptions = {
|
|
84
|
+
workspaceDir?: string;
|
|
85
|
+
/** In-memory handles from a running workspace. When provided, stop uses these
|
|
86
|
+
* directly instead of hydrating from the on-disk state file. */
|
|
87
|
+
handles?: ServiceHandle[];
|
|
88
|
+
/** Remove volumes and orphan containers (docker compose down -v --remove-orphans). */
|
|
89
|
+
clean?: boolean;
|
|
90
|
+
signal?: AbortSignal;
|
|
91
|
+
onEvent?: (event: OrchestratorEvent) => void;
|
|
92
|
+
};
|
|
93
|
+
export type ServiceState = {
|
|
94
|
+
runner: "process" | "container" | "compose";
|
|
95
|
+
pid?: number;
|
|
96
|
+
containerId?: string;
|
|
97
|
+
};
|
|
98
|
+
export type WorkspaceState = {
|
|
99
|
+
workspaceName: string;
|
|
100
|
+
projectName: string;
|
|
101
|
+
fileArgs: string[];
|
|
102
|
+
workspaceDir: string;
|
|
103
|
+
services: Record<string, ServiceState>;
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/orchestrator/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC5F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,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,CAqCrD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a line-buffering function that accumulates chunks and emits
|
|
3
|
+
* complete lines (split on newline). Partial trailing content is held
|
|
4
|
+
* until the next chunk completes the line.
|
|
5
|
+
*/
|
|
6
|
+
export declare function createLineBuffer(onLine: (line: string) => void): (chunk: string) => void;
|
|
7
|
+
//# sourceMappingURL=line-buffer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-buffer.d.ts","sourceRoot":"","sources":["../../src/output/line-buffer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAWxF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Plugin, PluginContext } from "@lo1/sdk";
|
|
2
|
+
import { Lo1Error } from "../errors";
|
|
3
|
+
export declare class PluginError extends Lo1Error {
|
|
4
|
+
readonly pluginName?: string | undefined;
|
|
5
|
+
constructor(message: string, pluginName?: string | undefined);
|
|
6
|
+
}
|
|
7
|
+
export type ImportFn = (specifier: string) => Promise<{
|
|
8
|
+
default?: unknown;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function resolveSpecifier(specifier: string, workspaceDir: string): string;
|
|
11
|
+
export declare function loadPlugin(specifier: string, context: PluginContext, importFn?: ImportFn): Promise<Plugin>;
|
|
12
|
+
export declare function loadPlugins(declarations: Record<string, string>, context: PluginContext, importFn?: ImportFn): Promise<Map<string, Plugin>>;
|
|
13
|
+
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/plugin/loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAiB,MAAM,UAAU,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAIrC,qBAAa,WAAY,SAAQ,QAAQ;aAGrB,UAAU,CAAC,EAAE,MAAM;gBADnC,OAAO,EAAE,MAAM,EACC,UAAU,CAAC,EAAE,MAAM,YAAA;CAKtC;AAED,MAAM,MAAM,QAAQ,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAI7E,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAKhF;AAED,wBAAsB,UAAU,CAC9B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,aAAa,EACtB,QAAQ,GAAE,QAAwB,GACjC,OAAO,CAAC,MAAM,CAAC,CAuCjB;AAED,wBAAsB,WAAW,CAC/B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,OAAO,EAAE,aAAa,EACtB,QAAQ,GAAE,QAAwB,GACjC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAkB9B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { WorkspaceConfig } from "@lo1/sdk";
|
|
2
|
+
export type CaddyfileResult = {
|
|
3
|
+
content: string;
|
|
4
|
+
domains: string[];
|
|
5
|
+
};
|
|
6
|
+
export declare function generateCaddyfile(config: WorkspaceConfig): CaddyfileResult;
|
|
7
|
+
export declare function writeCaddyfile(content: string, workspaceDir?: string): Promise<string>;
|
|
8
|
+
//# sourceMappingURL=caddyfile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"caddyfile.d.ts","sourceRoot":"","sources":["../../src/proxy/caddyfile.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMhD,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAQF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CAoB1E;AA2DD,wBAAsB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,SAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAOzF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WorkspaceConfig } from "@lo1/sdk";
|
|
2
|
+
/**
|
|
3
|
+
* Collects all proxy domains from workspace config.
|
|
4
|
+
* Used by Caddyfile generation, hosts management, and TLS setup.
|
|
5
|
+
*/
|
|
6
|
+
export declare function collectDomains(config: WorkspaceConfig): string[];
|
|
7
|
+
//# sourceMappingURL=domains.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domains.d.ts","sourceRoot":"","sources":["../../src/proxy/domains.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,EAAE,CAoBhE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Lo1Error } from "../errors";
|
|
2
|
+
export declare class ReadinessProbeError extends Lo1Error {
|
|
3
|
+
constructor(service: string, url: string, reason: string);
|
|
4
|
+
}
|
|
5
|
+
export type ProbeOptions = {
|
|
6
|
+
url: string;
|
|
7
|
+
serviceName: string;
|
|
8
|
+
timeoutMs?: number;
|
|
9
|
+
intervalMs?: number;
|
|
10
|
+
backoffMultiplier?: number;
|
|
11
|
+
maxIntervalMs?: number;
|
|
12
|
+
signal?: AbortSignal;
|
|
13
|
+
onAttempt?: (attempt: number, status?: number) => void;
|
|
14
|
+
};
|
|
15
|
+
export type FetchFn = (url: string, init?: {
|
|
16
|
+
signal?: AbortSignal;
|
|
17
|
+
}) => Promise<Response>;
|
|
18
|
+
export declare function waitForReady(options: ProbeOptions, fetchFn?: FetchFn): Promise<void>;
|
|
19
|
+
//# sourceMappingURL=probe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probe.d.ts","sourceRoot":"","sources":["../../src/readiness/probe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAKrC,qBAAa,mBAAoB,SAAQ,QAAQ;gBACnC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAOzD;AAOD,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,WAAW,CAAA;CAAE,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE1F,wBAAsB,YAAY,CAChC,OAAO,EAAE,YAAY,EACrB,OAAO,GAAE,OAA0B,GAClC,OAAO,CAAC,IAAI,CAAC,CA8Cf"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { WorkspaceConfig } from "@lo1/sdk";
|
|
2
|
+
export type ExecFn = (cmd: string, args: string[], options?: {
|
|
3
|
+
cwd?: string;
|
|
4
|
+
}) => Promise<{
|
|
5
|
+
stdout: string;
|
|
6
|
+
stderr: string;
|
|
7
|
+
}>;
|
|
8
|
+
export type CloneResult = {
|
|
9
|
+
name: string;
|
|
10
|
+
path: string;
|
|
11
|
+
cloned: boolean;
|
|
12
|
+
error?: Error;
|
|
13
|
+
};
|
|
14
|
+
export type InitReposResult = {
|
|
15
|
+
results: CloneResult[];
|
|
16
|
+
clonedCount: number;
|
|
17
|
+
skippedCount: number;
|
|
18
|
+
failedCount: number;
|
|
19
|
+
};
|
|
20
|
+
export declare function initRepositories(config: WorkspaceConfig, options?: {
|
|
21
|
+
cwd?: string;
|
|
22
|
+
failFast?: boolean;
|
|
23
|
+
}, exec?: ExecFn): Promise<InitReposResult>;
|
|
24
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/repos/init.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIhD,MAAM,MAAM,MAAM,GAAG,CACnB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,KACvB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEjD,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAWF,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,EAC9C,IAAI,GAAE,MAAoB,GACzB,OAAO,CAAC,eAAe,CAAC,CAwC1B"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { EventEmitter } from "node:events";
|
|
2
|
+
import { Lo1Error } from "../errors";
|
|
3
|
+
export declare class ComposeExecError extends Lo1Error {
|
|
4
|
+
readonly stderr?: string | undefined;
|
|
5
|
+
constructor(message: string, stderr?: string | undefined);
|
|
6
|
+
}
|
|
7
|
+
export type ExecFn = (cmd: string, args: string[], options?: {
|
|
8
|
+
cwd?: string;
|
|
9
|
+
signal?: AbortSignal;
|
|
10
|
+
}) => Promise<{
|
|
11
|
+
stdout: string;
|
|
12
|
+
stderr: string;
|
|
13
|
+
}>;
|
|
14
|
+
export type ComposeOutputLine = {
|
|
15
|
+
stream: "stdout" | "stderr";
|
|
16
|
+
text: string;
|
|
17
|
+
};
|
|
18
|
+
export type ComposeExecOptions = {
|
|
19
|
+
projectName: string;
|
|
20
|
+
fileArgs: string[];
|
|
21
|
+
services?: string[];
|
|
22
|
+
cwd?: string;
|
|
23
|
+
signal?: AbortSignal;
|
|
24
|
+
onOutput?: (line: ComposeOutputLine) => void;
|
|
25
|
+
};
|
|
26
|
+
export type ComposeServiceStatus = {
|
|
27
|
+
Name: string;
|
|
28
|
+
Service: string;
|
|
29
|
+
State: string;
|
|
30
|
+
Health: string;
|
|
31
|
+
ExitCode: number;
|
|
32
|
+
};
|
|
33
|
+
export type ComposeLogLine = {
|
|
34
|
+
service: string;
|
|
35
|
+
stream: "stdout" | "stderr";
|
|
36
|
+
text: string;
|
|
37
|
+
};
|
|
38
|
+
export type ComposeLogsHandle = {
|
|
39
|
+
kill: () => void;
|
|
40
|
+
};
|
|
41
|
+
/** Minimal subset of ChildProcess used by compose runners. */
|
|
42
|
+
export type SpawnedChild = EventEmitter & {
|
|
43
|
+
stdout: EventEmitter | null;
|
|
44
|
+
stderr: EventEmitter | null;
|
|
45
|
+
kill(signal?: NodeJS.Signals | number): unknown;
|
|
46
|
+
};
|
|
47
|
+
export type ComposeSpawnFn = (cmd: string, args: string[], options: {
|
|
48
|
+
cwd?: string;
|
|
49
|
+
stdio: ["ignore", "pipe", "pipe"];
|
|
50
|
+
}) => SpawnedChild;
|
|
51
|
+
export declare function composeUp(options: ComposeExecOptions, spawnFn?: ComposeSpawnFn): Promise<void>;
|
|
52
|
+
export declare function composeLogs(options: ComposeExecOptions, onLog: (line: ComposeLogLine) => void, spawnFn?: ComposeSpawnFn): ComposeLogsHandle;
|
|
53
|
+
export type ComposeWaitOptions = {
|
|
54
|
+
projectName: string;
|
|
55
|
+
fileArgs: string[];
|
|
56
|
+
services: string[];
|
|
57
|
+
cwd?: string;
|
|
58
|
+
signal?: AbortSignal;
|
|
59
|
+
pollInterval?: number;
|
|
60
|
+
timeout?: number;
|
|
61
|
+
/** Services that must exit (code 0) before being considered ready.
|
|
62
|
+
* Typically init-task containers like migrators or seed scripts. */
|
|
63
|
+
waitForExit?: string[];
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Polls `docker compose ps` until all target services reach a terminal state:
|
|
67
|
+
* - Long-running services: "running" with health "healthy" or no healthcheck
|
|
68
|
+
* - Init-task services (in `waitForExit`): must reach "exited" with code 0
|
|
69
|
+
* Throws on unhealthy services, non-zero exit codes, or timeout.
|
|
70
|
+
*/
|
|
71
|
+
export declare function composeWait(options: ComposeWaitOptions, exec?: ExecFn): Promise<void>;
|
|
72
|
+
export declare function composeDown(options: ComposeExecOptions & {
|
|
73
|
+
clean?: boolean;
|
|
74
|
+
}, exec?: ExecFn): Promise<void>;
|
|
75
|
+
export declare function composePs(options: ComposeExecOptions, exec?: ExecFn): Promise<ComposeServiceStatus[]>;
|
|
76
|
+
//# sourceMappingURL=compose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src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B,CAAC;AAEF;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,kBAAkB,EAC3B,IAAI,GAAE,MAAoB,GACzB,OAAO,CAAC,IAAI,CAAC,CAqEf;AAED,wBAAsB,WAAW,CAC/B,OAAO,EAAE,kBAAkB,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,EACjD,IAAI,GAAE,MAAoB,GACzB,OAAO,CAAC,IAAI,CAAC,CAgBf;AAED,wBAAsB,SAAS,CAC7B,OAAO,EAAE,kBAAkB,EAC3B,IAAI,GAAE,MAAoB,GACzB,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAsBjC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ChildProcess, type StdioOptions } from "node:child_process";
|
|
2
|
+
import type { ContainerConfig } from "@lo1/sdk";
|
|
3
|
+
import type { OutputLine } from "./process";
|
|
4
|
+
import { Lo1Error } from "../errors";
|
|
5
|
+
export declare class ContainerRunnerError extends Lo1Error {
|
|
6
|
+
constructor(message: string);
|
|
7
|
+
}
|
|
8
|
+
export type ContainerRunnerOptions = {
|
|
9
|
+
workspaceName: string;
|
|
10
|
+
serviceName: string;
|
|
11
|
+
containerConfig: ContainerConfig;
|
|
12
|
+
networkName: string;
|
|
13
|
+
env: Record<string, string>;
|
|
14
|
+
onOutput?: (line: OutputLine) => void;
|
|
15
|
+
};
|
|
16
|
+
export type ContainerHandle = {
|
|
17
|
+
serviceName: string;
|
|
18
|
+
containerId: string;
|
|
19
|
+
readonly running: boolean;
|
|
20
|
+
stop(timeoutMs?: number): Promise<void>;
|
|
21
|
+
readonly exitPromise: Promise<number | null>;
|
|
22
|
+
};
|
|
23
|
+
export type ExecFn = (cmd: string, args: string[], options?: {
|
|
24
|
+
cwd?: string;
|
|
25
|
+
}) => Promise<{
|
|
26
|
+
stdout: string;
|
|
27
|
+
stderr: string;
|
|
28
|
+
}>;
|
|
29
|
+
export type LogSpawnFn = (cmd: string, args: string[], options?: {
|
|
30
|
+
stdio?: StdioOptions;
|
|
31
|
+
}) => ChildProcess;
|
|
32
|
+
export declare function startContainer(options: ContainerRunnerOptions, exec?: ExecFn, logSpawn?: LogSpawnFn): Promise<ContainerHandle>;
|
|
33
|
+
//# sourceMappingURL=container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../src/runner/container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE3F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAMrC,qBAAa,oBAAqB,SAAQ,QAAQ;gBACpC,OAAO,EAAE,MAAM;CAI5B;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,eAAe,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,CACnB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,KACvB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEjD,MAAM,MAAM,UAAU,GAAG,CACvB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,YAAY,CAAA;CAAE,KAC/B,YAAY,CAAC;AAmClB,wBAAsB,cAAc,CAClC,OAAO,EAAE,sBAAsB,EAC/B,IAAI,GAAE,MAAoB,EAC1B,QAAQ,GAAE,UAA4B,GACrC,OAAO,CAAC,eAAe,CAAC,CAsF1B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ChildProcess, type StdioOptions } from "node:child_process";
|
|
2
|
+
import { Lo1Error } from "../errors";
|
|
3
|
+
export declare class ProcessRunnerError extends Lo1Error {
|
|
4
|
+
constructor(message: string);
|
|
5
|
+
}
|
|
6
|
+
export type OutputLine = {
|
|
7
|
+
service: string;
|
|
8
|
+
stream: "stdout" | "stderr";
|
|
9
|
+
text: string;
|
|
10
|
+
timestamp: Date;
|
|
11
|
+
};
|
|
12
|
+
export type ProcessRunnerOptions = {
|
|
13
|
+
serviceName: string;
|
|
14
|
+
command: string;
|
|
15
|
+
cwd: string;
|
|
16
|
+
env: Record<string, string>;
|
|
17
|
+
onOutput?: (line: OutputLine) => void;
|
|
18
|
+
};
|
|
19
|
+
export type ProcessHandle = {
|
|
20
|
+
serviceName: string;
|
|
21
|
+
readonly pid: number | undefined;
|
|
22
|
+
readonly running: boolean;
|
|
23
|
+
stop(timeoutMs?: number): Promise<number | null>;
|
|
24
|
+
readonly exitPromise: Promise<number | null>;
|
|
25
|
+
};
|
|
26
|
+
export type SpawnFn = (cmd: string, args: string[], options: {
|
|
27
|
+
cwd: string;
|
|
28
|
+
env: Record<string, string>;
|
|
29
|
+
stdio: StdioOptions;
|
|
30
|
+
}) => ChildProcess;
|
|
31
|
+
export declare function startProcess(options: ProcessRunnerOptions, spawnFn?: SpawnFn): ProcessHandle;
|
|
32
|
+
//# sourceMappingURL=process.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../../src/runner/process.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGjF,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAIrC,qBAAa,kBAAmB,SAAQ,QAAQ;gBAClC,OAAO,EAAE,MAAM;CAI5B;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACjD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,CACpB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,KAAK,EAAE,YAAY,CAAA;CAAE,KACvE,YAAY,CAAC;AAmBlB,wBAAgB,YAAY,CAC1B,OAAO,EAAE,oBAAoB,EAC7B,OAAO,GAAE,OAAsB,GAC9B,aAAa,CAiFf"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Lo1Error } from "../errors";
|
|
2
|
+
export type ExecFn = (cmd: string, args: string[]) => Promise<{
|
|
3
|
+
stdout: string;
|
|
4
|
+
stderr: string;
|
|
5
|
+
}>;
|
|
6
|
+
export type TlsDeps = {
|
|
7
|
+
exec: ExecFn;
|
|
8
|
+
readFile: (path: string) => Promise<string | null>;
|
|
9
|
+
writeFile: (path: string, content: string) => Promise<void>;
|
|
10
|
+
mkdir: (path: string) => Promise<void>;
|
|
11
|
+
hash: (content: string) => string;
|
|
12
|
+
platform: string;
|
|
13
|
+
maxCertRetries: number;
|
|
14
|
+
certRetryIntervalMs: number;
|
|
15
|
+
};
|
|
16
|
+
export declare class TlsError extends Lo1Error {
|
|
17
|
+
constructor(message: string);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Extracts Caddy's root CA from the container, installs it in the host
|
|
21
|
+
* trust store, and caches a hash so subsequent runs are skipped when
|
|
22
|
+
* the cert hasn't changed.
|
|
23
|
+
*/
|
|
24
|
+
export declare function trustCaddyCa(containerName?: string, workspaceDir?: string, overrides?: Partial<TlsDeps>): Promise<void>;
|
|
25
|
+
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/tls/setup.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAMrC,MAAM,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAElG,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACnD,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,qBAAa,QAAS,SAAQ,QAAQ;gBACxB,OAAO,EAAE,MAAM;CAI5B;AAiCD;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,aAAa,SAAc,EAC3B,YAAY,SAAM,EAClB,SAAS,GAAE,OAAO,CAAC,OAAO,CAAM,GAC/B,OAAO,CAAC,IAAI,CAAC,CAqBf"}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lo1/cli",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "lo1 — Multi-service local dev environment",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"lo1": "./dist/lo1.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "bun build ./src/cli/index.ts --outfile ./dist/lo1.js --target node && bun x tsc --emitDeclarationOnly --outDir ./dist",
|
|
16
|
+
"typecheck": "tsc --noEmit",
|
|
17
|
+
"clean": "rm -rf dist",
|
|
18
|
+
"test": "bun test"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@lo1/sdk": "0.1.0",
|
|
22
|
+
"commander": "^13.0.0",
|
|
23
|
+
"debug": "^4.4.3",
|
|
24
|
+
"js-yaml": "^4.1.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/bun": "latest",
|
|
28
|
+
"@types/debug": "^4.1.12",
|
|
29
|
+
"@types/js-yaml": "^4.0.0"
|
|
30
|
+
}
|
|
31
|
+
}
|