@vitejs/devtools 0.1.5 → 0.1.8
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/{DockIcon-DNt-Vqy4.js → DockIcon-zZkKuxFy.js} +2 -2
- package/dist/{DockStandalone-DxFEMDp2.js → DockStandalone-BuMVHLt_.js} +64 -64
- package/dist/{LogItem-CZM2G41b.js → LogItem-D-AbVX5q.js} +5 -5
- package/dist/{ViewBuiltinLogs-1ABRTwzd.js → ViewBuiltinLogs-D9GVXA00.js} +39 -39
- package/dist/{ViewBuiltinTerminals-Co7G-321.js → ViewBuiltinTerminals-afgLtRQP.js} +11 -11
- package/dist/{ViewJsonRender-ByPfpKFM.js → ViewJsonRender-DtluXw3F.js} +4 -4
- package/dist/cli-commands.js +92 -2
- package/dist/cli.js +8 -4
- package/dist/client/inject.js +49 -28
- package/dist/client/standalone/assets/{DockStandalone-C8ChyZLh.js → DockStandalone-DvxQ5kAU.js} +1 -1
- package/dist/client/standalone/assets/{ViewBuiltinTerminals-UrMq7UXM.js → ViewBuiltinTerminals-CpNVjAgX.js} +1 -1
- package/dist/client/standalone/assets/{ViewJsonRender-BURuu55Z.js → ViewJsonRender-CbWAIBeO.js} +1 -1
- package/dist/client/standalone/assets/{index-Rpv7PwRD.js → index-BGGAiDua.js} +3 -3
- package/dist/client/standalone/index.html +1 -1
- package/dist/client/webcomponents.d.ts +1 -21628
- package/dist/client/webcomponents.js +31 -31
- package/dist/config.js +1 -1
- package/dist/constants-DfEeYo9W.js +142 -0
- package/dist/{dist-D2Z6bwqJ.js → dist-CBtGbo90.js} +4 -4
- package/dist/dist-DpLy3ojW.js +229 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/plugins-DfC1vp4w.js +31 -0
- package/dist/{popup-BUPO6e0I.js → popup-CAT8YohS.js} +2 -2
- package/dist/server-BuWZ1h8p.js +241 -0
- package/dist/server-Ca6LOTxO.js +3 -0
- package/dist/{plugins-DiuKIPkS.js → server-DhChc9gv.js} +8 -624
- package/dist/standalone-CAJbdnf4.js +34 -0
- package/dist/static-dump-Q0iG9hz3.js +65 -0
- package/package.json +9 -14
- package/dist/cli-commands-CnJ4eqDp.js +0 -180
- package/dist/vue.runtime.esm-bundler-CS1wMbap.js +0 -6988
- /package/dist/{context-internal-Du6FuGIu.d.ts → context-internal-BA4ba-FN.d.ts} +0 -0
- /package/dist/{context-internal-CvIHbZq4.js → context-internal-DZpoJjMz.js} +0 -0
- /package/dist/{iconify-BW79QmbD.js → iconify-JodklND-.js} +0 -0
- /package/dist/{utils-DaaVwEUH.js → utils-HWI9S6d-.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as
|
|
3
|
-
import {
|
|
1
|
+
import { o as useTimeAgo } from "./dist-CBtGbo90.js";
|
|
2
|
+
import { a as levels, i as getHashColorFromString, n as _sfc_main$3, o as markLogsAsRead, r as formEntries, s as useLogs, t as _sfc_main$2 } from "./LogItem-D-AbVX5q.js";
|
|
3
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderList, toDisplayString, unref, vModelText, withCtx, withDirectives, withModifiers } from "vue";
|
|
4
4
|
//#region src/client/webcomponents/components/display/FilterToggles.vue
|
|
5
5
|
const _hoisted_1$1 = { class: "text-xs op40" };
|
|
6
6
|
const _hoisted_2$1 = { class: "flex flex-wrap items-center gap-0.5" };
|
|
@@ -17,7 +17,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
emits: ["toggle"],
|
|
18
18
|
setup(__props) {
|
|
19
19
|
return (_ctx, _cache) => {
|
|
20
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
20
|
+
return openBlock(), createElementBlock(Fragment, null, [createElementVNode("span", _hoisted_1$1, toDisplayString(__props.label), 1), createElementVNode("div", _hoisted_2$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
|
|
21
21
|
return openBlock(), createElementBlock("button", {
|
|
22
22
|
key: item,
|
|
23
23
|
class: normalizeClass(["px-1.5 py-0.5 rounded text-xs flex items-center gap-0.5 hover:bg-active transition", [__props.active.size === 0 || __props.active.has(item) ? __props.styles?.[item]?.color || "" : "op30"]]),
|
|
@@ -29,7 +29,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
29
29
|
}, [__props.styles?.[item]?.icon ? (openBlock(), createElementBlock("div", {
|
|
30
30
|
key: 0,
|
|
31
31
|
class: normalizeClass([__props.styles[item].icon, "w-3.5 h-3.5"])
|
|
32
|
-
}, null, 2)) : createCommentVNode("v-if", true),
|
|
32
|
+
}, null, 2)) : createCommentVNode("v-if", true), createElementVNode("span", null, toDisplayString(__props.styles?.[item]?.label || item), 1)], 14, _hoisted_3$1);
|
|
33
33
|
}), 128))])], 64);
|
|
34
34
|
};
|
|
35
35
|
}
|
|
@@ -245,44 +245,44 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
245
245
|
return (_ctx, _cache) => {
|
|
246
246
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
247
247
|
createCommentVNode(" Toolbar "),
|
|
248
|
-
|
|
248
|
+
createElementVNode("div", _hoisted_2, [
|
|
249
249
|
createCommentVNode(" Row 1: Search + sort + actions "),
|
|
250
|
-
|
|
251
|
-
withDirectives(
|
|
250
|
+
createElementVNode("div", _hoisted_3, [
|
|
251
|
+
withDirectives(createElementVNode("input", {
|
|
252
252
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => search.value = $event),
|
|
253
253
|
type: "text",
|
|
254
254
|
placeholder: "Search logs...",
|
|
255
255
|
class: "bg-transparent border border-base rounded px-2 py-0.5 text-xs w-48 outline-none focus:border-purple"
|
|
256
256
|
}, null, 512), [[vModelText, search.value]]),
|
|
257
|
-
|
|
257
|
+
createElementVNode("button", {
|
|
258
258
|
class: "flex items-center gap-0.5 op50 hover:op100 p-1 rounded hover:bg-active transition",
|
|
259
259
|
title: sortLabels[sortBy.value],
|
|
260
260
|
onClick: cycleSortMode
|
|
261
|
-
}, [
|
|
262
|
-
_cache[7] || (_cache[7] =
|
|
261
|
+
}, [createElementVNode("div", { class: normalizeClass([sortIcons[sortBy.value], "w-4 h-4"]) }, null, 2)], 8, _hoisted_4),
|
|
262
|
+
_cache[7] || (_cache[7] = createElementVNode("div", { class: "flex-1" }, null, -1)),
|
|
263
263
|
filteredEntries.value.length !== unref(logsState).entries.length ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(filteredEntries.value.length) + "/" + toDisplayString(unref(logsState).entries.length), 1)) : createCommentVNode("v-if", true),
|
|
264
264
|
hasActiveFilter.value ? (openBlock(), createElementBlock("button", {
|
|
265
265
|
key: 1,
|
|
266
266
|
class: "text-xs op50 hover:op100 px-1.5 py-0.5 hover:bg-active rounded transition flex items-center gap-0.5",
|
|
267
267
|
title: "Reset all filters",
|
|
268
268
|
onClick: resetFilters
|
|
269
|
-
}, [..._cache[4] || (_cache[4] = [
|
|
269
|
+
}, [..._cache[4] || (_cache[4] = [createElementVNode("div", { class: "i-ph:funnel-x-duotone w-3.5 h-3.5" }, null, -1), createTextVNode(" Reset Filters ", -1)])])) : createCommentVNode("v-if", true),
|
|
270
270
|
hasActiveFilter.value ? (openBlock(), createElementBlock("div", _hoisted_6)) : createCommentVNode("v-if", true),
|
|
271
271
|
hasActiveFilter.value && filteredEntries.value.length > 0 ? (openBlock(), createElementBlock("button", {
|
|
272
272
|
key: 3,
|
|
273
273
|
class: "text-xs op50 hover:op100 px-1.5 py-0.5 hover:bg-active rounded transition flex items-center gap-0.5",
|
|
274
274
|
title: "Dismiss all matching the current filter",
|
|
275
275
|
onClick: dismissFiltered
|
|
276
|
-
}, [..._cache[5] || (_cache[5] = [
|
|
276
|
+
}, [..._cache[5] || (_cache[5] = [createElementVNode("div", { class: "i-ph:trash-duotone w-3.5 h-3.5" }, null, -1), createTextVNode(" Dismiss filtered ", -1)])])) : createCommentVNode("v-if", true),
|
|
277
277
|
!hasActiveFilter.value && unref(logsState).entries.length > 0 ? (openBlock(), createElementBlock("button", {
|
|
278
278
|
key: 4,
|
|
279
279
|
class: "text-xs op50 hover:op100 px-1.5 py-0.5 hover:bg-active rounded transition flex items-center gap-0.5",
|
|
280
280
|
title: "Dismiss all logs",
|
|
281
281
|
onClick: clearAll
|
|
282
|
-
}, [..._cache[6] || (_cache[6] = [
|
|
282
|
+
}, [..._cache[6] || (_cache[6] = [createElementVNode("div", { class: "i-ph:trash-duotone w-3.5 h-3.5" }, null, -1), createTextVNode(" Dismiss all ", -1)])])) : createCommentVNode("v-if", true)
|
|
283
283
|
]),
|
|
284
284
|
createCommentVNode(" Row 2: Level + source + category + label filters "),
|
|
285
|
-
|
|
285
|
+
createElementVNode("div", _hoisted_7, [
|
|
286
286
|
createVNode(_sfc_main$1, {
|
|
287
287
|
label: "Level",
|
|
288
288
|
items: unref(allLevels),
|
|
@@ -294,7 +294,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
294
294
|
"active",
|
|
295
295
|
"styles"
|
|
296
296
|
]),
|
|
297
|
-
_cache[10] || (_cache[10] =
|
|
297
|
+
_cache[10] || (_cache[10] = createElementVNode("div", { class: "border-l border-base h-4 mx-0.5" }, null, -1)),
|
|
298
298
|
createVNode(_sfc_main$1, {
|
|
299
299
|
label: "From",
|
|
300
300
|
items: unref(allFroms),
|
|
@@ -307,7 +307,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
307
307
|
"styles",
|
|
308
308
|
"onToggle"
|
|
309
309
|
]),
|
|
310
|
-
allCategories.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_cache[8] || (_cache[8] =
|
|
310
|
+
allCategories.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_cache[8] || (_cache[8] = createElementVNode("div", { class: "border-l border-base h-4 mx-1" }, null, -1)), createVNode(_sfc_main$1, {
|
|
311
311
|
label: "Category",
|
|
312
312
|
items: allCategories.value,
|
|
313
313
|
active: activeCategories.value,
|
|
@@ -318,7 +318,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
318
318
|
"active",
|
|
319
319
|
"hash-color"
|
|
320
320
|
])], 64)) : createCommentVNode("v-if", true),
|
|
321
|
-
allLabels.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [_cache[9] || (_cache[9] =
|
|
321
|
+
allLabels.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [_cache[9] || (_cache[9] = createElementVNode("div", { class: "border-l border-base h-4 mx-1" }, null, -1)), createVNode(_sfc_main$1, {
|
|
322
322
|
label: "Labels",
|
|
323
323
|
items: allLabels.value,
|
|
324
324
|
active: activeLabelFilters.value,
|
|
@@ -332,9 +332,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
332
332
|
])
|
|
333
333
|
]),
|
|
334
334
|
createCommentVNode(" Content "),
|
|
335
|
-
|
|
335
|
+
createElementVNode("div", { class: normalizeClass(["h-full of-hidden", selectedEntry.value ? "grid grid-cols-[1fr_1fr]" : ""]) }, [
|
|
336
336
|
createCommentVNode(" Log list "),
|
|
337
|
-
|
|
337
|
+
createElementVNode("div", _hoisted_8, [filteredEntries.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_9, " No logs ")) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(filteredEntries.value, (entry) => {
|
|
338
338
|
return openBlock(), createElementBlock("div", {
|
|
339
339
|
key: entry.id,
|
|
340
340
|
class: normalizeClass(["w-full text-left border-b border-base hover:bg-active transition border-l-2 text-sm group cursor-pointer", [selectedId.value === entry.id ? "bg-active" : ""]]),
|
|
@@ -343,45 +343,45 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
343
343
|
entry,
|
|
344
344
|
class: "px-3 py-2.5"
|
|
345
345
|
}, {
|
|
346
|
-
actions: withCtx(() => [
|
|
346
|
+
actions: withCtx(() => [createElementVNode("button", {
|
|
347
347
|
class: "op0 group-hover:op50 hover:op100! p-0.5 rounded hover:bg-active flex-none",
|
|
348
348
|
title: "Dismiss",
|
|
349
349
|
onClick: withModifiers(($event) => removeEntry(entry.id), ["stop"])
|
|
350
|
-
}, [..._cache[11] || (_cache[11] = [
|
|
350
|
+
}, [..._cache[11] || (_cache[11] = [createElementVNode("div", { class: "i-ph-trash-duotone w-3 h-3" }, null, -1)])], 8, _hoisted_11)]),
|
|
351
351
|
_: 2
|
|
352
352
|
}, 1032, ["entry"])], 10, _hoisted_10);
|
|
353
353
|
}), 128))]),
|
|
354
354
|
createCommentVNode(" Detail panel "),
|
|
355
355
|
selectedEntry.value ? (openBlock(), createElementBlock("div", _hoisted_12, [
|
|
356
356
|
createCommentVNode(" Header "),
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
createElementVNode("div", _hoisted_13, [
|
|
358
|
+
createElementVNode("div", _hoisted_14, [createElementVNode("div", _hoisted_15, toDisplayString(selectedEntry.value.message), 1)]),
|
|
359
359
|
createCommentVNode(" Dismiss button "),
|
|
360
|
-
|
|
360
|
+
createElementVNode("button", {
|
|
361
361
|
class: "op50 hover:op100 p-1",
|
|
362
362
|
title: "Dismiss",
|
|
363
363
|
onClick: _cache[1] || (_cache[1] = ($event) => removeEntry(selectedEntry.value.id))
|
|
364
|
-
}, [..._cache[12] || (_cache[12] = [
|
|
364
|
+
}, [..._cache[12] || (_cache[12] = [createElementVNode("div", { class: "i-ph-trash-duotone w-4 h-4" }, null, -1)])]),
|
|
365
365
|
createCommentVNode(" Close button "),
|
|
366
|
-
|
|
366
|
+
createElementVNode("button", {
|
|
367
367
|
class: "op50 hover:op100 p-1",
|
|
368
368
|
title: "Close detail",
|
|
369
369
|
onClick: _cache[2] || (_cache[2] = ($event) => selectedId.value = null)
|
|
370
|
-
}, [..._cache[13] || (_cache[13] = [
|
|
370
|
+
}, [..._cache[13] || (_cache[13] = [createElementVNode("div", { class: "i-ph-x w-4 h-4" }, null, -1)])])
|
|
371
371
|
]),
|
|
372
372
|
createCommentVNode(" Metadata row "),
|
|
373
|
-
|
|
374
|
-
|
|
373
|
+
createElementVNode("div", _hoisted_16, [
|
|
374
|
+
createElementVNode("span", { class: normalizeClass(["flex items-center gap-1", unref(levels)[selectedEntry.value.level].color]) }, [createElementVNode("div", { class: normalizeClass([unref(levels)[selectedEntry.value.level].icon, "w-3.5 h-3.5"]) }, null, 2), createElementVNode("span", _hoisted_17, toDisplayString(selectedEntry.value.level), 1)], 2),
|
|
375
375
|
unref(formEntries)[selectedEntry.value.from] ? (openBlock(), createElementBlock("span", {
|
|
376
376
|
key: 0,
|
|
377
377
|
class: normalizeClass(["flex items-center gap-1", unref(formEntries)[selectedEntry.value.from].color])
|
|
378
|
-
}, [
|
|
379
|
-
selectedEntry.value.status === "loading" ? (openBlock(), createElementBlock("span", _hoisted_18, [..._cache[14] || (_cache[14] = [
|
|
380
|
-
|
|
378
|
+
}, [createElementVNode("div", { class: normalizeClass([unref(formEntries)[selectedEntry.value.from].icon, "w-3.5 h-3.5"]) }, null, 2), createTextVNode(" " + toDisplayString(unref(formEntries)[selectedEntry.value.from].label), 1)], 2)) : createCommentVNode("v-if", true),
|
|
379
|
+
selectedEntry.value.status === "loading" ? (openBlock(), createElementBlock("span", _hoisted_18, [..._cache[14] || (_cache[14] = [createElementVNode("div", { class: "w-3 h-3 border-1.5 border-current border-t-transparent rounded-full animate-spin" }, null, -1), createTextVNode(" Loading ", -1)])])) : createCommentVNode("v-if", true),
|
|
380
|
+
createElementVNode("span", {
|
|
381
381
|
class: "op40",
|
|
382
382
|
title: formatAbsoluteTime(selectedEntry.value.timestamp)
|
|
383
383
|
}, toDisplayString(unref(selectedTimeAgo)), 9, _hoisted_19),
|
|
384
|
-
selectedEntry.value.notify ? (openBlock(), createElementBlock("span", _hoisted_20, [..._cache[15] || (_cache[15] = [
|
|
384
|
+
selectedEntry.value.notify ? (openBlock(), createElementBlock("span", _hoisted_20, [..._cache[15] || (_cache[15] = [createElementVNode("div", { class: "i-ph:bell-duotone w-3.5 h-3.5" }, null, -1), createTextVNode(" notify ", -1)])])) : createCommentVNode("v-if", true)
|
|
385
385
|
]),
|
|
386
386
|
createCommentVNode(" Description "),
|
|
387
387
|
selectedEntry.value.description ? (openBlock(), createElementBlock("div", _hoisted_21, toDisplayString(selectedEntry.value.description), 1)) : createCommentVNode("v-if", true),
|
|
@@ -400,24 +400,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
400
400
|
key: 2,
|
|
401
401
|
class: "flex items-center gap-1.5 text-sm text-blue hover:underline mb-3",
|
|
402
402
|
onClick: _cache[3] || (_cache[3] = ($event) => openFile(selectedEntry.value))
|
|
403
|
-
}, [_cache[16] || (_cache[16] =
|
|
403
|
+
}, [_cache[16] || (_cache[16] = createElementVNode("div", { class: "i-ph:file-code-duotone w-4 h-4" }, null, -1)), createElementVNode("span", null, [
|
|
404
404
|
createTextVNode(toDisplayString(selectedEntry.value.filePosition.file), 1),
|
|
405
405
|
selectedEntry.value.filePosition.line ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(":" + toDisplayString(selectedEntry.value.filePosition.line), 1)], 64)) : createCommentVNode("v-if", true),
|
|
406
406
|
selectedEntry.value.filePosition.column ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(":" + toDisplayString(selectedEntry.value.filePosition.column), 1)], 64)) : createCommentVNode("v-if", true)
|
|
407
407
|
])])) : createCommentVNode("v-if", true),
|
|
408
408
|
createCommentVNode(" Element position "),
|
|
409
409
|
selectedEntry.value.elementPosition ? (openBlock(), createElementBlock("div", _hoisted_23, [
|
|
410
|
-
_cache[17] || (_cache[17] =
|
|
410
|
+
_cache[17] || (_cache[17] = createElementVNode("div", { class: "op50 text-xs mb-1" }, " Element ", -1)),
|
|
411
411
|
selectedEntry.value.elementPosition.selector ? (openBlock(), createElementBlock("div", _hoisted_24, toDisplayString(selectedEntry.value.elementPosition.selector), 1)) : createCommentVNode("v-if", true),
|
|
412
412
|
selectedEntry.value.elementPosition.description ? (openBlock(), createElementBlock("div", _hoisted_25, toDisplayString(selectedEntry.value.elementPosition.description), 1)) : createCommentVNode("v-if", true),
|
|
413
413
|
selectedEntry.value.elementPosition.boundingBox ? (openBlock(), createElementBlock("div", _hoisted_26, toDisplayString(selectedEntry.value.elementPosition.boundingBox.x) + ", " + toDisplayString(selectedEntry.value.elementPosition.boundingBox.y) + " (" + toDisplayString(selectedEntry.value.elementPosition.boundingBox.width) + " × " + toDisplayString(selectedEntry.value.elementPosition.boundingBox.height) + ") ", 1)) : createCommentVNode("v-if", true)
|
|
414
414
|
])) : createCommentVNode("v-if", true),
|
|
415
415
|
createCommentVNode(" Stacktrace "),
|
|
416
|
-
selectedEntry.value.stacktrace ? (openBlock(), createElementBlock("div", _hoisted_27, [_cache[18] || (_cache[18] =
|
|
416
|
+
selectedEntry.value.stacktrace ? (openBlock(), createElementBlock("div", _hoisted_27, [_cache[18] || (_cache[18] = createElementVNode("div", { class: "op50 text-xs mb-1" }, " Stack Trace ", -1)), createElementVNode("pre", _hoisted_28, toDisplayString(selectedEntry.value.stacktrace), 1)])) : createCommentVNode("v-if", true),
|
|
417
417
|
createCommentVNode(" Timers "),
|
|
418
|
-
selectedEntry.value.autoDismiss || selectedEntry.value.autoDelete ? (openBlock(), createElementBlock("div", _hoisted_29, [selectedEntry.value.autoDismiss ? (openBlock(), createElementBlock("span", _hoisted_30, [_cache[19] || (_cache[19] =
|
|
418
|
+
selectedEntry.value.autoDismiss || selectedEntry.value.autoDelete ? (openBlock(), createElementBlock("div", _hoisted_29, [selectedEntry.value.autoDismiss ? (openBlock(), createElementBlock("span", _hoisted_30, [_cache[19] || (_cache[19] = createElementVNode("div", { class: "i-ph:bell-slash-duotone w-3.5 h-3.5" }, null, -1)), createTextVNode(" Auto-dismiss: " + toDisplayString(selectedEntry.value.autoDismiss / 1e3) + "s ", 1)])) : createCommentVNode("v-if", true), selectedEntry.value.autoDelete ? (openBlock(), createElementBlock("span", _hoisted_31, [_cache[20] || (_cache[20] = createElementVNode("div", { class: "i-ph:timer-duotone w-3.5 h-3.5" }, null, -1)), createTextVNode(" Auto-delete: " + toDisplayString(selectedEntry.value.autoDelete / 1e3) + "s ", 1)])) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true),
|
|
419
419
|
createCommentVNode(" ID + Timestamp "),
|
|
420
|
-
|
|
420
|
+
createElementVNode("div", _hoisted_32, [createElementVNode("span", null, "ID: " + toDisplayString(selectedEntry.value.id), 1), createElementVNode("span", null, toDisplayString(formatAbsoluteTime(selectedEntry.value.timestamp)) + " (" + toDisplayString(new Date(selectedEntry.value.timestamp).toLocaleDateString()) + ")", 1)])
|
|
421
421
|
])) : createCommentVNode("v-if", true)
|
|
422
422
|
], 2)
|
|
423
423
|
]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import "
|
|
1
|
+
import { r as useEventListener, u as watchImmediate } from "./dist-CBtGbo90.js";
|
|
2
|
+
import { t as _sfc_main$2 } from "./DockIcon-zZkKuxFy.js";
|
|
3
|
+
import "./iconify-JodklND-.js";
|
|
4
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, markRaw, nextTick, normalizeClass, onMounted, onUnmounted, openBlock, reactive, ref, renderList, shallowRef, toDisplayString, unref, watch } from "vue";
|
|
5
5
|
//#region src/client/webcomponents/state/terminals.ts
|
|
6
6
|
let _terminalsMap;
|
|
7
7
|
function useTerminals(context) {
|
|
@@ -57,7 +57,7 @@ function useTerminals(context) {
|
|
|
57
57
|
* http://bellard.org/jslinux/
|
|
58
58
|
* Copyright (c) 2011 Fabrice Bellard
|
|
59
59
|
*/
|
|
60
|
-
var h = 2, _ = 1, o = class {
|
|
60
|
+
var h$1 = 2, _ = 1, o = class {
|
|
61
61
|
activate(e) {
|
|
62
62
|
this._terminal = e;
|
|
63
63
|
}
|
|
@@ -79,7 +79,7 @@ var h = 2, _ = 1, o = class {
|
|
|
79
79
|
left: parseInt(i.getPropertyValue("padding-left"))
|
|
80
80
|
}, m = n.top + n.bottom, d = n.right + n.left, c = l - m, p = a - d - s;
|
|
81
81
|
return {
|
|
82
|
-
cols: Math.max(h, Math.floor(p / t.css.cell.width)),
|
|
82
|
+
cols: Math.max(h$1, Math.floor(p / t.css.cell.width)),
|
|
83
83
|
rows: Math.max(_, Math.floor(c / t.css.cell.height))
|
|
84
84
|
};
|
|
85
85
|
}
|
|
@@ -10360,7 +10360,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
10360
10360
|
props.terminal.terminal = null;
|
|
10361
10361
|
});
|
|
10362
10362
|
return (_ctx, _cache) => {
|
|
10363
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
10363
|
+
return openBlock(), createElementBlock(Fragment, null, [createElementVNode("div", {
|
|
10364
10364
|
ref_key: "container",
|
|
10365
10365
|
ref: container,
|
|
10366
10366
|
class: "h-full w-full of-auto bg-black"
|
|
@@ -10388,7 +10388,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10388
10388
|
if (selectedTerminal.value == null && terminals.size > 0) selectedTerminal.value = terminals.values().next().value;
|
|
10389
10389
|
});
|
|
10390
10390
|
return (_ctx, _cache) => {
|
|
10391
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
10391
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(terminals).values(), (terminal) => {
|
|
10392
10392
|
return openBlock(), createElementBlock("button", {
|
|
10393
10393
|
key: terminal.info.id,
|
|
10394
10394
|
class: normalizeClass(["px3 py1.5 border-r border-base hover:bg-active text-sm flex items-center gap-1", { "bg-active": selectedTerminal.value?.info.id === terminal.info.id }]),
|
|
@@ -10396,12 +10396,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10396
10396
|
}, [createVNode(_sfc_main$2, {
|
|
10397
10397
|
icon: terminal.info.icon || "ph:terminal-duotone",
|
|
10398
10398
|
class: "w-4 h-4"
|
|
10399
|
-
}, null, 8, ["icon"]),
|
|
10400
|
-
}), 128))]),
|
|
10399
|
+
}, null, 8, ["icon"]), createElementVNode("span", null, toDisplayString(terminal.info.title), 1)], 10, _hoisted_3);
|
|
10400
|
+
}), 128))]), createElementVNode("div", _hoisted_4, [selectedTerminal.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
10401
10401
|
key: selectedTerminal.value.info.id,
|
|
10402
10402
|
context: __props.context,
|
|
10403
10403
|
terminal: selectedTerminal.value
|
|
10404
|
-
}, null, 8, ["context", "terminal"])) : (openBlock(), createElementBlock("div", _hoisted_5, [..._cache[0] || (_cache[0] = [
|
|
10404
|
+
}, null, 8, ["context", "terminal"])) : (openBlock(), createElementBlock("div", _hoisted_5, [..._cache[0] || (_cache[0] = [createElementVNode("div", null, "Select a terminal tab to start", -1)])]))])]);
|
|
10405
10405
|
};
|
|
10406
10406
|
}
|
|
10407
10407
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as getIconifySvg } from "./iconify-JodklND-.js";
|
|
2
|
+
import { computed, createBlock, createElementBlock, createVNode, defineComponent, h, inject, markRaw, onErrorCaptured, onMounted, onUnmounted, openBlock, provide, ref, shallowRef, toDisplayString, unref, watch, watchEffect, withCtx } from "vue";
|
|
3
3
|
Object.freeze({ status: "aborted" });
|
|
4
4
|
function $constructor(name, initializer, params) {
|
|
5
5
|
function init(inst, def) {
|
|
@@ -3393,7 +3393,7 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
3393
3393
|
inst.prefault = (def) => prefault(inst, def);
|
|
3394
3394
|
inst.catch = (params) => _catch(inst, params);
|
|
3395
3395
|
inst.pipe = (target) => pipe(inst, target);
|
|
3396
|
-
inst.readonly = () => readonly(inst);
|
|
3396
|
+
inst.readonly = () => readonly$1(inst);
|
|
3397
3397
|
inst.describe = (description) => {
|
|
3398
3398
|
const cl = inst.clone();
|
|
3399
3399
|
globalRegistry.add(cl, { description });
|
|
@@ -3932,7 +3932,7 @@ const ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
|
3932
3932
|
inst._zod.processJSONSchema = (ctx, json, params) => readonlyProcessor(inst, ctx, json, params);
|
|
3933
3933
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
3934
3934
|
});
|
|
3935
|
-
function readonly(innerType) {
|
|
3935
|
+
function readonly$1(innerType) {
|
|
3936
3936
|
return new ZodReadonly({
|
|
3937
3937
|
type: "readonly",
|
|
3938
3938
|
innerType
|
package/dist/cli-commands.js
CHANGED
|
@@ -1,3 +1,93 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { n as
|
|
1
|
+
import { n as ansis_default } from "./constants-DfEeYo9W.js";
|
|
2
|
+
import { n as normalizeHttpServerUrl } from "./utils-HWI9S6d-.js";
|
|
3
|
+
import { dirClientStandalone } from "./dirs.js";
|
|
4
|
+
import { DEVTOOLS_CONNECTION_META_FILENAME, DEVTOOLS_DIRNAME, DEVTOOLS_DOCK_IMPORTS_FILENAME, DEVTOOLS_MOUNT_PATH, DEVTOOLS_RPC_DUMP_DIRNAME, DEVTOOLS_RPC_DUMP_MANIFEST_FILENAME } from "@vitejs/devtools-kit/constants";
|
|
5
|
+
import { dirname, join, relative, resolve } from "pathe";
|
|
6
|
+
import { existsSync } from "node:fs";
|
|
7
|
+
import fs$1 from "node:fs/promises";
|
|
8
|
+
//#region src/node/cli-commands.ts
|
|
9
|
+
async function start(options) {
|
|
10
|
+
const { host } = options;
|
|
11
|
+
const { getPort } = await import("./dist-DpLy3ojW.js").then((n) => n.t);
|
|
12
|
+
const port = await getPort({
|
|
13
|
+
host,
|
|
14
|
+
port: options.port == null ? void 0 : +options.port,
|
|
15
|
+
portRange: [9999, 15e3]
|
|
16
|
+
});
|
|
17
|
+
const { startStandaloneDevTools } = await import("./standalone-CAJbdnf4.js");
|
|
18
|
+
const { createDevToolsMiddleware } = await import("./server-BuWZ1h8p.js").then((n) => n.n);
|
|
19
|
+
const devtools = await startStandaloneDevTools({ cwd: options.root });
|
|
20
|
+
const { h3 } = await createDevToolsMiddleware({
|
|
21
|
+
cwd: devtools.config.root,
|
|
22
|
+
hostWebSocket: host,
|
|
23
|
+
context: devtools.context
|
|
24
|
+
});
|
|
25
|
+
const { createServer } = await import("node:http");
|
|
26
|
+
const { createApp, eventHandler, fromNodeMiddleware, sendRedirect, toNodeListener } = await import("h3");
|
|
27
|
+
const { default: sirv } = await import("sirv");
|
|
28
|
+
const app = createApp();
|
|
29
|
+
for (const { baseUrl, distDir } of devtools.context.views.buildStaticDirs) app.use(baseUrl, fromNodeMiddleware(sirv(distDir, {
|
|
30
|
+
dev: true,
|
|
31
|
+
single: true
|
|
32
|
+
})));
|
|
33
|
+
app.use(DEVTOOLS_MOUNT_PATH, h3.handler);
|
|
34
|
+
app.use("/", eventHandler(async (event) => {
|
|
35
|
+
if (event.node.req.url === "/") return sendRedirect(event, DEVTOOLS_MOUNT_PATH);
|
|
36
|
+
}));
|
|
37
|
+
createServer(toNodeListener(app)).listen(port, host, async () => {
|
|
38
|
+
const url = normalizeHttpServerUrl(host, port);
|
|
39
|
+
console.log(ansis_default.green`${"⬢"} Vite DevTools started at`, ansis_default.green(url), "\n");
|
|
40
|
+
const { default: open } = await import("open");
|
|
41
|
+
if (options.open) await open(url);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
async function build(options) {
|
|
45
|
+
console.log(ansis_default.cyan`${"⬢"} Building static Vite DevTools...`);
|
|
46
|
+
const { startStandaloneDevTools } = await import("./standalone-CAJbdnf4.js");
|
|
47
|
+
const devtools = await startStandaloneDevTools({
|
|
48
|
+
cwd: options.root,
|
|
49
|
+
config: options.config
|
|
50
|
+
});
|
|
51
|
+
const outDir = resolve(devtools.config.root, options.outDir);
|
|
52
|
+
if (existsSync(outDir)) await fs$1.rm(outDir, { recursive: true });
|
|
53
|
+
const devToolsRoot = join(outDir, DEVTOOLS_DIRNAME);
|
|
54
|
+
await fs$1.mkdir(devToolsRoot, { recursive: true });
|
|
55
|
+
await fs$1.cp(dirClientStandalone, devToolsRoot, { recursive: true });
|
|
56
|
+
for (const { baseUrl, distDir } of devtools.context.views.buildStaticDirs) {
|
|
57
|
+
console.log(ansis_default.cyan`${"⬢"} Copying static files from ${distDir} to ${join(outDir, baseUrl)}`);
|
|
58
|
+
await fs$1.mkdir(join(outDir, baseUrl), { recursive: true });
|
|
59
|
+
await fs$1.cp(distDir, join(outDir, baseUrl), { recursive: true });
|
|
60
|
+
}
|
|
61
|
+
const { renderDockImportsMap } = await import("./server-Ca6LOTxO.js");
|
|
62
|
+
await fs$1.mkdir(resolve(devToolsRoot, DEVTOOLS_RPC_DUMP_DIRNAME), { recursive: true });
|
|
63
|
+
await fs$1.writeFile(resolve(devToolsRoot, DEVTOOLS_CONNECTION_META_FILENAME), JSON.stringify({ backend: "static" }, null, 2), "utf-8");
|
|
64
|
+
await fs$1.writeFile(resolve(devToolsRoot, DEVTOOLS_DOCK_IMPORTS_FILENAME), renderDockImportsMap(devtools.context.docks.values()), "utf-8");
|
|
65
|
+
console.log(ansis_default.cyan`${"⬢"} Writing RPC dump to ${resolve(devToolsRoot, DEVTOOLS_RPC_DUMP_MANIFEST_FILENAME)}`);
|
|
66
|
+
const { collectStaticRpcDump } = await import("./static-dump-Q0iG9hz3.js");
|
|
67
|
+
const dump = await collectStaticRpcDump(devtools.context.rpc.definitions.values(), devtools.context);
|
|
68
|
+
for (const [filepath, data] of Object.entries(dump.files)) {
|
|
69
|
+
const fullpath = resolve(devToolsRoot, filepath);
|
|
70
|
+
await fs$1.mkdir(dirname(fullpath), { recursive: true });
|
|
71
|
+
await fs$1.writeFile(fullpath, JSON.stringify(data, null, 2), "utf-8");
|
|
72
|
+
}
|
|
73
|
+
await fs$1.writeFile(resolve(devToolsRoot, DEVTOOLS_RPC_DUMP_MANIFEST_FILENAME), JSON.stringify(dump.manifest, null, 2), "utf-8");
|
|
74
|
+
await fs$1.writeFile(resolve(outDir, "index.html"), [
|
|
75
|
+
"<!doctype html>",
|
|
76
|
+
"<html lang=\"en\">",
|
|
77
|
+
"<head>",
|
|
78
|
+
" <meta charset=\"UTF-8\">",
|
|
79
|
+
" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">",
|
|
80
|
+
" <title>Vite DevTools</title>",
|
|
81
|
+
` <meta http-equiv="refresh" content="0; url=${DEVTOOLS_MOUNT_PATH}">`,
|
|
82
|
+
"</head>",
|
|
83
|
+
"<body>",
|
|
84
|
+
` <script>location.replace(${JSON.stringify(DEVTOOLS_MOUNT_PATH)})<\/script>`,
|
|
85
|
+
"</body>",
|
|
86
|
+
"</html>"
|
|
87
|
+
].join("\n"), "utf-8");
|
|
88
|
+
console.log(ansis_default.green`${"⬢"} Built to ${relative(devtools.config.root, outDir)}`);
|
|
89
|
+
console.warn(ansis_default.yellow`${"⬢"} Static build is still experimental and not yet complete.`);
|
|
90
|
+
console.warn(ansis_default.yellow`${"⬢"} Generated output may be missing features and can change without notice.`);
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
3
93
|
export { build, start };
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import "./plugins-DiuKIPkS.js";
|
|
2
|
-
import { n as start, t as build } from "./cli-commands-CnJ4eqDp.js";
|
|
3
1
|
import process from "node:process";
|
|
4
2
|
import cac from "cac";
|
|
5
3
|
//#region src/node/cli.ts
|
|
@@ -7,8 +5,14 @@ const cli = cac("vite-devtools");
|
|
|
7
5
|
process.on("SIGINT", () => {
|
|
8
6
|
process.exit(0);
|
|
9
7
|
});
|
|
10
|
-
cli.command("build", "Build devtools with current config file for static hosting").option("--root <root>", "Root directory", { default: process.cwd() }).option("--config <config>", "Vite config file").option("--base <baseURL>", "Base URL for deployment", { default: "/" }).option("--outDir <dir>", "Output directory", { default: ".vite-devtools" }).action(
|
|
11
|
-
|
|
8
|
+
cli.command("build", "Build devtools with current config file for static hosting").option("--root <root>", "Root directory", { default: process.cwd() }).option("--config <config>", "Vite config file").option("--base <baseURL>", "Base URL for deployment", { default: "/" }).option("--outDir <dir>", "Output directory", { default: ".vite-devtools" }).action(async (options) => {
|
|
9
|
+
const { build } = await import("./cli-commands.js");
|
|
10
|
+
return await build(options);
|
|
11
|
+
});
|
|
12
|
+
cli.command("", "Start devtools").option("--root <root>", "Root directory", { default: process.cwd() }).option("--config <config>", "Vite config file").option("--host <host>", "Host", { default: process.env.HOST || "127.0.0.1" }).option("--port <port>", "Port", { default: process.env.PORT || 9999 }).option("--open", "Open browser", { default: true }).action(async (options) => {
|
|
13
|
+
const { start } = await import("./cli-commands.js");
|
|
14
|
+
return await start(options);
|
|
15
|
+
});
|
|
12
16
|
cli.help();
|
|
13
17
|
cli.parse();
|
|
14
18
|
//#endregion
|
package/dist/client/inject.js
CHANGED
|
@@ -1,38 +1,59 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { _ as sharedStateToRef, a as triggerMainFrameDockAction, g as createDockEntryState, h as DEFAULT_DOCK_PANEL_STORE, r as registerMainFrameDockActionHandler, v as useDocksEntries, x as BUILTIN_ENTRIES, y as docksGroupByCategories } from "../popup-BUPO6e0I.js";
|
|
1
|
+
import { i as useLocalStorage } from "../dist-CBtGbo90.js";
|
|
2
|
+
import { _ as sharedStateToRef, a as triggerMainFrameDockAction, g as createDockEntryState, h as DEFAULT_DOCK_PANEL_STORE, r as registerMainFrameDockActionHandler, v as useDocksEntries, x as BUILTIN_ENTRIES, y as docksGroupByCategories } from "../popup-CAT8YohS.js";
|
|
4
3
|
import { DEFAULT_STATE_USER_SETTINGS, DEVTOOLS_DOCK_IMPORTS_FILENAME, DEVTOOLS_DOCK_IMPORTS_VIRTUAL_ID, DEVTOOLS_MOUNT_PATH } from "@vitejs/devtools-kit/constants";
|
|
5
4
|
import { CLIENT_CONTEXT_KEY, getDevToolsRpcClient } from "@vitejs/devtools-kit/client";
|
|
5
|
+
import { computed, markRaw, reactive, ref, toRefs, watchEffect } from "vue";
|
|
6
6
|
//#region src/client/webcomponents/state/logs-client.ts
|
|
7
|
-
function createRpcHandle(rpc, initialEntry) {
|
|
8
|
-
let entry = initialEntry;
|
|
9
|
-
return {
|
|
10
|
-
get entry() {
|
|
11
|
-
return entry;
|
|
12
|
-
},
|
|
13
|
-
get id() {
|
|
14
|
-
return entry.id;
|
|
15
|
-
},
|
|
16
|
-
async update(patch) {
|
|
17
|
-
const updated = await rpc.call("devtoolskit:internal:logs:update", entry.id, patch);
|
|
18
|
-
if (updated) entry = updated;
|
|
19
|
-
return updated ?? void 0;
|
|
20
|
-
},
|
|
21
|
-
async dismiss() {
|
|
22
|
-
await rpc.call("devtoolskit:internal:logs:remove", entry.id);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
7
|
function createClientLogsClient(rpc) {
|
|
8
|
+
const buffer = [];
|
|
9
|
+
let flushing;
|
|
10
|
+
async function flush() {
|
|
11
|
+
if (rpc.isTrusted !== true) return;
|
|
12
|
+
if (flushing === void 0) flushing = new Promise(async (resolve) => {
|
|
13
|
+
while (buffer.length > 0) await buffer.shift()();
|
|
14
|
+
resolve();
|
|
15
|
+
});
|
|
16
|
+
return flushing;
|
|
17
|
+
}
|
|
18
|
+
async function enqueue(op) {
|
|
19
|
+
if (rpc.isTrusted === true && buffer.length !== 0) await flush();
|
|
20
|
+
if (rpc.isTrusted === true && buffer.length === 0) return await op();
|
|
21
|
+
return new Promise((resolve) => {
|
|
22
|
+
buffer.push(async () => {
|
|
23
|
+
resolve(await op());
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
rpc.events.on("rpc:is-trusted:updated", (isTrusted) => {
|
|
28
|
+
if (isTrusted && buffer.length > 0) flush();
|
|
29
|
+
});
|
|
27
30
|
return {
|
|
28
|
-
|
|
29
|
-
return
|
|
31
|
+
add(input) {
|
|
32
|
+
return enqueue(async () => {
|
|
33
|
+
let entry = await rpc.call("devtoolskit:internal:logs:add", input);
|
|
34
|
+
return {
|
|
35
|
+
get entry() {
|
|
36
|
+
return entry;
|
|
37
|
+
},
|
|
38
|
+
get id() {
|
|
39
|
+
return entry.id;
|
|
40
|
+
},
|
|
41
|
+
async update(patch) {
|
|
42
|
+
const updated = await rpc.call("devtoolskit:internal:logs:update", entry.id, patch);
|
|
43
|
+
if (updated) entry = updated;
|
|
44
|
+
return updated ?? void 0;
|
|
45
|
+
},
|
|
46
|
+
async dismiss() {
|
|
47
|
+
await rpc.call("devtoolskit:internal:logs:remove", entry.id);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
});
|
|
30
51
|
},
|
|
31
|
-
|
|
32
|
-
|
|
52
|
+
remove(id) {
|
|
53
|
+
return enqueue(() => rpc.call("devtoolskit:internal:logs:remove", id));
|
|
33
54
|
},
|
|
34
|
-
|
|
35
|
-
|
|
55
|
+
clear() {
|
|
56
|
+
return enqueue(() => rpc.call("devtoolskit:internal:logs:clear"));
|
|
36
57
|
}
|
|
37
58
|
};
|
|
38
59
|
}
|