@vitejs/devtools-vite 0.8.2 → 0.9.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/dist/index.mjs +48 -71
- package/dist/nitro.json +3 -3
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/1OzoDyp-.js +1 -0
- package/dist/public/_nuxt/BD9RWFCr.js +1 -0
- package/dist/public/_nuxt/{BVkpMuj6.js → BI2czHt6.js} +6 -5
- package/dist/public/_nuxt/BOY6uhyO.js +2 -0
- package/dist/public/_nuxt/{BDNMzG2s.js → BmP83cE4.js} +1 -0
- package/dist/public/_nuxt/CG20mqIK.js +9 -0
- package/dist/public/_nuxt/DZWKP7A0.js +2 -0
- package/dist/public/_nuxt/DhatuQj5.js +2 -0
- package/dist/public/_nuxt/DiR5oYyH.js +1 -0
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/282fbf2e-f850-4122-9e6e-5a779a6c826e.json +1 -0
- package/dist/public/_nuxt/ceT2ACMd.js +2 -0
- package/dist/public/_nuxt/entry.DkD6LOGS.css +1 -0
- package/dist/public/_nuxt/error-404.bD12eKH_.css +1 -0
- package/dist/public/_nuxt/error-500.CAuZFXRr.css +1 -0
- package/dist/public/index.html +1 -1
- package/package.json +13 -13
- package/dist/public/_nuxt/B3GmGsvS.js +0 -2
- package/dist/public/_nuxt/BLk_1fgY.js +0 -2
- package/dist/public/_nuxt/BSA6CAE7.js +0 -1
- package/dist/public/_nuxt/B_A1QLnD.js +0 -2
- package/dist/public/_nuxt/CHUoBDpr.js +0 -1
- package/dist/public/_nuxt/CVBNQmjt.js +0 -1
- package/dist/public/_nuxt/Cya-tyvy.js +0 -1
- package/dist/public/_nuxt/DCCrCahI.js +0 -1
- package/dist/public/_nuxt/DEDqDK_N.js +0 -1
- package/dist/public/_nuxt/DbCy1lFc.js +0 -1
- package/dist/public/_nuxt/DlHVZk4i.js +0 -4
- package/dist/public/_nuxt/XWR6704C.js +0 -3
- package/dist/public/_nuxt/builds/meta/353ae1e1-0f77-43f8-a07a-213b59688840.json +0 -1
- package/dist/public/_nuxt/entry.BLPAWyRl.css +0 -1
- package/dist/public/_nuxt/error-404.DCvQKNMV.css +0 -1
- package/dist/public/_nuxt/error-500.CBZl5Xes.css +0 -1
- package/dist/public/_nuxt/hdrrmwhp.js +0 -1
- package/dist/public/_nuxt/rpc.CVTFzytL.css +0 -1
package/dist/index.mjs
CHANGED
|
@@ -999,25 +999,30 @@ function toError$1(error) {
|
|
|
999
999
|
// src/node/inspect/store/index.ts
|
|
1000
1000
|
const DEFAULT_MAX_BATCH_ITEMS = 256;
|
|
1001
1001
|
const DEFAULT_MAX_BATCH_BYTES = 8388608;
|
|
1002
|
-
async function
|
|
1003
|
-
const filename = options.filename === ":memory:" ? void 0 : options.filename;
|
|
1002
|
+
async function openArchives(filename) {
|
|
1004
1003
|
if (filename) mkdirSync(dirname(filename), { recursive: true });
|
|
1005
1004
|
let payloads;
|
|
1006
1005
|
try {
|
|
1007
1006
|
payloads = await createInspectPayloadStore(filename);
|
|
1008
1007
|
const pluginCalls = await createInspectPluginCallStore(filename ? join(dirname(filename), "plugin-calls.bin") : void 0);
|
|
1009
|
-
return
|
|
1008
|
+
return {
|
|
1009
|
+
payloads,
|
|
1010
|
+
pluginCalls
|
|
1011
|
+
};
|
|
1010
1012
|
} catch (error) {
|
|
1011
1013
|
await payloads?.close().catch(() => {});
|
|
1012
1014
|
reportStorageError("opening the inspect archives", error);
|
|
1013
1015
|
throw error;
|
|
1014
1016
|
}
|
|
1015
1017
|
}
|
|
1018
|
+
function createViteInspectStore(options = {}) {
|
|
1019
|
+
return new PayloadViteInspectStore(options);
|
|
1020
|
+
}
|
|
1016
1021
|
var PayloadViteInspectStore = class {
|
|
1022
|
+
options;
|
|
1017
1023
|
maxBatchItems;
|
|
1018
1024
|
maxBatchBytes;
|
|
1019
|
-
|
|
1020
|
-
pluginCalls;
|
|
1025
|
+
archives;
|
|
1021
1026
|
scopes = /* @__PURE__ */ new Map();
|
|
1022
1027
|
queue = [];
|
|
1023
1028
|
queueHead = 0;
|
|
@@ -1036,9 +1041,8 @@ var PayloadViteInspectStore = class {
|
|
|
1036
1041
|
changeVersion = 0;
|
|
1037
1042
|
activeReaders = 0;
|
|
1038
1043
|
readerWaiters = [];
|
|
1039
|
-
constructor(
|
|
1040
|
-
this.
|
|
1041
|
-
this.pluginCalls = pluginCalls;
|
|
1044
|
+
constructor(options) {
|
|
1045
|
+
this.options = options;
|
|
1042
1046
|
this.maxBatchItems = positiveInteger(options.maxBatchItems, DEFAULT_MAX_BATCH_ITEMS);
|
|
1043
1047
|
this.maxBatchBytes = positiveInteger(options.maxBatchBytes, DEFAULT_MAX_BATCH_BYTES);
|
|
1044
1048
|
}
|
|
@@ -1154,7 +1158,7 @@ var PayloadViteInspectStore = class {
|
|
|
1154
1158
|
});
|
|
1155
1159
|
}
|
|
1156
1160
|
async getPluginCalls(scope, pluginId) {
|
|
1157
|
-
return this.readSnapshot(() => this.pluginCalls.read(scope, pluginId));
|
|
1161
|
+
return this.readSnapshot(() => this.archives?.pluginCalls.read(scope, pluginId) ?? Promise.resolve([]));
|
|
1158
1162
|
}
|
|
1159
1163
|
async getFirstResolveResult(scope, sourceId) {
|
|
1160
1164
|
await this.flush();
|
|
@@ -1202,8 +1206,9 @@ var PayloadViteInspectStore = class {
|
|
|
1202
1206
|
}
|
|
1203
1207
|
this.startPump();
|
|
1204
1208
|
if (this.pumpPromise) await this.pumpPromise;
|
|
1209
|
+
this.throwWriteError();
|
|
1205
1210
|
}
|
|
1206
|
-
await this.pluginCalls.flush();
|
|
1211
|
+
await this.archives?.pluginCalls.flush();
|
|
1207
1212
|
this.throwWriteError();
|
|
1208
1213
|
}
|
|
1209
1214
|
async close() {
|
|
@@ -1295,6 +1300,11 @@ var PayloadViteInspectStore = class {
|
|
|
1295
1300
|
await flushDataWrites();
|
|
1296
1301
|
}
|
|
1297
1302
|
async writeDataBatch(writes) {
|
|
1303
|
+
if (!this.archives) {
|
|
1304
|
+
const filename = typeof this.options.filename === "function" ? this.options.filename() : this.options.filename;
|
|
1305
|
+
this.archives = await openArchives(filename === ":memory:" ? void 0 : filename);
|
|
1306
|
+
}
|
|
1307
|
+
const { payloads, pluginCalls } = this.archives;
|
|
1298
1308
|
const values = [];
|
|
1299
1309
|
const prepared = [];
|
|
1300
1310
|
const pluginCallWrites = [];
|
|
@@ -1361,7 +1371,7 @@ var PayloadViteInspectStore = class {
|
|
|
1361
1371
|
}
|
|
1362
1372
|
prepared.push(item);
|
|
1363
1373
|
}
|
|
1364
|
-
const [ranges] = await Promise.all([values.length > 0 ?
|
|
1374
|
+
const [ranges] = await Promise.all([values.length > 0 ? payloads.write(values) : Promise.resolve([]), pluginCalls.write(pluginCallWrites)]);
|
|
1365
1375
|
for (const item of prepared) this.applyPreparedWrite(item, ranges);
|
|
1366
1376
|
}
|
|
1367
1377
|
applyPreparedWrite(prepared, ranges) {
|
|
@@ -1396,7 +1406,7 @@ var PayloadViteInspectStore = class {
|
|
|
1396
1406
|
const data = this.getScope(write.scope);
|
|
1397
1407
|
let transforms = data.transforms.get(write.moduleId);
|
|
1398
1408
|
if (!transforms || write.transformRequest && transforms.transformRequest !== write.transformRequest) {
|
|
1399
|
-
if (transforms) this.payloads.reclaim(collectPayloadRanges(transforms.items));
|
|
1409
|
+
if (transforms) this.archives?.payloads.reclaim(collectPayloadRanges(transforms.items));
|
|
1400
1410
|
transforms = {
|
|
1401
1411
|
transformRequest: write.transformRequest,
|
|
1402
1412
|
publicModuleId: write.publicModuleId,
|
|
@@ -1423,7 +1433,7 @@ var PayloadViteInspectStore = class {
|
|
|
1423
1433
|
const data = this.getScope(write.scope);
|
|
1424
1434
|
this.commitDeclinedLoadMetrics(data, write.publicModuleId, write.transformRequest);
|
|
1425
1435
|
const existing = data.transforms.get(write.moduleId);
|
|
1426
|
-
if (existing) this.payloads.reclaim(collectPayloadRanges(existing.items));
|
|
1436
|
+
if (existing) this.archives?.payloads.reclaim(collectPayloadRanges(existing.items));
|
|
1427
1437
|
setTransforms(data, write.moduleId, {
|
|
1428
1438
|
transformRequest: write.transformRequest,
|
|
1429
1439
|
publicModuleId: write.publicModuleId,
|
|
@@ -1442,7 +1452,7 @@ var PayloadViteInspectStore = class {
|
|
|
1442
1452
|
invalidateNow(scope, moduleId, publicModuleId) {
|
|
1443
1453
|
const data = this.scopes.get(scope);
|
|
1444
1454
|
if (!data) {
|
|
1445
|
-
this.pluginCalls.invalidate(scope, /* @__PURE__ */ new Set([publicModuleId]));
|
|
1455
|
+
this.archives?.pluginCalls.invalidate(scope, /* @__PURE__ */ new Set([publicModuleId]));
|
|
1446
1456
|
return;
|
|
1447
1457
|
}
|
|
1448
1458
|
const invalidIds = /* @__PURE__ */ new Set();
|
|
@@ -1488,7 +1498,7 @@ var PayloadViteInspectStore = class {
|
|
|
1488
1498
|
reclaimed.push(...collectPayloadRanges(transforms.items));
|
|
1489
1499
|
deleteTransforms(data, id);
|
|
1490
1500
|
}
|
|
1491
|
-
this.payloads.reclaim(reclaimed);
|
|
1501
|
+
this.archives?.payloads.reclaim(reclaimed);
|
|
1492
1502
|
deleteResolveIds(data, linkedResolveIds);
|
|
1493
1503
|
for (const id of invalidPublicIds) {
|
|
1494
1504
|
data.declinedLoadMetrics.delete(id);
|
|
@@ -1497,22 +1507,22 @@ var PayloadViteInspectStore = class {
|
|
|
1497
1507
|
if (pendingLoadMetrics.size === 0) data.pendingLoadMetrics.delete(request);
|
|
1498
1508
|
}
|
|
1499
1509
|
}
|
|
1500
|
-
this.pluginCalls.invalidate(scope, invalidPublicIds);
|
|
1510
|
+
this.archives?.pluginCalls.invalidate(scope, invalidPublicIds);
|
|
1501
1511
|
}
|
|
1502
1512
|
clearScopeNow(scope) {
|
|
1503
1513
|
const data = this.scopes.get(scope);
|
|
1504
1514
|
if (!data) {
|
|
1505
|
-
this.pluginCalls.clearScope(scope);
|
|
1515
|
+
this.archives?.pluginCalls.clearScope(scope);
|
|
1506
1516
|
return;
|
|
1507
1517
|
}
|
|
1508
1518
|
const ranges = [];
|
|
1509
1519
|
for (const transforms of data.transforms.values()) ranges.push(...collectPayloadRanges(transforms.items));
|
|
1510
|
-
this.payloads.reclaim(ranges);
|
|
1511
|
-
this.pluginCalls.clearScope(scope);
|
|
1520
|
+
this.archives?.payloads.reclaim(ranges);
|
|
1521
|
+
this.archives?.pluginCalls.clearScope(scope);
|
|
1512
1522
|
this.scopes.delete(scope);
|
|
1513
1523
|
}
|
|
1514
1524
|
async restoreTransformInfo(info) {
|
|
1515
|
-
const result = info.result ? await this.payloads.read(info.result) : void 0;
|
|
1525
|
+
const result = info.result ? await this.archives.payloads.read(info.result) : void 0;
|
|
1516
1526
|
return {
|
|
1517
1527
|
name: info.name,
|
|
1518
1528
|
plugin_id: info.pluginId,
|
|
@@ -1568,13 +1578,13 @@ var PayloadViteInspectStore = class {
|
|
|
1568
1578
|
this.scheduledPump = void 0;
|
|
1569
1579
|
}
|
|
1570
1580
|
try {
|
|
1571
|
-
await this.payloads.close();
|
|
1581
|
+
await this.archives?.payloads.close();
|
|
1572
1582
|
} catch (error) {
|
|
1573
1583
|
thrownError ??= error;
|
|
1574
1584
|
reportStorageError("closing the payload archive", error);
|
|
1575
1585
|
}
|
|
1576
1586
|
try {
|
|
1577
|
-
await this.pluginCalls.close();
|
|
1587
|
+
await this.archives?.pluginCalls.close();
|
|
1578
1588
|
} catch (error) {
|
|
1579
1589
|
thrownError ??= error;
|
|
1580
1590
|
reportStorageError("closing the plugin call archive", error);
|
|
@@ -1720,8 +1730,8 @@ var ViteInspectContext = class ViteInspectContext {
|
|
|
1720
1730
|
filter = createFilter();
|
|
1721
1731
|
configToInstances = /* @__PURE__ */ new Map();
|
|
1722
1732
|
idToInstances = /* @__PURE__ */ new Map();
|
|
1723
|
-
static
|
|
1724
|
-
return new ViteInspectContext(
|
|
1733
|
+
static create(options = {}) {
|
|
1734
|
+
return new ViteInspectContext(createViteInspectStore(options));
|
|
1725
1735
|
}
|
|
1726
1736
|
constructor(store) {
|
|
1727
1737
|
this.store = store;
|
|
@@ -2349,59 +2359,18 @@ function hijackPlugin(plugin, ctx) {
|
|
|
2349
2359
|
// src/node/inspect/plugin.ts
|
|
2350
2360
|
function DevToolsViteInspect() {
|
|
2351
2361
|
let inspectContext;
|
|
2352
|
-
let inspectContextPromise;
|
|
2353
|
-
let closingInspectContext;
|
|
2354
|
-
let inspectStorageDir;
|
|
2355
2362
|
let inspectModuleUpdatedState;
|
|
2356
2363
|
function notifyInspectModuleUpdated(ids = null) {
|
|
2357
2364
|
if (inspectModuleUpdatedState) notifyViteInspectModuleUpdated(inspectModuleUpdatedState, ids);
|
|
2358
2365
|
}
|
|
2359
|
-
async function createInspectContext(config) {
|
|
2360
|
-
const cacheDir = config.cacheDir || join(config.root, "node_modules/.vite");
|
|
2361
|
-
const storageDir = join(cacheDir, "devtools", "inspect");
|
|
2362
|
-
inspectStorageDir = storageDir;
|
|
2363
|
-
removeInspectStorage();
|
|
2364
|
-
try {
|
|
2365
|
-
const ctx = await ViteInspectContext.create({ filename: join(storageDir, "payloads.bin") });
|
|
2366
|
-
inspectContext = ctx;
|
|
2367
|
-
return ctx;
|
|
2368
|
-
} catch (error) {
|
|
2369
|
-
removeInspectStorage();
|
|
2370
|
-
throw error;
|
|
2371
|
-
}
|
|
2372
|
-
}
|
|
2373
|
-
function ensureInspectContext(config) {
|
|
2374
|
-
if (config.command !== "serve") return Promise.resolve(void 0);
|
|
2375
|
-
inspectContextPromise ??= createInspectContext(config);
|
|
2376
|
-
return inspectContextPromise;
|
|
2377
|
-
}
|
|
2378
|
-
async function closeInspectContext() {
|
|
2379
|
-
const ctx = inspectContext ?? await inspectContextPromise;
|
|
2380
|
-
if (!ctx) return;
|
|
2381
|
-
closingInspectContext ??= (async () => {
|
|
2382
|
-
await ctx.close();
|
|
2383
|
-
})();
|
|
2384
|
-
await closingInspectContext;
|
|
2385
|
-
}
|
|
2386
|
-
function removeInspectStorage() {
|
|
2387
|
-
if (inspectStorageDir) rmSync(inspectStorageDir, {
|
|
2388
|
-
recursive: true,
|
|
2389
|
-
force: true
|
|
2390
|
-
});
|
|
2391
|
-
}
|
|
2392
|
-
async function resolveInspectContext() {
|
|
2393
|
-
if (inspectContext) return inspectContext;
|
|
2394
|
-
return inspectContextPromise;
|
|
2395
|
-
}
|
|
2396
2366
|
return {
|
|
2397
2367
|
name: "vite:devtools:vite-inspect",
|
|
2398
2368
|
enforce: "pre",
|
|
2399
2369
|
devtools: { async setup(ctx) {
|
|
2400
2370
|
ctx.diagnostics.register(diagnostics);
|
|
2401
2371
|
for (const fn of viteRpcFunctions) ctx.rpc.register(fn);
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
setViteInspectContext(ctx, currentInspectContext);
|
|
2372
|
+
if (inspectContext) {
|
|
2373
|
+
setViteInspectContext(ctx, inspectContext);
|
|
2405
2374
|
for (const fn of inspectRpcFunctions) ctx.rpc.register(fn);
|
|
2406
2375
|
inspectModuleUpdatedState = await getViteInspectModuleUpdatedState(ctx);
|
|
2407
2376
|
if (ctx.viteServer) {
|
|
@@ -2416,9 +2385,17 @@ function DevToolsViteInspect() {
|
|
|
2416
2385
|
}
|
|
2417
2386
|
}
|
|
2418
2387
|
} },
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2388
|
+
configResolved(config) {
|
|
2389
|
+
if (config.command !== "serve") return;
|
|
2390
|
+
const cacheDir = config.cacheDir || join(config.root, "node_modules/.vite");
|
|
2391
|
+
const storageDir = join(cacheDir, "devtools", "inspect");
|
|
2392
|
+
const ctx = inspectContext ??= ViteInspectContext.create({ filename: () => {
|
|
2393
|
+
rmSync(storageDir, {
|
|
2394
|
+
recursive: true,
|
|
2395
|
+
force: true
|
|
2396
|
+
});
|
|
2397
|
+
return join(storageDir, "payloads.bin");
|
|
2398
|
+
} });
|
|
2422
2399
|
const vite = ctx.getViteContext(config);
|
|
2423
2400
|
vite.registerEnvironmentNames(Object.keys(config.environments));
|
|
2424
2401
|
config.plugins.forEach((plugin) => hijackPlugin(plugin, ctx));
|
|
@@ -2454,7 +2431,7 @@ function DevToolsViteInspect() {
|
|
|
2454
2431
|
try {
|
|
2455
2432
|
await closeServer();
|
|
2456
2433
|
} finally {
|
|
2457
|
-
await
|
|
2434
|
+
await ctx.close();
|
|
2458
2435
|
}
|
|
2459
2436
|
};
|
|
2460
2437
|
const vite = ctx.getViteContext(server.config);
|
package/dist/nitro.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"date": "2026-
|
|
2
|
+
"date": "2026-12-01T11:38:50.938Z",
|
|
3
3
|
"preset": "static",
|
|
4
4
|
"framework": {
|
|
5
5
|
"name": "nuxt",
|
|
6
|
-
"version": "4.
|
|
6
|
+
"version": "4.7.1"
|
|
7
7
|
},
|
|
8
8
|
"versions": {
|
|
9
|
-
"nitro": "2.13.
|
|
9
|
+
"nitro": "2.13.6"
|
|
10
10
|
},
|
|
11
11
|
"commands": {
|
|
12
12
|
"preview": "npx serve public"
|
package/dist/public/200.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vite DevTools</title><script type="importmap">{"imports":{"#entry":"/__devtools-vite/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vite DevTools</title><script type="importmap">{"imports":{"#entry":"/__devtools-vite/_nuxt/CG20mqIK.js"}}</script><link rel="stylesheet" href="/__devtools-vite/_nuxt/entry.DkD6LOGS.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__devtools-vite/_nuxt/CG20mqIK.js"><script type="module" src="/__devtools-vite/_nuxt/CG20mqIK.js" crossorigin></script><meta name="description" content="DevTools for Vite"><meta property="og:title" content="Vite DevTools"><meta property="og:description" content="DevTools for Vite"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><template data-nuxt-prefetch><link rel="prefetch" as="script" crossorigin href="/__devtools-vite/_nuxt/BD9RWFCr.js"></template></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__devtools-vite/",buildId:"282fbf2e-f850-4122-9e6e-5a779a6c826e",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1796125130837,false]</script></body></html>
|
package/dist/public/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vite DevTools</title><script type="importmap">{"imports":{"#entry":"/__devtools-vite/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vite DevTools</title><script type="importmap">{"imports":{"#entry":"/__devtools-vite/_nuxt/CG20mqIK.js"}}</script><link rel="stylesheet" href="/__devtools-vite/_nuxt/entry.DkD6LOGS.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__devtools-vite/_nuxt/CG20mqIK.js"><script type="module" src="/__devtools-vite/_nuxt/CG20mqIK.js" crossorigin></script><meta name="description" content="DevTools for Vite"><meta property="og:title" content="Vite DevTools"><meta property="og:description" content="DevTools for Vite"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><template data-nuxt-prefetch><link rel="prefetch" as="script" crossorigin href="/__devtools-vite/_nuxt/BD9RWFCr.js"></template></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__devtools-vite/",buildId:"282fbf2e-f850-4122-9e6e-5a779a6c826e",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1796125130837,false]</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Dt as e,an as t,i as n,st as r,ut as i}from"#entry";import{t as a}from"./BmP83cE4.js";var o={class:`antialiased bg-white dark:bg-neutral-950 dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-neutral-950 tracking-wide`},s={class:`max-w-520px text-center`},c=[`textContent`],l=[`textContent`],u=[`textContent`],d=a({__name:`error-500`,props:{appName:{type:String,default:`Nuxt`},status:{type:Number,default:500},statusText:{type:String,default:`Internal server error`},description:{type:String,default:`This page is temporarily unavailable.`},refresh:{type:String,default:`Refresh this page`}},setup(a){let d=a;return n({title:`${d.status} - ${d.statusText} | ${d.appName}`,script:[],style:[{innerHTML:`*,:after,:before{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb);--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset: ;--un-shadow:0 0 #0000;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }:after,:before{--un-content:""}html{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}`}]}),(n,d)=>(e(),i(`div`,o,[r(`div`,s,[r(`h1`,{class:`font-medium leading-none mb-4 sm:text-[72px] tabular-nums text-[56px]`,textContent:t(a.status)},null,8,c),r(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:t(a.statusText)},null,8,l),r(`p`,{class:`mb-4 px-2 text-md text-neutral-500`,textContent:t(a.description)},null,8,u)])]))}},[[`__scopeId`,`data-v-1f047682`]]);export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"#entry";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(){let e=typeof document>`u`?void 0:document;return{url:e?.location?.href??``,title:e?.title??``,visible:!e||e.visibilityState===`visible`,focused:e?.hasFocus()??!0}}function u(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a,l()).catch(()=>{}))}))},s=a(o),u=e.events.on(`connection:status`,e=>{e===`connected`&&o()}),d=typeof window>`u`?void 0:window;return d?.addEventListener(`focus`,o),d?.addEventListener(`blur`,o),d?.document.addEventListener(`visibilitychange`,o),o(),()=>{n=!0,s(),u(),d?.removeEventListener(`focus`,o),d?.removeEventListener(`blur`,o),d?.document.removeEventListener(`visibilitychange`,o)}}export{u as setupBrowserAgentRpcBridge};
|