@moinulmoin/eden 0.1.5 → 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/NOTICE +0 -31
- package/README.md +37 -109
- package/dist/eve-control-plane.d.ts +19 -0
- package/dist/eve-control-plane.js +345 -23
- package/dist/eve-packaging.d.ts +7 -0
- package/dist/eve-packaging.js +144 -14
- package/dist/eve-runtime-image.js +15 -13
- package/dist/eve.d.ts +17 -2
- package/dist/eve.js +60 -26
- package/dist/index.d.ts +4 -166
- package/dist/index.js +48 -6700
- package/package.json +3 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env -S node --
|
|
2
|
-
import type { EdenCompilerResult } from "@moinulmoin/eden-compiler";
|
|
3
2
|
import { type EveCliExecutionRequest } from "./eve.js";
|
|
4
3
|
import { type EvePreflightOptions } from "./eve-control-plane.js";
|
|
5
|
-
export { EVE_CLI_COMMANDS, EVE_USAGE, EveCliError, eveHelpText, parseEveArguments, } from "./eve.js";
|
|
4
|
+
export { EVE_CLI_COMMANDS, EVE_USAGE, EveCliError, deriveEveTargetName, eveHelpText, parseEveArguments, } from "./eve.js";
|
|
6
5
|
export { EvePackagingError, buildEveProjectSnapshot, createDockerEveProjectBuilder, revalidateEveProjectCandidateInputs, } from "./eve-packaging.js";
|
|
7
6
|
export { EVE_RESERVED_HOST_VARIABLES, EVE_START_COMMAND, EveRuntimeConfig, EveRuntimeConfigError, loadEveRuntimeConfig, parseEveRuntimeConfig, prepareEveRuntimeInjection, readEveRuntimeConfig, redactEveRuntimeOutput, } from "./eve-runtime-config.js";
|
|
8
7
|
export type { EveReservedHostVariable, EveRuntimeConfigErrorCode, EveRuntimeInjection, EveRuntimeInjectionMode, EveRuntimeInjectionOptions, EveRuntimeInputIdentity, EveRuntimeProtectedPutRequest, EveRuntimeProtectedPutResult, EveRuntimeProtectedStore, EveStartProcessRequest, RedactedRuntimeConfigSeam, } from "./eve-runtime-config.js";
|
|
@@ -12,139 +11,15 @@ export type { EveNodeImage, EvePackagingCheck, EvePackagingCode, EveProjectBuild
|
|
|
12
11
|
export type { EveHostRequirements, EveRuntimeClosure, EveRuntimeClosureFile, EveRuntimeCleanup, EveRuntimeImage, EveRuntimeImageDiscardRequest, EveRuntimeImageMetadata, EveRuntimeImageRequest, EveRuntimeImageResult, EveRuntimeNativeModule, EveRuntimeStatus, } from "./eve-runtime-image.js";
|
|
13
12
|
export { DEFAULT_EVE_HOST_REQUIREMENTS, DEFAULT_EVE_NODE_IMAGE, runEveControlPlane, runEveDestroy, } from "./eve-control-plane.js";
|
|
14
13
|
export type { EveCloudflareReadRequest, EveCloudflareReadResult, EveCloudflareReadRunner, EveCloudflareTargetState, EveContainerDeleteRunner, EveDeploymentCompensationRequest, EveDeploymentCompensationRunner, EveDeploymentHealthRequest, EveDeploymentHealthResult, EveDeploymentHealthRunner, EveDeploymentIdentity, EveDeploymentIdentityProof, EveDeploymentMetadata, EveDeploymentPublicationRequest, EveDeploymentPublicationResult, EveDeploymentPublicationRunner, EveDeploymentStatus, EveDestroyCloudflareReadRequest, EveDestroyCloudflareReadRunner, EveDestroyOutcome, EveDestroyTargetRead, EveImagePublicationRequest, EveImagePublicationResult, EveImagePublicationRunner, EvePreflightCandidate, EvePreflightCheck, EvePreflightCheckStatus, EvePreflightOptions, EvePreflightResult, EvePreflightRuntimeEvidence, EvePreflightRuntimeRunner, EvePreflightRuntimeRunnerRequest, EveRuntimeConfigLoader, EveRuntimeImageDiscardRunner, EveWorkerDeleteRunner, } from "./eve-control-plane.js";
|
|
15
|
-
export declare const EDEN_CLI_COMMANDS: readonly ["preflight", "deploy", "destroy"
|
|
14
|
+
export declare const EDEN_CLI_COMMANDS: readonly ["preflight", "deploy", "destroy"];
|
|
16
15
|
export type EdenCliCommand = (typeof EDEN_CLI_COMMANDS)[number];
|
|
17
|
-
export declare const EDEN_AGENT_COMMANDS: readonly ["init", "dev", "build", "deploy"];
|
|
18
|
-
export type EdenAgentCommand = (typeof EDEN_AGENT_COMMANDS)[number];
|
|
19
|
-
export declare const EDEN_LOCAL_HOST: "127.0.0.1";
|
|
20
|
-
export declare const EDEN_LOCAL_PORT: 8797;
|
|
21
|
-
export declare const EDEN_LOCAL_INSPECTOR_HOST: "127.0.0.1";
|
|
22
|
-
export declare const EDEN_LOCAL_INSPECTOR_PORT: 9297;
|
|
23
|
-
export interface EdenCliDryRunRequest {
|
|
24
|
-
readonly cwd: string;
|
|
25
|
-
readonly configPath: string;
|
|
26
|
-
readonly originalConfigPath: string;
|
|
27
|
-
readonly args: readonly string[];
|
|
28
|
-
}
|
|
29
|
-
export interface EdenCliDryRunResult {
|
|
30
|
-
readonly exitCode: number;
|
|
31
|
-
readonly stdout: string;
|
|
32
|
-
readonly stderr: string;
|
|
33
|
-
}
|
|
34
|
-
export interface EdenCliDryRunHandle {
|
|
35
|
-
readonly process: EdenCliProcess;
|
|
36
|
-
readonly result: Promise<EdenCliDryRunResult>;
|
|
37
|
-
}
|
|
38
|
-
export type EdenCliRemoteCommandKind = "secret-put" | "secret-delete" | "deploy" | "delete";
|
|
39
|
-
export interface EdenCliRemoteCommandRequest {
|
|
40
|
-
readonly kind: EdenCliRemoteCommandKind;
|
|
41
|
-
readonly cwd: string;
|
|
42
|
-
readonly args: readonly string[];
|
|
43
|
-
readonly stdin?: string;
|
|
44
|
-
}
|
|
45
|
-
export interface EdenCliRemoteCommandResult {
|
|
46
|
-
readonly exitCode: number;
|
|
47
|
-
readonly stdout: string;
|
|
48
|
-
readonly stderr: string;
|
|
49
|
-
}
|
|
50
|
-
export interface EdenCliRemoteCommandHandle {
|
|
51
|
-
readonly process: EdenCliProcess;
|
|
52
|
-
readonly result: Promise<EdenCliRemoteCommandResult>;
|
|
53
|
-
}
|
|
54
|
-
export type EdenCliRemoteCommandReturn = EdenCliRemoteCommandResult | EdenCliRemoteCommandHandle | Promise<EdenCliRemoteCommandResult | EdenCliRemoteCommandHandle>;
|
|
55
|
-
export interface EdenCliRemoteValidationRequest {
|
|
56
|
-
readonly cwd: string;
|
|
57
|
-
readonly environment: "preview" | "production";
|
|
58
|
-
readonly workerName: string;
|
|
59
|
-
readonly url: string;
|
|
60
|
-
readonly expectedGeneration: {
|
|
61
|
-
readonly generationId: string;
|
|
62
|
-
readonly bundleDigest: string;
|
|
63
|
-
readonly manifestVersion: string;
|
|
64
|
-
readonly runtimeVersion: string;
|
|
65
|
-
readonly agentBundleVersion: string;
|
|
66
|
-
readonly protocolVersion: string;
|
|
67
|
-
readonly schemaVersion: number;
|
|
68
|
-
readonly toolNames: readonly string[];
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
export interface EdenCliRemoteValidationResult {
|
|
72
|
-
readonly ok: boolean;
|
|
73
|
-
readonly code?: string;
|
|
74
|
-
readonly message?: string;
|
|
75
|
-
}
|
|
76
|
-
export interface EdenCliProcessRequest {
|
|
77
|
-
readonly command: string;
|
|
78
|
-
/**
|
|
79
|
-
* Arguments needed to invoke the executable directly. The package shim is a
|
|
80
|
-
* shell script on POSIX and discards custom argv0 markers, so the default
|
|
81
|
-
* runner supplies the real Node entrypoint here.
|
|
82
|
-
*/
|
|
83
|
-
readonly commandArgs?: readonly string[];
|
|
84
|
-
readonly args: readonly string[];
|
|
85
|
-
readonly cwd: string;
|
|
86
|
-
readonly env: Readonly<Record<string, string | undefined>>;
|
|
87
|
-
readonly processIdentity?: string;
|
|
88
|
-
readonly readiness?: readonly {
|
|
89
|
-
readonly host: string;
|
|
90
|
-
readonly port: number;
|
|
91
|
-
}[];
|
|
92
|
-
}
|
|
93
|
-
export type EdenCliProcessIdentity = {
|
|
94
|
-
readonly marker: string;
|
|
95
|
-
readonly pid: number;
|
|
96
|
-
readonly pgid: number;
|
|
97
|
-
readonly lstart: string;
|
|
98
|
-
};
|
|
99
|
-
export interface EdenCliProcessExit {
|
|
100
|
-
readonly exitCode: number | null;
|
|
101
|
-
readonly signal: NodeJS.Signals | null;
|
|
102
|
-
}
|
|
103
|
-
export interface EdenCliProcess {
|
|
104
|
-
readonly pid: number;
|
|
105
|
-
/**
|
|
106
|
-
* A process-start identity captured by the process runner immediately after
|
|
107
|
-
* spawn. PID alone is never sufficient to authorize cleanup.
|
|
108
|
-
*/
|
|
109
|
-
readonly identity?: EdenCliProcessIdentity | Promise<EdenCliProcessIdentity | undefined>;
|
|
110
|
-
readonly startIdentity?: string | Promise<string | undefined>;
|
|
111
|
-
readonly exited: Promise<EdenCliProcessExit>;
|
|
112
|
-
readonly ready?: Promise<void>;
|
|
113
|
-
terminate(signal?: NodeJS.Signals): Promise<void>;
|
|
114
|
-
}
|
|
115
|
-
export interface EdenCliProcessRunner {
|
|
116
|
-
spawn(request: EdenCliProcessRequest): EdenCliProcess;
|
|
117
|
-
}
|
|
118
|
-
export interface EdenCliBuildProjectRequest {
|
|
119
|
-
readonly projectRoot: string;
|
|
120
|
-
readonly outputDirectory: string;
|
|
121
|
-
}
|
|
122
|
-
export type EdenCliBuildProjectRunner = (request: EdenCliBuildProjectRequest) => Promise<EdenCompilerResult>;
|
|
123
|
-
export interface EdenCliRuntimeGeneration {
|
|
124
|
-
readonly generationId: string;
|
|
125
|
-
readonly bundleDigest: string;
|
|
126
|
-
readonly manifestVersion: string;
|
|
127
|
-
readonly runtimeVersion: string;
|
|
128
|
-
readonly agentBundleVersion: string;
|
|
129
|
-
readonly protocolVersion: string;
|
|
130
|
-
readonly schemaVersion: number;
|
|
131
|
-
readonly toolNames: readonly string[];
|
|
132
|
-
}
|
|
133
|
-
export interface EdenCliRuntimeGenerationProofRequest {
|
|
134
|
-
readonly process: EdenCliProcess | undefined;
|
|
135
|
-
readonly generation: EdenCliRuntimeGeneration;
|
|
136
|
-
readonly signal: AbortSignal;
|
|
137
|
-
}
|
|
138
|
-
export type EdenCliRuntimeGenerationProof = "authenticated-fetch" | ((request: EdenCliRuntimeGenerationProofRequest) => boolean | Promise<boolean>);
|
|
139
|
-
export type EdenRuntimePublicationBoundary = "before-runtime-entry-publish" | "after-runtime-entry-publish" | "before-runtime-config-publish" | "after-runtime-config-publish" | "after-runtime-ready" | "before-runtime-rollback" | "after-runtime-rollback";
|
|
140
|
-
export type EdenDeploymentBoundary = "before-compatibility-dry-run" | "before-remote-runner-invocation" | "after-remote-runner-preflight" | "after-remote-final-read" | "after-compatibility-dry-run" | "before-secret-provision" | "after-secret-provision" | "before-deploy" | "after-deploy" | "before-remote-validation" | "after-remote-validation";
|
|
141
16
|
export interface EdenCliRunOptions {
|
|
142
17
|
readonly cwd?: string;
|
|
143
18
|
readonly stdout?: (line: string) => void;
|
|
144
19
|
readonly stderr?: (line: string) => void;
|
|
145
20
|
/**
|
|
146
|
-
* Eve execution is a separate control-plane seam.
|
|
147
|
-
*
|
|
21
|
+
* Eve execution is a separate control-plane seam. The default path fails
|
|
22
|
+
* closed.
|
|
148
23
|
*/
|
|
149
24
|
readonly eveRunner?: (request: EveCliExecutionRequest) => void | Promise<void>;
|
|
150
25
|
/**
|
|
@@ -152,44 +27,7 @@ export interface EdenCliRunOptions {
|
|
|
152
27
|
* Runtime values and remote-provider mutations never cross this boundary.
|
|
153
28
|
*/
|
|
154
29
|
readonly eveControlPlane?: EvePreflightOptions;
|
|
155
|
-
readonly initPublicationHook?: (boundary: EdenInitPublicationBoundary, target?: string) => void | Promise<void>;
|
|
156
|
-
readonly buildPublicationHook?: (boundary: EdenBuildPublicationBoundary) => void | Promise<void>;
|
|
157
|
-
readonly dryRunRunner?: (request: EdenCliDryRunRequest) => EdenCliDryRunResult | EdenCliDryRunHandle | Promise<EdenCliDryRunResult>;
|
|
158
|
-
readonly processRunner?: EdenCliProcessRunner;
|
|
159
|
-
/**
|
|
160
|
-
* Internal finite-test override for the compiler invocation. The returned
|
|
161
|
-
* promise is still owned by the same cancellation/quiescence barrier as the
|
|
162
|
-
* production compiler call.
|
|
163
|
-
*/
|
|
164
|
-
readonly buildProjectRunner?: EdenCliBuildProjectRunner;
|
|
165
|
-
/**
|
|
166
|
-
* Internal finite-test override for the authenticated local runtime
|
|
167
|
-
* readiness probe. Production callers use the bounded default.
|
|
168
|
-
*/
|
|
169
|
-
readonly runtimeReadinessTimeoutMs?: number;
|
|
170
|
-
/**
|
|
171
|
-
* Internal lifecycle injection for finite callers that need to stop dev
|
|
172
|
-
* without emitting a process-global signal.
|
|
173
|
-
*/
|
|
174
|
-
readonly stopSignal?: AbortSignal;
|
|
175
|
-
/**
|
|
176
|
-
* An injected process runner must provide this explicit proof seam. The
|
|
177
|
-
* string selects Eden's bearer-authenticated /eden/v1/info probe; a callback
|
|
178
|
-
* may provide an equivalent authenticated proof for a finite fixture.
|
|
179
|
-
*/
|
|
180
|
-
readonly runtimeGenerationProof?: EdenCliRuntimeGenerationProof;
|
|
181
|
-
readonly runtimePublicationHook?: (boundary: EdenRuntimePublicationBoundary) => void | Promise<void>;
|
|
182
|
-
readonly deploymentBoundaryHook?: (boundary: EdenDeploymentBoundary) => void | Promise<void>;
|
|
183
|
-
readonly remoteCommandRunner?: (request: EdenCliRemoteCommandRequest) => EdenCliRemoteCommandReturn;
|
|
184
|
-
readonly remoteValidationRunner?: (request: EdenCliRemoteValidationRequest) => Promise<EdenCliRemoteValidationResult>;
|
|
185
|
-
readonly remoteBearerSecret?: string;
|
|
186
30
|
}
|
|
187
|
-
export type EdenInitPublicationBoundary = "after-lock-acquire" | "after-state-write" | "after-stage-write" | "after-target-validation" | "after-init-link" | "before-init-destination-recheck" | "before-init-cleanup" | "after-init-cleanup-observation" | "after-init-cleanup" | "before-init-link" | "before-target-publish" | "after-target-publish" | "before-complete";
|
|
188
|
-
export type EdenBuildPublicationBoundary = "before-canonical-prepare" | "after-canonical-prepare" | "before-generation-publish" | "after-generation-publish" | "before-current-promotion" | "after-current-promotion";
|
|
189
|
-
export declare function stopEdenDev(options?: {
|
|
190
|
-
readonly cwd?: string;
|
|
191
|
-
readonly projectRoot?: string;
|
|
192
|
-
}): Promise<number>;
|
|
193
31
|
export declare function runEdenCli(args: readonly string[], options?: EdenCliRunOptions): Promise<number>;
|
|
194
32
|
export declare function main(args?: readonly string[]): Promise<number>;
|
|
195
33
|
export declare function isEdenCliCommand(value: string): value is EdenCliCommand;
|