@hyperframes/inspector 0.9.58 → 0.9.61
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 +11 -0
- package/dist/service.js +410 -216
- package/dist/types/core/src/cacheDir.d.ts +10 -0
- package/dist/types/core/src/chromeSandbox.d.ts +19 -0
- package/dist/types/core/src/projectFolders.d.ts +1 -0
- package/dist/types/core/src/safePath.d.ts +9 -15
- package/dist/types/core/src/terminalText.d.ts +2 -0
- package/dist/types/engine/src/services/publicNetwork/captureProxy.d.ts +1 -0
- package/dist/types/inspector/src/service.d.ts +8 -1
- package/package.json +3 -3
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
export declare function hyperframesCacheDir(...parts: string[]): string;
|
|
2
2
|
export declare function namedCacheDir(...parts: string[]): string | undefined;
|
|
3
|
+
export declare function foreignWritablePath(path: string, root: string): string | undefined;
|
|
4
|
+
export declare function foreignWritableTree(path: string, root: string): string | undefined;
|
|
5
|
+
export declare class CacheFolderNotPrivate extends Error {
|
|
6
|
+
readonly path: string;
|
|
7
|
+
constructor(path: string);
|
|
8
|
+
}
|
|
9
|
+
export declare function assertPrivateCachePath(path: string, root: string): string;
|
|
10
|
+
export declare function ensurePrivateCacheDir(path: string, root: string, mode?: number): string;
|
|
11
|
+
export declare function trustedCacheRoot(): string;
|
|
12
|
+
export declare function sealCacheInstall(path: string, root: string): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const NO_SANDBOX_ARGS: string[];
|
|
2
|
+
export interface ChromeSandboxHost {
|
|
3
|
+
platform: NodeJS.Platform;
|
|
4
|
+
env: NodeJS.ProcessEnv;
|
|
5
|
+
uid: number | undefined;
|
|
6
|
+
exists: (path: string) => boolean;
|
|
7
|
+
read: (path: string) => string | undefined;
|
|
8
|
+
}
|
|
9
|
+
/** Chrome keeps its sandbox unless the host can't give it one: root, serverless, a container, or blocked user namespaces. */
|
|
10
|
+
export declare function chromeSandboxEnabled(host?: ChromeSandboxHost): boolean;
|
|
11
|
+
export declare function chromeSandboxArgs(sandbox?: boolean): string[];
|
|
12
|
+
export declare function _resetChromeSandboxFallbackForTests(): void;
|
|
13
|
+
export declare function startsWithChromeSandboxFallback(args: readonly string[], starts: (args: string[]) => boolean, platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* A sandboxed Linux launch Chrome refuses at startup is retried once without the sandbox.
|
|
16
|
+
* The sandbox stays off for the process once Chrome names it as the cause, or after a second
|
|
17
|
+
* bare startup exit (a single one may be an unrelated kill). HYPERFRAMES_CHROME_SANDBOX=1 never retries.
|
|
18
|
+
*/
|
|
19
|
+
export declare function launchWithChromeSandboxFallback<T>(args: readonly string[], launch: (args: string[]) => Promise<T>, platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv): Promise<T>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { isCredentialOrToolStatePath, isPrivateFileUnder, isStudioPrivatePath, isVcsOrSecretPath, projectPathSegments, } from "@hyperframes/parsers/private-path";
|
|
1
2
|
export declare function realpath(path: string): string;
|
|
2
3
|
/**
|
|
3
4
|
* Reject paths that escape the `base` directory — including via symlinks.
|
|
@@ -15,11 +16,6 @@ export declare function realpath(path: string): string;
|
|
|
15
16
|
* can't redirect the path outside `base` right now. (A symlink swapped in between
|
|
16
17
|
* this check and the subsequent fs call is an inherent TOCTOU race this helper
|
|
17
18
|
* does not, and cannot by itself, defend against.)
|
|
18
|
-
*
|
|
19
|
-
* Lives at the package root rather than under `studio-api/` because callers span
|
|
20
|
-
* layers — `studio-api` routes, the `compiler`, the CLI, and the engine — and
|
|
21
|
-
* `compiler` sits below `studio-api` in the dependency graph, so it cannot import
|
|
22
|
-
* from there without a backwards edge.
|
|
23
19
|
*/
|
|
24
20
|
export declare function isSafePath(base: string, resolved: string): boolean;
|
|
25
21
|
/**
|
|
@@ -32,16 +28,14 @@ export declare function isSafePath(base: string, resolved: string): boolean;
|
|
|
32
28
|
* let the symlink-escape slip past several call sites historically.
|
|
33
29
|
*/
|
|
34
30
|
export declare function resolveWithinProject(base: string, relativePath: string): string | null;
|
|
35
|
-
/**
|
|
36
|
-
export
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
export declare function
|
|
43
|
-
/** Whether `isPrivate` holds for a file under `projectDir`, spelled as given or with its links resolved. */
|
|
44
|
-
export declare function isPrivateFileUnder(projectDir: string, filePath: string, isPrivate: (relPath: string) => boolean): boolean;
|
|
31
|
+
/** What makes a file one another program runs or trusts; see `toolTrustedFileKind`. */
|
|
32
|
+
export type ToolTrustedKind = "short-name" | "project-config" | "lock-file" | "tool-config" | "agent-instructions" | "program";
|
|
33
|
+
/**
|
|
34
|
+
* Why another program runs or trusts the file at a project-relative path, or null for an ordinary project file. The
|
|
35
|
+
* path is read in every spelling a case-insensitive file system or Windows opens: any case or Unicode form, either
|
|
36
|
+
* separator, trailing dots or spaces, a `:stream` suffix, or a short name for any of these.
|
|
37
|
+
*/
|
|
38
|
+
export declare function toolTrustedFileKind(relPath: string): ToolTrustedKind | null;
|
|
45
39
|
/** The project folder is gone, renamed or deleted while open; a write must not bring it back. */
|
|
46
40
|
export declare class ProjectRootMissingError extends Error {
|
|
47
41
|
readonly root: string;
|
|
@@ -8,6 +8,7 @@ export declare function startCaptureProxy(upstream?: UpstreamProxy | null, onRef
|
|
|
8
8
|
url: string;
|
|
9
9
|
close(): Promise<void>;
|
|
10
10
|
}>;
|
|
11
|
+
export declare function pageServerDirectHost(pageServerUrl: string): string;
|
|
11
12
|
export declare function browserProxyArgs(proxyUrl: string, directHost?: string): string[];
|
|
12
13
|
export declare function createPublicOnlyProfile(prefix: string): Promise<string>;
|
|
13
14
|
export {};
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { TimelineRequest } from "../../core/src/runtime/timelineInspection.js";
|
|
2
|
-
import { type Page } from "puppeteer-core";
|
|
2
|
+
import { type Browser, type Page } from "puppeteer-core";
|
|
3
3
|
import type { InspectRequest, Snippet } from "./types.js";
|
|
4
|
+
export declare function inspectorChromeArgs(proxyArgs: readonly string[], sandbox?: boolean): string[];
|
|
5
|
+
export declare function launchInspectorChrome(options: {
|
|
6
|
+
executablePath: string;
|
|
7
|
+
userDataDir: string;
|
|
8
|
+
proxyArgs: readonly string[];
|
|
9
|
+
sandbox?: boolean;
|
|
10
|
+
}): Promise<Browser>;
|
|
4
11
|
export interface InspectorOptions {
|
|
5
12
|
executablePath?: string;
|
|
6
13
|
idleMs?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/inspector",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.61",
|
|
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.61",
|
|
47
|
+
"@hyperframes/core": "0.9.61"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/node": "^25.0.10",
|