@hyperframes/inspector 0.9.89 → 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 CHANGED
@@ -16,6 +16,11 @@ var TRUSTED_EXTENSIONS = [
16
16
  ...["json", "jsonc", "json5", "yaml", "yml", "toml", "lock", "lockb", "md"],
17
17
  ...["js", "mjs", "cjs", "jsx", "ts", "mts", "cts", "tsx"]
18
18
  ];
19
+ var INERT_FIELDS = new Set(
20
+ "name version private type description license author contributors keywords homepage repository bugs engines".split(
21
+ " "
22
+ )
23
+ );
19
24
 
20
25
  // src/pageServer.ts
21
26
  function isLoopbackHost(host) {
package/dist/service.js CHANGED
@@ -41878,7 +41878,7 @@ import {
41878
41878
  existsSync as existsSync5,
41879
41879
  fstatSync as fstatSync3,
41880
41880
  openSync as openSync3,
41881
- readFileSync as readFileSync5,
41881
+ readFileSync as readFileSync6,
41882
41882
  realpathSync as realpathSync6,
41883
41883
  readdirSync as readdirSync4,
41884
41884
  rmSync
@@ -43114,7 +43114,7 @@ function sanitizeCssValue(value) {
43114
43114
 
43115
43115
  // ../core/src/compiler/htmlBundler.ts
43116
43116
  import { AsyncLocalStorage } from "async_hooks";
43117
- import { readFileSync as readFileSync4, existsSync as existsSync4, statSync as statSync4 } from "fs";
43117
+ import { readFileSync as readFileSync5, existsSync as existsSync4, statSync as statSync4 } from "fs";
43118
43118
  import { parse as parseJs } from "acorn";
43119
43119
  import { resolve as resolve7, relative as relative5, dirname as dirname4, isAbsolute as isAbsolute5, sep as sep4 } from "path";
43120
43120
 
@@ -63808,7 +63808,14 @@ ${AUTHORED_SOURCE_END}`;
63808
63808
 
63809
63809
  // ../core/src/safePath.ts
63810
63810
  import { resolve as resolve6, sep as sep3, join as join5, dirname as dirname3, basename, relative as relative4, isAbsolute as isAbsolute4, parse as parse18 } from "node:path";
63811
- import { lstatSync, mkdirSync, realpath as realpathWalk, realpathSync as realpathSync3, statSync as statSync3 } from "node:fs";
63811
+ import {
63812
+ lstatSync,
63813
+ mkdirSync,
63814
+ readFileSync as readFileSync4,
63815
+ realpath as realpathWalk,
63816
+ realpathSync as realpathSync3,
63817
+ statSync as statSync3
63818
+ } from "node:fs";
63812
63819
  var nativeRefused = (error) => error.code === "EISDIR";
63813
63820
  function realpath2(path) {
63814
63821
  try {
@@ -63873,6 +63880,11 @@ var TRUSTED_EXTENSIONS = [
63873
63880
  ...["json", "jsonc", "json5", "yaml", "yml", "toml", "lock", "lockb", "md"],
63874
63881
  ...["js", "mjs", "cjs", "jsx", "ts", "mts", "cts", "tsx"]
63875
63882
  ];
63883
+ var INERT_FIELDS = new Set(
63884
+ "name version private type description license author contributors keywords homepage repository bugs engines".split(
63885
+ " "
63886
+ )
63887
+ );
63876
63888
 
63877
63889
  // ../parsers/dist/hfIds.js
63878
63890
  function isHtmlTemplate2(el) {
@@ -64737,7 +64749,7 @@ function safeReadFileBuffer(filePath) {
64737
64749
  noteRead(filePath);
64738
64750
  if (!readAllowed(filePath) || !existsSync4(filePath)) return null;
64739
64751
  try {
64740
- return readFileSync4(filePath);
64752
+ return readFileSync5(filePath);
64741
64753
  } catch {
64742
64754
  return null;
64743
64755
  }
@@ -66905,7 +66917,7 @@ var Inspector = class {
66905
66917
  ".mp3": "audio/mpeg"
66906
66918
  };
66907
66919
  res.setHeader("Content-Type", types[extname3(file)] ?? "application/octet-stream");
66908
- res.end(readFileSync5(fd));
66920
+ res.end(readFileSync6(fd));
66909
66921
  } finally {
66910
66922
  closeSync3(fd);
66911
66923
  }
@@ -66923,7 +66935,7 @@ var Inspector = class {
66923
66935
  await page.setViewport({ width: 1920, height: 1080, deviceScaleFactor: 1 });
66924
66936
  if (this.options.instrument !== false) {
66925
66937
  await page.evaluateOnNewDocument(
66926
- "window.__hfLiveInspection = " + JSON.stringify({ generation }) + ";\n" + readFileSync5(new URL(`../dist/inspection.${"js"}`, import.meta.url), "utf8")
66938
+ "window.__hfLiveInspection = " + JSON.stringify({ generation }) + ";\n" + readFileSync6(new URL(`../dist/inspection.${"js"}`, import.meta.url), "utf8")
66927
66939
  );
66928
66940
  }
66929
66941
  await page.goto(`http://127.0.0.1:${host.port}/`, { waitUntil: "load", timeout: 3e4 });
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/inspector",
3
- "version": "0.9.89",
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/core": "0.9.89",
47
- "@hyperframes/parsers": "0.9.89"
46
+ "@hyperframes/parsers": "0.9.90",
47
+ "@hyperframes/core": "0.9.90"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/node": "^25.0.10",