@hyperframes/producer 0.9.95 → 0.9.96
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.js
CHANGED
|
@@ -370,7 +370,11 @@ import { fileURLToPath as fileURLToPath5 } from "url";
|
|
|
370
370
|
// src/services/fileServer.ts
|
|
371
371
|
import { Hono } from "hono";
|
|
372
372
|
import { serve } from "@hono/node-server";
|
|
373
|
-
import {
|
|
373
|
+
import {
|
|
374
|
+
answerOwnLoopbackHostOnly,
|
|
375
|
+
boundedPageText,
|
|
376
|
+
settleOnBrowserSafePort
|
|
377
|
+
} from "@hyperframes/engine";
|
|
374
378
|
import {
|
|
375
379
|
existsSync as existsSync2,
|
|
376
380
|
realpathSync,
|
|
@@ -1130,12 +1134,13 @@ function closeFileServerSafely(fileServer, label, log = defaultLogger) {
|
|
|
1130
1134
|
});
|
|
1131
1135
|
}
|
|
1132
1136
|
}
|
|
1137
|
+
var NO_FILE_AT_NAME = /* @__PURE__ */ new Set(["ENOENT", "ENOTDIR", "ENAMETOOLONG"]);
|
|
1133
1138
|
function openRegularFile(filePath) {
|
|
1134
1139
|
let fd;
|
|
1135
1140
|
try {
|
|
1136
1141
|
fd = openSync(filePath, constants.O_RDONLY | constants.O_NONBLOCK);
|
|
1137
1142
|
} catch (error) {
|
|
1138
|
-
if (error instanceof Error && "code" in error && (error.code
|
|
1143
|
+
if (error instanceof Error && "code" in error && NO_FILE_AT_NAME.has(String(error.code)))
|
|
1139
1144
|
return null;
|
|
1140
1145
|
if (!statSync2(filePath, { throwIfNoEntry: false })?.isFile()) return null;
|
|
1141
1146
|
throw error;
|
|
@@ -1198,7 +1203,7 @@ function createFileServer(options) {
|
|
|
1198
1203
|
}
|
|
1199
1204
|
if (!file) {
|
|
1200
1205
|
if (!/favicon\.ico$/i.test(requestPath)) {
|
|
1201
|
-
console.warn(`[FileServer] 404 Not Found: ${terminalText2(requestPath)}`);
|
|
1206
|
+
console.warn(`[FileServer] 404 Not Found: ${terminalText2(boundedPageText(requestPath))}`);
|
|
1202
1207
|
}
|
|
1203
1208
|
return c.text("Not found", 404);
|
|
1204
1209
|
}
|
package/dist/public-server.js
CHANGED
|
@@ -412,7 +412,11 @@ import { fileURLToPath as fileURLToPath5 } from "url";
|
|
|
412
412
|
// src/services/fileServer.ts
|
|
413
413
|
import { Hono } from "hono";
|
|
414
414
|
import { serve } from "@hono/node-server";
|
|
415
|
-
import {
|
|
415
|
+
import {
|
|
416
|
+
answerOwnLoopbackHostOnly,
|
|
417
|
+
boundedPageText,
|
|
418
|
+
settleOnBrowserSafePort
|
|
419
|
+
} from "@hyperframes/engine";
|
|
416
420
|
import {
|
|
417
421
|
existsSync as existsSync2,
|
|
418
422
|
realpathSync,
|
|
@@ -1172,12 +1176,13 @@ function closeFileServerSafely(fileServer, label, log = defaultLogger) {
|
|
|
1172
1176
|
});
|
|
1173
1177
|
}
|
|
1174
1178
|
}
|
|
1179
|
+
var NO_FILE_AT_NAME = /* @__PURE__ */ new Set(["ENOENT", "ENOTDIR", "ENAMETOOLONG"]);
|
|
1175
1180
|
function openRegularFile(filePath) {
|
|
1176
1181
|
let fd;
|
|
1177
1182
|
try {
|
|
1178
1183
|
fd = openSync(filePath, constants.O_RDONLY | constants.O_NONBLOCK);
|
|
1179
1184
|
} catch (error) {
|
|
1180
|
-
if (error instanceof Error && "code" in error && (error.code
|
|
1185
|
+
if (error instanceof Error && "code" in error && NO_FILE_AT_NAME.has(String(error.code)))
|
|
1181
1186
|
return null;
|
|
1182
1187
|
if (!statSync2(filePath, { throwIfNoEntry: false })?.isFile()) return null;
|
|
1183
1188
|
throw error;
|
|
@@ -1240,7 +1245,7 @@ function createFileServer(options) {
|
|
|
1240
1245
|
}
|
|
1241
1246
|
if (!file) {
|
|
1242
1247
|
if (!/favicon\.ico$/i.test(requestPath)) {
|
|
1243
|
-
console.warn(`[FileServer] 404 Not Found: ${terminalText2(requestPath)}`);
|
|
1248
|
+
console.warn(`[FileServer] 404 Not Found: ${terminalText2(boundedPageText(requestPath))}`);
|
|
1244
1249
|
}
|
|
1245
1250
|
return c.text("Not found", 404);
|
|
1246
1251
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/producer",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.96",
|
|
4
4
|
"description": "HTML-to-video rendering engine using Chrome's BeginFrame API",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"postcss": "^8.4.0",
|
|
36
36
|
"puppeteer": "~25.13.0",
|
|
37
37
|
"puppeteer-core": "^25.13.0",
|
|
38
|
-
"@hyperframes/core": "0.9.
|
|
39
|
-
"@hyperframes/engine": "0.9.
|
|
40
|
-
"@hyperframes/
|
|
41
|
-
"@hyperframes/
|
|
42
|
-
"@hyperframes/
|
|
38
|
+
"@hyperframes/core": "0.9.96",
|
|
39
|
+
"@hyperframes/engine": "0.9.96",
|
|
40
|
+
"@hyperframes/parsers": "0.9.96",
|
|
41
|
+
"@hyperframes/lint": "0.9.96",
|
|
42
|
+
"@hyperframes/studio-server": "0.9.96"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^25.0.10",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"tsx": "^4.21.0",
|
|
49
49
|
"typescript": "^5.7.2",
|
|
50
50
|
"vitest": "^4.1.12",
|
|
51
|
-
"@hyperframes/aws-lambda": "0.9.
|
|
51
|
+
"@hyperframes/aws-lambda": "0.9.96"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=22"
|