@gigadrive/network-config 4.4.0 → 4.6.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/index.d.mts CHANGED
@@ -1,7 +1,40 @@
1
- import { FileSystem, Path } from '@effect/platform';
2
- import { Effect, Schema, Layer } from 'effect';
3
- import * as _effect_platform_Path from '@effect/platform/Path';
1
+ import { Schema, Effect, Layer } from 'effect';
4
2
  import * as _effect_platform_FileSystem from '@effect/platform/FileSystem';
3
+ import * as _effect_platform_Path from '@effect/platform/Path';
4
+ import * as effect_Layer from 'effect/Layer';
5
+ import { Path, FileSystem } from '@effect/platform';
6
+
7
+ declare const StaticAssetHeadersSchema: Schema.filter<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.filter<typeof Schema.String>, Schema.mutable<Schema.Array$<Schema.filter<typeof Schema.String>>>]>>>>;
8
+ type StaticAssetHeaders = Schema.Schema.Type<typeof StaticAssetHeadersSchema>;
9
+ /** One logical static asset whose source is relative to the project root. */
10
+ declare const StaticAssetManifestEntrySchema: Schema.mutable<Schema.Struct<{
11
+ source: Schema.filter<typeof Schema.String>;
12
+ path: Schema.filter<typeof Schema.String>;
13
+ status: Schema.optional<Schema.filter<typeof Schema.Int>>;
14
+ headers: Schema.optional<Schema.filter<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.filter<typeof Schema.String>, Schema.mutable<Schema.Array$<Schema.filter<typeof Schema.String>>>]>>>>>;
15
+ immutable: Schema.optional<typeof Schema.Boolean>;
16
+ }>>;
17
+ type StaticAssetManifestEntry = Schema.Schema.Type<typeof StaticAssetManifestEntrySchema>;
18
+ /** Portable manifest for declaring many logical assets without expanding deployment configuration. */
19
+ declare const StaticAssetManifestV1Schema: Schema.filter<Schema.mutable<Schema.Struct<{
20
+ version: Schema.Literal<[1]>;
21
+ assets: Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
22
+ source: Schema.filter<typeof Schema.String>;
23
+ path: Schema.filter<typeof Schema.String>;
24
+ status: Schema.optional<Schema.filter<typeof Schema.Int>>;
25
+ headers: Schema.optional<Schema.filter<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.filter<typeof Schema.String>, Schema.mutable<Schema.Array$<Schema.filter<typeof Schema.String>>>]>>>>>;
26
+ immutable: Schema.optional<typeof Schema.Boolean>;
27
+ }>>>>;
28
+ }>>>;
29
+ type StaticAssetManifestV1 = Schema.Schema.Type<typeof StaticAssetManifestV1Schema>;
30
+ type StaticAssetManifest = StaticAssetManifestV1;
31
+ /**
32
+ * Parses and validates a portable static asset manifest.
33
+ *
34
+ * @param content JSON manifest content.
35
+ * @returns The validated manifest, or `undefined` when malformed.
36
+ */
37
+ declare const parseStaticAssetManifest: (content: string) => StaticAssetManifest | undefined;
5
38
 
6
39
  interface NormalizedImageLocalPattern {
7
40
  pathname?: string;
@@ -41,112 +74,255 @@ interface NormalizedImagePolicy {
41
74
  type JsonValue = null | boolean | number | string | JsonValue[] | {
42
75
  [key: string]: JsonValue;
43
76
  };
44
- interface GigadriveNextPrerenderOutput {
45
- id: string;
46
- type: 'PRERENDER';
47
- pathname: string;
48
- parentOutputId: string;
49
- groupId: number;
50
- pprChain?: {
51
- headers: Record<string, string>;
52
- };
53
- parentFallbackMode?: JsonValue;
54
- fallback?: {
55
- filePath?: string;
56
- initialStatus?: number;
57
- initialHeaders?: Record<string, string | string[]>;
58
- initialExpiration?: number;
59
- initialRevalidate?: number | false;
60
- postponedState?: string;
61
- };
62
- config: {
63
- allowQuery?: string[];
64
- allowHeader?: string[];
65
- bypassFor?: JsonValue[];
66
- renderingMode?: string;
67
- partialFallback?: boolean;
68
- bypassToken?: string;
69
- };
70
- }
71
- /**
72
- * A directory subtree published under a single URL prefix, registered as one
73
- * descriptor instead of enumerating every file. Used to collapse `.next/static`
74
- * (thousands of content-hashed chunks) into a single edge-served prefix.
75
- */
76
- interface GigadriveNextStaticAssetPrefix {
77
- /** Project-relative source directory (e.g. `.next/static`). */
78
- sourceDir: string;
79
- /** Public URL prefix the subtree is served under (e.g. `_next/static`). */
80
- urlPrefix: string;
81
- /** Entries are content-hashed and safe to serve with immutable cache-control. */
82
- immutable: boolean;
83
- }
84
- interface GigadriveNextBuildManifestV1 {
85
- version: 1;
86
- output: 'standalone' | 'export';
87
- distDir: string;
88
- repoRootToProject: string;
89
- nextVersion: string;
90
- buildId: string;
91
- }
92
- /** Aggregated runtime configuration collapsed onto the single standalone server. */
93
- interface GigadriveNextServerDescriptor {
94
- maxDuration?: number;
95
- preferredRegion?: string | string[];
96
- env?: Record<string, string>;
97
- }
98
- /**
99
- * Portable runtime plan for the single standalone Next.js server (Next >= 16.2).
100
- *
101
- * The whole deployment runs as one `next start` standalone server, so the plan
102
- * carries only what the platform needs to route around it: prerender/ISR/PPR
103
- * seeds, the `.next/static` prefix, and the routing/image configuration. It
104
- * deliberately omits per-route outputs and entrypoints — the server owns
105
- * routing, middleware, edge routes, and PPR resume in-process.
106
- */
107
- interface GigadriveNextBuildManifestV2Standalone {
108
- version: 2;
109
- mode: 'standalone-v2';
110
- distDir: string;
111
- repoRootToProject: string;
112
- nextVersion: string;
113
- buildId: string;
114
- server: GigadriveNextServerDescriptor;
115
- config: {
116
- basePath: string;
117
- trailingSlash: boolean;
118
- cacheComponents: boolean;
119
- i18n?: JsonValue;
120
- images?: NormalizedImagePolicy;
121
- };
122
- routing: {
123
- beforeMiddleware: JsonValue[];
124
- beforeFiles: JsonValue[];
125
- afterFiles: JsonValue[];
126
- dynamicRoutes: JsonValue[];
127
- onMatch: JsonValue[];
128
- fallback: JsonValue[];
129
- shouldNormalizeNextData: boolean;
130
- rsc: JsonValue;
131
- };
132
- outputs: {
133
- prerenders: GigadriveNextPrerenderOutput[];
134
- staticAssets: GigadriveNextStaticAssetPrefix[];
135
- };
136
- }
137
- /** Minimal plan for static-export builds (Next >= 16.2). */
138
- interface GigadriveNextBuildManifestV2Export {
139
- version: 2;
140
- mode: 'export';
141
- distDir: string;
142
- repoRootToProject: string;
143
- nextVersion: string;
144
- buildId: string;
145
- }
77
+ declare const GigadriveNextPrerenderOutputSchema: Schema.mutable<Schema.Struct<{
78
+ id: typeof Schema.String;
79
+ type: Schema.Literal<["PRERENDER"]>;
80
+ pathname: Schema.filter<typeof Schema.String>;
81
+ parentOutputId: typeof Schema.String;
82
+ groupId: typeof Schema.Number;
83
+ pprChain: Schema.optional<Schema.mutable<Schema.Struct<{
84
+ headers: Schema.filter<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.filter<typeof Schema.String>>>>;
85
+ }>>>;
86
+ parentFallbackMode: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
87
+ fallback: Schema.optional<Schema.mutable<Schema.Struct<{
88
+ filePath: Schema.optional<Schema.filter<typeof Schema.String>>;
89
+ initialStatus: Schema.optional<Schema.filter<typeof Schema.Int>>;
90
+ initialHeaders: Schema.optional<Schema.filter<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.filter<typeof Schema.String>, Schema.mutable<Schema.Array$<Schema.filter<typeof Schema.String>>>]>>>>>;
91
+ initialExpiration: Schema.optional<typeof Schema.Number>;
92
+ initialRevalidate: Schema.optional<Schema.Union<[typeof Schema.Number, Schema.Literal<[false]>]>>;
93
+ postponedState: Schema.optional<typeof Schema.String>;
94
+ }>>>;
95
+ config: Schema.mutable<Schema.Struct<{
96
+ allowQuery: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
97
+ allowHeader: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
98
+ bypassFor: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
99
+ renderingMode: Schema.optional<typeof Schema.String>;
100
+ partialFallback: Schema.optional<typeof Schema.Boolean>;
101
+ bypassToken: Schema.optional<typeof Schema.String>;
102
+ }>>;
103
+ }>>;
104
+ type GigadriveNextPrerenderOutput = Schema.Schema.Type<typeof GigadriveNextPrerenderOutputSchema>;
105
+ /** A directory subtree published under one URL prefix. */
106
+ declare const GigadriveNextStaticAssetPrefixSchema: Schema.mutable<Schema.Struct<{
107
+ sourceDir: Schema.filter<typeof Schema.String>;
108
+ urlPrefix: Schema.filter<typeof Schema.String>;
109
+ immutable: typeof Schema.Boolean;
110
+ }>>;
111
+ type GigadriveNextStaticAssetPrefix = Schema.Schema.Type<typeof GigadriveNextStaticAssetPrefixSchema>;
112
+ /** Aggregated runtime configuration for the standalone server. */
113
+ declare const GigadriveNextServerDescriptorSchema: Schema.mutable<Schema.Struct<{
114
+ maxDuration: Schema.optional<typeof Schema.Number>;
115
+ preferredRegion: Schema.optional<Schema.Union<[typeof Schema.String, Schema.mutable<Schema.Array$<typeof Schema.String>>]>>;
116
+ env: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.String>>>;
117
+ }>>;
118
+ type GigadriveNextServerDescriptor = Schema.Schema.Type<typeof GigadriveNextServerDescriptorSchema>;
119
+ declare const GigadriveNextBuildManifestV1Schema: Schema.mutable<Schema.Struct<{
120
+ version: Schema.Literal<[1]>;
121
+ output: Schema.Literal<["standalone", "export"]>;
122
+ distDir: Schema.filter<typeof Schema.String>;
123
+ repoRootToProject: Schema.filter<typeof Schema.String>;
124
+ nextVersion: typeof Schema.String;
125
+ buildId: typeof Schema.String;
126
+ }>>;
127
+ type GigadriveNextBuildManifestV1 = Schema.Schema.Type<typeof GigadriveNextBuildManifestV1Schema>;
128
+ /** Minimal plan for static-export builds. */
129
+ declare const GigadriveNextBuildManifestV2ExportSchema: Schema.mutable<Schema.Struct<{
130
+ version: Schema.Literal<[2]>;
131
+ mode: Schema.Literal<["export"]>;
132
+ distDir: Schema.filter<typeof Schema.String>;
133
+ repoRootToProject: Schema.filter<typeof Schema.String>;
134
+ nextVersion: typeof Schema.String;
135
+ buildId: typeof Schema.String;
136
+ }>>;
137
+ type GigadriveNextBuildManifestV2Export = Schema.Schema.Type<typeof GigadriveNextBuildManifestV2ExportSchema>;
138
+ /** Portable runtime plan for a standalone Next.js server. */
139
+ declare const GigadriveNextBuildManifestV2StandaloneSchema: Schema.mutable<Schema.Struct<{
140
+ version: Schema.Literal<[2]>;
141
+ mode: Schema.Literal<["standalone-v2"]>;
142
+ distDir: Schema.filter<typeof Schema.String>;
143
+ repoRootToProject: Schema.filter<typeof Schema.String>;
144
+ nextVersion: typeof Schema.String;
145
+ buildId: typeof Schema.String;
146
+ server: Schema.mutable<Schema.Struct<{
147
+ maxDuration: Schema.optional<typeof Schema.Number>;
148
+ preferredRegion: Schema.optional<Schema.Union<[typeof Schema.String, Schema.mutable<Schema.Array$<typeof Schema.String>>]>>;
149
+ env: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.String>>>;
150
+ }>>;
151
+ config: Schema.mutable<Schema.Struct<{
152
+ basePath: typeof Schema.String;
153
+ trailingSlash: typeof Schema.Boolean;
154
+ cacheComponents: typeof Schema.Boolean;
155
+ i18n: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
156
+ images: Schema.optional<Schema.Schema<NormalizedImagePolicy, NormalizedImagePolicy, never>>;
157
+ }>>;
158
+ routing: Schema.mutable<Schema.Struct<{
159
+ beforeMiddleware: Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>;
160
+ beforeFiles: Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>;
161
+ afterFiles: Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>;
162
+ dynamicRoutes: Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>;
163
+ onMatch: Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>;
164
+ fallback: Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>;
165
+ shouldNormalizeNextData: typeof Schema.Boolean;
166
+ rsc: Schema.Schema<JsonValue, JsonValue, never>;
167
+ }>>;
168
+ outputs: Schema.mutable<Schema.Struct<{
169
+ prerenders: Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
170
+ id: typeof Schema.String;
171
+ type: Schema.Literal<["PRERENDER"]>;
172
+ pathname: Schema.filter<typeof Schema.String>;
173
+ parentOutputId: typeof Schema.String;
174
+ groupId: typeof Schema.Number;
175
+ pprChain: Schema.optional<Schema.mutable<Schema.Struct<{
176
+ headers: Schema.filter<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.filter<typeof Schema.String>>>>;
177
+ }>>>;
178
+ parentFallbackMode: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
179
+ fallback: Schema.optional<Schema.mutable<Schema.Struct<{
180
+ filePath: Schema.optional<Schema.filter<typeof Schema.String>>;
181
+ initialStatus: Schema.optional<Schema.filter<typeof Schema.Int>>;
182
+ initialHeaders: Schema.optional<Schema.filter<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.filter<typeof Schema.String>, Schema.mutable<Schema.Array$<Schema.filter<typeof Schema.String>>>]>>>>>;
183
+ initialExpiration: Schema.optional<typeof Schema.Number>;
184
+ initialRevalidate: Schema.optional<Schema.Union<[typeof Schema.Number, Schema.Literal<[false]>]>>;
185
+ postponedState: Schema.optional<typeof Schema.String>;
186
+ }>>>;
187
+ config: Schema.mutable<Schema.Struct<{
188
+ allowQuery: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
189
+ allowHeader: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
190
+ bypassFor: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
191
+ renderingMode: Schema.optional<typeof Schema.String>;
192
+ partialFallback: Schema.optional<typeof Schema.Boolean>;
193
+ bypassToken: Schema.optional<typeof Schema.String>;
194
+ }>>;
195
+ }>>>>;
196
+ prerenderManifest: Schema.optional<Schema.filter<typeof Schema.String>>;
197
+ assetManifest: Schema.optional<Schema.filter<typeof Schema.String>>;
198
+ entryPagePaths: Schema.optional<Schema.mutable<Schema.Array$<Schema.filter<typeof Schema.String>>>>;
199
+ staticAssets: Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
200
+ sourceDir: Schema.filter<typeof Schema.String>;
201
+ urlPrefix: Schema.filter<typeof Schema.String>;
202
+ immutable: typeof Schema.Boolean;
203
+ }>>>>;
204
+ }>>;
205
+ }>>;
206
+ type GigadriveNextBuildManifestV2Standalone = Schema.Schema.Type<typeof GigadriveNextBuildManifestV2StandaloneSchema>;
207
+ declare const GigadriveNextBuildManifestSchema: Schema.Union<[Schema.mutable<Schema.Struct<{
208
+ version: Schema.Literal<[1]>;
209
+ output: Schema.Literal<["standalone", "export"]>;
210
+ distDir: Schema.filter<typeof Schema.String>;
211
+ repoRootToProject: Schema.filter<typeof Schema.String>;
212
+ nextVersion: typeof Schema.String;
213
+ buildId: typeof Schema.String;
214
+ }>>, Schema.mutable<Schema.Struct<{
215
+ version: Schema.Literal<[2]>;
216
+ mode: Schema.Literal<["export"]>;
217
+ distDir: Schema.filter<typeof Schema.String>;
218
+ repoRootToProject: Schema.filter<typeof Schema.String>;
219
+ nextVersion: typeof Schema.String;
220
+ buildId: typeof Schema.String;
221
+ }>>, Schema.mutable<Schema.Struct<{
222
+ version: Schema.Literal<[2]>;
223
+ mode: Schema.Literal<["standalone-v2"]>;
224
+ distDir: Schema.filter<typeof Schema.String>;
225
+ repoRootToProject: Schema.filter<typeof Schema.String>;
226
+ nextVersion: typeof Schema.String;
227
+ buildId: typeof Schema.String;
228
+ server: Schema.mutable<Schema.Struct<{
229
+ maxDuration: Schema.optional<typeof Schema.Number>;
230
+ preferredRegion: Schema.optional<Schema.Union<[typeof Schema.String, Schema.mutable<Schema.Array$<typeof Schema.String>>]>>;
231
+ env: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.String>>>;
232
+ }>>;
233
+ config: Schema.mutable<Schema.Struct<{
234
+ basePath: typeof Schema.String;
235
+ trailingSlash: typeof Schema.Boolean;
236
+ cacheComponents: typeof Schema.Boolean;
237
+ i18n: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
238
+ images: Schema.optional<Schema.Schema<NormalizedImagePolicy, NormalizedImagePolicy, never>>;
239
+ }>>;
240
+ routing: Schema.mutable<Schema.Struct<{
241
+ beforeMiddleware: Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>;
242
+ beforeFiles: Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>;
243
+ afterFiles: Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>;
244
+ dynamicRoutes: Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>;
245
+ onMatch: Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>;
246
+ fallback: Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>;
247
+ shouldNormalizeNextData: typeof Schema.Boolean;
248
+ rsc: Schema.Schema<JsonValue, JsonValue, never>;
249
+ }>>;
250
+ outputs: Schema.mutable<Schema.Struct<{
251
+ prerenders: Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
252
+ id: typeof Schema.String;
253
+ type: Schema.Literal<["PRERENDER"]>;
254
+ pathname: Schema.filter<typeof Schema.String>;
255
+ parentOutputId: typeof Schema.String;
256
+ groupId: typeof Schema.Number;
257
+ pprChain: Schema.optional<Schema.mutable<Schema.Struct<{
258
+ headers: Schema.filter<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.filter<typeof Schema.String>>>>;
259
+ }>>>;
260
+ parentFallbackMode: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
261
+ fallback: Schema.optional<Schema.mutable<Schema.Struct<{
262
+ filePath: Schema.optional<Schema.filter<typeof Schema.String>>;
263
+ initialStatus: Schema.optional<Schema.filter<typeof Schema.Int>>;
264
+ initialHeaders: Schema.optional<Schema.filter<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.filter<typeof Schema.String>, Schema.mutable<Schema.Array$<Schema.filter<typeof Schema.String>>>]>>>>>;
265
+ initialExpiration: Schema.optional<typeof Schema.Number>;
266
+ initialRevalidate: Schema.optional<Schema.Union<[typeof Schema.Number, Schema.Literal<[false]>]>>;
267
+ postponedState: Schema.optional<typeof Schema.String>;
268
+ }>>>;
269
+ config: Schema.mutable<Schema.Struct<{
270
+ allowQuery: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
271
+ allowHeader: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
272
+ bypassFor: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
273
+ renderingMode: Schema.optional<typeof Schema.String>;
274
+ partialFallback: Schema.optional<typeof Schema.Boolean>;
275
+ bypassToken: Schema.optional<typeof Schema.String>;
276
+ }>>;
277
+ }>>>>;
278
+ prerenderManifest: Schema.optional<Schema.filter<typeof Schema.String>>;
279
+ assetManifest: Schema.optional<Schema.filter<typeof Schema.String>>;
280
+ entryPagePaths: Schema.optional<Schema.mutable<Schema.Array$<Schema.filter<typeof Schema.String>>>>;
281
+ staticAssets: Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
282
+ sourceDir: Schema.filter<typeof Schema.String>;
283
+ urlPrefix: Schema.filter<typeof Schema.String>;
284
+ immutable: typeof Schema.Boolean;
285
+ }>>>>;
286
+ }>>;
287
+ }>>]>;
146
288
  type GigadriveNextBuildManifestV2 = GigadriveNextBuildManifestV2Standalone | GigadriveNextBuildManifestV2Export;
147
- type GigadriveNextBuildManifest = GigadriveNextBuildManifestV1 | GigadriveNextBuildManifestV2;
289
+ type GigadriveNextBuildManifest = Schema.Schema.Type<typeof GigadriveNextBuildManifestSchema>;
290
+ /** Portable sidecar containing high-cardinality Next.js prerender metadata. */
291
+ declare const GigadriveNextPrerenderManifestV1Schema: Schema.mutable<Schema.Struct<{
292
+ version: Schema.Literal<[1]>;
293
+ prerenders: Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
294
+ id: typeof Schema.String;
295
+ type: Schema.Literal<["PRERENDER"]>;
296
+ pathname: Schema.filter<typeof Schema.String>;
297
+ parentOutputId: typeof Schema.String;
298
+ groupId: typeof Schema.Number;
299
+ pprChain: Schema.optional<Schema.mutable<Schema.Struct<{
300
+ headers: Schema.filter<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.filter<typeof Schema.String>>>>;
301
+ }>>>;
302
+ parentFallbackMode: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
303
+ fallback: Schema.optional<Schema.mutable<Schema.Struct<{
304
+ filePath: Schema.optional<Schema.filter<typeof Schema.String>>;
305
+ initialStatus: Schema.optional<Schema.filter<typeof Schema.Int>>;
306
+ initialHeaders: Schema.optional<Schema.filter<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.filter<typeof Schema.String>, Schema.mutable<Schema.Array$<Schema.filter<typeof Schema.String>>>]>>>>>;
307
+ initialExpiration: Schema.optional<typeof Schema.Number>;
308
+ initialRevalidate: Schema.optional<Schema.Union<[typeof Schema.Number, Schema.Literal<[false]>]>>;
309
+ postponedState: Schema.optional<typeof Schema.String>;
310
+ }>>>;
311
+ config: Schema.mutable<Schema.Struct<{
312
+ allowQuery: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
313
+ allowHeader: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
314
+ bypassFor: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
315
+ renderingMode: Schema.optional<typeof Schema.String>;
316
+ partialFallback: Schema.optional<typeof Schema.Boolean>;
317
+ bypassToken: Schema.optional<typeof Schema.String>;
318
+ }>>;
319
+ }>>>>;
320
+ }>>;
321
+ type GigadriveNextPrerenderManifestV1 = Schema.Schema.Type<typeof GigadriveNextPrerenderManifestV1Schema>;
148
322
  /** Parses and structurally validates adapter metadata before deployment code consumes it. */
149
323
  declare const parseGigadriveNextBuildManifest: (content: string) => GigadriveNextBuildManifest | undefined;
324
+ /** Parses and validates a portable Next.js prerender sidecar. */
325
+ declare const parseGigadriveNextPrerenderManifest: (content: string) => GigadriveNextPrerenderManifestV1 | undefined;
150
326
 
151
327
  declare const REGION_DEFINITIONS: readonly ["us-east-1", "us-east-2", "us-west-1", "us-west-2", "ap-south-1", "ap-northeast-3", "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "eu-north-1", "sa-east-1"];
152
328
  type Region = (typeof REGION_DEFINITIONS)[number];
@@ -206,6 +382,14 @@ interface NormalizedConfig {
206
382
  /** Optional Content-Type override applied to the whole subtree. */
207
383
  contentType?: string;
208
384
  }>;
385
+ /**
386
+ * Project-relative manifests containing logical static asset entries. A
387
+ * manifest keeps high-cardinality path mappings out of this configuration.
388
+ */
389
+ manifests?: Array<{
390
+ /** Project-relative path to a {@link StaticAssetManifest}. */
391
+ source: string;
392
+ }>;
209
393
  /**
210
394
  * Whether routes for the assets should be generated during deployment.
211
395
  */
@@ -346,7 +530,8 @@ type NormalizedFramework = NormalizedNextjsFramework;
346
530
  * discriminators. The whole deployment runs as one standalone server, so this
347
531
  * carries prerender/routing/image metadata but no per-route entrypoints.
348
532
  */
349
- type NormalizedNextjsFramework = Omit<GigadriveNextBuildManifestV2Standalone, 'version'> & {
533
+ type NormalizedNextjsFramework = Omit<GigadriveNextBuildManifestV2Standalone, 'version' | 'outputs'> & {
534
+ outputs: Omit<GigadriveNextBuildManifestV2Standalone['outputs'], 'entryPagePaths'>;
350
535
  type: 'nextjs';
351
536
  schemaVersion: 2;
352
537
  /**
@@ -398,190 +583,6 @@ type NormalizedConfigRouteMatchRequirements = [] | [
398
583
  }
399
584
  ];
400
585
 
401
- declare const ManifestNotFoundError_base: Schema.TaggedErrorClass<ManifestNotFoundError, "ManifestNotFoundError", {
402
- readonly _tag: Schema.tag<"ManifestNotFoundError">;
403
- } & {
404
- message: typeof Schema.String;
405
- filePath: typeof Schema.String;
406
- }>;
407
- declare class ManifestNotFoundError extends ManifestNotFoundError_base {
408
- }
409
- declare const ManifestReadError_base: Schema.TaggedErrorClass<ManifestReadError, "ManifestReadError", {
410
- readonly _tag: Schema.tag<"ManifestReadError">;
411
- } & {
412
- message: typeof Schema.String;
413
- filePath: typeof Schema.String;
414
- }>;
415
- declare class ManifestReadError extends ManifestReadError_base {
416
- }
417
- declare const ManifestParseError_base: Schema.TaggedErrorClass<ManifestParseError, "ManifestParseError", {
418
- readonly _tag: Schema.tag<"ManifestParseError">;
419
- } & {
420
- message: typeof Schema.String;
421
- filePath: typeof Schema.String;
422
- }>;
423
- declare class ManifestParseError extends ManifestParseError_base {
424
- }
425
- declare const FrameworkNotDetectedError_base: Schema.TaggedErrorClass<FrameworkNotDetectedError, "FrameworkNotDetectedError", {
426
- readonly _tag: Schema.tag<"FrameworkNotDetectedError">;
427
- } & {
428
- message: typeof Schema.String;
429
- directory: typeof Schema.String;
430
- }>;
431
- declare class FrameworkNotDetectedError extends FrameworkNotDetectedError_base {
432
- }
433
- interface FrameworkDetectionItem {
434
- /** Check manifest dependencies for this package (routed by framework language) */
435
- matchPackage?: string;
436
- /** Check if this file exists (relative to project root) */
437
- path?: string;
438
- /** If path is set, also check file content matches this regex */
439
- matchContent?: string;
440
- }
441
- type FrameworkLanguage = 'node' | 'php';
442
- type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun' | 'composer';
443
- interface FrameworkDefinition {
444
- slug: string;
445
- name: string;
446
- language: FrameworkLanguage;
447
- /** ALL items must match for the framework to be detected */
448
- detectors: FrameworkDetectionItem[];
449
- /** Higher = higher priority (specific frameworks beat generic ones) */
450
- priority: number;
451
- /** Generates deployment defaults for this framework */
452
- getDefaultConfig: (packageManager: PackageManager) => FrameworkDefaultConfig;
453
- /** Refines defaults with project files after a framework match, e.g. framework CLI config. */
454
- refineDefaultConfig?: (defaults: FrameworkDefaultConfig, projectFolder: string) => Effect.Effect<FrameworkDefaultConfig, never, FileSystem.FileSystem | Path.Path>;
455
- }
456
- interface FrameworkDefaultConfig {
457
- runtime: Runtime;
458
- memory: number;
459
- maxDuration: number;
460
- streaming: boolean;
461
- /** Overrides the auto-generated install command (e.g. for custom composer flags) */
462
- installCommand?: string;
463
- /** Build commands (install command is auto-prepended by generateConfig) */
464
- commands: string[];
465
- entrypoint?: string;
466
- assetsDir?: string;
467
- assetsPrefixToStrip?: string;
468
- /** Explicit project-relative files to publish as static assets. */
469
- assetPaths?: string[];
470
- /** Public path overrides keyed by project-relative asset path. */
471
- assetOverrides?: Record<string, {
472
- path?: string;
473
- contentType?: string;
474
- }>;
475
- /** Directory subtrees to publish under a URL prefix without per-file enumeration. */
476
- assetPrefixes?: Array<{
477
- source: string;
478
- destination: string;
479
- immutable?: boolean;
480
- populateCache?: boolean;
481
- contentType?: string;
482
- }>;
483
- populateAssetCache?: boolean;
484
- routes: Array<{
485
- source: string;
486
- destination: string;
487
- }>;
488
- environmentVariables: Record<string, string>;
489
- symlinks?: Record<string, string>;
490
- excludeFiles?: string[];
491
- package?: {
492
- trace?: boolean;
493
- includeProjectFiles?: boolean;
494
- preserveSymlinks?: boolean;
495
- rootOverwrite?: string;
496
- filePathMap?: Record<string, string>;
497
- includeFiles?: string[];
498
- excludeFiles?: string[];
499
- };
500
- /** Advanced framework output that replaces the one-entrypoint defaults. */
501
- normalizedConfig?: Partial<NormalizedConfig>;
502
- }
503
- interface DetectionResult {
504
- framework: FrameworkDefinition;
505
- packageManager: PackageManager;
506
- config: NormalizedConfig;
507
- }
508
-
509
- /**
510
- * Detects the framework used in a project by checking framework definitions
511
- * against the project's dependencies and file structure.
512
- *
513
- * Framework definitions are checked in priority order (highest first).
514
- * All detectors for a framework must match for it to be selected.
515
- *
516
- * @param projectFolder - Absolute path to the project root
517
- * @returns DetectionResult with framework, package manager, and generated config
518
- */
519
- declare const detectFramework: (projectFolder: string) => Effect.Effect<{
520
- framework: FrameworkDefinition;
521
- packageManager: PackageManager;
522
- config: NormalizedConfig;
523
- }, ManifestReadError | ManifestParseError | FrameworkNotDetectedError, FileSystem.FileSystem | Path.Path>;
524
-
525
- /**
526
- * Detects the package manager by checking for lockfiles in the project folder.
527
- * Falls back to `npm` if no lockfile is found.
528
- *
529
- * @param projectFolder - Absolute path to the project root
530
- * @returns The detected package manager
531
- */
532
- declare const detectPackageManager: (projectFolder: string) => Effect.Effect<PackageManager, never, FileSystem.FileSystem | Path.Path>;
533
-
534
- /**
535
- * All supported framework definitions, sorted by priority descending.
536
- * Higher priority frameworks are checked first during detection.
537
- */
538
- declare const FRAMEWORK_DEFINITIONS: FrameworkDefinition[];
539
-
540
- /**
541
- * Generates a NormalizedConfig from a framework definition and detected package manager.
542
- * Prepends the install command and builds a complete deployment configuration.
543
- *
544
- * @param framework - The detected framework definition
545
- * @param packageManager - The detected package manager
546
- * @returns A complete NormalizedConfig with framework defaults
547
- */
548
- declare const generateConfig: (framework: FrameworkDefinition, packageManager: PackageManager, refinedDefaults?: FrameworkDefaultConfig | undefined) => Effect.Effect<NormalizedConfig, never, never>;
549
-
550
- /**
551
- * Merges framework defaults with a user-provided config.
552
- * User config always takes precedence; framework defaults fill gaps.
553
- *
554
- * - commands: use user's if non-empty, otherwise framework's
555
- * - entrypoints: use user's if non-empty, otherwise framework's
556
- * - routes: use user's if non-empty, otherwise framework's
557
- * - assets: use user's if defined with paths, otherwise framework's
558
- * - excludeFiles: use user's if non-empty, otherwise framework's
559
- * - regions: always use user's (always populated from parsing)
560
- * - environmentVariables: deep merge (framework base, user overrides)
561
- * - services: always use user's (frameworks don't define services)
562
- * - warnings/errors: concatenate both
563
- *
564
- * @param userConfig - The config parsed from the user's config file
565
- * @param frameworkConfig - The config generated from framework detection
566
- * @returns The merged config
567
- */
568
- declare const mergeWithFrameworkDefaults: (userConfig: NormalizedConfig, frameworkConfig: NormalizedConfig) => Effect.Effect<NormalizedConfig, never, never>;
569
-
570
- /**
571
- * Reads dependency names from the appropriate manifest file for a language.
572
- * Returns a set of all dependency names (production + dev).
573
- *
574
- * If the manifest file does not exist, returns an empty set (graceful).
575
- * If the file exists but cannot be read (`ManifestReadError`) or parsed
576
- * (`ManifestParseError`), the error propagates — this indicates a real
577
- * problem the user should know about.
578
- *
579
- * @param projectFolder - Absolute path to the project root
580
- * @param language - The framework language to determine which manifest to read
581
- * @returns A set of dependency package names
582
- */
583
- declare const readDependencies: (projectFolder: string, language: FrameworkLanguage) => Effect.Effect<Set<string>, ManifestReadError | ManifestParseError, FileSystem.FileSystem | Path.Path>;
584
-
585
586
  declare const ConfigFileNotFoundError_base: Schema.TaggedErrorClass<ConfigFileNotFoundError, "ConfigFileNotFoundError", {
586
587
  readonly _tag: Schema.tag<"ConfigFileNotFoundError">;
587
588
  } & {
@@ -607,6 +608,15 @@ declare const ConfigFileParseError_base: Schema.TaggedErrorClass<ConfigFileParse
607
608
  }>;
608
609
  declare class ConfigFileParseError extends ConfigFileParseError_base {
609
610
  }
611
+ declare const ConfigModuleLoadError_base: Schema.TaggedErrorClass<ConfigModuleLoadError, "ConfigModuleLoadError", {
612
+ readonly _tag: Schema.tag<"ConfigModuleLoadError">;
613
+ } & {
614
+ message: typeof Schema.String;
615
+ filePath: typeof Schema.String;
616
+ cause: Schema.optional<typeof Schema.String>;
617
+ }>;
618
+ declare class ConfigModuleLoadError extends ConfigModuleLoadError_base {
619
+ }
610
620
  declare const ConfigVersionError_base: Schema.TaggedErrorClass<ConfigVersionError, "ConfigVersionError", {
611
621
  readonly _tag: Schema.tag<"ConfigVersionError">;
612
622
  } & {
@@ -634,23 +644,24 @@ declare const FunctionConfigError_base: Schema.TaggedErrorClass<FunctionConfigEr
634
644
  declare class FunctionConfigError extends FunctionConfigError_base {
635
645
  }
636
646
 
637
- /**
638
- * Ensure a normalized config has no function files that are also defined as assets.
639
- * For example, a file `public/index.php` should not be defined as an asset, when it is a function and `public` is an asset folder.
640
- * @param config The normalized config to filter.
641
- * @returns A promise that resolves to the filtered config.
642
- */
643
- declare const filterFunctionsFromAssets: (config: NormalizedConfig) => NormalizedConfig;
647
+ declare const ConfigModuleLoader_base: Effect.Service.Class<ConfigModuleLoader, "ConfigModuleLoader", {
648
+ readonly effect: Effect.Effect<{
649
+ loadConfigModule: (filePath: string) => Effect.Effect<Record<string, unknown>, ConfigModuleLoadError, never>;
650
+ }, never, never>;
651
+ }>;
652
+ declare class ConfigModuleLoader extends ConfigModuleLoader_base {
653
+ }
644
654
 
645
- declare const ALLOWED_CONFIG_NAMES: readonly ["gigadrive.yaml", "gigadrive.yml", "nebula.yaml", "nebula.yml", "nebula.json"];
655
+ declare const ALLOWED_CONFIG_NAMES: readonly ["gigadrive.ts", "gigadrive.mts", "gigadrive.cts", "gigadrive.js", "gigadrive.mjs", "gigadrive.cjs", "gigadrive.yaml", "gigadrive.yml", "gigadrive.json", "nebula.yaml", "nebula.yml", "nebula.json"];
646
656
  declare const RawConfigReader_base: Effect.Service.Class<RawConfigReader, "RawConfigReader", {
657
+ readonly dependencies: readonly [effect_Layer.Layer<ConfigModuleLoader, never, never>];
647
658
  readonly effect: Effect.Effect<{
648
659
  findConfig: (projectFolder: string) => Effect.Effect<string | null, never, never>;
649
660
  readRawConfig: (filePath: string, options?: {
650
661
  disableVersionCheck?: boolean;
651
- } | undefined) => Effect.Effect<Record<string, unknown>, ConfigFileNotFoundError | ConfigFileEmptyError | ConfigFileParseError | ConfigVersionError, never>;
652
- readConfigFile: <T>(configFilePath: string) => Effect.Effect<T | null, ConfigFileEmptyError | ConfigFileParseError | ConfigVersionError, never>;
653
- }, never, FileSystem.FileSystem | Path.Path>;
662
+ } | undefined) => Effect.Effect<Record<string, unknown>, ConfigFileNotFoundError | ConfigFileEmptyError | ConfigFileParseError | ConfigModuleLoadError | ConfigVersionError, never>;
663
+ readConfigFile: <T>(configFilePath: string) => Effect.Effect<T | null, ConfigFileEmptyError | ConfigFileParseError | ConfigModuleLoadError | ConfigVersionError, never>;
664
+ }, never, ConfigModuleLoader | Path.Path | FileSystem.FileSystem>;
654
665
  }>;
655
666
  declare class RawConfigReader extends RawConfigReader_base {
656
667
  }
@@ -663,38 +674,135 @@ declare const SchemaValidator_base: Effect.Service.Class<SchemaValidator, "Schem
663
674
  declare class SchemaValidator extends SchemaValidator_base {
664
675
  }
665
676
 
666
- interface ConfigV4 extends Config {
667
- version: 4;
668
- /**
669
- * A list of presets to apply to the project. Each preset will be applied in order.
670
- */
671
- presets?: string[] | null;
672
- /**
673
- * The folder which holds the assets to be deployed to the edge. Defaults to none.
674
- */
675
- assets?: string | null;
676
- /**
677
- * If true, the assets will be cached at the edge during deployment. This may increase the deployment time, depending on the size of the assets. Defaults to false.
678
- */
679
- populateAssetCache?: boolean | null;
680
- /** Managed image optimization policy for this deployment. */
681
- images?: Partial<NormalizedImagePolicy> | null;
682
- /**
683
- * The regions to which the project will be deployed. Use "global" to deploy to all regions. More regions will incur higher costs.
684
- */
685
- regions?: string[] | null;
686
- /**
687
- * The commands to run to build the project. For example, `bun install` or `npm install`.
688
- */
689
- build_commands?: string[] | null;
690
- /**
691
- * The serverless functions to deploy.
692
- */
693
- functions?: {
694
- /**
695
- * The pattern to match the file path of the function. May be a glob pattern or a regular expression.
696
- */
697
- [pattern: string]: ConfigV4FunctionSettings;
677
+ /**
678
+ * Resolves merged function settings for a given path by iterating all function
679
+ * patterns in the config. Later patterns override earlier ones.
680
+ *
681
+ * @returns The merged settings, or undefined when no pattern matches the path.
682
+ */
683
+ declare const getFunctionSettings: (path: string, config: ConfigV4) => ConfigV4FunctionSettings | undefined;
684
+ declare const V4ConfigParser_base: Effect.Service.Class<V4ConfigParser, "V4ConfigParser", {
685
+ readonly accessors: true;
686
+ readonly effect: Effect.Effect<{
687
+ /**
688
+ * Parses a ConfigV4 into a NormalizedConfig.
689
+ *
690
+ * @param config - The raw V4 config object
691
+ * @param projectFolder - Absolute path to the project root
692
+ */
693
+ parse: (config: ConfigV4, projectFolder: string) => Effect.Effect<{
694
+ regions: ("us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "ap-south-1" | "ap-northeast-3" | "ap-northeast-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ca-central-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "sa-east-1")[];
695
+ assets: {
696
+ paths: string[];
697
+ prefixToStrip: string;
698
+ dynamicRoutes: boolean;
699
+ populateCache: boolean;
700
+ };
701
+ environmentVariables: Record<string, string>;
702
+ commands: string[];
703
+ images: NormalizedImagePolicy | undefined;
704
+ services: NormalizedConfigServiceDefinition[] | undefined;
705
+ entrypoints: NormalizedConfigEntrypoint[];
706
+ errors: never[];
707
+ warnings: never[];
708
+ routes: NormalizedConfigRoute[];
709
+ }, FunctionConfigError, Path.Path | FileSystem.FileSystem>;
710
+ }, never, never>;
711
+ }>;
712
+ declare class V4ConfigParser extends V4ConfigParser_base {
713
+ }
714
+
715
+ declare const VercelBuildOutputParser_base: Effect.Service.Class<VercelBuildOutputParser, "VercelBuildOutputParser", {
716
+ readonly effect: Effect.Effect<{
717
+ parse: (parseResult: NormalizedConfig, projectFolder: string) => Effect.Effect<NormalizedConfig, ConfigFileEmptyError | ConfigFileParseError | ConfigModuleLoadError | ConfigVersionError, Path.Path | _effect_platform_FileSystem.FileSystem>;
718
+ }, never, RawConfigReader | Path.Path>;
719
+ }>;
720
+ declare class VercelBuildOutputParser extends VercelBuildOutputParser_base {
721
+ }
722
+
723
+ interface Config {
724
+ version: number;
725
+ env?: Record<string, string>;
726
+ }
727
+ /**
728
+ * Parses a config file at the given path and validates it against the appropriate
729
+ * JSON Schema, returning a NormalizedConfig **without** post-processing.
730
+ *
731
+ * Use {@link parseConfig} when you also want Vercel BOv3 merging, empty-deployment
732
+ * checks, and function/asset deduplication applied automatically.
733
+ *
734
+ * @param filePath - Absolute path to the config file
735
+ * @param projectFolder - Absolute path to the project root
736
+ */
737
+ declare const parseConfigRaw: (filePath: string, projectFolder: string) => Effect.Effect<{
738
+ regions: ("us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "ap-south-1" | "ap-northeast-3" | "ap-northeast-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ca-central-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "sa-east-1")[];
739
+ assets: {
740
+ paths: string[];
741
+ prefixToStrip: string;
742
+ dynamicRoutes: boolean;
743
+ populateCache: boolean;
744
+ };
745
+ environmentVariables: Record<string, string>;
746
+ commands: string[];
747
+ images: NormalizedImagePolicy | undefined;
748
+ services: NormalizedConfigServiceDefinition[] | undefined;
749
+ entrypoints: NormalizedConfigEntrypoint[];
750
+ errors: never[];
751
+ warnings: never[];
752
+ routes: NormalizedConfigRoute[];
753
+ }, ConfigFileNotFoundError | ConfigFileEmptyError | ConfigFileParseError | ConfigModuleLoadError | ConfigVersionError | ConfigSchemaValidationError | FunctionConfigError, RawConfigReader | _effect_platform_Path.Path | _effect_platform_FileSystem.FileSystem | SchemaValidator | V4ConfigParser>;
754
+ /**
755
+ * Parses a config file at the given path, validates it against the appropriate
756
+ * JSON Schema, converts it to a NormalizedConfig, and applies post-processing.
757
+ *
758
+ * @param filePath - Absolute path to the config file
759
+ * @param projectFolder - Absolute path to the project root
760
+ */
761
+ declare const parseConfig: (filePath: string, projectFolder: string) => Effect.Effect<NormalizedConfig, ConfigFileNotFoundError | ConfigFileEmptyError | ConfigFileParseError | ConfigModuleLoadError | ConfigVersionError | ConfigSchemaValidationError | FunctionConfigError, RawConfigReader | _effect_platform_Path.Path | _effect_platform_FileSystem.FileSystem | SchemaValidator | V4ConfigParser | VercelBuildOutputParser>;
762
+ /**
763
+ * Applies post-processing transformers to a NormalizedConfig:
764
+ * - Vercel Build Output v3 (merges functions/routes from .vercel/output if present)
765
+ * - Empty deployment validation
766
+ * - Filter functions from assets
767
+ *
768
+ * @param config - The parsed NormalizedConfig
769
+ * @param projectFolder - Absolute path to the project root
770
+ * @returns The post-processed NormalizedConfig
771
+ */
772
+ declare const postProcessConfig: (config: NormalizedConfig, projectFolder: string) => Effect.Effect<NormalizedConfig, ConfigFileEmptyError | ConfigFileParseError | ConfigModuleLoadError | ConfigVersionError, _effect_platform_Path.Path | _effect_platform_FileSystem.FileSystem | VercelBuildOutputParser>;
773
+
774
+ interface ConfigV4 extends Config {
775
+ version: 4;
776
+ /**
777
+ * A list of presets to apply to the project. Each preset will be applied in order.
778
+ */
779
+ presets?: string[] | null;
780
+ /**
781
+ * The folder which holds the assets to be deployed to the edge. Defaults to none.
782
+ */
783
+ assets?: string | null;
784
+ /**
785
+ * If true, the assets will be cached at the edge during deployment. This may increase the deployment time, depending on the size of the assets. Defaults to false.
786
+ */
787
+ populateAssetCache?: boolean | null;
788
+ /** Managed image optimization policy for this deployment. */
789
+ images?: Partial<NormalizedImagePolicy> | null;
790
+ /**
791
+ * The regions to which the project will be deployed. Use "global" to deploy to all regions. More regions will incur higher costs.
792
+ */
793
+ regions?: string[] | null;
794
+ /**
795
+ * The commands to run to build the project. For example, `bun install` or `npm install`.
796
+ */
797
+ build_commands?: string[] | null;
798
+ /**
799
+ * The serverless functions to deploy.
800
+ */
801
+ functions?: {
802
+ /**
803
+ * The pattern to match the file path of the function. May be a glob pattern or a regular expression.
804
+ */
805
+ [pattern: string]: ConfigV4FunctionSettings;
698
806
  } | null;
699
807
  /**
700
808
  * A list of route definitions.
@@ -866,102 +974,231 @@ interface ConfigV4FunctionSettings {
866
974
  }
867
975
 
868
976
  /**
869
- * Resolves merged function settings for a given path by iterating all function
870
- * patterns in the config. Later patterns override earlier ones.
977
+ * Identity helper providing type inference and checking for `gigadrive.ts`
978
+ * config files. Using it is optional — a plain object default export works the
979
+ * same, but `defineConfig` gives editor autocompletion without a type
980
+ * annotation. Requires `@gigadrive/network-config` to be installed in the
981
+ * project (e.g. as a devDependency).
871
982
  *
872
- * @returns The merged settings, or undefined when no pattern matches the path.
983
+ * Prefer importing from the `@gigadrive/network-config/define-config` subpath:
984
+ * it is dependency-free, whereas the package root eagerly imports peer
985
+ * dependencies (`effect`, `@effect/platform`) that package managers which do
986
+ * not auto-install peers (e.g. Yarn) will not have installed.
987
+ *
988
+ * Note that a `gigadrive.ts` config is executed as code when the config is
989
+ * read — the same trust model as `build_commands`.
990
+ *
991
+ * @param config - The deployment configuration
992
+ * @returns The configuration, unchanged
993
+ * @example
994
+ * ```ts
995
+ * // gigadrive.ts
996
+ * import { defineConfig } from '@gigadrive/network-config/define-config';
997
+ *
998
+ * export default defineConfig({
999
+ * version: 4,
1000
+ * regions: ['eu-central-1'],
1001
+ * });
1002
+ * ```
873
1003
  */
874
- declare const getFunctionSettings: (path: string, config: ConfigV4) => ConfigV4FunctionSettings | undefined;
875
- declare const V4ConfigParser_base: Effect.Service.Class<V4ConfigParser, "V4ConfigParser", {
876
- readonly accessors: true;
877
- readonly effect: Effect.Effect<{
878
- /**
879
- * Parses a ConfigV4 into a NormalizedConfig.
880
- *
881
- * @param config - The raw V4 config object
882
- * @param projectFolder - Absolute path to the project root
883
- */
884
- parse: (config: ConfigV4, projectFolder: string) => Effect.Effect<{
885
- regions: ("us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "ap-south-1" | "ap-northeast-3" | "ap-northeast-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ca-central-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "sa-east-1")[];
886
- assets: {
887
- paths: string[];
888
- prefixToStrip: string;
889
- dynamicRoutes: boolean;
890
- populateCache: boolean;
891
- };
892
- environmentVariables: Record<string, string>;
893
- commands: string[];
894
- images: NormalizedImagePolicy | undefined;
895
- services: NormalizedConfigServiceDefinition[] | undefined;
896
- entrypoints: NormalizedConfigEntrypoint[];
897
- errors: never[];
898
- warnings: never[];
899
- routes: NormalizedConfigRoute[];
900
- }, FunctionConfigError, FileSystem.FileSystem | Path.Path>;
901
- }, never, never>;
1004
+ declare const defineConfig: (config: ConfigV4) => ConfigV4;
1005
+
1006
+ declare const ManifestNotFoundError_base: Schema.TaggedErrorClass<ManifestNotFoundError, "ManifestNotFoundError", {
1007
+ readonly _tag: Schema.tag<"ManifestNotFoundError">;
1008
+ } & {
1009
+ message: typeof Schema.String;
1010
+ filePath: typeof Schema.String;
902
1011
  }>;
903
- declare class V4ConfigParser extends V4ConfigParser_base {
1012
+ declare class ManifestNotFoundError extends ManifestNotFoundError_base {
904
1013
  }
905
-
906
- declare const VercelBuildOutputParser_base: Effect.Service.Class<VercelBuildOutputParser, "VercelBuildOutputParser", {
907
- readonly effect: Effect.Effect<{
908
- parse: (parseResult: NormalizedConfig, projectFolder: string) => Effect.Effect<NormalizedConfig, ConfigFileEmptyError | ConfigFileParseError | ConfigVersionError, _effect_platform_FileSystem.FileSystem | Path.Path>;
909
- }, never, Path.Path | RawConfigReader>;
1014
+ declare const ManifestReadError_base: Schema.TaggedErrorClass<ManifestReadError, "ManifestReadError", {
1015
+ readonly _tag: Schema.tag<"ManifestReadError">;
1016
+ } & {
1017
+ message: typeof Schema.String;
1018
+ filePath: typeof Schema.String;
910
1019
  }>;
911
- declare class VercelBuildOutputParser extends VercelBuildOutputParser_base {
1020
+ declare class ManifestReadError extends ManifestReadError_base {
912
1021
  }
913
-
914
- interface Config {
915
- version: number;
916
- env?: Record<string, string>;
1022
+ declare const ManifestParseError_base: Schema.TaggedErrorClass<ManifestParseError, "ManifestParseError", {
1023
+ readonly _tag: Schema.tag<"ManifestParseError">;
1024
+ } & {
1025
+ message: typeof Schema.String;
1026
+ filePath: typeof Schema.String;
1027
+ }>;
1028
+ declare class ManifestParseError extends ManifestParseError_base {
1029
+ }
1030
+ declare const FrameworkNotDetectedError_base: Schema.TaggedErrorClass<FrameworkNotDetectedError, "FrameworkNotDetectedError", {
1031
+ readonly _tag: Schema.tag<"FrameworkNotDetectedError">;
1032
+ } & {
1033
+ message: typeof Schema.String;
1034
+ directory: typeof Schema.String;
1035
+ }>;
1036
+ declare class FrameworkNotDetectedError extends FrameworkNotDetectedError_base {
1037
+ }
1038
+ interface FrameworkDetectionItem {
1039
+ /** Check manifest dependencies for this package (routed by framework language) */
1040
+ matchPackage?: string;
1041
+ /** Check if this file exists (relative to project root) */
1042
+ path?: string;
1043
+ /** If path is set, also check file content matches this regex */
1044
+ matchContent?: string;
1045
+ }
1046
+ type FrameworkLanguage = 'node' | 'php';
1047
+ type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun' | 'composer';
1048
+ interface FrameworkDefinition {
1049
+ slug: string;
1050
+ name: string;
1051
+ language: FrameworkLanguage;
1052
+ /** ALL items must match for the framework to be detected */
1053
+ detectors: FrameworkDetectionItem[];
1054
+ /** Higher = higher priority (specific frameworks beat generic ones) */
1055
+ priority: number;
1056
+ /** Generates deployment defaults for this framework */
1057
+ getDefaultConfig: (packageManager: PackageManager) => FrameworkDefaultConfig;
1058
+ /** Refines defaults with project files after a framework match, e.g. framework CLI config. */
1059
+ refineDefaultConfig?: (defaults: FrameworkDefaultConfig, projectFolder: string) => Effect.Effect<FrameworkDefaultConfig, never, FileSystem.FileSystem | Path.Path>;
1060
+ }
1061
+ interface FrameworkDefaultConfig {
1062
+ runtime: Runtime;
1063
+ memory: number;
1064
+ maxDuration: number;
1065
+ streaming: boolean;
1066
+ /** Overrides the auto-generated install command (e.g. for custom composer flags) */
1067
+ installCommand?: string;
1068
+ /** Build commands (install command is auto-prepended by generateConfig) */
1069
+ commands: string[];
1070
+ entrypoint?: string;
1071
+ assetsDir?: string;
1072
+ assetsPrefixToStrip?: string;
1073
+ /** Explicit project-relative files to publish as static assets. */
1074
+ assetPaths?: string[];
1075
+ /** Public path overrides keyed by project-relative asset path. */
1076
+ assetOverrides?: Record<string, {
1077
+ path?: string;
1078
+ contentType?: string;
1079
+ }>;
1080
+ /** Directory subtrees to publish under a URL prefix without per-file enumeration. */
1081
+ assetPrefixes?: Array<{
1082
+ source: string;
1083
+ destination: string;
1084
+ immutable?: boolean;
1085
+ populateCache?: boolean;
1086
+ contentType?: string;
1087
+ }>;
1088
+ /** Project-relative manifests containing logical static asset entries. */
1089
+ assetManifests?: Array<{
1090
+ source: string;
1091
+ }>;
1092
+ populateAssetCache?: boolean;
1093
+ routes: Array<{
1094
+ source: string;
1095
+ destination: string;
1096
+ }>;
1097
+ environmentVariables: Record<string, string>;
1098
+ symlinks?: Record<string, string>;
1099
+ excludeFiles?: string[];
1100
+ package?: {
1101
+ trace?: boolean;
1102
+ includeProjectFiles?: boolean;
1103
+ preserveSymlinks?: boolean;
1104
+ rootOverwrite?: string;
1105
+ filePathMap?: Record<string, string>;
1106
+ includeFiles?: string[];
1107
+ excludeFiles?: string[];
1108
+ };
1109
+ /** Advanced framework output that replaces the one-entrypoint defaults. */
1110
+ normalizedConfig?: Partial<NormalizedConfig>;
917
1111
  }
1112
+ interface DetectionResult {
1113
+ framework: FrameworkDefinition;
1114
+ packageManager: PackageManager;
1115
+ config: NormalizedConfig;
1116
+ }
1117
+
918
1118
  /**
919
- * Parses a config file at the given path and validates it against the appropriate
920
- * JSON Schema, returning a NormalizedConfig **without** post-processing.
1119
+ * Detects the framework used in a project by checking framework definitions
1120
+ * against the project's dependencies and file structure.
921
1121
  *
922
- * Use {@link parseConfig} when you also want Vercel BOv3 merging, empty-deployment
923
- * checks, and function/asset deduplication applied automatically.
1122
+ * Framework definitions are checked in priority order (highest first).
1123
+ * All detectors for a framework must match for it to be selected.
924
1124
  *
925
- * @param filePath - Absolute path to the config file
926
1125
  * @param projectFolder - Absolute path to the project root
1126
+ * @returns DetectionResult with framework, package manager, and generated config
927
1127
  */
928
- declare const parseConfigRaw: (filePath: string, projectFolder: string) => Effect.Effect<{
929
- regions: ("us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "ap-south-1" | "ap-northeast-3" | "ap-northeast-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ca-central-1" | "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "sa-east-1")[];
930
- assets: {
931
- paths: string[];
932
- prefixToStrip: string;
933
- dynamicRoutes: boolean;
934
- populateCache: boolean;
935
- };
936
- environmentVariables: Record<string, string>;
937
- commands: string[];
938
- images: NormalizedImagePolicy | undefined;
939
- services: NormalizedConfigServiceDefinition[] | undefined;
940
- entrypoints: NormalizedConfigEntrypoint[];
941
- errors: never[];
942
- warnings: never[];
943
- routes: NormalizedConfigRoute[];
944
- }, ConfigFileNotFoundError | ConfigFileEmptyError | ConfigFileParseError | ConfigVersionError | ConfigSchemaValidationError | FunctionConfigError, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path | RawConfigReader | SchemaValidator | V4ConfigParser>;
1128
+ declare const detectFramework: (projectFolder: string) => Effect.Effect<{
1129
+ framework: FrameworkDefinition;
1130
+ packageManager: PackageManager;
1131
+ config: NormalizedConfig;
1132
+ }, ManifestReadError | ManifestParseError | FrameworkNotDetectedError, Path.Path | FileSystem.FileSystem>;
1133
+
945
1134
  /**
946
- * Parses a config file at the given path, validates it against the appropriate
947
- * JSON Schema, converts it to a NormalizedConfig, and applies post-processing.
1135
+ * Detects the package manager by checking for lockfiles in the project folder.
1136
+ * Falls back to `npm` if no lockfile is found.
948
1137
  *
949
- * @param filePath - Absolute path to the config file
950
1138
  * @param projectFolder - Absolute path to the project root
1139
+ * @returns The detected package manager
951
1140
  */
952
- declare const parseConfig: (filePath: string, projectFolder: string) => Effect.Effect<NormalizedConfig, ConfigFileNotFoundError | ConfigFileEmptyError | ConfigFileParseError | ConfigVersionError | ConfigSchemaValidationError | FunctionConfigError, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path | RawConfigReader | SchemaValidator | V4ConfigParser | VercelBuildOutputParser>;
1141
+ declare const detectPackageManager: (projectFolder: string) => Effect.Effect<PackageManager, never, Path.Path | FileSystem.FileSystem>;
1142
+
953
1143
  /**
954
- * Applies post-processing transformers to a NormalizedConfig:
955
- * - Vercel Build Output v3 (merges functions/routes from .vercel/output if present)
956
- * - Empty deployment validation
957
- * - Filter functions from assets
1144
+ * All supported framework definitions, sorted by priority descending.
1145
+ * Higher priority frameworks are checked first during detection.
1146
+ */
1147
+ declare const FRAMEWORK_DEFINITIONS: FrameworkDefinition[];
1148
+
1149
+ /**
1150
+ * Generates a NormalizedConfig from a framework definition and detected package manager.
1151
+ * Prepends the install command and builds a complete deployment configuration.
1152
+ *
1153
+ * @param framework - The detected framework definition
1154
+ * @param packageManager - The detected package manager
1155
+ * @returns A complete NormalizedConfig with framework defaults
1156
+ */
1157
+ declare const generateConfig: (framework: FrameworkDefinition, packageManager: PackageManager, refinedDefaults?: FrameworkDefaultConfig | undefined) => Effect.Effect<NormalizedConfig, never, never>;
1158
+
1159
+ /**
1160
+ * Merges framework defaults with a user-provided config.
1161
+ * User config always takes precedence; framework defaults fill gaps.
1162
+ *
1163
+ * - commands: use user's if non-empty, otherwise framework's
1164
+ * - entrypoints: use user's if non-empty, otherwise framework's
1165
+ * - routes: use user's if non-empty, otherwise framework's
1166
+ * - assets: use user's if it declares any sources, otherwise framework's
1167
+ * - excludeFiles: use user's if non-empty, otherwise framework's
1168
+ * - regions: always use user's (always populated from parsing)
1169
+ * - environmentVariables: deep merge (framework base, user overrides)
1170
+ * - services: always use user's (frameworks don't define services)
1171
+ * - warnings/errors: concatenate both
1172
+ *
1173
+ * @param userConfig - The config parsed from the user's config file
1174
+ * @param frameworkConfig - The config generated from framework detection
1175
+ * @returns The merged config
1176
+ */
1177
+ declare const mergeWithFrameworkDefaults: (userConfig: NormalizedConfig, frameworkConfig: NormalizedConfig) => Effect.Effect<NormalizedConfig, never, never>;
1178
+
1179
+ /**
1180
+ * Reads dependency names from the appropriate manifest file for a language.
1181
+ * Returns a set of all dependency names (production + dev).
1182
+ *
1183
+ * If the manifest file does not exist, returns an empty set (graceful).
1184
+ * If the file exists but cannot be read (`ManifestReadError`) or parsed
1185
+ * (`ManifestParseError`), the error propagates — this indicates a real
1186
+ * problem the user should know about.
958
1187
  *
959
- * @param config - The parsed NormalizedConfig
960
1188
  * @param projectFolder - Absolute path to the project root
961
- * @returns The post-processed NormalizedConfig
1189
+ * @param language - The framework language to determine which manifest to read
1190
+ * @returns A set of dependency package names
962
1191
  */
963
- declare const postProcessConfig: (config: NormalizedConfig, projectFolder: string) => Effect.Effect<NormalizedConfig, ConfigFileEmptyError | ConfigFileParseError | ConfigVersionError, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path | VercelBuildOutputParser>;
1192
+ declare const readDependencies: (projectFolder: string, language: FrameworkLanguage) => Effect.Effect<Set<string>, ManifestReadError | ManifestParseError, Path.Path | FileSystem.FileSystem>;
1193
+
1194
+ /**
1195
+ * Ensure a normalized config has no function files that are also defined as assets.
1196
+ * For example, a file `public/index.php` should not be defined as an asset, when it is a function and `public` is an asset folder.
1197
+ * @param config The normalized config to filter.
1198
+ * @returns A promise that resolves to the filtered config.
1199
+ */
1200
+ declare const filterFunctionsFromAssets: (config: NormalizedConfig) => NormalizedConfig;
964
1201
 
965
- declare const NetworkConfigLive: Layer.Layer<RawConfigReader | SchemaValidator | V4ConfigParser | VercelBuildOutputParser, never, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path>;
1202
+ declare const NetworkConfigLive: Layer.Layer<ConfigModuleLoader | RawConfigReader | SchemaValidator | V4ConfigParser | VercelBuildOutputParser, never, _effect_platform_Path.Path | _effect_platform_FileSystem.FileSystem>;
966
1203
 
967
- export { ALLOWED_CONFIG_NAMES, AVAILABLE_REGIONS, AVAILABLE_RUNTIMES, type Config, ConfigFileEmptyError, ConfigFileNotFoundError, ConfigFileParseError, ConfigSchemaValidationError, type ConfigV4, type ConfigV4FunctionSettings, type ConfigV4Service, type ConfigV4ServicePostgres, type ConfigV4ServiceRedis, type ConfigV4ServiceStorage, type ConfigV4Services, type ConfigV4StorageBucket, ConfigVersionError, DEFAULT_FUNCTION_DURATION_SECONDS, type DetectionResult, FRAMEWORK_DEFINITIONS, type FilePathMap, type FrameworkDefaultConfig, type FrameworkDefinition, type FrameworkDetectionItem, type FrameworkLanguage, FrameworkNotDetectedError, FunctionConfigError, type GigadriveNextBuildManifest, type GigadriveNextBuildManifestV1, type GigadriveNextBuildManifestV2, type GigadriveNextBuildManifestV2Export, type GigadriveNextBuildManifestV2Standalone, type GigadriveNextPrerenderOutput, type GigadriveNextServerDescriptor, type GigadriveNextStaticAssetPrefix, type JsonValue, MAX_FUNCTION_DURATION_SECONDS, ManifestNotFoundError, ManifestParseError, ManifestReadError, type NeonAWSRegion, NetworkConfigLive, type NormalizedConfig, type NormalizedConfigEntrypoint, type NormalizedConfigRoute, type NormalizedConfigRouteHandler, type NormalizedConfigRouteMatchRequirements, type NormalizedConfigRouteMethod, type NormalizedConfigService, type NormalizedConfigServiceDefinition, type NormalizedConfigServicePostgres, type NormalizedConfigServiceRedis, type NormalizedConfigServiceStorage, type NormalizedConfigServiceType, type NormalizedConfigStorageBucket, type NormalizedFramework, type NormalizedImageFit, type NormalizedImageFormat, type NormalizedImageLocalPattern, type NormalizedImagePolicy, type NormalizedImageRemotePattern, type NormalizedImageVariant, type NormalizedNextjsFramework, type NormalizedSharedArtifact, type PackageManager, RawConfigReader, type Region, type Runtime, SchemaValidator, type UpstashAWSRegion, V4ConfigParser, VercelBuildOutputParser, detectFramework, detectPackageManager, filterFunctionsFromAssets, generateConfig, getFunctionSettings, mergeWithFrameworkDefaults, parseConfig, parseConfigRaw, parseGigadriveNextBuildManifest, postProcessConfig, readDependencies };
1204
+ export { ALLOWED_CONFIG_NAMES, AVAILABLE_REGIONS, AVAILABLE_RUNTIMES, type Config, ConfigFileEmptyError, ConfigFileNotFoundError, ConfigFileParseError, ConfigModuleLoadError, ConfigModuleLoader, ConfigSchemaValidationError, type ConfigV4, type ConfigV4FunctionSettings, type ConfigV4Service, type ConfigV4ServicePostgres, type ConfigV4ServiceRedis, type ConfigV4ServiceStorage, type ConfigV4Services, type ConfigV4StorageBucket, ConfigVersionError, DEFAULT_FUNCTION_DURATION_SECONDS, type DetectionResult, FRAMEWORK_DEFINITIONS, type FilePathMap, type FrameworkDefaultConfig, type FrameworkDefinition, type FrameworkDetectionItem, type FrameworkLanguage, FrameworkNotDetectedError, FunctionConfigError, type GigadriveNextBuildManifest, GigadriveNextBuildManifestSchema, type GigadriveNextBuildManifestV1, GigadriveNextBuildManifestV1Schema, type GigadriveNextBuildManifestV2, type GigadriveNextBuildManifestV2Export, GigadriveNextBuildManifestV2ExportSchema, type GigadriveNextBuildManifestV2Standalone, GigadriveNextBuildManifestV2StandaloneSchema, type GigadriveNextPrerenderManifestV1, GigadriveNextPrerenderManifestV1Schema, type GigadriveNextPrerenderOutput, GigadriveNextPrerenderOutputSchema, type GigadriveNextServerDescriptor, GigadriveNextServerDescriptorSchema, type GigadriveNextStaticAssetPrefix, GigadriveNextStaticAssetPrefixSchema, type JsonValue, MAX_FUNCTION_DURATION_SECONDS, ManifestNotFoundError, ManifestParseError, ManifestReadError, type NeonAWSRegion, NetworkConfigLive, type NormalizedConfig, type NormalizedConfigEntrypoint, type NormalizedConfigRoute, type NormalizedConfigRouteHandler, type NormalizedConfigRouteMatchRequirements, type NormalizedConfigRouteMethod, type NormalizedConfigService, type NormalizedConfigServiceDefinition, type NormalizedConfigServicePostgres, type NormalizedConfigServiceRedis, type NormalizedConfigServiceStorage, type NormalizedConfigServiceType, type NormalizedConfigStorageBucket, type NormalizedFramework, type NormalizedImageFit, type NormalizedImageFormat, type NormalizedImageLocalPattern, type NormalizedImagePolicy, type NormalizedImageRemotePattern, type NormalizedImageVariant, type NormalizedNextjsFramework, type NormalizedSharedArtifact, type PackageManager, RawConfigReader, type Region, type Runtime, SchemaValidator, type StaticAssetHeaders, StaticAssetHeadersSchema, type StaticAssetManifest, type StaticAssetManifestEntry, StaticAssetManifestEntrySchema, type StaticAssetManifestV1, StaticAssetManifestV1Schema, type UpstashAWSRegion, V4ConfigParser, VercelBuildOutputParser, defineConfig, detectFramework, detectPackageManager, filterFunctionsFromAssets, generateConfig, getFunctionSettings, mergeWithFrameworkDefaults, parseConfig, parseConfigRaw, parseGigadriveNextBuildManifest, parseGigadriveNextPrerenderManifest, parseStaticAssetManifest, postProcessConfig, readDependencies };