nuxt-devtools-observatory 0.1.28 → 0.1.31
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/README.md +93 -11
- package/client/.env +2 -1
- package/client/.env.example +2 -1
- package/client/dist/assets/index-BuMXDBO9.js +17 -0
- package/client/dist/assets/index-CwcspZ6w.css +1 -0
- package/client/dist/index.html +2 -2
- package/client/src/App.vue +4 -0
- package/client/src/components/Flamegraph.vue +443 -0
- package/client/src/components/SpanInspector.vue +446 -0
- package/client/src/components/TraceFilter.vue +344 -0
- package/client/src/components/WaterfallView.vue +443 -0
- package/client/src/composables/useResizablePane.ts +65 -0
- package/client/src/composables/useTraceFilter.ts +164 -0
- package/client/src/stores/observatory.ts +16 -2
- package/client/src/style.css +203 -28
- package/client/src/views/ComposableTracker.vue +324 -259
- package/client/src/views/FetchDashboard.vue +104 -133
- package/client/src/views/ProvideInjectGraph.vue +99 -109
- package/client/src/views/RenderHeatmap.vue +191 -147
- package/client/src/views/TraceViewer.vue +599 -0
- package/client/src/views/TransitionTimeline.vue +167 -137
- package/client/tsconfig.json +3 -1
- package/client/vite.config.ts +8 -0
- package/dist/module.d.mts +5 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +186 -200
- package/dist/runtime/composables/render-registry.js +66 -110
- package/dist/runtime/composables/transition-registry.js +103 -28
- package/dist/runtime/instrumentation/asyncData.d.ts +9 -0
- package/dist/runtime/instrumentation/asyncData.js +49 -0
- package/dist/runtime/instrumentation/component.d.ts +2 -0
- package/dist/runtime/instrumentation/component.js +126 -0
- package/dist/runtime/instrumentation/fetch.d.ts +2 -0
- package/dist/runtime/instrumentation/fetch.js +89 -0
- package/dist/runtime/instrumentation/route.d.ts +6 -0
- package/dist/runtime/instrumentation/route.js +41 -0
- package/dist/runtime/plugin.js +39 -3
- package/dist/runtime/tracing/context.d.ts +9 -0
- package/dist/runtime/tracing/context.js +15 -0
- package/dist/runtime/tracing/trace.d.ts +25 -0
- package/dist/runtime/tracing/trace.js +0 -0
- package/dist/runtime/tracing/traceStore.d.ts +39 -0
- package/dist/runtime/tracing/traceStore.js +101 -0
- package/dist/runtime/tracing/tracing.d.ts +27 -0
- package/dist/runtime/tracing/tracing.js +48 -0
- package/package.json +9 -6
- package/client/dist/assets/index-DXCGQOSF.js +0 -17
- package/client/dist/assets/index-htI4WwBU.css +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { getCurrentTraceId, setCurrentTraceId } from "../tracing/context.js";
|
|
2
|
+
import { traceStore } from "../tracing/traceStore.js";
|
|
3
|
+
export function setupRouteInstrumentation(nuxtApp, options) {
|
|
4
|
+
let activeTraceId;
|
|
5
|
+
const getRoutePath = () => {
|
|
6
|
+
const path = options.getCurrentPath();
|
|
7
|
+
return path && path.length > 0 ? path : "/";
|
|
8
|
+
};
|
|
9
|
+
nuxtApp.hook("page:start", () => {
|
|
10
|
+
if (activeTraceId) {
|
|
11
|
+
traceStore.endTrace(activeTraceId, { status: "cancelled" });
|
|
12
|
+
activeTraceId = void 0;
|
|
13
|
+
}
|
|
14
|
+
const route = getRoutePath();
|
|
15
|
+
const previousRoute = getCurrentTraceId(options.carrier);
|
|
16
|
+
const trace = traceStore.createTrace({
|
|
17
|
+
name: `route:${route}`,
|
|
18
|
+
metadata: {
|
|
19
|
+
kind: "route-navigation",
|
|
20
|
+
route,
|
|
21
|
+
previousTraceId: previousRoute
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
activeTraceId = trace.id;
|
|
25
|
+
setCurrentTraceId(trace.id, options.carrier);
|
|
26
|
+
});
|
|
27
|
+
nuxtApp.hook("page:finish", () => {
|
|
28
|
+
if (!activeTraceId) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const route = getRoutePath();
|
|
32
|
+
traceStore.endTrace(activeTraceId, {
|
|
33
|
+
status: "ok",
|
|
34
|
+
metadata: {
|
|
35
|
+
route
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
setCurrentTraceId(void 0, options.carrier);
|
|
39
|
+
activeTraceId = void 0;
|
|
40
|
+
});
|
|
41
|
+
}
|
package/dist/runtime/plugin.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { defineNuxtPlugin, useNuxtApp, useRuntimeConfig, useRouter } from "#app";
|
|
2
2
|
import { nextTick } from "vue";
|
|
3
|
+
import { setupComposableRegistry } from "./composables/composable-registry.js";
|
|
3
4
|
import { setupFetchRegistry } from "./composables/fetch-registry.js";
|
|
4
5
|
import { setupProvideInjectRegistry } from "./composables/provide-inject-registry.js";
|
|
5
|
-
import { setupComposableRegistry } from "./composables/composable-registry.js";
|
|
6
6
|
import { setupRenderRegistry } from "./composables/render-registry.js";
|
|
7
7
|
import { setupTransitionRegistry } from "./composables/transition-registry.js";
|
|
8
|
+
import { setupComponentInstrumentation } from "./instrumentation/component.js";
|
|
9
|
+
import { setupFetchInstrumentation } from "./instrumentation/fetch.js";
|
|
10
|
+
import { setupRouteInstrumentation } from "./instrumentation/route.js";
|
|
11
|
+
import { traceStore } from "./tracing/traceStore.js";
|
|
8
12
|
export default defineNuxtPlugin(() => {
|
|
9
13
|
if (!import.meta.dev) {
|
|
10
14
|
return;
|
|
@@ -42,6 +46,10 @@ export default defineNuxtPlugin(() => {
|
|
|
42
46
|
registries.transition = setupTransitionRegistry();
|
|
43
47
|
}
|
|
44
48
|
if (import.meta.client) {
|
|
49
|
+
if (config.traceViewer) {
|
|
50
|
+
setupComponentInstrumentation(nuxtApp);
|
|
51
|
+
setupFetchInstrumentation(nuxtApp);
|
|
52
|
+
}
|
|
45
53
|
delete window.__observatory__;
|
|
46
54
|
window.__observatory__ = registries;
|
|
47
55
|
const composableRegistry = registries.composable;
|
|
@@ -121,6 +129,11 @@ export default defineNuxtPlugin(() => {
|
|
|
121
129
|
});
|
|
122
130
|
if (import.meta.client) {
|
|
123
131
|
const router = useRouter();
|
|
132
|
+
if (config.traceViewer) {
|
|
133
|
+
setupRouteInstrumentation(nuxtApp, {
|
|
134
|
+
getCurrentPath: () => router.currentRoute.value.path ?? "/"
|
|
135
|
+
});
|
|
136
|
+
}
|
|
124
137
|
router.beforeEach(
|
|
125
138
|
(_to, from) => {
|
|
126
139
|
if (!from || from.name === void 0) {
|
|
@@ -175,7 +188,8 @@ export default defineNuxtPlugin(() => {
|
|
|
175
188
|
fetch: Array.isArray(snapshot.fetch) ? snapshot.fetch.length : 0,
|
|
176
189
|
composables: Array.isArray(snapshot.composables) ? snapshot.composables.length : 0,
|
|
177
190
|
renders: Array.isArray(snapshot.renders) ? snapshot.renders.length : 0,
|
|
178
|
-
transitions: Array.isArray(snapshot.transitions) ? snapshot.transitions.length : 0
|
|
191
|
+
transitions: Array.isArray(snapshot.transitions) ? snapshot.transitions.length : 0,
|
|
192
|
+
traces: Array.isArray(snapshot.traces) ? snapshot.traces.length : 0
|
|
179
193
|
});
|
|
180
194
|
lastSnapshotSignature = JSON.stringify(snapshot);
|
|
181
195
|
import.meta.hot.send("observatory:snapshot", snapshot);
|
|
@@ -207,13 +221,35 @@ export default defineNuxtPlugin(() => {
|
|
|
207
221
|
const hasGetSnapshot = reg && typeof reg.getSnapshot === "function";
|
|
208
222
|
snapshot[key === "composable" ? "composables" : key === "render" ? "renders" : key === "transition" ? "transitions" : key] = hasGetSnapshot ? safeParse(reg.getSnapshot(), fallback) : fallback;
|
|
209
223
|
}
|
|
224
|
+
snapshot.traces = config.traceViewer ? traceStore.getAllTraces().map((trace) => ({
|
|
225
|
+
id: trace.id,
|
|
226
|
+
name: trace.name,
|
|
227
|
+
startTime: trace.startTime,
|
|
228
|
+
endTime: trace.endTime,
|
|
229
|
+
durationMs: trace.durationMs,
|
|
230
|
+
status: trace.status,
|
|
231
|
+
metadata: trace.metadata,
|
|
232
|
+
spans: trace.spans.map((span) => ({
|
|
233
|
+
id: span.id,
|
|
234
|
+
traceId: span.traceId,
|
|
235
|
+
parentSpanId: span.parentSpanId,
|
|
236
|
+
name: span.name,
|
|
237
|
+
type: span.type,
|
|
238
|
+
startTime: span.startTime,
|
|
239
|
+
endTime: span.endTime,
|
|
240
|
+
durationMs: span.durationMs,
|
|
241
|
+
status: span.status,
|
|
242
|
+
metadata: span.metadata
|
|
243
|
+
}))
|
|
244
|
+
})) : [];
|
|
210
245
|
snapshot.features = {
|
|
211
246
|
fetchDashboard: !!registries.fetch,
|
|
212
247
|
provideInjectGraph: !!registries.provideInject,
|
|
213
248
|
composableTracker: !!registries.composable,
|
|
214
249
|
composableNavigationMode,
|
|
215
250
|
renderHeatmap: !!registries.render,
|
|
216
|
-
transitionTracker: !!registries.transition
|
|
251
|
+
transitionTracker: !!registries.transition,
|
|
252
|
+
traceViewer: !!config.traceViewer
|
|
217
253
|
};
|
|
218
254
|
return snapshot;
|
|
219
255
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const TRACE_CONTEXT_KEY = "__observatory_trace_context__";
|
|
2
|
+
type TraceContextCarrier = {
|
|
3
|
+
[TRACE_CONTEXT_KEY]?: {
|
|
4
|
+
currentTraceId?: string;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export declare function setCurrentTraceId(traceId: string | undefined, carrier?: TraceContextCarrier): void;
|
|
8
|
+
export declare function getCurrentTraceId(carrier?: TraceContextCarrier): string | undefined;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const TRACE_CONTEXT_KEY = "__observatory_trace_context__";
|
|
2
|
+
function getGlobalCarrier() {
|
|
3
|
+
return globalThis;
|
|
4
|
+
}
|
|
5
|
+
export function setCurrentTraceId(traceId, carrier) {
|
|
6
|
+
const target = carrier ?? getGlobalCarrier();
|
|
7
|
+
if (!target[TRACE_CONTEXT_KEY]) {
|
|
8
|
+
target[TRACE_CONTEXT_KEY] = {};
|
|
9
|
+
}
|
|
10
|
+
target[TRACE_CONTEXT_KEY].currentTraceId = traceId;
|
|
11
|
+
}
|
|
12
|
+
export function getCurrentTraceId(carrier) {
|
|
13
|
+
const target = carrier ?? getGlobalCarrier();
|
|
14
|
+
return target[TRACE_CONTEXT_KEY]?.currentTraceId;
|
|
15
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type SpanType = 'render' | 'transition' | 'fetch' | 'composable' | 'navigation' | 'custom' | (string & {});
|
|
2
|
+
export type SpanStatus = 'active' | 'ok' | 'error' | 'cancelled';
|
|
3
|
+
export interface Span {
|
|
4
|
+
id: string;
|
|
5
|
+
traceId: string;
|
|
6
|
+
parentSpanId?: string;
|
|
7
|
+
name: string;
|
|
8
|
+
type: SpanType;
|
|
9
|
+
startTime: number;
|
|
10
|
+
endTime?: number;
|
|
11
|
+
durationMs?: number;
|
|
12
|
+
status: SpanStatus;
|
|
13
|
+
metadata?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
export type TraceStatus = 'active' | 'ok' | 'error' | 'cancelled';
|
|
16
|
+
export interface Trace {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
startTime: number;
|
|
20
|
+
endTime?: number;
|
|
21
|
+
durationMs?: number;
|
|
22
|
+
status: TraceStatus;
|
|
23
|
+
metadata?: Record<string, unknown>;
|
|
24
|
+
spans: Span[];
|
|
25
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Span, SpanStatus, Trace, TraceStatus } from './trace.js';
|
|
2
|
+
export interface CreateTraceInput {
|
|
3
|
+
id?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
startTime?: number;
|
|
6
|
+
metadata?: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
export interface AddSpanInput {
|
|
9
|
+
id?: string;
|
|
10
|
+
traceId: string;
|
|
11
|
+
parentSpanId?: string;
|
|
12
|
+
name: string;
|
|
13
|
+
type: Span['type'];
|
|
14
|
+
startTime?: number;
|
|
15
|
+
endTime?: number;
|
|
16
|
+
status?: SpanStatus;
|
|
17
|
+
metadata?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
export interface EndTraceInput {
|
|
20
|
+
endTime?: number;
|
|
21
|
+
status?: TraceStatus;
|
|
22
|
+
metadata?: Record<string, unknown>;
|
|
23
|
+
}
|
|
24
|
+
export declare class TraceStore {
|
|
25
|
+
private readonly traces;
|
|
26
|
+
createTrace(input?: CreateTraceInput): Trace;
|
|
27
|
+
addSpan(input: AddSpanInput): Span;
|
|
28
|
+
endTrace(traceId: string, input?: EndTraceInput): Trace | null;
|
|
29
|
+
endSpan(spanId: string, traceId: string, input?: {
|
|
30
|
+
endTime?: number;
|
|
31
|
+
status?: SpanStatus;
|
|
32
|
+
metadata?: Record<string, unknown>;
|
|
33
|
+
}): Span | null;
|
|
34
|
+
getTrace(traceId: string): Trace | undefined;
|
|
35
|
+
getAllTraces(): Trace[];
|
|
36
|
+
clear(): void;
|
|
37
|
+
private ensureTrace;
|
|
38
|
+
}
|
|
39
|
+
export declare const traceStore: TraceStore;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
function createId(prefix) {
|
|
2
|
+
const random = Math.random().toString(36).slice(2, 10);
|
|
3
|
+
return `${prefix}_${Date.now()}_${random}`;
|
|
4
|
+
}
|
|
5
|
+
function computeDuration(startTime, endTime) {
|
|
6
|
+
return Math.max(endTime - startTime, 0);
|
|
7
|
+
}
|
|
8
|
+
export class TraceStore {
|
|
9
|
+
traces = /* @__PURE__ */ new Map();
|
|
10
|
+
createTrace(input = {}) {
|
|
11
|
+
const startTime = input.startTime ?? performance.now();
|
|
12
|
+
const trace = {
|
|
13
|
+
id: input.id ?? createId("trace"),
|
|
14
|
+
name: input.name ?? "trace",
|
|
15
|
+
startTime,
|
|
16
|
+
status: "active",
|
|
17
|
+
metadata: input.metadata,
|
|
18
|
+
spans: []
|
|
19
|
+
};
|
|
20
|
+
this.traces.set(trace.id, trace);
|
|
21
|
+
return trace;
|
|
22
|
+
}
|
|
23
|
+
addSpan(input) {
|
|
24
|
+
const trace = this.ensureTrace(input.traceId, input.startTime);
|
|
25
|
+
const startTime = input.startTime ?? performance.now();
|
|
26
|
+
const endTime = input.endTime;
|
|
27
|
+
const span = {
|
|
28
|
+
id: input.id ?? createId("span"),
|
|
29
|
+
traceId: trace.id,
|
|
30
|
+
parentSpanId: input.parentSpanId,
|
|
31
|
+
name: input.name,
|
|
32
|
+
type: input.type,
|
|
33
|
+
startTime,
|
|
34
|
+
endTime,
|
|
35
|
+
durationMs: endTime !== void 0 ? computeDuration(startTime, endTime) : void 0,
|
|
36
|
+
status: input.status ?? (endTime !== void 0 ? "ok" : "active"),
|
|
37
|
+
metadata: input.metadata
|
|
38
|
+
};
|
|
39
|
+
trace.spans.push(span);
|
|
40
|
+
if (trace.endTime !== void 0) {
|
|
41
|
+
trace.durationMs = computeDuration(trace.startTime, trace.endTime);
|
|
42
|
+
}
|
|
43
|
+
return span;
|
|
44
|
+
}
|
|
45
|
+
endTrace(traceId, input = {}) {
|
|
46
|
+
const trace = this.traces.get(traceId);
|
|
47
|
+
if (!trace) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
const endTime = input.endTime ?? performance.now();
|
|
51
|
+
trace.endTime = endTime;
|
|
52
|
+
trace.durationMs = computeDuration(trace.startTime, endTime);
|
|
53
|
+
trace.status = input.status ?? "ok";
|
|
54
|
+
if (input.metadata) {
|
|
55
|
+
trace.metadata = {
|
|
56
|
+
...trace.metadata ?? {},
|
|
57
|
+
...input.metadata
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
return trace;
|
|
61
|
+
}
|
|
62
|
+
endSpan(spanId, traceId, input = {}) {
|
|
63
|
+
const trace = this.traces.get(traceId);
|
|
64
|
+
if (!trace) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
const span = trace.spans.find((item) => item.id === spanId);
|
|
68
|
+
if (!span) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
const endTime = input.endTime ?? performance.now();
|
|
72
|
+
span.endTime = endTime;
|
|
73
|
+
span.durationMs = computeDuration(span.startTime, endTime);
|
|
74
|
+
span.status = input.status ?? "ok";
|
|
75
|
+
if (input.metadata) {
|
|
76
|
+
span.metadata = {
|
|
77
|
+
...span.metadata ?? {},
|
|
78
|
+
...input.metadata
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return span;
|
|
82
|
+
}
|
|
83
|
+
getTrace(traceId) {
|
|
84
|
+
return this.traces.get(traceId);
|
|
85
|
+
}
|
|
86
|
+
getAllTraces() {
|
|
87
|
+
return [...this.traces.values()];
|
|
88
|
+
}
|
|
89
|
+
clear() {
|
|
90
|
+
this.traces.clear();
|
|
91
|
+
}
|
|
92
|
+
ensureTrace(traceId, startTime) {
|
|
93
|
+
const existing = this.traces.get(traceId);
|
|
94
|
+
if (existing) {
|
|
95
|
+
return existing;
|
|
96
|
+
}
|
|
97
|
+
const trace = this.createTrace({ id: traceId, startTime });
|
|
98
|
+
return trace;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
export const traceStore = new TraceStore();
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type TraceStore } from './traceStore.js';
|
|
2
|
+
import type { Span, SpanStatus, SpanType, Trace } from './trace.js';
|
|
3
|
+
export interface StartSpanInput {
|
|
4
|
+
name: string;
|
|
5
|
+
type: SpanType;
|
|
6
|
+
traceId?: string;
|
|
7
|
+
parentSpanId?: string;
|
|
8
|
+
metadata?: Record<string, unknown>;
|
|
9
|
+
startTime?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface EndSpanInput {
|
|
12
|
+
endTime?: number;
|
|
13
|
+
status?: SpanStatus;
|
|
14
|
+
metadata?: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
export interface SpanHandle {
|
|
17
|
+
trace: Trace;
|
|
18
|
+
span: Span;
|
|
19
|
+
end: (input?: EndSpanInput) => Span;
|
|
20
|
+
}
|
|
21
|
+
export interface StartSpanOptions {
|
|
22
|
+
store?: TraceStore;
|
|
23
|
+
carrier?: object;
|
|
24
|
+
traceName?: string;
|
|
25
|
+
traceMetadata?: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
export declare function startSpan(input: StartSpanInput, options?: StartSpanOptions): SpanHandle;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { getCurrentTraceId, setCurrentTraceId } from "./context.js";
|
|
2
|
+
import { traceStore } from "./traceStore.js";
|
|
3
|
+
export function startSpan(input, options = {}) {
|
|
4
|
+
const store = options.store ?? traceStore;
|
|
5
|
+
const activeTraceId = input.traceId ?? getCurrentTraceId(options.carrier);
|
|
6
|
+
let trace = activeTraceId ? store.getTrace(activeTraceId) : void 0;
|
|
7
|
+
if (!trace) {
|
|
8
|
+
trace = store.createTrace({
|
|
9
|
+
id: activeTraceId,
|
|
10
|
+
name: options.traceName ?? input.name,
|
|
11
|
+
metadata: options.traceMetadata,
|
|
12
|
+
startTime: input.startTime
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
setCurrentTraceId(trace.id, options.carrier);
|
|
16
|
+
const span = store.addSpan({
|
|
17
|
+
traceId: trace.id,
|
|
18
|
+
parentSpanId: input.parentSpanId,
|
|
19
|
+
name: input.name,
|
|
20
|
+
type: input.type,
|
|
21
|
+
metadata: input.metadata,
|
|
22
|
+
startTime: input.startTime
|
|
23
|
+
});
|
|
24
|
+
let ended = false;
|
|
25
|
+
const end = (endInput = {}) => {
|
|
26
|
+
if (ended) {
|
|
27
|
+
return span;
|
|
28
|
+
}
|
|
29
|
+
const endedSpan = store.endSpan(span.id, trace.id, {
|
|
30
|
+
endTime: endInput.endTime,
|
|
31
|
+
status: endInput.status,
|
|
32
|
+
metadata: endInput.metadata
|
|
33
|
+
});
|
|
34
|
+
ended = true;
|
|
35
|
+
if (endedSpan) {
|
|
36
|
+
span.endTime = endedSpan.endTime;
|
|
37
|
+
span.durationMs = endedSpan.durationMs;
|
|
38
|
+
span.status = endedSpan.status;
|
|
39
|
+
span.metadata = endedSpan.metadata;
|
|
40
|
+
}
|
|
41
|
+
return span;
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
trace,
|
|
45
|
+
span,
|
|
46
|
+
end
|
|
47
|
+
};
|
|
48
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-devtools-observatory",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.31",
|
|
4
4
|
"description": "Nuxt DevTools: useFetch Dashboard, provide/inject Graph, Composable Tracker, Render Heatmap",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -34,16 +34,18 @@
|
|
|
34
34
|
"client"
|
|
35
35
|
],
|
|
36
36
|
"scripts": {
|
|
37
|
-
"dev": "nuxi dev playground",
|
|
38
|
-
"
|
|
39
|
-
"docs:
|
|
40
|
-
"docs:
|
|
37
|
+
"dev": "concurrently -r -n client,nuxt \"pnpm dev:client\" \"nuxi dev playground\"",
|
|
38
|
+
"dev:client": "vite build --watch --config client/vite.config.ts",
|
|
39
|
+
"docs:clean": "rm -rf docs/.nuxt docs/.output",
|
|
40
|
+
"docs:dev": "pnpm docs:clean && pnpm --dir docs dev",
|
|
41
|
+
"docs:build": "pnpm docs:clean && pnpm --dir docs build",
|
|
42
|
+
"docs:generate": "pnpm docs:clean && pnpm --dir docs generate",
|
|
41
43
|
"docs:preview": "pnpm --dir docs preview",
|
|
42
44
|
"build:client": "vite build --config client/vite.config.ts",
|
|
43
45
|
"build": "npm run build:client && nuxt-module-build build",
|
|
44
46
|
"prepack": "npm run build",
|
|
45
47
|
"lint": "eslint .",
|
|
46
|
-
"format": "prettier --write '**/*.{ts,vue,js,json}' --ignore-path .prettierignore && stylelint '**/*.{css,vue}' --ignore-pattern '**/.nuxt/**' --ignore-pattern '**/.output/**' --ignore-pattern 'coverage/**' --ignore-pattern 'client/dist/**' --ignore-pattern 'scripts/**' --fix && eslint --fix '**/*.{ts,vue,js}' --ignore-pattern '**/.nuxt/**' --ignore-pattern '**/.output/**' --ignore-pattern 'coverage/**' --ignore-pattern 'client/dist/**' --ignore-pattern 'scripts/**'",
|
|
48
|
+
"format": "prettier --write '**/*.{ts,vue,js,json}' --ignore-path .prettierignore && stylelint '**/*.{css,vue}' --ignore-pattern '**/.nuxt/**' --ignore-pattern '**/.output/**' --ignore-pattern 'coverage/**' --ignore-pattern 'client/dist/**' --ignore-pattern 'scripts/**' --fix && eslint --fix '**/*.{ts,vue,js}' --ignore-pattern '**/.nuxt/**' --ignore-pattern '**/.output/**' --ignore-pattern 'coverage/**' --ignore-pattern 'client/dist/**' --ignore-pattern 'scripts/**' --ignore-pattern 'docs/dist/**'",
|
|
47
49
|
"typecheck": "vue-tsc --noEmit",
|
|
48
50
|
"test": "vitest run",
|
|
49
51
|
"test:watch": "vitest",
|
|
@@ -72,6 +74,7 @@
|
|
|
72
74
|
"@types/node": "^25.5.0",
|
|
73
75
|
"@vitejs/plugin-vue": "^6.0.0",
|
|
74
76
|
"@vitest/coverage-v8": "^4.1.0",
|
|
77
|
+
"concurrently": "^9.2.1",
|
|
75
78
|
"eslint": "^9.39.2",
|
|
76
79
|
"eslint-config-prettier": "^10.1.8",
|
|
77
80
|
"eslint-plugin-jsdoc": "^62.5.0",
|