@web-ts-toolkit/express-runtime 0.28.0 → 0.29.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/cli-api.js +7 -4
- package/cli-api.mjs +6 -2
- package/cli.js +7 -4
- package/package.json +1 -1
package/cli-api.js
CHANGED
|
@@ -883,7 +883,11 @@ function applyServerlessResult(result, res) {
|
|
|
883
883
|
if (r.headers && typeof r.headers === "object") {
|
|
884
884
|
for (const [key, value] of Object.entries(r.headers)) {
|
|
885
885
|
if (value !== void 0) {
|
|
886
|
-
|
|
886
|
+
if (Array.isArray(value) && key.toLowerCase() === "set-cookie") {
|
|
887
|
+
res.setHeader(key, value);
|
|
888
|
+
} else {
|
|
889
|
+
res.setHeader(key, Array.isArray(value) ? value.join(",") : value);
|
|
890
|
+
}
|
|
887
891
|
}
|
|
888
892
|
}
|
|
889
893
|
}
|
|
@@ -944,7 +948,7 @@ async function loadHandler(handlerPath) {
|
|
|
944
948
|
}
|
|
945
949
|
return exported;
|
|
946
950
|
}
|
|
947
|
-
var import_node_url, import_node_path, import_node_fs, import_node_module, import_node_child_process,
|
|
951
|
+
var import_node_url, import_node_path, import_node_fs, import_node_module, import_node_child_process, CLI_VERSION, DEFAULT_WATCH_EXTENSIONS, DEFAULT_WATCH_DELAY, moduleRequire, TEMP_BUILD_ENTRY_FILENAME, TEMP_SERVERLESS_ENTRY_FILENAME;
|
|
948
952
|
var init_cli_utils = __esm({
|
|
949
953
|
"src/cli-utils.ts"() {
|
|
950
954
|
"use strict";
|
|
@@ -954,12 +958,11 @@ var init_cli_utils = __esm({
|
|
|
954
958
|
import_node_module = require("module");
|
|
955
959
|
import_node_child_process = require("child_process");
|
|
956
960
|
init_index();
|
|
957
|
-
import_meta = {};
|
|
958
961
|
CLI_VERSION = "0.0.0-PLACEHOLDER";
|
|
959
962
|
DEFAULT_WATCH_EXTENSIONS = ["ts", "js", "mjs", "cjs", "json"];
|
|
960
963
|
DEFAULT_WATCH_DELAY = 500;
|
|
961
964
|
moduleRequire = (0, import_node_module.createRequire)(
|
|
962
|
-
|
|
965
|
+
(0, import_node_url.pathToFileURL)((0, import_node_path.resolve)(process.cwd(), "__wtt_runtime_preload__.js"))
|
|
963
966
|
);
|
|
964
967
|
TEMP_BUILD_ENTRY_FILENAME = ".express-runtime-build-entry.ts";
|
|
965
968
|
TEMP_SERVERLESS_ENTRY_FILENAME = ".express-runtime-build-serverless-entry.ts";
|
package/cli-api.mjs
CHANGED
|
@@ -518,7 +518,7 @@ function loadEnvFiles(paths) {
|
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
var moduleRequire = createRequire(
|
|
521
|
-
|
|
521
|
+
pathToFileURL(pathResolve(process.cwd(), "__wtt_runtime_preload__.js"))
|
|
522
522
|
);
|
|
523
523
|
async function preloadModules(modules) {
|
|
524
524
|
for (const mod of modules) {
|
|
@@ -698,7 +698,11 @@ function applyServerlessResult(result, res) {
|
|
|
698
698
|
if (r.headers && typeof r.headers === "object") {
|
|
699
699
|
for (const [key, value] of Object.entries(r.headers)) {
|
|
700
700
|
if (value !== void 0) {
|
|
701
|
-
|
|
701
|
+
if (Array.isArray(value) && key.toLowerCase() === "set-cookie") {
|
|
702
|
+
res.setHeader(key, value);
|
|
703
|
+
} else {
|
|
704
|
+
res.setHeader(key, Array.isArray(value) ? value.join(",") : value);
|
|
705
|
+
}
|
|
702
706
|
}
|
|
703
707
|
}
|
|
704
708
|
}
|
package/cli.js
CHANGED
|
@@ -883,7 +883,11 @@ function applyServerlessResult(result, res) {
|
|
|
883
883
|
if (r.headers && typeof r.headers === "object") {
|
|
884
884
|
for (const [key, value] of Object.entries(r.headers)) {
|
|
885
885
|
if (value !== void 0) {
|
|
886
|
-
|
|
886
|
+
if (Array.isArray(value) && key.toLowerCase() === "set-cookie") {
|
|
887
|
+
res.setHeader(key, value);
|
|
888
|
+
} else {
|
|
889
|
+
res.setHeader(key, Array.isArray(value) ? value.join(",") : value);
|
|
890
|
+
}
|
|
887
891
|
}
|
|
888
892
|
}
|
|
889
893
|
}
|
|
@@ -944,7 +948,7 @@ async function loadHandler(handlerPath) {
|
|
|
944
948
|
}
|
|
945
949
|
return exported;
|
|
946
950
|
}
|
|
947
|
-
var import_node_url, import_node_path, import_node_fs, import_node_module, import_node_child_process,
|
|
951
|
+
var import_node_url, import_node_path, import_node_fs, import_node_module, import_node_child_process, CLI_VERSION, DEFAULT_WATCH_EXTENSIONS, DEFAULT_WATCH_DELAY, moduleRequire, TEMP_BUILD_ENTRY_FILENAME, TEMP_SERVERLESS_ENTRY_FILENAME;
|
|
948
952
|
var init_cli_utils = __esm({
|
|
949
953
|
"src/cli-utils.ts"() {
|
|
950
954
|
"use strict";
|
|
@@ -954,12 +958,11 @@ var init_cli_utils = __esm({
|
|
|
954
958
|
import_node_module = require("module");
|
|
955
959
|
import_node_child_process = require("child_process");
|
|
956
960
|
init_src();
|
|
957
|
-
import_meta = {};
|
|
958
961
|
CLI_VERSION = "0.0.0-PLACEHOLDER";
|
|
959
962
|
DEFAULT_WATCH_EXTENSIONS = ["ts", "js", "mjs", "cjs", "json"];
|
|
960
963
|
DEFAULT_WATCH_DELAY = 500;
|
|
961
964
|
moduleRequire = (0, import_node_module.createRequire)(
|
|
962
|
-
|
|
965
|
+
(0, import_node_url.pathToFileURL)((0, import_node_path.resolve)(process.cwd(), "__wtt_runtime_preload__.js"))
|
|
963
966
|
);
|
|
964
967
|
TEMP_BUILD_ENTRY_FILENAME = ".express-runtime-build-entry.ts";
|
|
965
968
|
TEMP_SERVERLESS_ENTRY_FILENAME = ".express-runtime-build-serverless-entry.ts";
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@web-ts-toolkit/express-runtime",
|
|
3
3
|
"description": "Express app factory plus serverless handler and local dev server helpers",
|
|
4
4
|
"homepage": "https://web-ts-toolkit.pages.dev/docs/packages/express-runtime",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.29.0",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"keywords": [
|
|
8
8
|
"express",
|