@hyperframes/studio-server 0.8.205 → 0.8.206
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 +4 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3871,6 +3871,7 @@ function registerFileRoutes(api, adapter) {
|
|
|
3871
3871
|
// src/routes/preview.ts
|
|
3872
3872
|
import { parseHTML as parseHTML7 } from "linkedom";
|
|
3873
3873
|
import { createReadStream, existsSync as existsSync5, readFileSync as readFileSync6, statSync as statSync4 } from "fs";
|
|
3874
|
+
import { stripSdrPngColourTags } from "@hyperframes/core/compiler/png-colour-tags";
|
|
3874
3875
|
import { Readable } from "stream";
|
|
3875
3876
|
import { join as join8, resolve as resolve4 } from "path";
|
|
3876
3877
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -4567,8 +4568,9 @@ ${etag}`;
|
|
|
4567
4568
|
servedContentType = PROXY_VARIANT_CONFIG[proxyVariant].contentType;
|
|
4568
4569
|
}
|
|
4569
4570
|
const textBuffer = isText ? Buffer.from(readFileSync6(file, "utf-8"), "utf-8") : null;
|
|
4570
|
-
const
|
|
4571
|
-
const
|
|
4571
|
+
const heldBuffer = textBuffer ?? (contentType === "image/png" ? stripSdrPngColourTags(readFileSync6(file)) : null);
|
|
4572
|
+
const totalSize = heldBuffer ? heldBuffer.length : statSync4(servedPath).size;
|
|
4573
|
+
const bodyFor = (start, end) => heldBuffer ? new Uint8Array(heldBuffer.subarray(start, end + 1)) : (
|
|
4572
4574
|
// Node's web stream type and the DOM one do not overlap for tsc on
|
|
4573
4575
|
// every platform's lib set; the double cast is the documented bridge.
|
|
4574
4576
|
Readable.toWeb(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/studio-server",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.206",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/heygen-com/hyperframes",
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
"linkedom": "^0.18.12",
|
|
85
85
|
"postcss": "^8.5.8",
|
|
86
86
|
"postcss-selector-parser": "^7.1.2",
|
|
87
|
-
"@hyperframes/
|
|
88
|
-
"@hyperframes/
|
|
87
|
+
"@hyperframes/parsers": "0.8.206",
|
|
88
|
+
"@hyperframes/core": "0.8.206"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"@types/node": "^25.0.10",
|