@tonyclaw/llm-inspector 1.6.2 → 1.7.0
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/.output/cli.js +3 -43
- package/.output/nitro.json +3 -3
- package/.output/server/_chunks/ssr-renderer.mjs +4 -0
- package/.output/server/_libs/h3-v2.mjs +5 -5
- package/.output/server/_libs/h3.mjs +5 -5
- package/.output/server/_libs/react-dom.mjs +2074 -1228
- package/.output/server/_libs/readable-stream.mjs +3 -3
- package/.output/server/_libs/srvx.mjs +443 -47
- package/.output/server/_libs/util-deprecate.mjs +2 -2
- package/.output/server/_ssr/index-ByCLZu7J.mjs +4 -3
- package/.output/server/_ssr/index.mjs +7 -0
- package/.output/server/_ssr/router-Bq_mxeNz.mjs +3 -0
- package/.output/server/index.mjs +28 -26
- package/package.json +1 -1
- package/src/cli.ts +3 -55
package/.output/server/index.mjs
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
globalThis.__nitro_main__ = import.meta.url;
|
|
2
|
-
import {
|
|
2
|
+
import { N as NodeResponse, s as serve } from "./_libs/srvx.mjs";
|
|
3
3
|
import { d as defineHandler, H as HTTPError, t as toEventHandler, a as defineLazyEventHandler, b as H3Core } from "./_libs/h3.mjs";
|
|
4
4
|
import { d as decodePath, w as withLeadingSlash, a as withoutTrailingSlash, j as joinURL } from "./_libs/ufo.mjs";
|
|
5
5
|
import { promises } from "node:fs";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import { dirname, resolve } from "node:path";
|
|
8
|
+
import "node:http";
|
|
9
|
+
import "node:stream";
|
|
10
|
+
import "node:https";
|
|
11
|
+
import "node:http2";
|
|
8
12
|
import "./_libs/rou3.mjs";
|
|
9
13
|
function lazyService(loader) {
|
|
10
14
|
let promise, mod;
|
|
@@ -26,7 +30,7 @@ const services = {
|
|
|
26
30
|
globalThis.__nitro_vite_envs__ = services;
|
|
27
31
|
const errorHandler$1 = (error, event) => {
|
|
28
32
|
const res = defaultHandler(error, event);
|
|
29
|
-
return new
|
|
33
|
+
return new NodeResponse(typeof res.body === "string" ? res.body : JSON.stringify(res.body, null, 2), res);
|
|
30
34
|
};
|
|
31
35
|
function defaultHandler(error, event, opts) {
|
|
32
36
|
const isSensitive = error.unhandled;
|
|
@@ -96,49 +100,49 @@ const assets = {
|
|
|
96
100
|
"/assets/alibaba-TTwafVwX.svg": {
|
|
97
101
|
"type": "image/svg+xml",
|
|
98
102
|
"etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
|
|
99
|
-
"mtime": "2026-06-
|
|
103
|
+
"mtime": "2026-06-03T08:20:44.008Z",
|
|
100
104
|
"size": 5915,
|
|
101
105
|
"path": "../public/assets/alibaba-TTwafVwX.svg"
|
|
102
106
|
},
|
|
103
107
|
"/assets/index-B3RwBPLW.css": {
|
|
104
108
|
"type": "text/css; charset=utf-8",
|
|
105
109
|
"etag": '"10c74-aXacU4DRFVsUwcC5jHnjoPRSlTA"',
|
|
106
|
-
"mtime": "2026-06-
|
|
110
|
+
"mtime": "2026-06-03T08:20:44.011Z",
|
|
107
111
|
"size": 68724,
|
|
108
112
|
"path": "../public/assets/index-B3RwBPLW.css"
|
|
109
113
|
},
|
|
110
|
-
"/assets/main-Cp8AM0Pa.js": {
|
|
111
|
-
"type": "text/javascript; charset=utf-8",
|
|
112
|
-
"etag": '"4db57-FpqlPRLq9OHoaAFCL2NIXtZbW5c"',
|
|
113
|
-
"mtime": "2026-06-03T07:55:59.583Z",
|
|
114
|
-
"size": 318295,
|
|
115
|
-
"path": "../public/assets/main-Cp8AM0Pa.js"
|
|
116
|
-
},
|
|
117
|
-
"/assets/qwen-CONDcHqt.png": {
|
|
118
|
-
"type": "image/png",
|
|
119
|
-
"etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
|
|
120
|
-
"mtime": "2026-06-03T07:55:59.581Z",
|
|
121
|
-
"size": 357059,
|
|
122
|
-
"path": "../public/assets/qwen-CONDcHqt.png"
|
|
123
|
-
},
|
|
124
114
|
"/assets/minimax-BPMzvuL-.jpeg": {
|
|
125
115
|
"type": "image/jpeg",
|
|
126
116
|
"etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
|
|
127
|
-
"mtime": "2026-06-
|
|
117
|
+
"mtime": "2026-06-03T08:20:44.010Z",
|
|
128
118
|
"size": 6918,
|
|
129
119
|
"path": "../public/assets/minimax-BPMzvuL-.jpeg"
|
|
130
120
|
},
|
|
131
121
|
"/assets/zhipuai-BPNAnxo-.svg": {
|
|
132
122
|
"type": "image/svg+xml",
|
|
133
123
|
"etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
|
|
134
|
-
"mtime": "2026-06-
|
|
124
|
+
"mtime": "2026-06-03T08:20:44.010Z",
|
|
135
125
|
"size": 11256,
|
|
136
126
|
"path": "../public/assets/zhipuai-BPNAnxo-.svg"
|
|
137
127
|
},
|
|
128
|
+
"/assets/main-Cp8AM0Pa.js": {
|
|
129
|
+
"type": "text/javascript; charset=utf-8",
|
|
130
|
+
"etag": '"4db57-FpqlPRLq9OHoaAFCL2NIXtZbW5c"',
|
|
131
|
+
"mtime": "2026-06-03T08:20:44.011Z",
|
|
132
|
+
"size": 318295,
|
|
133
|
+
"path": "../public/assets/main-Cp8AM0Pa.js"
|
|
134
|
+
},
|
|
135
|
+
"/assets/qwen-CONDcHqt.png": {
|
|
136
|
+
"type": "image/png",
|
|
137
|
+
"etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
|
|
138
|
+
"mtime": "2026-06-03T08:20:44.010Z",
|
|
139
|
+
"size": 357059,
|
|
140
|
+
"path": "../public/assets/qwen-CONDcHqt.png"
|
|
141
|
+
},
|
|
138
142
|
"/assets/index-s4lwsWvq.js": {
|
|
139
143
|
"type": "text/javascript; charset=utf-8",
|
|
140
144
|
"etag": '"828c8-LEW/XL92J2/5lU4VKALlH7aVpaA"',
|
|
141
|
-
"mtime": "2026-06-
|
|
145
|
+
"mtime": "2026-06-03T08:20:44.011Z",
|
|
142
146
|
"size": 534728,
|
|
143
147
|
"path": "../public/assets/index-s4lwsWvq.js"
|
|
144
148
|
}
|
|
@@ -375,7 +379,6 @@ const host = process.env.NITRO_HOST || process.env.HOST;
|
|
|
375
379
|
const cert = process.env.NITRO_SSL_CERT;
|
|
376
380
|
const key = process.env.NITRO_SSL_KEY;
|
|
377
381
|
const nitroApp = useNitroApp();
|
|
378
|
-
let _fetch = nitroApp.fetch;
|
|
379
382
|
serve({
|
|
380
383
|
port,
|
|
381
384
|
hostname: host,
|
|
@@ -383,11 +386,10 @@ serve({
|
|
|
383
386
|
cert,
|
|
384
387
|
key
|
|
385
388
|
} : void 0,
|
|
386
|
-
fetch:
|
|
387
|
-
bun: { websocket: void 0 }
|
|
389
|
+
fetch: nitroApp.fetch
|
|
388
390
|
});
|
|
389
391
|
trapUnhandledErrors();
|
|
390
|
-
const
|
|
392
|
+
const nodeServer = {};
|
|
391
393
|
export {
|
|
392
|
-
|
|
394
|
+
nodeServer as default
|
|
393
395
|
};
|
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -2,57 +2,12 @@
|
|
|
2
2
|
import { spawn } from "node:child_process";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
|
-
import { existsSync } from "node:fs";
|
|
6
5
|
|
|
7
6
|
const __filename = fileURLToPath(import.meta.url);
|
|
8
7
|
const __dirname = dirname(__filename);
|
|
9
8
|
|
|
10
9
|
const DEFAULT_PORT = 25947;
|
|
11
10
|
|
|
12
|
-
// Find bun executable
|
|
13
|
-
const findBun = (): string | null => {
|
|
14
|
-
// Check if bun is in PATH
|
|
15
|
-
const pathEnv = process.env.PATH ?? "";
|
|
16
|
-
const pathDirs = pathEnv.split(process.platform === "win32" ? ";" : ":");
|
|
17
|
-
|
|
18
|
-
for (const dir of pathDirs) {
|
|
19
|
-
const bunPath = join(dir, process.platform === "win32" ? "bun.exe" : "bun");
|
|
20
|
-
if (existsSync(bunPath)) {
|
|
21
|
-
// On Windows, npm shim is a script, not the actual exe
|
|
22
|
-
if (process.platform === "win32" && !bunPath.endsWith(".exe")) {
|
|
23
|
-
// Check if it's the npm shim and find the actual exe
|
|
24
|
-
const actualPath = join(dir, "node_modules", "bun", "bin", "bun.exe");
|
|
25
|
-
if (existsSync(actualPath)) {
|
|
26
|
-
return actualPath;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return bunPath;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Common Windows paths
|
|
34
|
-
if (process.platform === "win32") {
|
|
35
|
-
const localAppData = process.env.LOCALAPPDATA ?? "";
|
|
36
|
-
const appData = process.env.APPDATA ?? "";
|
|
37
|
-
const userProfile = process.env.USERPROFILE ?? "";
|
|
38
|
-
|
|
39
|
-
const commonPaths = [
|
|
40
|
-
join(localAppData, "bun", "bin", "bun.exe"),
|
|
41
|
-
join(appData, "bun", "bin", "bun.exe"),
|
|
42
|
-
join(userProfile, "AppData", "Local", "bun", "bin", "bun.exe"),
|
|
43
|
-
join(userProfile, "AppData", "Roaming", "npm", "node_modules", "bun", "bin", "bun.exe"),
|
|
44
|
-
join(userProfile, "AppData", "Roaming", "npm", "bun"),
|
|
45
|
-
];
|
|
46
|
-
for (const bunPath of commonPaths) {
|
|
47
|
-
if (existsSync(bunPath)) {
|
|
48
|
-
return bunPath;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return null;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
11
|
const envPort = process.env["PORT"];
|
|
57
12
|
const portDefault = envPort !== undefined ? Number(envPort) : DEFAULT_PORT;
|
|
58
13
|
|
|
@@ -126,22 +81,15 @@ if (open) {
|
|
|
126
81
|
openBrowser(url);
|
|
127
82
|
}
|
|
128
83
|
|
|
129
|
-
// Find bun and start server
|
|
130
|
-
const bunPath = findBun();
|
|
131
|
-
if (bunPath === null) {
|
|
132
|
-
console.error("\nError: bun is not installed or not in PATH.");
|
|
133
|
-
console.error("Please install bun from https://bun.sh");
|
|
134
|
-
process.exit(1);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
84
|
// Compute server path
|
|
138
85
|
const outputDir = __dirname;
|
|
139
86
|
const serverPath = join(outputDir, "../.output/server/index.mjs");
|
|
140
87
|
|
|
141
|
-
// Start server with
|
|
142
|
-
const serverProcess = spawn(
|
|
88
|
+
// Start server with node
|
|
89
|
+
const serverProcess = spawn(process.execPath, [serverPath], {
|
|
143
90
|
stdio: ["ignore", "inherit", "inherit"],
|
|
144
91
|
detached: true,
|
|
92
|
+
env: { ...process.env },
|
|
145
93
|
});
|
|
146
94
|
|
|
147
95
|
serverProcess.unref();
|