@hyperframes/inspector 0.9.88 → 0.9.90
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/server.js +5 -0
- package/dist/service.js +106 -67
- package/dist/types/core/src/compiler/htmlDocument.d.ts +2 -2
- package/dist/types/core/src/compiler/htmlTokens.d.ts +7 -0
- package/dist/types/core/src/safePath.d.ts +7 -0
- package/dist/types/core/src/studioPreviewMark.d.ts +3 -0
- package/dist/types/inspector/src/pageServer.d.ts +7 -0
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { escapeInlineScriptSource, RUNTIME_BOOTSTRAP_ATTR } from "./htmlTokens.js";
|
|
2
|
+
export { escapeInlineScriptSource, RUNTIME_BOOTSTRAP_ATTR };
|
|
2
3
|
export interface SceneRootLookup {
|
|
3
4
|
root: Element | null;
|
|
4
5
|
hasTemplate: boolean;
|
|
@@ -14,7 +15,6 @@ export declare function isFullHtmlDocument(html: string): boolean;
|
|
|
14
15
|
export declare function parseHTMLContent(html: string): Document;
|
|
15
16
|
export declare function stripEmbeddedRuntimeScripts(html: string): string;
|
|
16
17
|
export declare function isRuntimeFileUrl(src: string | null | undefined): boolean;
|
|
17
|
-
export declare function escapeInlineScriptSource(source: string): string;
|
|
18
18
|
export declare function mapStartTagsAndStyles(html: string, map: {
|
|
19
19
|
tag: (tag: string) => string;
|
|
20
20
|
style: (css: string) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Case-insensitive HTML token scans, with no DOM: the player inlines scripts with these too. */
|
|
2
|
+
export declare const RUNTIME_BOOTSTRAP_ATTR = "data-hyperframes-preview-runtime";
|
|
3
|
+
/** ASCII-only chunks bound match arrays; starting at uppercase preserves unchanged spans. */
|
|
4
|
+
export declare function lowerAscii(text: string): string;
|
|
5
|
+
export declare function startsWithLower(text: string, token: string, at: number): boolean;
|
|
6
|
+
export declare function indexOfLower(text: string, token: string, from: number): number;
|
|
7
|
+
export declare function escapeInlineScriptSource(source: string): string;
|
|
@@ -57,3 +57,10 @@ export declare function realProjectRoot(root: string): string;
|
|
|
57
57
|
* A `dir` outside `root` is created recursively, but only while `root` exists.
|
|
58
58
|
*/
|
|
59
59
|
export declare function mkdirWithinProject(root: string, dir: string): void;
|
|
60
|
+
/** The real path; for a path not there (yet, or any more), the nearest existing folder's real path plus the rest. */
|
|
61
|
+
export declare function realFilePath(filePath: string): string;
|
|
62
|
+
export type EntryKind = "file" | "folder";
|
|
63
|
+
/** A script only Node runs, whatever folder holds it. */
|
|
64
|
+
export declare function nodeOnlyScript(relPath: string): boolean;
|
|
65
|
+
/** A Node-only script, or `.js`/`.mjs` or an extensionless file below (at any depth, past the project too) a package.json that is not the scaffold's. */
|
|
66
|
+
export declare function nodeMayRun(projectDir: string, relPath: string, kind: EntryKind): boolean;
|
|
@@ -15,6 +15,9 @@ export declare function servedToStudio(doc: Document): boolean;
|
|
|
15
15
|
export declare function inPlayerFrame(doc: Document): boolean;
|
|
16
16
|
export declare function defersMediaIn(doc: Document): boolean;
|
|
17
17
|
export declare function capturePageIn(doc: Document): boolean;
|
|
18
|
+
export declare const CAPTURE_STILLS = "hf-capture-stills";
|
|
19
|
+
export declare const CAPTURE_STILL_ATTR = "data-hf-capture-still";
|
|
20
|
+
export declare function captureStillsIn(doc: Document): boolean;
|
|
18
21
|
export declare const STUDIO_PREVIEW_UPCOMING_ATTR = "data-hf-upcoming";
|
|
19
22
|
export declare const STUDIO_PREVIEW_LAZY_ATTR = "data-hf-preview-lazy";
|
|
20
23
|
export declare const STUDIO_PREVIEW_ERRORS = "__hfPreviewErrors";
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { Server } from "node:http";
|
|
2
2
|
export declare function closeServer(server: Server): Promise<void>;
|
|
3
3
|
export declare function isLoopbackHost(host: string | undefined): boolean;
|
|
4
|
+
export declare function isOwnPageHost(host: string | undefined, port: number): boolean;
|
|
5
|
+
export declare function fromAnotherSite(fetchSite: string | string[] | undefined): boolean;
|
|
6
|
+
export declare const NO_FRAMING_HEADERS: {
|
|
7
|
+
readonly "Content-Security-Policy": "frame-ancestors 'self'";
|
|
8
|
+
readonly "X-Frame-Options": "SAMEORIGIN";
|
|
9
|
+
readonly "Cross-Origin-Resource-Policy": "same-origin";
|
|
10
|
+
};
|
|
4
11
|
export declare function servableProjectFile(project: string, urlPath: string): string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/inspector",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.90",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/heygen-com/hyperframes",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"htmlparser2": "^10.1.0",
|
|
44
44
|
"postcss": "^8.5.8",
|
|
45
45
|
"puppeteer-core": "^25.8.0",
|
|
46
|
-
"@hyperframes/
|
|
47
|
-
"@hyperframes/
|
|
46
|
+
"@hyperframes/parsers": "0.9.90",
|
|
47
|
+
"@hyperframes/core": "0.9.90"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/node": "^25.0.10",
|