@gigadrive/network-config 3.1.2 → 3.3.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 +28 -3
- package/dist/index.d.ts +28 -3
- package/dist/index.js +1769 -48331
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +240 -122
- package/dist/index.mjs.map +1 -1
- package/dist/nextjs-adapter.cjs +3 -0
- package/dist/nextjs-adapter.d.mts +37 -0
- package/dist/nextjs-adapter.d.ts +39 -0
- package/dist/nextjs-adapter.js +80 -0
- package/dist/nextjs-adapter.js.map +1 -0
- package/dist/nextjs-adapter.mjs +49 -0
- package/dist/nextjs-adapter.mjs.map +1 -0
- package/dist/v4/schema.json +2 -2
- package/package.json +7 -2
- package/src/v4/schema.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -110,17 +110,29 @@ interface NormalizedConfigServicePostgres extends NormalizedConfigService {
|
|
|
110
110
|
postgresVersion?: '17' | '16' | '15' | '14';
|
|
111
111
|
region?: NeonAWSRegion;
|
|
112
112
|
}
|
|
113
|
+
/** Default maximum lifetime of one function invocation, in seconds. */
|
|
114
|
+
declare const DEFAULT_FUNCTION_DURATION_SECONDS = 30;
|
|
115
|
+
/** Maximum configurable lifetime of one function invocation, in seconds (eight hours). */
|
|
116
|
+
declare const MAX_FUNCTION_DURATION_SECONDS = 28800;
|
|
113
117
|
interface NormalizedConfigEntrypoint {
|
|
114
118
|
displayName?: string;
|
|
115
119
|
path: string;
|
|
116
120
|
runtime: Runtime;
|
|
117
121
|
memory: number;
|
|
122
|
+
/**
|
|
123
|
+
* Maximum lifetime of one HTTP request, response stream, or WebSocket connection, in seconds.
|
|
124
|
+
*
|
|
125
|
+
* The limit applies to an invocation, not to the reusable compute environment that happens to
|
|
126
|
+
* serve it. The platform may suspend or reuse that environment after all invocations finish.
|
|
127
|
+
*/
|
|
118
128
|
maxDuration: number;
|
|
119
129
|
schedule?: string;
|
|
120
130
|
symlinks?: Record<string, string>;
|
|
121
131
|
environmentVariables?: Record<string, string>;
|
|
122
132
|
streaming?: boolean;
|
|
123
133
|
package?: {
|
|
134
|
+
/** Disable dependency tracing when the framework output is already self-contained. */
|
|
135
|
+
trace?: boolean;
|
|
124
136
|
rootOverwrite?: string;
|
|
125
137
|
filePathMap?: FilePathMap;
|
|
126
138
|
includeFiles?: string[];
|
|
@@ -218,7 +230,7 @@ interface FrameworkDefinition {
|
|
|
218
230
|
/** Generates deployment defaults for this framework */
|
|
219
231
|
getDefaultConfig: (packageManager: PackageManager) => FrameworkDefaultConfig;
|
|
220
232
|
/** Refines defaults with project files after a framework match, e.g. framework CLI config. */
|
|
221
|
-
refineDefaultConfig?: (defaults: FrameworkDefaultConfig, projectFolder: string) => Effect.Effect<FrameworkDefaultConfig, never, FileSystem.FileSystem>;
|
|
233
|
+
refineDefaultConfig?: (defaults: FrameworkDefaultConfig, projectFolder: string) => Effect.Effect<FrameworkDefaultConfig, never, FileSystem.FileSystem | Path.Path>;
|
|
222
234
|
}
|
|
223
235
|
interface FrameworkDefaultConfig {
|
|
224
236
|
runtime: Runtime;
|
|
@@ -231,6 +243,14 @@ interface FrameworkDefaultConfig {
|
|
|
231
243
|
commands: string[];
|
|
232
244
|
entrypoint?: string;
|
|
233
245
|
assetsDir?: string;
|
|
246
|
+
assetsPrefixToStrip?: string;
|
|
247
|
+
/** Explicit project-relative files to publish as static assets. */
|
|
248
|
+
assetPaths?: string[];
|
|
249
|
+
/** Public path overrides keyed by project-relative asset path. */
|
|
250
|
+
assetOverrides?: Record<string, {
|
|
251
|
+
path?: string;
|
|
252
|
+
contentType?: string;
|
|
253
|
+
}>;
|
|
234
254
|
populateAssetCache?: boolean;
|
|
235
255
|
routes: Array<{
|
|
236
256
|
source: string;
|
|
@@ -240,6 +260,7 @@ interface FrameworkDefaultConfig {
|
|
|
240
260
|
symlinks?: Record<string, string>;
|
|
241
261
|
excludeFiles?: string[];
|
|
242
262
|
package?: {
|
|
263
|
+
trace?: boolean;
|
|
243
264
|
rootOverwrite?: string;
|
|
244
265
|
filePathMap?: Record<string, string>;
|
|
245
266
|
includeFiles?: string[];
|
|
@@ -504,7 +525,11 @@ interface ConfigV4FunctionSettings {
|
|
|
504
525
|
*/
|
|
505
526
|
memory?: number;
|
|
506
527
|
/**
|
|
507
|
-
*
|
|
528
|
+
* Maximum lifetime of one HTTP request, response stream, or WebSocket connection, in seconds.
|
|
529
|
+
* Defaults to 30 seconds and may not be higher than eight hours (28,800 seconds).
|
|
530
|
+
*
|
|
531
|
+
* This is an invocation limit. It does not control how long the platform retains or reuses the
|
|
532
|
+
* underlying execution environment after the invocation finishes.
|
|
508
533
|
*/
|
|
509
534
|
max_duration?: number;
|
|
510
535
|
/**
|
|
@@ -633,4 +658,4 @@ declare const postProcessConfig: (config: NormalizedConfig, projectFolder: strin
|
|
|
633
658
|
|
|
634
659
|
declare const NetworkConfigLive: Layer.Layer<RawConfigReader | SchemaValidator | V4ConfigParser | VercelBuildOutputParser, never, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path>;
|
|
635
660
|
|
|
636
|
-
export { ALLOWED_CONFIG_NAMES, AVAILABLE_REGIONS, AVAILABLE_RUNTIMES, type Config, ConfigFileEmptyError, ConfigFileNotFoundError, ConfigFileParseError, ConfigSchemaValidationError, ConfigVersionError, type DetectionResult, FRAMEWORK_DEFINITIONS, type FilePathMap, type FrameworkDefaultConfig, type FrameworkDefinition, type FrameworkDetectionItem, type FrameworkLanguage, FrameworkNotDetectedError, FunctionConfigError, 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 };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -110,17 +110,29 @@ interface NormalizedConfigServicePostgres extends NormalizedConfigService {
|
|
|
110
110
|
postgresVersion?: '17' | '16' | '15' | '14';
|
|
111
111
|
region?: NeonAWSRegion;
|
|
112
112
|
}
|
|
113
|
+
/** Default maximum lifetime of one function invocation, in seconds. */
|
|
114
|
+
declare const DEFAULT_FUNCTION_DURATION_SECONDS = 30;
|
|
115
|
+
/** Maximum configurable lifetime of one function invocation, in seconds (eight hours). */
|
|
116
|
+
declare const MAX_FUNCTION_DURATION_SECONDS = 28800;
|
|
113
117
|
interface NormalizedConfigEntrypoint {
|
|
114
118
|
displayName?: string;
|
|
115
119
|
path: string;
|
|
116
120
|
runtime: Runtime;
|
|
117
121
|
memory: number;
|
|
122
|
+
/**
|
|
123
|
+
* Maximum lifetime of one HTTP request, response stream, or WebSocket connection, in seconds.
|
|
124
|
+
*
|
|
125
|
+
* The limit applies to an invocation, not to the reusable compute environment that happens to
|
|
126
|
+
* serve it. The platform may suspend or reuse that environment after all invocations finish.
|
|
127
|
+
*/
|
|
118
128
|
maxDuration: number;
|
|
119
129
|
schedule?: string;
|
|
120
130
|
symlinks?: Record<string, string>;
|
|
121
131
|
environmentVariables?: Record<string, string>;
|
|
122
132
|
streaming?: boolean;
|
|
123
133
|
package?: {
|
|
134
|
+
/** Disable dependency tracing when the framework output is already self-contained. */
|
|
135
|
+
trace?: boolean;
|
|
124
136
|
rootOverwrite?: string;
|
|
125
137
|
filePathMap?: FilePathMap;
|
|
126
138
|
includeFiles?: string[];
|
|
@@ -218,7 +230,7 @@ interface FrameworkDefinition {
|
|
|
218
230
|
/** Generates deployment defaults for this framework */
|
|
219
231
|
getDefaultConfig: (packageManager: PackageManager) => FrameworkDefaultConfig;
|
|
220
232
|
/** Refines defaults with project files after a framework match, e.g. framework CLI config. */
|
|
221
|
-
refineDefaultConfig?: (defaults: FrameworkDefaultConfig, projectFolder: string) => Effect.Effect<FrameworkDefaultConfig, never, FileSystem.FileSystem>;
|
|
233
|
+
refineDefaultConfig?: (defaults: FrameworkDefaultConfig, projectFolder: string) => Effect.Effect<FrameworkDefaultConfig, never, FileSystem.FileSystem | Path.Path>;
|
|
222
234
|
}
|
|
223
235
|
interface FrameworkDefaultConfig {
|
|
224
236
|
runtime: Runtime;
|
|
@@ -231,6 +243,14 @@ interface FrameworkDefaultConfig {
|
|
|
231
243
|
commands: string[];
|
|
232
244
|
entrypoint?: string;
|
|
233
245
|
assetsDir?: string;
|
|
246
|
+
assetsPrefixToStrip?: string;
|
|
247
|
+
/** Explicit project-relative files to publish as static assets. */
|
|
248
|
+
assetPaths?: string[];
|
|
249
|
+
/** Public path overrides keyed by project-relative asset path. */
|
|
250
|
+
assetOverrides?: Record<string, {
|
|
251
|
+
path?: string;
|
|
252
|
+
contentType?: string;
|
|
253
|
+
}>;
|
|
234
254
|
populateAssetCache?: boolean;
|
|
235
255
|
routes: Array<{
|
|
236
256
|
source: string;
|
|
@@ -240,6 +260,7 @@ interface FrameworkDefaultConfig {
|
|
|
240
260
|
symlinks?: Record<string, string>;
|
|
241
261
|
excludeFiles?: string[];
|
|
242
262
|
package?: {
|
|
263
|
+
trace?: boolean;
|
|
243
264
|
rootOverwrite?: string;
|
|
244
265
|
filePathMap?: Record<string, string>;
|
|
245
266
|
includeFiles?: string[];
|
|
@@ -504,7 +525,11 @@ interface ConfigV4FunctionSettings {
|
|
|
504
525
|
*/
|
|
505
526
|
memory?: number;
|
|
506
527
|
/**
|
|
507
|
-
*
|
|
528
|
+
* Maximum lifetime of one HTTP request, response stream, or WebSocket connection, in seconds.
|
|
529
|
+
* Defaults to 30 seconds and may not be higher than eight hours (28,800 seconds).
|
|
530
|
+
*
|
|
531
|
+
* This is an invocation limit. It does not control how long the platform retains or reuses the
|
|
532
|
+
* underlying execution environment after the invocation finishes.
|
|
508
533
|
*/
|
|
509
534
|
max_duration?: number;
|
|
510
535
|
/**
|
|
@@ -633,4 +658,4 @@ declare const postProcessConfig: (config: NormalizedConfig, projectFolder: strin
|
|
|
633
658
|
|
|
634
659
|
declare const NetworkConfigLive: Layer.Layer<RawConfigReader | SchemaValidator | V4ConfigParser | VercelBuildOutputParser, never, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path>;
|
|
635
660
|
|
|
636
|
-
export { ALLOWED_CONFIG_NAMES, AVAILABLE_REGIONS, AVAILABLE_RUNTIMES, type Config, ConfigFileEmptyError, ConfigFileNotFoundError, ConfigFileParseError, ConfigSchemaValidationError, ConfigVersionError, type DetectionResult, FRAMEWORK_DEFINITIONS, type FilePathMap, type FrameworkDefaultConfig, type FrameworkDefinition, type FrameworkDetectionItem, type FrameworkLanguage, FrameworkNotDetectedError, FunctionConfigError, 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 };
|
|
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 };
|