@gigadrive/network-config 3.3.2 → 3.4.1
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 +187 -1
- package/dist/index.d.ts +187 -1
- package/dist/index.js +280 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +279 -18
- package/dist/index.mjs.map +1 -1
- package/dist/nextjs-adapter.d.mts +7 -33
- package/dist/nextjs-adapter.d.ts +6 -34
- package/dist/nextjs-adapter.js +324 -21
- package/dist/nextjs-adapter.js.map +1 -1
- package/dist/nextjs-adapter.mjs +324 -22
- package/dist/nextjs-adapter.mjs.map +1 -1
- package/dist/nextjs-cache-components-handler.d.mts +20 -0
- package/dist/nextjs-cache-components-handler.d.ts +20 -0
- package/dist/nextjs-cache-components-handler.js +200 -0
- package/dist/nextjs-cache-components-handler.js.map +1 -0
- package/dist/nextjs-cache-components-handler.mjs +177 -0
- package/dist/nextjs-cache-components-handler.mjs.map +1 -0
- package/dist/nextjs-cache-handler.d.mts +12 -0
- package/dist/nextjs-cache-handler.d.ts +12 -0
- package/dist/nextjs-cache-handler.js +141 -0
- package/dist/nextjs-cache-handler.js.map +1 -0
- package/dist/nextjs-cache-handler.mjs +118 -0
- package/dist/nextjs-cache-handler.mjs.map +1 -0
- package/dist/nextjs-image-loader.d.mts +9 -0
- package/dist/nextjs-image-loader.d.ts +9 -0
- package/dist/nextjs-image-loader.js +36 -0
- package/dist/nextjs-image-loader.js.map +1 -0
- package/dist/nextjs-image-loader.mjs +15 -0
- package/dist/nextjs-image-loader.mjs.map +1 -0
- package/dist/v4/schema.json +85 -0
- package/package.json +19 -3
- package/src/v4/schema.json +85 -0
package/dist/index.d.mts
CHANGED
|
@@ -3,6 +3,169 @@ import { Effect, Schema, Layer } from 'effect';
|
|
|
3
3
|
import * as _effect_platform_Path from '@effect/platform/Path';
|
|
4
4
|
import * as _effect_platform_FileSystem from '@effect/platform/FileSystem';
|
|
5
5
|
|
|
6
|
+
interface NormalizedImageLocalPattern {
|
|
7
|
+
pathname?: string;
|
|
8
|
+
search?: string;
|
|
9
|
+
}
|
|
10
|
+
interface NormalizedImageRemotePattern extends NormalizedImageLocalPattern {
|
|
11
|
+
protocol?: 'http' | 'https';
|
|
12
|
+
hostname: string;
|
|
13
|
+
port?: string;
|
|
14
|
+
}
|
|
15
|
+
type NormalizedImageFormat = 'image/avif' | 'image/webp' | 'image/jpeg' | 'image/png';
|
|
16
|
+
type NormalizedImageFit = 'contain' | 'cover' | 'fill' | 'inside' | 'outside';
|
|
17
|
+
interface NormalizedImageVariant {
|
|
18
|
+
width?: number;
|
|
19
|
+
height?: number;
|
|
20
|
+
quality?: number;
|
|
21
|
+
format?: NormalizedImageFormat;
|
|
22
|
+
fit?: NormalizedImageFit;
|
|
23
|
+
}
|
|
24
|
+
interface NormalizedImagePolicy {
|
|
25
|
+
localPatterns: NormalizedImageLocalPattern[];
|
|
26
|
+
remotePatterns: NormalizedImageRemotePattern[];
|
|
27
|
+
widths: number[];
|
|
28
|
+
heights: number[];
|
|
29
|
+
qualities: number[];
|
|
30
|
+
formats: NormalizedImageFormat[];
|
|
31
|
+
minimumCacheTTL: number;
|
|
32
|
+
dangerouslyAllowSVG: boolean;
|
|
33
|
+
contentSecurityPolicy: string;
|
|
34
|
+
contentDispositionType: 'inline' | 'attachment';
|
|
35
|
+
maximumRedirects: number;
|
|
36
|
+
maximumResponseBody: number;
|
|
37
|
+
variants: Record<string, NormalizedImageVariant>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** JSON values accepted in the portable Next.js adapter manifest. */
|
|
41
|
+
type JsonValue = null | boolean | number | string | JsonValue[] | {
|
|
42
|
+
[key: string]: JsonValue;
|
|
43
|
+
};
|
|
44
|
+
type GigadriveNextRuntime = 'nodejs' | 'edge';
|
|
45
|
+
interface GigadriveNextEdgeRuntime {
|
|
46
|
+
modulePath: string;
|
|
47
|
+
entryKey: string;
|
|
48
|
+
handlerExport: string;
|
|
49
|
+
}
|
|
50
|
+
interface GigadriveNextEntrypoint {
|
|
51
|
+
id: string;
|
|
52
|
+
runtime: GigadriveNextRuntime;
|
|
53
|
+
filePath: string;
|
|
54
|
+
outputIds: string[];
|
|
55
|
+
assets: Record<string, string>;
|
|
56
|
+
wasmAssets?: Record<string, string>;
|
|
57
|
+
edgeRuntime?: GigadriveNextEdgeRuntime;
|
|
58
|
+
config: {
|
|
59
|
+
maxDuration?: number;
|
|
60
|
+
preferredRegion?: string | string[];
|
|
61
|
+
env?: Record<string, string>;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
interface GigadriveNextRouteOutput {
|
|
65
|
+
id: string;
|
|
66
|
+
type: 'PAGES' | 'PAGES_API' | 'APP_PAGE' | 'APP_ROUTE' | 'MIDDLEWARE';
|
|
67
|
+
filePath: string;
|
|
68
|
+
pathname: string;
|
|
69
|
+
sourcePage: string;
|
|
70
|
+
runtime: GigadriveNextRuntime;
|
|
71
|
+
assets: Record<string, string>;
|
|
72
|
+
wasmAssets?: Record<string, string>;
|
|
73
|
+
edgeRuntime?: GigadriveNextEdgeRuntime;
|
|
74
|
+
config: {
|
|
75
|
+
maxDuration?: number;
|
|
76
|
+
preferredRegion?: string | string[];
|
|
77
|
+
env?: Record<string, string>;
|
|
78
|
+
matchers?: Array<{
|
|
79
|
+
source: string;
|
|
80
|
+
sourceRegex: string;
|
|
81
|
+
has?: JsonValue[];
|
|
82
|
+
missing?: JsonValue[];
|
|
83
|
+
}>;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
interface GigadriveNextPrerenderOutput {
|
|
87
|
+
id: string;
|
|
88
|
+
type: 'PRERENDER';
|
|
89
|
+
pathname: string;
|
|
90
|
+
parentOutputId: string;
|
|
91
|
+
groupId: number;
|
|
92
|
+
pprChain?: {
|
|
93
|
+
headers: Record<string, string>;
|
|
94
|
+
};
|
|
95
|
+
parentFallbackMode?: JsonValue;
|
|
96
|
+
fallback?: {
|
|
97
|
+
filePath?: string;
|
|
98
|
+
initialStatus?: number;
|
|
99
|
+
initialHeaders?: Record<string, string | string[]>;
|
|
100
|
+
initialExpiration?: number;
|
|
101
|
+
initialRevalidate?: number | false;
|
|
102
|
+
postponedState?: string;
|
|
103
|
+
};
|
|
104
|
+
config: {
|
|
105
|
+
allowQuery?: string[];
|
|
106
|
+
allowHeader?: string[];
|
|
107
|
+
bypassFor?: JsonValue[];
|
|
108
|
+
renderingMode?: string;
|
|
109
|
+
partialFallback?: boolean;
|
|
110
|
+
bypassToken?: string;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
interface GigadriveNextStaticOutput {
|
|
114
|
+
id: string;
|
|
115
|
+
type: 'STATIC_FILE';
|
|
116
|
+
filePath: string;
|
|
117
|
+
pathname: string;
|
|
118
|
+
immutableHash?: string;
|
|
119
|
+
}
|
|
120
|
+
interface GigadriveNextBuildManifestV1 {
|
|
121
|
+
version: 1;
|
|
122
|
+
output: 'standalone' | 'export';
|
|
123
|
+
distDir: string;
|
|
124
|
+
repoRootToProject: string;
|
|
125
|
+
nextVersion: string;
|
|
126
|
+
buildId: string;
|
|
127
|
+
}
|
|
128
|
+
/** Portable build/runtime plan emitted by the Next.js 16 deployment adapter. */
|
|
129
|
+
interface GigadriveNextBuildManifestV2 {
|
|
130
|
+
version: 2;
|
|
131
|
+
mode: 'adapter-v2' | 'export';
|
|
132
|
+
distDir: string;
|
|
133
|
+
repoRootToProject: string;
|
|
134
|
+
nextVersion: string;
|
|
135
|
+
buildId: string;
|
|
136
|
+
config: {
|
|
137
|
+
basePath: string;
|
|
138
|
+
trailingSlash: boolean;
|
|
139
|
+
cacheComponents: boolean;
|
|
140
|
+
i18n?: JsonValue;
|
|
141
|
+
images?: NormalizedImagePolicy;
|
|
142
|
+
};
|
|
143
|
+
routing: {
|
|
144
|
+
beforeMiddleware: JsonValue[];
|
|
145
|
+
beforeFiles: JsonValue[];
|
|
146
|
+
afterFiles: JsonValue[];
|
|
147
|
+
dynamicRoutes: JsonValue[];
|
|
148
|
+
onMatch: JsonValue[];
|
|
149
|
+
fallback: JsonValue[];
|
|
150
|
+
shouldNormalizeNextData: boolean;
|
|
151
|
+
rsc: JsonValue;
|
|
152
|
+
};
|
|
153
|
+
outputs: {
|
|
154
|
+
pages: GigadriveNextRouteOutput[];
|
|
155
|
+
middleware?: GigadriveNextRouteOutput;
|
|
156
|
+
appPages: GigadriveNextRouteOutput[];
|
|
157
|
+
pagesApi: GigadriveNextRouteOutput[];
|
|
158
|
+
appRoutes: GigadriveNextRouteOutput[];
|
|
159
|
+
prerenders: GigadriveNextPrerenderOutput[];
|
|
160
|
+
staticFiles: GigadriveNextStaticOutput[];
|
|
161
|
+
};
|
|
162
|
+
entrypoints: GigadriveNextEntrypoint[];
|
|
163
|
+
outputEntrypoints: Record<string, string>;
|
|
164
|
+
}
|
|
165
|
+
type GigadriveNextBuildManifest = GigadriveNextBuildManifestV1 | GigadriveNextBuildManifestV2;
|
|
166
|
+
/** Parses and structurally validates adapter metadata before deployment code consumes it. */
|
|
167
|
+
declare const parseGigadriveNextBuildManifest: (content: string) => GigadriveNextBuildManifest | undefined;
|
|
168
|
+
|
|
6
169
|
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"];
|
|
7
170
|
type Region = (typeof REGION_DEFINITIONS)[number];
|
|
8
171
|
declare const AVAILABLE_REGIONS: Region[];
|
|
@@ -52,6 +215,12 @@ interface NormalizedConfig {
|
|
|
52
215
|
*/
|
|
53
216
|
populateCache?: boolean;
|
|
54
217
|
};
|
|
218
|
+
/** Framework-specific runtime metadata understood by the Network gateway. */
|
|
219
|
+
framework?: NormalizedFramework;
|
|
220
|
+
/** Provider-neutral managed image optimization policy. */
|
|
221
|
+
images?: NormalizedImagePolicy;
|
|
222
|
+
/** Content-addressable files mounted into more than one function package. */
|
|
223
|
+
sharedArtifacts?: NormalizedSharedArtifact[];
|
|
55
224
|
/**
|
|
56
225
|
* Additional environment variables to set during runtime and build.
|
|
57
226
|
*/
|
|
@@ -137,8 +306,19 @@ interface NormalizedConfigEntrypoint {
|
|
|
137
306
|
filePathMap?: FilePathMap;
|
|
138
307
|
includeFiles?: string[];
|
|
139
308
|
excludeFiles?: string[];
|
|
309
|
+
/** Shared deployment artifacts that must be mounted before this overlay. */
|
|
310
|
+
sharedArtifactIds?: string[];
|
|
140
311
|
};
|
|
141
312
|
}
|
|
313
|
+
type NormalizedFramework = NormalizedNextjsFramework;
|
|
314
|
+
type NormalizedNextjsFramework = Omit<GigadriveNextBuildManifestV2, 'version'> & {
|
|
315
|
+
type: 'nextjs';
|
|
316
|
+
schemaVersion: 2;
|
|
317
|
+
};
|
|
318
|
+
interface NormalizedSharedArtifact {
|
|
319
|
+
id: string;
|
|
320
|
+
filePathMap: FilePathMap;
|
|
321
|
+
}
|
|
142
322
|
interface NormalizedConfigRoute {
|
|
143
323
|
path: string;
|
|
144
324
|
destination: string;
|
|
@@ -266,6 +446,8 @@ interface FrameworkDefaultConfig {
|
|
|
266
446
|
includeFiles?: string[];
|
|
267
447
|
excludeFiles?: string[];
|
|
268
448
|
};
|
|
449
|
+
/** Advanced framework output that replaces the one-entrypoint defaults. */
|
|
450
|
+
normalizedConfig?: Partial<NormalizedConfig>;
|
|
269
451
|
}
|
|
270
452
|
interface DetectionResult {
|
|
271
453
|
framework: FrameworkDefinition;
|
|
@@ -444,6 +626,8 @@ interface ConfigV4 extends Config {
|
|
|
444
626
|
* 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.
|
|
445
627
|
*/
|
|
446
628
|
populateAssetCache?: boolean | null;
|
|
629
|
+
/** Managed image optimization policy for this deployment. */
|
|
630
|
+
images?: Partial<NormalizedImagePolicy> | null;
|
|
447
631
|
/**
|
|
448
632
|
* The regions to which the project will be deployed. Use "global" to deploy to all regions. More regions will incur higher costs.
|
|
449
633
|
*/
|
|
@@ -589,6 +773,7 @@ declare const V4ConfigParser_base: Effect.Service.Class<V4ConfigParser, "V4Confi
|
|
|
589
773
|
};
|
|
590
774
|
environmentVariables: Record<string, string>;
|
|
591
775
|
commands: string[];
|
|
776
|
+
images: NormalizedImagePolicy | undefined;
|
|
592
777
|
entrypoints: NormalizedConfigEntrypoint[];
|
|
593
778
|
errors: never[];
|
|
594
779
|
warnings: never[];
|
|
@@ -631,6 +816,7 @@ declare const parseConfigRaw: (filePath: string, projectFolder: string) => Effec
|
|
|
631
816
|
};
|
|
632
817
|
environmentVariables: Record<string, string>;
|
|
633
818
|
commands: string[];
|
|
819
|
+
images: NormalizedImagePolicy | undefined;
|
|
634
820
|
entrypoints: NormalizedConfigEntrypoint[];
|
|
635
821
|
errors: never[];
|
|
636
822
|
warnings: never[];
|
|
@@ -658,4 +844,4 @@ declare const postProcessConfig: (config: NormalizedConfig, projectFolder: strin
|
|
|
658
844
|
|
|
659
845
|
declare const NetworkConfigLive: Layer.Layer<RawConfigReader | SchemaValidator | V4ConfigParser | VercelBuildOutputParser, never, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path>;
|
|
660
846
|
|
|
661
|
-
export { ALLOWED_CONFIG_NAMES, AVAILABLE_REGIONS, AVAILABLE_RUNTIMES, type Config, ConfigFileEmptyError, ConfigFileNotFoundError, ConfigFileParseError, ConfigSchemaValidationError, ConfigVersionError, DEFAULT_FUNCTION_DURATION_SECONDS, type DetectionResult, FRAMEWORK_DEFINITIONS, type FilePathMap, type FrameworkDefaultConfig, type FrameworkDefinition, type FrameworkDetectionItem, type FrameworkLanguage, FrameworkNotDetectedError, FunctionConfigError, 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 NormalizedConfigServicePostgres, type NormalizedConfigServiceRedis, type NormalizedConfigServiceType, type PackageManager, RawConfigReader, type Region, type Runtime, SchemaValidator, type UpstashAWSRegion, V4ConfigParser, VercelBuildOutputParser, detectFramework, detectPackageManager, filterFunctionsFromAssets, generateConfig, getFunctionSettings, mergeWithFrameworkDefaults, parseConfig, parseConfigRaw, postProcessConfig, readDependencies };
|
|
847
|
+
export { ALLOWED_CONFIG_NAMES, AVAILABLE_REGIONS, AVAILABLE_RUNTIMES, type Config, ConfigFileEmptyError, ConfigFileNotFoundError, ConfigFileParseError, ConfigSchemaValidationError, 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 GigadriveNextEdgeRuntime, type GigadriveNextEntrypoint, type GigadriveNextPrerenderOutput, type GigadriveNextRouteOutput, type GigadriveNextRuntime, type GigadriveNextStaticOutput, 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 NormalizedConfigServicePostgres, type NormalizedConfigServiceRedis, type NormalizedConfigServiceType, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,169 @@ import { Effect, Schema, Layer } from 'effect';
|
|
|
3
3
|
import * as _effect_platform_Path from '@effect/platform/Path';
|
|
4
4
|
import * as _effect_platform_FileSystem from '@effect/platform/FileSystem';
|
|
5
5
|
|
|
6
|
+
interface NormalizedImageLocalPattern {
|
|
7
|
+
pathname?: string;
|
|
8
|
+
search?: string;
|
|
9
|
+
}
|
|
10
|
+
interface NormalizedImageRemotePattern extends NormalizedImageLocalPattern {
|
|
11
|
+
protocol?: 'http' | 'https';
|
|
12
|
+
hostname: string;
|
|
13
|
+
port?: string;
|
|
14
|
+
}
|
|
15
|
+
type NormalizedImageFormat = 'image/avif' | 'image/webp' | 'image/jpeg' | 'image/png';
|
|
16
|
+
type NormalizedImageFit = 'contain' | 'cover' | 'fill' | 'inside' | 'outside';
|
|
17
|
+
interface NormalizedImageVariant {
|
|
18
|
+
width?: number;
|
|
19
|
+
height?: number;
|
|
20
|
+
quality?: number;
|
|
21
|
+
format?: NormalizedImageFormat;
|
|
22
|
+
fit?: NormalizedImageFit;
|
|
23
|
+
}
|
|
24
|
+
interface NormalizedImagePolicy {
|
|
25
|
+
localPatterns: NormalizedImageLocalPattern[];
|
|
26
|
+
remotePatterns: NormalizedImageRemotePattern[];
|
|
27
|
+
widths: number[];
|
|
28
|
+
heights: number[];
|
|
29
|
+
qualities: number[];
|
|
30
|
+
formats: NormalizedImageFormat[];
|
|
31
|
+
minimumCacheTTL: number;
|
|
32
|
+
dangerouslyAllowSVG: boolean;
|
|
33
|
+
contentSecurityPolicy: string;
|
|
34
|
+
contentDispositionType: 'inline' | 'attachment';
|
|
35
|
+
maximumRedirects: number;
|
|
36
|
+
maximumResponseBody: number;
|
|
37
|
+
variants: Record<string, NormalizedImageVariant>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** JSON values accepted in the portable Next.js adapter manifest. */
|
|
41
|
+
type JsonValue = null | boolean | number | string | JsonValue[] | {
|
|
42
|
+
[key: string]: JsonValue;
|
|
43
|
+
};
|
|
44
|
+
type GigadriveNextRuntime = 'nodejs' | 'edge';
|
|
45
|
+
interface GigadriveNextEdgeRuntime {
|
|
46
|
+
modulePath: string;
|
|
47
|
+
entryKey: string;
|
|
48
|
+
handlerExport: string;
|
|
49
|
+
}
|
|
50
|
+
interface GigadriveNextEntrypoint {
|
|
51
|
+
id: string;
|
|
52
|
+
runtime: GigadriveNextRuntime;
|
|
53
|
+
filePath: string;
|
|
54
|
+
outputIds: string[];
|
|
55
|
+
assets: Record<string, string>;
|
|
56
|
+
wasmAssets?: Record<string, string>;
|
|
57
|
+
edgeRuntime?: GigadriveNextEdgeRuntime;
|
|
58
|
+
config: {
|
|
59
|
+
maxDuration?: number;
|
|
60
|
+
preferredRegion?: string | string[];
|
|
61
|
+
env?: Record<string, string>;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
interface GigadriveNextRouteOutput {
|
|
65
|
+
id: string;
|
|
66
|
+
type: 'PAGES' | 'PAGES_API' | 'APP_PAGE' | 'APP_ROUTE' | 'MIDDLEWARE';
|
|
67
|
+
filePath: string;
|
|
68
|
+
pathname: string;
|
|
69
|
+
sourcePage: string;
|
|
70
|
+
runtime: GigadriveNextRuntime;
|
|
71
|
+
assets: Record<string, string>;
|
|
72
|
+
wasmAssets?: Record<string, string>;
|
|
73
|
+
edgeRuntime?: GigadriveNextEdgeRuntime;
|
|
74
|
+
config: {
|
|
75
|
+
maxDuration?: number;
|
|
76
|
+
preferredRegion?: string | string[];
|
|
77
|
+
env?: Record<string, string>;
|
|
78
|
+
matchers?: Array<{
|
|
79
|
+
source: string;
|
|
80
|
+
sourceRegex: string;
|
|
81
|
+
has?: JsonValue[];
|
|
82
|
+
missing?: JsonValue[];
|
|
83
|
+
}>;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
interface GigadriveNextPrerenderOutput {
|
|
87
|
+
id: string;
|
|
88
|
+
type: 'PRERENDER';
|
|
89
|
+
pathname: string;
|
|
90
|
+
parentOutputId: string;
|
|
91
|
+
groupId: number;
|
|
92
|
+
pprChain?: {
|
|
93
|
+
headers: Record<string, string>;
|
|
94
|
+
};
|
|
95
|
+
parentFallbackMode?: JsonValue;
|
|
96
|
+
fallback?: {
|
|
97
|
+
filePath?: string;
|
|
98
|
+
initialStatus?: number;
|
|
99
|
+
initialHeaders?: Record<string, string | string[]>;
|
|
100
|
+
initialExpiration?: number;
|
|
101
|
+
initialRevalidate?: number | false;
|
|
102
|
+
postponedState?: string;
|
|
103
|
+
};
|
|
104
|
+
config: {
|
|
105
|
+
allowQuery?: string[];
|
|
106
|
+
allowHeader?: string[];
|
|
107
|
+
bypassFor?: JsonValue[];
|
|
108
|
+
renderingMode?: string;
|
|
109
|
+
partialFallback?: boolean;
|
|
110
|
+
bypassToken?: string;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
interface GigadriveNextStaticOutput {
|
|
114
|
+
id: string;
|
|
115
|
+
type: 'STATIC_FILE';
|
|
116
|
+
filePath: string;
|
|
117
|
+
pathname: string;
|
|
118
|
+
immutableHash?: string;
|
|
119
|
+
}
|
|
120
|
+
interface GigadriveNextBuildManifestV1 {
|
|
121
|
+
version: 1;
|
|
122
|
+
output: 'standalone' | 'export';
|
|
123
|
+
distDir: string;
|
|
124
|
+
repoRootToProject: string;
|
|
125
|
+
nextVersion: string;
|
|
126
|
+
buildId: string;
|
|
127
|
+
}
|
|
128
|
+
/** Portable build/runtime plan emitted by the Next.js 16 deployment adapter. */
|
|
129
|
+
interface GigadriveNextBuildManifestV2 {
|
|
130
|
+
version: 2;
|
|
131
|
+
mode: 'adapter-v2' | 'export';
|
|
132
|
+
distDir: string;
|
|
133
|
+
repoRootToProject: string;
|
|
134
|
+
nextVersion: string;
|
|
135
|
+
buildId: string;
|
|
136
|
+
config: {
|
|
137
|
+
basePath: string;
|
|
138
|
+
trailingSlash: boolean;
|
|
139
|
+
cacheComponents: boolean;
|
|
140
|
+
i18n?: JsonValue;
|
|
141
|
+
images?: NormalizedImagePolicy;
|
|
142
|
+
};
|
|
143
|
+
routing: {
|
|
144
|
+
beforeMiddleware: JsonValue[];
|
|
145
|
+
beforeFiles: JsonValue[];
|
|
146
|
+
afterFiles: JsonValue[];
|
|
147
|
+
dynamicRoutes: JsonValue[];
|
|
148
|
+
onMatch: JsonValue[];
|
|
149
|
+
fallback: JsonValue[];
|
|
150
|
+
shouldNormalizeNextData: boolean;
|
|
151
|
+
rsc: JsonValue;
|
|
152
|
+
};
|
|
153
|
+
outputs: {
|
|
154
|
+
pages: GigadriveNextRouteOutput[];
|
|
155
|
+
middleware?: GigadriveNextRouteOutput;
|
|
156
|
+
appPages: GigadriveNextRouteOutput[];
|
|
157
|
+
pagesApi: GigadriveNextRouteOutput[];
|
|
158
|
+
appRoutes: GigadriveNextRouteOutput[];
|
|
159
|
+
prerenders: GigadriveNextPrerenderOutput[];
|
|
160
|
+
staticFiles: GigadriveNextStaticOutput[];
|
|
161
|
+
};
|
|
162
|
+
entrypoints: GigadriveNextEntrypoint[];
|
|
163
|
+
outputEntrypoints: Record<string, string>;
|
|
164
|
+
}
|
|
165
|
+
type GigadriveNextBuildManifest = GigadriveNextBuildManifestV1 | GigadriveNextBuildManifestV2;
|
|
166
|
+
/** Parses and structurally validates adapter metadata before deployment code consumes it. */
|
|
167
|
+
declare const parseGigadriveNextBuildManifest: (content: string) => GigadriveNextBuildManifest | undefined;
|
|
168
|
+
|
|
6
169
|
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"];
|
|
7
170
|
type Region = (typeof REGION_DEFINITIONS)[number];
|
|
8
171
|
declare const AVAILABLE_REGIONS: Region[];
|
|
@@ -52,6 +215,12 @@ interface NormalizedConfig {
|
|
|
52
215
|
*/
|
|
53
216
|
populateCache?: boolean;
|
|
54
217
|
};
|
|
218
|
+
/** Framework-specific runtime metadata understood by the Network gateway. */
|
|
219
|
+
framework?: NormalizedFramework;
|
|
220
|
+
/** Provider-neutral managed image optimization policy. */
|
|
221
|
+
images?: NormalizedImagePolicy;
|
|
222
|
+
/** Content-addressable files mounted into more than one function package. */
|
|
223
|
+
sharedArtifacts?: NormalizedSharedArtifact[];
|
|
55
224
|
/**
|
|
56
225
|
* Additional environment variables to set during runtime and build.
|
|
57
226
|
*/
|
|
@@ -137,8 +306,19 @@ interface NormalizedConfigEntrypoint {
|
|
|
137
306
|
filePathMap?: FilePathMap;
|
|
138
307
|
includeFiles?: string[];
|
|
139
308
|
excludeFiles?: string[];
|
|
309
|
+
/** Shared deployment artifacts that must be mounted before this overlay. */
|
|
310
|
+
sharedArtifactIds?: string[];
|
|
140
311
|
};
|
|
141
312
|
}
|
|
313
|
+
type NormalizedFramework = NormalizedNextjsFramework;
|
|
314
|
+
type NormalizedNextjsFramework = Omit<GigadriveNextBuildManifestV2, 'version'> & {
|
|
315
|
+
type: 'nextjs';
|
|
316
|
+
schemaVersion: 2;
|
|
317
|
+
};
|
|
318
|
+
interface NormalizedSharedArtifact {
|
|
319
|
+
id: string;
|
|
320
|
+
filePathMap: FilePathMap;
|
|
321
|
+
}
|
|
142
322
|
interface NormalizedConfigRoute {
|
|
143
323
|
path: string;
|
|
144
324
|
destination: string;
|
|
@@ -266,6 +446,8 @@ interface FrameworkDefaultConfig {
|
|
|
266
446
|
includeFiles?: string[];
|
|
267
447
|
excludeFiles?: string[];
|
|
268
448
|
};
|
|
449
|
+
/** Advanced framework output that replaces the one-entrypoint defaults. */
|
|
450
|
+
normalizedConfig?: Partial<NormalizedConfig>;
|
|
269
451
|
}
|
|
270
452
|
interface DetectionResult {
|
|
271
453
|
framework: FrameworkDefinition;
|
|
@@ -444,6 +626,8 @@ interface ConfigV4 extends Config {
|
|
|
444
626
|
* 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.
|
|
445
627
|
*/
|
|
446
628
|
populateAssetCache?: boolean | null;
|
|
629
|
+
/** Managed image optimization policy for this deployment. */
|
|
630
|
+
images?: Partial<NormalizedImagePolicy> | null;
|
|
447
631
|
/**
|
|
448
632
|
* The regions to which the project will be deployed. Use "global" to deploy to all regions. More regions will incur higher costs.
|
|
449
633
|
*/
|
|
@@ -589,6 +773,7 @@ declare const V4ConfigParser_base: Effect.Service.Class<V4ConfigParser, "V4Confi
|
|
|
589
773
|
};
|
|
590
774
|
environmentVariables: Record<string, string>;
|
|
591
775
|
commands: string[];
|
|
776
|
+
images: NormalizedImagePolicy | undefined;
|
|
592
777
|
entrypoints: NormalizedConfigEntrypoint[];
|
|
593
778
|
errors: never[];
|
|
594
779
|
warnings: never[];
|
|
@@ -631,6 +816,7 @@ declare const parseConfigRaw: (filePath: string, projectFolder: string) => Effec
|
|
|
631
816
|
};
|
|
632
817
|
environmentVariables: Record<string, string>;
|
|
633
818
|
commands: string[];
|
|
819
|
+
images: NormalizedImagePolicy | undefined;
|
|
634
820
|
entrypoints: NormalizedConfigEntrypoint[];
|
|
635
821
|
errors: never[];
|
|
636
822
|
warnings: never[];
|
|
@@ -658,4 +844,4 @@ declare const postProcessConfig: (config: NormalizedConfig, projectFolder: strin
|
|
|
658
844
|
|
|
659
845
|
declare const NetworkConfigLive: Layer.Layer<RawConfigReader | SchemaValidator | V4ConfigParser | VercelBuildOutputParser, never, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path>;
|
|
660
846
|
|
|
661
|
-
export { ALLOWED_CONFIG_NAMES, AVAILABLE_REGIONS, AVAILABLE_RUNTIMES, type Config, ConfigFileEmptyError, ConfigFileNotFoundError, ConfigFileParseError, ConfigSchemaValidationError, ConfigVersionError, DEFAULT_FUNCTION_DURATION_SECONDS, type DetectionResult, FRAMEWORK_DEFINITIONS, type FilePathMap, type FrameworkDefaultConfig, type FrameworkDefinition, type FrameworkDetectionItem, type FrameworkLanguage, FrameworkNotDetectedError, FunctionConfigError, 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 NormalizedConfigServicePostgres, type NormalizedConfigServiceRedis, type NormalizedConfigServiceType, type PackageManager, RawConfigReader, type Region, type Runtime, SchemaValidator, type UpstashAWSRegion, V4ConfigParser, VercelBuildOutputParser, detectFramework, detectPackageManager, filterFunctionsFromAssets, generateConfig, getFunctionSettings, mergeWithFrameworkDefaults, parseConfig, parseConfigRaw, postProcessConfig, readDependencies };
|
|
847
|
+
export { ALLOWED_CONFIG_NAMES, AVAILABLE_REGIONS, AVAILABLE_RUNTIMES, type Config, ConfigFileEmptyError, ConfigFileNotFoundError, ConfigFileParseError, ConfigSchemaValidationError, 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 GigadriveNextEdgeRuntime, type GigadriveNextEntrypoint, type GigadriveNextPrerenderOutput, type GigadriveNextRouteOutput, type GigadriveNextRuntime, type GigadriveNextStaticOutput, 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 NormalizedConfigServicePostgres, type NormalizedConfigServiceRedis, type NormalizedConfigServiceType, 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 };
|