@gigadrive/network-config 4.6.0 → 5.0.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.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Schema, Effect, Layer } from 'effect';
2
- import * as _effect_platform_FileSystem from '@effect/platform/FileSystem';
2
+ import { FileSystem, Path } from '@effect/platform';
3
3
  import * as _effect_platform_Path from '@effect/platform/Path';
4
+ import * as _effect_platform_FileSystem from '@effect/platform/FileSystem';
4
5
  import * as effect_Layer from 'effect/Layer';
5
- import { Path, FileSystem } from '@effect/platform';
6
6
 
7
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
8
  type StaticAssetHeaders = Schema.Schema.Type<typeof StaticAssetHeadersSchema>;
@@ -36,6 +36,21 @@ type StaticAssetManifest = StaticAssetManifestV1;
36
36
  */
37
37
  declare const parseStaticAssetManifest: (content: string) => StaticAssetManifest | undefined;
38
38
 
39
+ /**
40
+ * Lists every publishable file inside a static asset directory.
41
+ *
42
+ * Both the `assets:` key of a user config and a framework's `assetsDir` mean
43
+ * "publish this directory to the edge", and both resolve that declaration into
44
+ * concrete file paths through this walker.
45
+ *
46
+ * @param projectFolder - Absolute path to the project root
47
+ * @param assetsDir - Project-relative asset directory (e.g. `dist`, `.output/public`)
48
+ * @returns Sorted forward-slash paths relative to `assetsDir`. Empty when the
49
+ * directory is missing or is not a directory, so a project that never produced
50
+ * the expected build output fails config validation instead of the walker.
51
+ */
52
+ declare const collectAssetFiles: (projectFolder: string, assetsDir: string) => Effect.Effect<string[], never, FileSystem.FileSystem | Path.Path>;
53
+
39
54
  interface NormalizedImageLocalPattern {
40
55
  pathname?: string;
41
56
  search?: string;
@@ -74,10 +89,23 @@ interface NormalizedImagePolicy {
74
89
  type JsonValue = null | boolean | number | string | JsonValue[] | {
75
90
  [key: string]: JsonValue;
76
91
  };
77
- declare const GigadriveNextPrerenderOutputSchema: Schema.mutable<Schema.Struct<{
92
+ /**
93
+ * Portable Next.js prerender metadata.
94
+ *
95
+ * A fallback file is a mutable incremental-cache build seed, not a permanently
96
+ * authoritative static asset. Consumers must evaluate bypass, preview,
97
+ * revalidation, and PPR metadata before using it, and may only short-circuit
98
+ * ordinary GET and HEAD requests.
99
+ */
100
+ declare const GigadriveNextPrerenderOutputSchema: Schema.Union<[Schema.mutable<Schema.Struct<{
101
+ routeType: Schema.Literal<["route", "fallback", "shell", "page"]>;
102
+ response: Schema.Literal<["empty", "initial", "complete"]>;
103
+ compute: Schema.Literal<["blocking", "resuming", "static"]>;
104
+ htmlSize: Schema.optional<typeof Schema.Number>;
78
105
  id: typeof Schema.String;
79
106
  type: Schema.Literal<["PRERENDER"]>;
80
107
  pathname: Schema.filter<typeof Schema.String>;
108
+ route: Schema.optional<Schema.filter<typeof Schema.String>>;
81
109
  parentOutputId: typeof Schema.String;
82
110
  groupId: typeof Schema.Number;
83
111
  pprChain: Schema.optional<Schema.mutable<Schema.Struct<{
@@ -100,7 +128,38 @@ declare const GigadriveNextPrerenderOutputSchema: Schema.mutable<Schema.Struct<{
100
128
  partialFallback: Schema.optional<typeof Schema.Boolean>;
101
129
  bypassToken: Schema.optional<typeof Schema.String>;
102
130
  }>>;
103
- }>>;
131
+ }>>, Schema.mutable<Schema.Struct<{
132
+ routeType: Schema.optional<typeof Schema.Never>;
133
+ response: Schema.optional<typeof Schema.Never>;
134
+ compute: Schema.optional<typeof Schema.Never>;
135
+ htmlSize: Schema.optional<typeof Schema.Never>;
136
+ id: typeof Schema.String;
137
+ type: Schema.Literal<["PRERENDER"]>;
138
+ pathname: Schema.filter<typeof Schema.String>;
139
+ route: Schema.optional<Schema.filter<typeof Schema.String>>;
140
+ parentOutputId: typeof Schema.String;
141
+ groupId: typeof Schema.Number;
142
+ pprChain: Schema.optional<Schema.mutable<Schema.Struct<{
143
+ headers: Schema.filter<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.filter<typeof Schema.String>>>>;
144
+ }>>>;
145
+ parentFallbackMode: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
146
+ fallback: Schema.optional<Schema.mutable<Schema.Struct<{
147
+ filePath: Schema.optional<Schema.filter<typeof Schema.String>>;
148
+ initialStatus: Schema.optional<Schema.filter<typeof Schema.Int>>;
149
+ 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>>>]>>>>>;
150
+ initialExpiration: Schema.optional<typeof Schema.Number>;
151
+ initialRevalidate: Schema.optional<Schema.Union<[typeof Schema.Number, Schema.Literal<[false]>]>>;
152
+ postponedState: Schema.optional<typeof Schema.String>;
153
+ }>>>;
154
+ config: Schema.mutable<Schema.Struct<{
155
+ allowQuery: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
156
+ allowHeader: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
157
+ bypassFor: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
158
+ renderingMode: Schema.optional<typeof Schema.String>;
159
+ partialFallback: Schema.optional<typeof Schema.Boolean>;
160
+ bypassToken: Schema.optional<typeof Schema.String>;
161
+ }>>;
162
+ }>>]>;
104
163
  type GigadriveNextPrerenderOutput = Schema.Schema.Type<typeof GigadriveNextPrerenderOutputSchema>;
105
164
  /** A directory subtree published under one URL prefix. */
106
165
  declare const GigadriveNextStaticAssetPrefixSchema: Schema.mutable<Schema.Struct<{
@@ -109,6 +168,72 @@ declare const GigadriveNextStaticAssetPrefixSchema: Schema.mutable<Schema.Struct
109
168
  immutable: typeof Schema.Boolean;
110
169
  }>>;
111
170
  type GigadriveNextStaticAssetPrefix = Schema.Schema.Type<typeof GigadriveNextStaticAssetPrefixSchema>;
171
+ /** Portable request condition used by a Next.js middleware/Proxy matcher. */
172
+ declare const GigadriveNextRouteConditionSchema: Schema.Union<[Schema.mutable<Schema.Struct<{
173
+ type: Schema.Literal<["header", "cookie", "query"]>;
174
+ key: typeof Schema.String;
175
+ value: Schema.optional<typeof Schema.String>;
176
+ }>>, Schema.mutable<Schema.Struct<{
177
+ type: Schema.Literal<["host"]>;
178
+ value: typeof Schema.String;
179
+ }>>]>;
180
+ type GigadriveNextRouteCondition = Schema.Schema.Type<typeof GigadriveNextRouteConditionSchema>;
181
+ /** Validated public matcher metadata for a Next.js middleware or Proxy entrypoint. */
182
+ declare const GigadriveNextMiddlewareMatcherSchema: Schema.mutable<Schema.Struct<{
183
+ source: typeof Schema.String;
184
+ sourceRegex: typeof Schema.String;
185
+ has: Schema.optional<Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.Struct<{
186
+ type: Schema.Literal<["header", "cookie", "query"]>;
187
+ key: typeof Schema.String;
188
+ value: Schema.optional<typeof Schema.String>;
189
+ }>>, Schema.mutable<Schema.Struct<{
190
+ type: Schema.Literal<["host"]>;
191
+ value: typeof Schema.String;
192
+ }>>]>>>>;
193
+ missing: Schema.optional<Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.Struct<{
194
+ type: Schema.Literal<["header", "cookie", "query"]>;
195
+ key: typeof Schema.String;
196
+ value: Schema.optional<typeof Schema.String>;
197
+ }>>, Schema.mutable<Schema.Struct<{
198
+ type: Schema.Literal<["host"]>;
199
+ value: typeof Schema.String;
200
+ }>>]>>>>;
201
+ }>>;
202
+ type GigadriveNextMiddlewareMatcher = Schema.Schema.Type<typeof GigadriveNextMiddlewareMatcherSchema>;
203
+ /**
204
+ * Portable middleware/Proxy discovery result.
205
+ *
206
+ * The object is emitted for every new standalone build. Its optional position
207
+ * in the containing manifest preserves parsing of manifests written by older
208
+ * SDK releases, where absence means that middleware presence is unknown.
209
+ */
210
+ declare const GigadriveNextMiddlewareDescriptorSchema: Schema.Union<[Schema.mutable<Schema.Struct<{
211
+ present: Schema.Literal<[true]>;
212
+ matchers: Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
213
+ source: typeof Schema.String;
214
+ sourceRegex: typeof Schema.String;
215
+ has: Schema.optional<Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.Struct<{
216
+ type: Schema.Literal<["header", "cookie", "query"]>;
217
+ key: typeof Schema.String;
218
+ value: Schema.optional<typeof Schema.String>;
219
+ }>>, Schema.mutable<Schema.Struct<{
220
+ type: Schema.Literal<["host"]>;
221
+ value: typeof Schema.String;
222
+ }>>]>>>>;
223
+ missing: Schema.optional<Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.Struct<{
224
+ type: Schema.Literal<["header", "cookie", "query"]>;
225
+ key: typeof Schema.String;
226
+ value: Schema.optional<typeof Schema.String>;
227
+ }>>, Schema.mutable<Schema.Struct<{
228
+ type: Schema.Literal<["host"]>;
229
+ value: typeof Schema.String;
230
+ }>>]>>>>;
231
+ }>>>>;
232
+ }>>, Schema.mutable<Schema.Struct<{
233
+ present: Schema.Literal<[false]>;
234
+ matchers: Schema.mutable<Schema.Tuple<[]>>;
235
+ }>>]>;
236
+ type GigadriveNextMiddlewareDescriptor = Schema.Schema.Type<typeof GigadriveNextMiddlewareDescriptorSchema>;
112
237
  /** Aggregated runtime configuration for the standalone server. */
113
238
  declare const GigadriveNextServerDescriptorSchema: Schema.mutable<Schema.Struct<{
114
239
  maxDuration: Schema.optional<typeof Schema.Number>;
@@ -116,6 +241,9 @@ declare const GigadriveNextServerDescriptorSchema: Schema.mutable<Schema.Struct<
116
241
  env: Schema.optional<Schema.mutable<Schema.Record$<typeof Schema.String, typeof Schema.String>>>;
117
242
  }>>;
118
243
  type GigadriveNextServerDescriptor = Schema.Schema.Type<typeof GigadriveNextServerDescriptorSchema>;
244
+ /** Methods for which a validated prerender seed may participate in response lookup. */
245
+ declare const GigadriveNextPrerenderSeedMethodsSchema: Schema.mutable<Schema.Tuple2<Schema.Literal<["GET"]>, Schema.Literal<["HEAD"]>>>;
246
+ type GigadriveNextPrerenderSeedMethods = Schema.Schema.Type<typeof GigadriveNextPrerenderSeedMethodsSchema>;
119
247
  declare const GigadriveNextBuildManifestV1Schema: Schema.mutable<Schema.Struct<{
120
248
  version: Schema.Literal<[1]>;
121
249
  output: Schema.Literal<["standalone", "export"]>;
@@ -166,10 +294,15 @@ declare const GigadriveNextBuildManifestV2StandaloneSchema: Schema.mutable<Schem
166
294
  rsc: Schema.Schema<JsonValue, JsonValue, never>;
167
295
  }>>;
168
296
  outputs: Schema.mutable<Schema.Struct<{
169
- prerenders: Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
297
+ prerenders: Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.Struct<{
298
+ routeType: Schema.Literal<["route", "fallback", "shell", "page"]>;
299
+ response: Schema.Literal<["empty", "initial", "complete"]>;
300
+ compute: Schema.Literal<["blocking", "resuming", "static"]>;
301
+ htmlSize: Schema.optional<typeof Schema.Number>;
170
302
  id: typeof Schema.String;
171
303
  type: Schema.Literal<["PRERENDER"]>;
172
304
  pathname: Schema.filter<typeof Schema.String>;
305
+ route: Schema.optional<Schema.filter<typeof Schema.String>>;
173
306
  parentOutputId: typeof Schema.String;
174
307
  groupId: typeof Schema.Number;
175
308
  pprChain: Schema.optional<Schema.mutable<Schema.Struct<{
@@ -192,7 +325,38 @@ declare const GigadriveNextBuildManifestV2StandaloneSchema: Schema.mutable<Schem
192
325
  partialFallback: Schema.optional<typeof Schema.Boolean>;
193
326
  bypassToken: Schema.optional<typeof Schema.String>;
194
327
  }>>;
195
- }>>>>;
328
+ }>>, Schema.mutable<Schema.Struct<{
329
+ routeType: Schema.optional<typeof Schema.Never>;
330
+ response: Schema.optional<typeof Schema.Never>;
331
+ compute: Schema.optional<typeof Schema.Never>;
332
+ htmlSize: Schema.optional<typeof Schema.Never>;
333
+ id: typeof Schema.String;
334
+ type: Schema.Literal<["PRERENDER"]>;
335
+ pathname: Schema.filter<typeof Schema.String>;
336
+ route: Schema.optional<Schema.filter<typeof Schema.String>>;
337
+ parentOutputId: typeof Schema.String;
338
+ groupId: typeof Schema.Number;
339
+ pprChain: Schema.optional<Schema.mutable<Schema.Struct<{
340
+ headers: Schema.filter<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.filter<typeof Schema.String>>>>;
341
+ }>>>;
342
+ parentFallbackMode: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
343
+ fallback: Schema.optional<Schema.mutable<Schema.Struct<{
344
+ filePath: Schema.optional<Schema.filter<typeof Schema.String>>;
345
+ initialStatus: Schema.optional<Schema.filter<typeof Schema.Int>>;
346
+ 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>>>]>>>>>;
347
+ initialExpiration: Schema.optional<typeof Schema.Number>;
348
+ initialRevalidate: Schema.optional<Schema.Union<[typeof Schema.Number, Schema.Literal<[false]>]>>;
349
+ postponedState: Schema.optional<typeof Schema.String>;
350
+ }>>>;
351
+ config: Schema.mutable<Schema.Struct<{
352
+ allowQuery: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
353
+ allowHeader: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
354
+ bypassFor: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
355
+ renderingMode: Schema.optional<typeof Schema.String>;
356
+ partialFallback: Schema.optional<typeof Schema.Boolean>;
357
+ bypassToken: Schema.optional<typeof Schema.String>;
358
+ }>>;
359
+ }>>]>>>;
196
360
  prerenderManifest: Schema.optional<Schema.filter<typeof Schema.String>>;
197
361
  assetManifest: Schema.optional<Schema.filter<typeof Schema.String>>;
198
362
  entryPagePaths: Schema.optional<Schema.mutable<Schema.Array$<Schema.filter<typeof Schema.String>>>>;
@@ -201,6 +365,32 @@ declare const GigadriveNextBuildManifestV2StandaloneSchema: Schema.mutable<Schem
201
365
  urlPrefix: Schema.filter<typeof Schema.String>;
202
366
  immutable: typeof Schema.Boolean;
203
367
  }>>>>;
368
+ middleware: Schema.optional<Schema.Union<[Schema.mutable<Schema.Struct<{
369
+ present: Schema.Literal<[true]>;
370
+ matchers: Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
371
+ source: typeof Schema.String;
372
+ sourceRegex: typeof Schema.String;
373
+ has: Schema.optional<Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.Struct<{
374
+ type: Schema.Literal<["header", "cookie", "query"]>;
375
+ key: typeof Schema.String;
376
+ value: Schema.optional<typeof Schema.String>;
377
+ }>>, Schema.mutable<Schema.Struct<{
378
+ type: Schema.Literal<["host"]>;
379
+ value: typeof Schema.String;
380
+ }>>]>>>>;
381
+ missing: Schema.optional<Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.Struct<{
382
+ type: Schema.Literal<["header", "cookie", "query"]>;
383
+ key: typeof Schema.String;
384
+ value: Schema.optional<typeof Schema.String>;
385
+ }>>, Schema.mutable<Schema.Struct<{
386
+ type: Schema.Literal<["host"]>;
387
+ value: typeof Schema.String;
388
+ }>>]>>>>;
389
+ }>>>>;
390
+ }>>, Schema.mutable<Schema.Struct<{
391
+ present: Schema.Literal<[false]>;
392
+ matchers: Schema.mutable<Schema.Tuple<[]>>;
393
+ }>>]>>;
204
394
  }>>;
205
395
  }>>;
206
396
  type GigadriveNextBuildManifestV2Standalone = Schema.Schema.Type<typeof GigadriveNextBuildManifestV2StandaloneSchema>;
@@ -248,10 +438,15 @@ declare const GigadriveNextBuildManifestSchema: Schema.Union<[Schema.mutable<Sch
248
438
  rsc: Schema.Schema<JsonValue, JsonValue, never>;
249
439
  }>>;
250
440
  outputs: Schema.mutable<Schema.Struct<{
251
- prerenders: Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
441
+ prerenders: Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.Struct<{
442
+ routeType: Schema.Literal<["route", "fallback", "shell", "page"]>;
443
+ response: Schema.Literal<["empty", "initial", "complete"]>;
444
+ compute: Schema.Literal<["blocking", "resuming", "static"]>;
445
+ htmlSize: Schema.optional<typeof Schema.Number>;
252
446
  id: typeof Schema.String;
253
447
  type: Schema.Literal<["PRERENDER"]>;
254
448
  pathname: Schema.filter<typeof Schema.String>;
449
+ route: Schema.optional<Schema.filter<typeof Schema.String>>;
255
450
  parentOutputId: typeof Schema.String;
256
451
  groupId: typeof Schema.Number;
257
452
  pprChain: Schema.optional<Schema.mutable<Schema.Struct<{
@@ -274,7 +469,38 @@ declare const GigadriveNextBuildManifestSchema: Schema.Union<[Schema.mutable<Sch
274
469
  partialFallback: Schema.optional<typeof Schema.Boolean>;
275
470
  bypassToken: Schema.optional<typeof Schema.String>;
276
471
  }>>;
277
- }>>>>;
472
+ }>>, Schema.mutable<Schema.Struct<{
473
+ routeType: Schema.optional<typeof Schema.Never>;
474
+ response: Schema.optional<typeof Schema.Never>;
475
+ compute: Schema.optional<typeof Schema.Never>;
476
+ htmlSize: Schema.optional<typeof Schema.Never>;
477
+ id: typeof Schema.String;
478
+ type: Schema.Literal<["PRERENDER"]>;
479
+ pathname: Schema.filter<typeof Schema.String>;
480
+ route: Schema.optional<Schema.filter<typeof Schema.String>>;
481
+ parentOutputId: typeof Schema.String;
482
+ groupId: typeof Schema.Number;
483
+ pprChain: Schema.optional<Schema.mutable<Schema.Struct<{
484
+ headers: Schema.filter<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.filter<typeof Schema.String>>>>;
485
+ }>>>;
486
+ parentFallbackMode: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
487
+ fallback: Schema.optional<Schema.mutable<Schema.Struct<{
488
+ filePath: Schema.optional<Schema.filter<typeof Schema.String>>;
489
+ initialStatus: Schema.optional<Schema.filter<typeof Schema.Int>>;
490
+ 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>>>]>>>>>;
491
+ initialExpiration: Schema.optional<typeof Schema.Number>;
492
+ initialRevalidate: Schema.optional<Schema.Union<[typeof Schema.Number, Schema.Literal<[false]>]>>;
493
+ postponedState: Schema.optional<typeof Schema.String>;
494
+ }>>>;
495
+ config: Schema.mutable<Schema.Struct<{
496
+ allowQuery: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
497
+ allowHeader: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
498
+ bypassFor: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
499
+ renderingMode: Schema.optional<typeof Schema.String>;
500
+ partialFallback: Schema.optional<typeof Schema.Boolean>;
501
+ bypassToken: Schema.optional<typeof Schema.String>;
502
+ }>>;
503
+ }>>]>>>;
278
504
  prerenderManifest: Schema.optional<Schema.filter<typeof Schema.String>>;
279
505
  assetManifest: Schema.optional<Schema.filter<typeof Schema.String>>;
280
506
  entryPagePaths: Schema.optional<Schema.mutable<Schema.Array$<Schema.filter<typeof Schema.String>>>>;
@@ -283,17 +509,54 @@ declare const GigadriveNextBuildManifestSchema: Schema.Union<[Schema.mutable<Sch
283
509
  urlPrefix: Schema.filter<typeof Schema.String>;
284
510
  immutable: typeof Schema.Boolean;
285
511
  }>>>>;
512
+ middleware: Schema.optional<Schema.Union<[Schema.mutable<Schema.Struct<{
513
+ present: Schema.Literal<[true]>;
514
+ matchers: Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
515
+ source: typeof Schema.String;
516
+ sourceRegex: typeof Schema.String;
517
+ has: Schema.optional<Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.Struct<{
518
+ type: Schema.Literal<["header", "cookie", "query"]>;
519
+ key: typeof Schema.String;
520
+ value: Schema.optional<typeof Schema.String>;
521
+ }>>, Schema.mutable<Schema.Struct<{
522
+ type: Schema.Literal<["host"]>;
523
+ value: typeof Schema.String;
524
+ }>>]>>>>;
525
+ missing: Schema.optional<Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.Struct<{
526
+ type: Schema.Literal<["header", "cookie", "query"]>;
527
+ key: typeof Schema.String;
528
+ value: Schema.optional<typeof Schema.String>;
529
+ }>>, Schema.mutable<Schema.Struct<{
530
+ type: Schema.Literal<["host"]>;
531
+ value: typeof Schema.String;
532
+ }>>]>>>>;
533
+ }>>>>;
534
+ }>>, Schema.mutable<Schema.Struct<{
535
+ present: Schema.Literal<[false]>;
536
+ matchers: Schema.mutable<Schema.Tuple<[]>>;
537
+ }>>]>>;
286
538
  }>>;
287
539
  }>>]>;
288
540
  type GigadriveNextBuildManifestV2 = GigadriveNextBuildManifestV2Standalone | GigadriveNextBuildManifestV2Export;
289
541
  type GigadriveNextBuildManifest = Schema.Schema.Type<typeof GigadriveNextBuildManifestSchema>;
290
- /** Portable sidecar containing high-cardinality Next.js prerender metadata. */
542
+ /**
543
+ * Portable sidecar containing high-cardinality Next.js prerender build seeds.
544
+ *
545
+ * `seedMethods` is optional only for parsing sidecars emitted by older SDK
546
+ * releases. New adapters always emit the explicit GET/HEAD method scope.
547
+ */
291
548
  declare const GigadriveNextPrerenderManifestV1Schema: Schema.mutable<Schema.Struct<{
292
549
  version: Schema.Literal<[1]>;
293
- prerenders: Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
550
+ seedMethods: Schema.optional<Schema.mutable<Schema.Tuple2<Schema.Literal<["GET"]>, Schema.Literal<["HEAD"]>>>>;
551
+ prerenders: Schema.mutable<Schema.Array$<Schema.Union<[Schema.mutable<Schema.Struct<{
552
+ routeType: Schema.Literal<["route", "fallback", "shell", "page"]>;
553
+ response: Schema.Literal<["empty", "initial", "complete"]>;
554
+ compute: Schema.Literal<["blocking", "resuming", "static"]>;
555
+ htmlSize: Schema.optional<typeof Schema.Number>;
294
556
  id: typeof Schema.String;
295
557
  type: Schema.Literal<["PRERENDER"]>;
296
558
  pathname: Schema.filter<typeof Schema.String>;
559
+ route: Schema.optional<Schema.filter<typeof Schema.String>>;
297
560
  parentOutputId: typeof Schema.String;
298
561
  groupId: typeof Schema.Number;
299
562
  pprChain: Schema.optional<Schema.mutable<Schema.Struct<{
@@ -316,7 +579,38 @@ declare const GigadriveNextPrerenderManifestV1Schema: Schema.mutable<Schema.Stru
316
579
  partialFallback: Schema.optional<typeof Schema.Boolean>;
317
580
  bypassToken: Schema.optional<typeof Schema.String>;
318
581
  }>>;
319
- }>>>>;
582
+ }>>, Schema.mutable<Schema.Struct<{
583
+ routeType: Schema.optional<typeof Schema.Never>;
584
+ response: Schema.optional<typeof Schema.Never>;
585
+ compute: Schema.optional<typeof Schema.Never>;
586
+ htmlSize: Schema.optional<typeof Schema.Never>;
587
+ id: typeof Schema.String;
588
+ type: Schema.Literal<["PRERENDER"]>;
589
+ pathname: Schema.filter<typeof Schema.String>;
590
+ route: Schema.optional<Schema.filter<typeof Schema.String>>;
591
+ parentOutputId: typeof Schema.String;
592
+ groupId: typeof Schema.Number;
593
+ pprChain: Schema.optional<Schema.mutable<Schema.Struct<{
594
+ headers: Schema.filter<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.filter<typeof Schema.String>>>>;
595
+ }>>>;
596
+ parentFallbackMode: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
597
+ fallback: Schema.optional<Schema.mutable<Schema.Struct<{
598
+ filePath: Schema.optional<Schema.filter<typeof Schema.String>>;
599
+ initialStatus: Schema.optional<Schema.filter<typeof Schema.Int>>;
600
+ 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>>>]>>>>>;
601
+ initialExpiration: Schema.optional<typeof Schema.Number>;
602
+ initialRevalidate: Schema.optional<Schema.Union<[typeof Schema.Number, Schema.Literal<[false]>]>>;
603
+ postponedState: Schema.optional<typeof Schema.String>;
604
+ }>>>;
605
+ config: Schema.mutable<Schema.Struct<{
606
+ allowQuery: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
607
+ allowHeader: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
608
+ bypassFor: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
609
+ renderingMode: Schema.optional<typeof Schema.String>;
610
+ partialFallback: Schema.optional<typeof Schema.Boolean>;
611
+ bypassToken: Schema.optional<typeof Schema.String>;
612
+ }>>;
613
+ }>>]>>>;
320
614
  }>>;
321
615
  type GigadriveNextPrerenderManifestV1 = Schema.Schema.Type<typeof GigadriveNextPrerenderManifestV1Schema>;
322
616
  /** Parses and structurally validates adapter metadata before deployment code consumes it. */
@@ -661,7 +955,7 @@ declare const RawConfigReader_base: Effect.Service.Class<RawConfigReader, "RawCo
661
955
  disableVersionCheck?: boolean;
662
956
  } | undefined) => Effect.Effect<Record<string, unknown>, ConfigFileNotFoundError | ConfigFileEmptyError | ConfigFileParseError | ConfigModuleLoadError | ConfigVersionError, never>;
663
957
  readConfigFile: <T>(configFilePath: string) => Effect.Effect<T | null, ConfigFileEmptyError | ConfigFileParseError | ConfigModuleLoadError | ConfigVersionError, never>;
664
- }, never, ConfigModuleLoader | Path.Path | FileSystem.FileSystem>;
958
+ }, never, FileSystem.FileSystem | Path.Path | ConfigModuleLoader>;
665
959
  }>;
666
960
  declare class RawConfigReader extends RawConfigReader_base {
667
961
  }
@@ -706,7 +1000,7 @@ declare const V4ConfigParser_base: Effect.Service.Class<V4ConfigParser, "V4Confi
706
1000
  errors: never[];
707
1001
  warnings: never[];
708
1002
  routes: NormalizedConfigRoute[];
709
- }, FunctionConfigError, Path.Path | FileSystem.FileSystem>;
1003
+ }, FunctionConfigError, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path>;
710
1004
  }, never, never>;
711
1005
  }>;
712
1006
  declare class V4ConfigParser extends V4ConfigParser_base {
@@ -714,8 +1008,8 @@ declare class V4ConfigParser extends V4ConfigParser_base {
714
1008
 
715
1009
  declare const VercelBuildOutputParser_base: Effect.Service.Class<VercelBuildOutputParser, "VercelBuildOutputParser", {
716
1010
  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>;
1011
+ parse: (parseResult: NormalizedConfig, projectFolder: string) => Effect.Effect<NormalizedConfig, ConfigFileEmptyError | ConfigFileParseError | ConfigModuleLoadError | ConfigVersionError, _effect_platform_FileSystem.FileSystem | Path.Path>;
1012
+ }, never, Path.Path | RawConfigReader>;
719
1013
  }>;
720
1014
  declare class VercelBuildOutputParser extends VercelBuildOutputParser_base {
721
1015
  }
@@ -750,7 +1044,7 @@ declare const parseConfigRaw: (filePath: string, projectFolder: string) => Effec
750
1044
  errors: never[];
751
1045
  warnings: never[];
752
1046
  routes: NormalizedConfigRoute[];
753
- }, ConfigFileNotFoundError | ConfigFileEmptyError | ConfigFileParseError | ConfigModuleLoadError | ConfigVersionError | ConfigSchemaValidationError | FunctionConfigError, RawConfigReader | _effect_platform_Path.Path | _effect_platform_FileSystem.FileSystem | SchemaValidator | V4ConfigParser>;
1047
+ }, ConfigFileNotFoundError | ConfigFileEmptyError | ConfigFileParseError | ConfigModuleLoadError | ConfigVersionError | ConfigSchemaValidationError | FunctionConfigError, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path | RawConfigReader | SchemaValidator | V4ConfigParser>;
754
1048
  /**
755
1049
  * Parses a config file at the given path, validates it against the appropriate
756
1050
  * JSON Schema, converts it to a NormalizedConfig, and applies post-processing.
@@ -758,7 +1052,7 @@ declare const parseConfigRaw: (filePath: string, projectFolder: string) => Effec
758
1052
  * @param filePath - Absolute path to the config file
759
1053
  * @param projectFolder - Absolute path to the project root
760
1054
  */
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>;
1055
+ declare const parseConfig: (filePath: string, projectFolder: string) => Effect.Effect<NormalizedConfig, ConfigFileNotFoundError | ConfigFileEmptyError | ConfigFileParseError | ConfigModuleLoadError | ConfigVersionError | ConfigSchemaValidationError | FunctionConfigError, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path | RawConfigReader | SchemaValidator | V4ConfigParser | VercelBuildOutputParser>;
762
1056
  /**
763
1057
  * Applies post-processing transformers to a NormalizedConfig:
764
1058
  * - Vercel Build Output v3 (merges functions/routes from .vercel/output if present)
@@ -769,7 +1063,7 @@ declare const parseConfig: (filePath: string, projectFolder: string) => Effect.E
769
1063
  * @param projectFolder - Absolute path to the project root
770
1064
  * @returns The post-processed NormalizedConfig
771
1065
  */
772
- declare const postProcessConfig: (config: NormalizedConfig, projectFolder: string) => Effect.Effect<NormalizedConfig, ConfigFileEmptyError | ConfigFileParseError | ConfigModuleLoadError | ConfigVersionError, _effect_platform_Path.Path | _effect_platform_FileSystem.FileSystem | VercelBuildOutputParser>;
1066
+ declare const postProcessConfig: (config: NormalizedConfig, projectFolder: string) => Effect.Effect<NormalizedConfig, ConfigFileEmptyError | ConfigFileParseError | ConfigModuleLoadError | ConfigVersionError, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path | VercelBuildOutputParser>;
773
1067
 
774
1068
  interface ConfigV4 extends Config {
775
1069
  version: 4;
@@ -1129,7 +1423,7 @@ declare const detectFramework: (projectFolder: string) => Effect.Effect<{
1129
1423
  framework: FrameworkDefinition;
1130
1424
  packageManager: PackageManager;
1131
1425
  config: NormalizedConfig;
1132
- }, ManifestReadError | ManifestParseError | FrameworkNotDetectedError, Path.Path | FileSystem.FileSystem>;
1426
+ }, ManifestReadError | ManifestParseError | FrameworkNotDetectedError, FileSystem.FileSystem | Path.Path>;
1133
1427
 
1134
1428
  /**
1135
1429
  * Detects the package manager by checking for lockfiles in the project folder.
@@ -1138,7 +1432,7 @@ declare const detectFramework: (projectFolder: string) => Effect.Effect<{
1138
1432
  * @param projectFolder - Absolute path to the project root
1139
1433
  * @returns The detected package manager
1140
1434
  */
1141
- declare const detectPackageManager: (projectFolder: string) => Effect.Effect<PackageManager, never, Path.Path | FileSystem.FileSystem>;
1435
+ declare const detectPackageManager: (projectFolder: string) => Effect.Effect<PackageManager, never, FileSystem.FileSystem | Path.Path>;
1142
1436
 
1143
1437
  /**
1144
1438
  * All supported framework definitions, sorted by priority descending.
@@ -1150,11 +1444,15 @@ declare const FRAMEWORK_DEFINITIONS: FrameworkDefinition[];
1150
1444
  * Generates a NormalizedConfig from a framework definition and detected package manager.
1151
1445
  * Prepends the install command and builds a complete deployment configuration.
1152
1446
  *
1447
+ * Runs after the customer build, so a framework's `assetsDir` is resolved
1448
+ * against real build output.
1449
+ *
1153
1450
  * @param framework - The detected framework definition
1154
1451
  * @param packageManager - The detected package manager
1452
+ * @param projectFolder - Absolute path to the project root, used to enumerate `assetsDir`
1155
1453
  * @returns A complete NormalizedConfig with framework defaults
1156
1454
  */
1157
- declare const generateConfig: (framework: FrameworkDefinition, packageManager: PackageManager, refinedDefaults?: FrameworkDefaultConfig | undefined) => Effect.Effect<NormalizedConfig, never, never>;
1455
+ declare const generateConfig: (framework: FrameworkDefinition, packageManager: PackageManager, projectFolder: string, refinedDefaults?: FrameworkDefaultConfig | undefined) => Effect.Effect<NormalizedConfig, never, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path>;
1158
1456
 
1159
1457
  /**
1160
1458
  * Merges framework defaults with a user-provided config.
@@ -1189,7 +1487,7 @@ declare const mergeWithFrameworkDefaults: (userConfig: NormalizedConfig, framewo
1189
1487
  * @param language - The framework language to determine which manifest to read
1190
1488
  * @returns A set of dependency package names
1191
1489
  */
1192
- declare const readDependencies: (projectFolder: string, language: FrameworkLanguage) => Effect.Effect<Set<string>, ManifestReadError | ManifestParseError, Path.Path | FileSystem.FileSystem>;
1490
+ declare const readDependencies: (projectFolder: string, language: FrameworkLanguage) => Effect.Effect<Set<string>, ManifestReadError | ManifestParseError, FileSystem.FileSystem | Path.Path>;
1193
1491
 
1194
1492
  /**
1195
1493
  * Ensure a normalized config has no function files that are also defined as assets.
@@ -1199,6 +1497,6 @@ declare const readDependencies: (projectFolder: string, language: FrameworkLangu
1199
1497
  */
1200
1498
  declare const filterFunctionsFromAssets: (config: NormalizedConfig) => NormalizedConfig;
1201
1499
 
1202
- declare const NetworkConfigLive: Layer.Layer<ConfigModuleLoader | RawConfigReader | SchemaValidator | V4ConfigParser | VercelBuildOutputParser, never, _effect_platform_Path.Path | _effect_platform_FileSystem.FileSystem>;
1500
+ declare const NetworkConfigLive: Layer.Layer<ConfigModuleLoader | RawConfigReader | SchemaValidator | V4ConfigParser | VercelBuildOutputParser, never, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path>;
1203
1501
 
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 };
1502
+ 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 GigadriveNextMiddlewareDescriptor, GigadriveNextMiddlewareDescriptorSchema, type GigadriveNextMiddlewareMatcher, GigadriveNextMiddlewareMatcherSchema, type GigadriveNextPrerenderManifestV1, GigadriveNextPrerenderManifestV1Schema, type GigadriveNextPrerenderOutput, GigadriveNextPrerenderOutputSchema, type GigadriveNextPrerenderSeedMethods, GigadriveNextPrerenderSeedMethodsSchema, type GigadriveNextRouteCondition, GigadriveNextRouteConditionSchema, 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, collectAssetFiles, defineConfig, detectFramework, detectPackageManager, filterFunctionsFromAssets, generateConfig, getFunctionSettings, mergeWithFrameworkDefaults, parseConfig, parseConfigRaw, parseGigadriveNextBuildManifest, parseGigadriveNextPrerenderManifest, parseStaticAssetManifest, postProcessConfig, readDependencies };