@gigadrive/network-config 3.1.2 → 3.2.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 +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -4
- package/dist/index.mjs.map +1 -1
- package/dist/v4/schema.json +2 -2
- package/package.json +3 -3
- package/src/v4/schema.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -110,11 +110,21 @@ 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>;
|
|
@@ -504,7 +514,11 @@ interface ConfigV4FunctionSettings {
|
|
|
504
514
|
*/
|
|
505
515
|
memory?: number;
|
|
506
516
|
/**
|
|
507
|
-
*
|
|
517
|
+
* Maximum lifetime of one HTTP request, response stream, or WebSocket connection, in seconds.
|
|
518
|
+
* Defaults to 30 seconds and may not be higher than eight hours (28,800 seconds).
|
|
519
|
+
*
|
|
520
|
+
* This is an invocation limit. It does not control how long the platform retains or reuses the
|
|
521
|
+
* underlying execution environment after the invocation finishes.
|
|
508
522
|
*/
|
|
509
523
|
max_duration?: number;
|
|
510
524
|
/**
|
|
@@ -633,4 +647,4 @@ declare const postProcessConfig: (config: NormalizedConfig, projectFolder: strin
|
|
|
633
647
|
|
|
634
648
|
declare const NetworkConfigLive: Layer.Layer<RawConfigReader | SchemaValidator | V4ConfigParser | VercelBuildOutputParser, never, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path>;
|
|
635
649
|
|
|
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 };
|
|
650
|
+
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,11 +110,21 @@ 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>;
|
|
@@ -504,7 +514,11 @@ interface ConfigV4FunctionSettings {
|
|
|
504
514
|
*/
|
|
505
515
|
memory?: number;
|
|
506
516
|
/**
|
|
507
|
-
*
|
|
517
|
+
* Maximum lifetime of one HTTP request, response stream, or WebSocket connection, in seconds.
|
|
518
|
+
* Defaults to 30 seconds and may not be higher than eight hours (28,800 seconds).
|
|
519
|
+
*
|
|
520
|
+
* This is an invocation limit. It does not control how long the platform retains or reuses the
|
|
521
|
+
* underlying execution environment after the invocation finishes.
|
|
508
522
|
*/
|
|
509
523
|
max_duration?: number;
|
|
510
524
|
/**
|
|
@@ -633,4 +647,4 @@ declare const postProcessConfig: (config: NormalizedConfig, projectFolder: strin
|
|
|
633
647
|
|
|
634
648
|
declare const NetworkConfigLive: Layer.Layer<RawConfigReader | SchemaValidator | V4ConfigParser | VercelBuildOutputParser, never, _effect_platform_FileSystem.FileSystem | _effect_platform_Path.Path>;
|
|
635
649
|
|
|
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 };
|
|
650
|
+
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.js
CHANGED
|
@@ -45592,6 +45592,10 @@ schema (${ast._tag}): ${ast}`;
|
|
|
45592
45592
|
};
|
|
45593
45593
|
};
|
|
45594
45594
|
|
|
45595
|
+
// src/normalized-config.ts
|
|
45596
|
+
var DEFAULT_FUNCTION_DURATION_SECONDS = 30;
|
|
45597
|
+
var MAX_FUNCTION_DURATION_SECONDS = 28800;
|
|
45598
|
+
|
|
45595
45599
|
// src/services/raw-config-reader.ts
|
|
45596
45600
|
var import_yaml = __toESM(require_dist());
|
|
45597
45601
|
var ALLOWED_CONFIG_NAMES = [
|
|
@@ -47551,7 +47555,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
47551
47555
|
var DISALLOWED_ASSET_EXTENSIONS = [".htaccess", ".htpasswd"];
|
|
47552
47556
|
var DEFAULT_FUNCTION_SETTINGS = {
|
|
47553
47557
|
memory: 128,
|
|
47554
|
-
max_duration:
|
|
47558
|
+
max_duration: DEFAULT_FUNCTION_DURATION_SECONDS,
|
|
47555
47559
|
schedule: void 0,
|
|
47556
47560
|
symlinks: void 0,
|
|
47557
47561
|
excludeFiles: void 0,
|
|
@@ -47648,7 +47652,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
47648
47652
|
path: file,
|
|
47649
47653
|
runtime: runtime5,
|
|
47650
47654
|
memory: settings.memory ?? 128,
|
|
47651
|
-
maxDuration: settings.max_duration ??
|
|
47655
|
+
maxDuration: settings.max_duration ?? DEFAULT_FUNCTION_DURATION_SECONDS,
|
|
47652
47656
|
schedule: func2.schedule,
|
|
47653
47657
|
symlinks: func2.symlinks,
|
|
47654
47658
|
streaming,
|
|
@@ -48071,8 +48075,8 @@ schema (${ast._tag}): ${ast}`;
|
|
|
48071
48075
|
},
|
|
48072
48076
|
max_duration: {
|
|
48073
48077
|
type: "number",
|
|
48074
|
-
description: "The
|
|
48075
|
-
maximum:
|
|
48078
|
+
description: "The maximum lifetime in seconds of one HTTP request, response stream, or WebSocket connection. Defaults to 30. The reusable execution environment is not terminated with the invocation.",
|
|
48079
|
+
maximum: 28800,
|
|
48076
48080
|
minimum: 1
|
|
48077
48081
|
},
|
|
48078
48082
|
runtime: {
|