@moinulmoin/eden 0.1.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.
@@ -0,0 +1,261 @@
1
+ import type { EveRuntimeInputIdentity } from "./eve-runtime-config.js";
2
+ export type EvePackagingCode = "ROOT_INVALID" | "UNSUPPORTED_TOOLCHAIN" | "DEPENDENCY_AMBIGUITY" | "SOURCE_RACE" | "EVE_BUILD_FAILED" | "UNSUPPORTED_EVE_OUTPUT" | "RUNTIME_CLOSURE_INCOMPLETE" | "SECRET_EXCLUSION_FAILED" | "DOCKER_PLATFORM_BLOCKED" | "UNSUPPORTED_HOST_REQUIREMENT" | "EVE_HEALTH_FAILED" | "CLEANUP_UNVERIFIED" | "PACKAGE_VERIFICATION_FAILED";
3
+ export interface EveRuntimeConfigExclusion {
4
+ /**
5
+ * This path is opaque. The packaging worker only uses its lexical identity
6
+ * to exclude it from a copied snapshot and never opens or stats it.
7
+ */
8
+ readonly envFilePath?: string;
9
+ /**
10
+ * The deployment-safety seam owns this identity. It may represent the
11
+ * explicit env file and parsed runtime configuration without exposing values.
12
+ */
13
+ readonly inputIdentity?: string | EveRuntimeInputIdentity;
14
+ readonly readInputIdentity?: () => string | EveRuntimeInputIdentity | Promise<string | EveRuntimeInputIdentity>;
15
+ readonly variableNames?: readonly string[];
16
+ readonly redactionRegistered?: boolean;
17
+ }
18
+ export interface EveNodeImage {
19
+ readonly reference: string;
20
+ readonly digest: string;
21
+ }
22
+ export interface EveProjectBuilderRequest {
23
+ readonly generationRoot: string;
24
+ readonly snapshotRoot: string;
25
+ readonly inputManifestPath: string;
26
+ readonly dockerfilePath: string | undefined;
27
+ readonly packageManagerVersion: string;
28
+ readonly installCommand: readonly [
29
+ "corepack",
30
+ "pnpm",
31
+ "install",
32
+ "--frozen-lockfile"
33
+ ];
34
+ readonly buildCommand: readonly ["./node_modules/.bin/eve", "build"];
35
+ readonly platform: "linux/amd64";
36
+ readonly sourceDigest: string;
37
+ /**
38
+ * The builder must execute only from this Eden-owned immutable snapshot.
39
+ * It is metadata for builders and test seams, not a permission to read the
40
+ * authored project root.
41
+ */
42
+ readonly buildContext: "immutable-snapshot";
43
+ }
44
+ export interface EveProjectBuilderResult {
45
+ readonly eveVersion?: string;
46
+ readonly imageId?: string;
47
+ readonly imagePlatform?: "linux/amd64";
48
+ readonly imageReference?: string;
49
+ readonly imageDigest?: string;
50
+ }
51
+ export interface EveProjectBuilder {
52
+ readonly nodeImage?: EveNodeImage;
53
+ build(request: EveProjectBuilderRequest): Promise<EveProjectBuilderResult>;
54
+ discard?(result: EveProjectBuilderResult): Promise<void>;
55
+ }
56
+ export interface EveProjectSnapshotOptions {
57
+ readonly projectRoot: string;
58
+ /**
59
+ * This must identify one new Eden-owned generation directory. The function
60
+ * refuses an existing directory and never writes to a prior generation.
61
+ */
62
+ readonly artifactRoot: string;
63
+ readonly builder: EveProjectBuilder;
64
+ readonly runtimeConfig?: EveRuntimeConfigExclusion;
65
+ readonly nodeImage?: EveNodeImage;
66
+ }
67
+ export interface EveProjectFile {
68
+ readonly relativePath: string;
69
+ readonly sha256: string;
70
+ readonly byteLength: number;
71
+ readonly mode: number;
72
+ }
73
+ export interface EveProjectInputManifest {
74
+ readonly version: 1;
75
+ readonly requestedRoot: string;
76
+ readonly canonicalRoot: string;
77
+ readonly projectId: string;
78
+ readonly packageManager: "pnpm";
79
+ readonly packageManagerVersion: string;
80
+ readonly packageJsonSha256: string;
81
+ readonly lockfileSha256: string;
82
+ readonly sourceDigest: string;
83
+ readonly files: readonly EveProjectFile[];
84
+ readonly excludedRelativePaths: readonly string[];
85
+ readonly runtimeConfigInputIdentity?: string;
86
+ readonly runtimeVariableNames: readonly string[];
87
+ }
88
+ export interface EveProjectSnapshot {
89
+ readonly generationId: string;
90
+ readonly path: string;
91
+ readonly sha256: string;
92
+ readonly includedFileCount: number;
93
+ readonly excludedCategories: readonly string[];
94
+ readonly sourceRaceChecked: boolean;
95
+ }
96
+ export interface EveProjectOutput {
97
+ readonly entrypointPath: ".output/server/index.mjs";
98
+ readonly sha256: string;
99
+ readonly regularFile: true;
100
+ readonly symlinkEscape: false;
101
+ readonly outputDigest: string;
102
+ readonly fileCount: number;
103
+ }
104
+ export interface EveProjectBuildCandidate {
105
+ readonly generationId: string;
106
+ readonly generationRoot: string;
107
+ readonly snapshotRoot: string;
108
+ readonly inputManifestPath: string;
109
+ readonly packageManager: "pnpm";
110
+ readonly packageManagerVersion: string;
111
+ readonly installCommand: readonly [
112
+ "corepack",
113
+ "pnpm",
114
+ "install",
115
+ "--frozen-lockfile"
116
+ ];
117
+ readonly buildCommand: readonly ["./node_modules/.bin/eve", "build"];
118
+ readonly eveExecutable: "node_modules/.bin/eve";
119
+ readonly eveVersion: string;
120
+ readonly packageJsonSha256: string;
121
+ readonly lockfileSha256: string;
122
+ readonly sourceDigest: string;
123
+ readonly snapshotDigest: string;
124
+ readonly generatedOutput: EveProjectOutput;
125
+ readonly runtimeConfigInputIdentity?: string;
126
+ readonly runtimeVariableNames: readonly string[];
127
+ }
128
+ export interface EveProjectToolchain {
129
+ readonly nodeVersion: "24.17.0";
130
+ readonly packageManager: "pnpm";
131
+ readonly packageManagerVersion: string;
132
+ readonly installCommand: readonly [
133
+ "corepack",
134
+ "pnpm",
135
+ "install",
136
+ "--frozen-lockfile"
137
+ ];
138
+ readonly buildCommand: readonly ["./node_modules/.bin/eve", "build"];
139
+ readonly startCommand: readonly [
140
+ "./node_modules/.bin/eve",
141
+ "start",
142
+ "--host",
143
+ "0.0.0.0",
144
+ "--port",
145
+ "8080"
146
+ ];
147
+ readonly eveExecutable: "node_modules/.bin/eve";
148
+ readonly eveVersion: string;
149
+ readonly lockfileUnchanged: true;
150
+ readonly nativeBuildPlatform: "linux/amd64";
151
+ }
152
+ export interface EveProjectImage {
153
+ readonly dockerfilePath: string | null;
154
+ readonly platform: "linux/amd64";
155
+ readonly builderImage: string | null;
156
+ readonly runtimeImage: string | null;
157
+ readonly imageId: string | null;
158
+ readonly imageReference: string | null;
159
+ readonly imageDigest: string | null;
160
+ readonly launchCommand: readonly [
161
+ "./node_modules/.bin/eve",
162
+ "start",
163
+ "--host",
164
+ "0.0.0.0",
165
+ "--port",
166
+ "8080"
167
+ ];
168
+ readonly workingDirectory: "/app";
169
+ readonly hostEnvironment: {
170
+ readonly HOST: "0.0.0.0";
171
+ readonly NITRO_HOST: "0.0.0.0";
172
+ readonly PORT: "8080";
173
+ readonly NITRO_PORT: "8080";
174
+ readonly NODE_ENV: "production";
175
+ };
176
+ readonly generatedOutput: EveProjectOutput | null;
177
+ }
178
+ export interface EveProjectRuntime {
179
+ readonly listenHost: "0.0.0.0";
180
+ readonly listenPort: 8080;
181
+ readonly healthMethod: "GET";
182
+ readonly healthPath: "/eve/v1/health";
183
+ readonly healthStatus: "not-run";
184
+ readonly healthVerified: false;
185
+ readonly durableLocalFilesystemClaim: false;
186
+ }
187
+ export interface EveProjectSecretsEvidence {
188
+ readonly runtimeVariableNames: readonly string[];
189
+ readonly valuesRecorded: false;
190
+ readonly excludedFromSnapshot: true;
191
+ readonly excludedFromBuildEnvironment: true;
192
+ readonly excludedFromDockerContext: true;
193
+ readonly excludedFromImage: true;
194
+ readonly excludedFromHistory: true;
195
+ readonly excludedFromManifestsAndLogs: true;
196
+ readonly redactionRegisteredBeforeChildren: boolean;
197
+ }
198
+ export interface EvePackagingCheck {
199
+ readonly id: string;
200
+ readonly status: "pass" | "blocked";
201
+ readonly subject: string;
202
+ readonly reason: string;
203
+ readonly remediation: string | null;
204
+ }
205
+ export interface EveProjectPackagingResult {
206
+ readonly schemaVersion: 1;
207
+ readonly worker: "eve-packaging-worker";
208
+ readonly operation: "local-package";
209
+ readonly status: "ready" | "blocked" | "failed";
210
+ readonly returnCode: EvePackagingCode | "EVE_PACKAGE_READY";
211
+ readonly deployable: boolean;
212
+ readonly project: {
213
+ readonly requestedRoot: string;
214
+ readonly canonicalRoot: string;
215
+ readonly projectId: string;
216
+ readonly packageJson: {
217
+ readonly path: "package.json";
218
+ readonly sha256: string;
219
+ };
220
+ readonly lockfile: {
221
+ readonly path: "pnpm-lock.yaml";
222
+ readonly sha256: string;
223
+ };
224
+ readonly sourceDigest: string;
225
+ readonly inputManifestPath: string;
226
+ } | null;
227
+ readonly candidate: EveProjectBuildCandidate | null;
228
+ readonly snapshot: EveProjectSnapshot | null;
229
+ readonly toolchain: EveProjectToolchain | null;
230
+ readonly image: EveProjectImage | null;
231
+ readonly runtime: EveProjectRuntime | null;
232
+ readonly secrets: EveProjectSecretsEvidence;
233
+ readonly checks: readonly EvePackagingCheck[];
234
+ readonly candidateImageId: string | null;
235
+ readonly candidateImageRetainedLocally: boolean;
236
+ readonly writtenPaths: readonly string[];
237
+ readonly error: {
238
+ readonly code: EvePackagingCode;
239
+ readonly subject: string;
240
+ readonly reason: string;
241
+ readonly remediation: string;
242
+ } | null;
243
+ }
244
+ export declare class EvePackagingError extends Error {
245
+ readonly code: EvePackagingCode;
246
+ readonly subject: string;
247
+ readonly remediation: string;
248
+ constructor(options: {
249
+ readonly code: EvePackagingCode;
250
+ readonly subject: string;
251
+ readonly reason: string;
252
+ readonly remediation: string;
253
+ });
254
+ }
255
+ export declare function buildEveProjectSnapshot(options: EveProjectSnapshotOptions): Promise<EveProjectPackagingResult>;
256
+ export declare function revalidateEveProjectCandidateInputs(candidate: EveProjectBuildCandidate, runtimeConfig?: EveRuntimeConfigExclusion): Promise<void>;
257
+ export declare function createDockerEveProjectBuilder(options: {
258
+ readonly nodeImage: EveNodeImage;
259
+ readonly dockerCommand?: string;
260
+ }): EveProjectBuilder;
261
+ //# sourceMappingURL=eve-packaging.d.ts.map