@gjsify/example-node-express-webserver 0.3.0 → 0.3.2
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.gjs.js +29 -19
- package/package.json +4 -4
package/dist/index.gjs.js
CHANGED
|
@@ -44178,6 +44178,33 @@ var init_client_request = __esm({
|
|
|
44178
44178
|
}
|
|
44179
44179
|
});
|
|
44180
44180
|
|
|
44181
|
+
// ../../../packages/node/http/lib/esm/validators.js
|
|
44182
|
+
function validateHeaderName(name2) {
|
|
44183
|
+
if (typeof name2 !== "string" || !/^[\^`\-\w!#$%&'*+.|~]+$/.test(name2)) {
|
|
44184
|
+
const error2 = new TypeError(`Header name must be a valid HTTP token ["${name2}"]`);
|
|
44185
|
+
Object.defineProperty(error2, "code", { value: "ERR_INVALID_HTTP_TOKEN" });
|
|
44186
|
+
throw error2;
|
|
44187
|
+
}
|
|
44188
|
+
}
|
|
44189
|
+
function validateHeaderValue(name2, value2) {
|
|
44190
|
+
if (value2 === void 0) {
|
|
44191
|
+
const error2 = new TypeError(`Header "${name2}" value must not be undefined`);
|
|
44192
|
+
Object.defineProperty(error2, "code", { value: "ERR_HTTP_INVALID_HEADER_VALUE" });
|
|
44193
|
+
throw error2;
|
|
44194
|
+
}
|
|
44195
|
+
if (typeof value2 === "string" && /[^\t -~-ÿ]/.test(value2)) {
|
|
44196
|
+
const error2 = new TypeError(`Invalid character in header content ["${name2}"]`);
|
|
44197
|
+
Object.defineProperty(error2, "code", { value: "ERR_INVALID_CHAR" });
|
|
44198
|
+
throw error2;
|
|
44199
|
+
}
|
|
44200
|
+
}
|
|
44201
|
+
var init_validators = __esm({
|
|
44202
|
+
"../../../packages/node/http/lib/esm/validators.js"() {
|
|
44203
|
+
init_console_gjs();
|
|
44204
|
+
init_auto_globals_c74cce974f();
|
|
44205
|
+
}
|
|
44206
|
+
});
|
|
44207
|
+
|
|
44181
44208
|
// ../../../packages/node/http/lib/esm/index.js
|
|
44182
44209
|
var esm_exports12 = {};
|
|
44183
44210
|
__export(esm_exports12, {
|
|
@@ -44199,25 +44226,6 @@ __export(esm_exports12, {
|
|
|
44199
44226
|
validateHeaderName: () => validateHeaderName,
|
|
44200
44227
|
validateHeaderValue: () => validateHeaderValue
|
|
44201
44228
|
});
|
|
44202
|
-
function validateHeaderName(name2) {
|
|
44203
|
-
if (typeof name2 !== "string" || !/^[\^`\-\w!#$%&'*+.|~]+$/.test(name2)) {
|
|
44204
|
-
const error2 = new TypeError(`Header name must be a valid HTTP token ["${name2}"]`);
|
|
44205
|
-
Object.defineProperty(error2, "code", { value: "ERR_INVALID_HTTP_TOKEN" });
|
|
44206
|
-
throw error2;
|
|
44207
|
-
}
|
|
44208
|
-
}
|
|
44209
|
-
function validateHeaderValue(name2, value2) {
|
|
44210
|
-
if (value2 === void 0) {
|
|
44211
|
-
const error2 = new TypeError(`Header "${name2}" value must not be undefined`);
|
|
44212
|
-
Object.defineProperty(error2, "code", { value: "ERR_HTTP_INVALID_HEADER_VALUE" });
|
|
44213
|
-
throw error2;
|
|
44214
|
-
}
|
|
44215
|
-
if (typeof value2 === "string" && /[^\t\u0020-\u007E\u0080-\u00FF]/.test(value2)) {
|
|
44216
|
-
const error2 = new TypeError(`Invalid character in header content ["${name2}"]`);
|
|
44217
|
-
Object.defineProperty(error2, "code", { value: "ERR_INVALID_CHAR" });
|
|
44218
|
-
throw error2;
|
|
44219
|
-
}
|
|
44220
|
-
}
|
|
44221
44229
|
function createServer(options, requestListener) {
|
|
44222
44230
|
if (typeof options === "function") {
|
|
44223
44231
|
return new Server2(options);
|
|
@@ -44253,6 +44261,8 @@ var init_esm24 = __esm({
|
|
|
44253
44261
|
init_incoming_message();
|
|
44254
44262
|
init_server();
|
|
44255
44263
|
init_client_request();
|
|
44264
|
+
init_validators();
|
|
44265
|
+
init_validators();
|
|
44256
44266
|
init_incoming_message();
|
|
44257
44267
|
init_server();
|
|
44258
44268
|
init_client_request();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/example-node-express-webserver",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Express.js blog showcase with JSON API and static frontend — a real Node.js web app running on GJS",
|
|
5
5
|
"main": "dist/index.gjs.js",
|
|
6
6
|
"type": "module",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"build:public": "mkdir -p dist/public && cp -r src/public/* dist/public/"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@gjsify/cli": "^0.3.
|
|
25
|
-
"@gjsify/node-globals": "^0.3.
|
|
26
|
-
"@gjsify/runtime": "^0.3.
|
|
24
|
+
"@gjsify/cli": "^0.3.2",
|
|
25
|
+
"@gjsify/node-globals": "^0.3.2",
|
|
26
|
+
"@gjsify/runtime": "^0.3.2",
|
|
27
27
|
"@types/express": "^5.0.6",
|
|
28
28
|
"@types/node": "^25.6.0",
|
|
29
29
|
"express": "^5.2.1",
|