@gigadrive/network-config 3.1.1 → 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 +51 -5
- package/dist/index.d.ts +51 -5
- package/dist/index.js +736 -611
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -13
- package/dist/index.mjs.map +1 -1
- package/dist/v4/schema.json +2 -2
- package/package.json +6 -6
- package/src/v4/schema.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -668,6 +668,10 @@ var filterFunctionsFromAssets = (config) => {
|
|
|
668
668
|
};
|
|
669
669
|
};
|
|
670
670
|
|
|
671
|
+
// src/normalized-config.ts
|
|
672
|
+
var DEFAULT_FUNCTION_DURATION_SECONDS = 30;
|
|
673
|
+
var MAX_FUNCTION_DURATION_SECONDS = 28800;
|
|
674
|
+
|
|
671
675
|
// src/parse-config.ts
|
|
672
676
|
import { Effect as Effect13 } from "effect";
|
|
673
677
|
|
|
@@ -791,7 +795,7 @@ var MAX_ASSET_DEPTH = 100;
|
|
|
791
795
|
var DISALLOWED_ASSET_EXTENSIONS = [".htaccess", ".htpasswd"];
|
|
792
796
|
var DEFAULT_FUNCTION_SETTINGS = {
|
|
793
797
|
memory: 128,
|
|
794
|
-
max_duration:
|
|
798
|
+
max_duration: DEFAULT_FUNCTION_DURATION_SECONDS,
|
|
795
799
|
schedule: void 0,
|
|
796
800
|
symlinks: void 0,
|
|
797
801
|
excludeFiles: void 0,
|
|
@@ -888,7 +892,7 @@ var parseEntrypoints = Effect10.fn("parseEntrypoints")(function* (config, projec
|
|
|
888
892
|
path: file,
|
|
889
893
|
runtime,
|
|
890
894
|
memory: settings.memory ?? 128,
|
|
891
|
-
maxDuration: settings.max_duration ??
|
|
895
|
+
maxDuration: settings.max_duration ?? DEFAULT_FUNCTION_DURATION_SECONDS,
|
|
892
896
|
schedule: func.schedule,
|
|
893
897
|
symlinks: func.symlinks,
|
|
894
898
|
streaming,
|
|
@@ -1198,15 +1202,13 @@ var VercelBuildOutputParser = class extends Effect12.Service()("VercelBuildOutpu
|
|
|
1198
1202
|
destination: functionEntrypointPath,
|
|
1199
1203
|
handler: handlerType
|
|
1200
1204
|
};
|
|
1201
|
-
const configRoutes = config.routes?.filter((r) => "dest" in r && r.dest === `/${functionName}`).map(
|
|
1202
|
-
(r)
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
})
|
|
1209
|
-
) ?? [];
|
|
1205
|
+
const configRoutes = config.routes?.filter((r) => "dest" in r && r.dest === `/${functionName}`).map((r) => ({
|
|
1206
|
+
path: ("src" in r ? r.src : void 0) ?? `/${functionName}`,
|
|
1207
|
+
methods: ["ANY"],
|
|
1208
|
+
headers: {},
|
|
1209
|
+
destination: functionEntrypointPath,
|
|
1210
|
+
handler: handlerType
|
|
1211
|
+
})) ?? [];
|
|
1210
1212
|
if (!result.routes) {
|
|
1211
1213
|
result.routes = [];
|
|
1212
1214
|
}
|
|
@@ -1295,8 +1297,8 @@ var schema_default = {
|
|
|
1295
1297
|
},
|
|
1296
1298
|
max_duration: {
|
|
1297
1299
|
type: "number",
|
|
1298
|
-
description: "The
|
|
1299
|
-
maximum:
|
|
1300
|
+
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.",
|
|
1301
|
+
maximum: 28800,
|
|
1300
1302
|
minimum: 1
|
|
1301
1303
|
},
|
|
1302
1304
|
runtime: {
|
|
@@ -1645,9 +1647,11 @@ export {
|
|
|
1645
1647
|
ConfigFileParseError,
|
|
1646
1648
|
ConfigSchemaValidationError,
|
|
1647
1649
|
ConfigVersionError,
|
|
1650
|
+
DEFAULT_FUNCTION_DURATION_SECONDS,
|
|
1648
1651
|
FRAMEWORK_DEFINITIONS,
|
|
1649
1652
|
FrameworkNotDetectedError,
|
|
1650
1653
|
FunctionConfigError,
|
|
1654
|
+
MAX_FUNCTION_DURATION_SECONDS,
|
|
1651
1655
|
ManifestNotFoundError,
|
|
1652
1656
|
ManifestParseError,
|
|
1653
1657
|
ManifestReadError,
|