@spotlightjs/overlay 2.14.0 → 2.15.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spotlightjs/overlay",
3
3
  "description": "The overlay of Spotlight to add debug interface to your web app.",
4
- "version": "2.14.0",
4
+ "version": "2.15.0",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "files": [
@@ -20,9 +20,9 @@
20
20
  "@fontsource/raleway": "^5.1.0",
21
21
  "@microlink/react-json-view": "^1.23.4",
22
22
  "@sentry/browser": "^8.51.0",
23
+ "@sentry/core": "^8.51.0",
23
24
  "@sentry/react": "^8.51.0",
24
25
  "@sentry/types": "^8.51.0",
25
- "@sentry/core": "^8.51.0",
26
26
  "@types/beautify": "^0.0.3",
27
27
  "@types/react": "^18.3.11",
28
28
  "@types/react-dom": "^18.3.0",
@@ -52,6 +52,7 @@
52
52
  "vite-plugin-dts": "^3.9.1",
53
53
  "vite-plugin-svgr": "^3.3.0",
54
54
  "vitest": "^0.34.6",
55
+ "zustand": "^5.0.3",
55
56
  "@spotlightjs/sidecar": "1.11.3",
56
57
  "@spotlightjs/tsconfig": "2.0.0"
57
58
  },
@@ -1,76 +0,0 @@
1
- import { Envelope } from '@sentry/core';
2
- import { RawEventContext } from '../../integration';
3
- import { Sdk, SentryErrorEvent, SentryEvent, SentryProcessedProfile, SentryProfileV1Event, SentryTransactionEvent, Trace } from '../types';
4
-
5
- type OnlineSubscription = ['online', (status: boolean) => void];
6
- type EventSubscription = ['event', (event: SentryEvent) => void];
7
- type TraceSubscription = ['trace', (trace: Trace) => void];
8
- type Subscription = OnlineSubscription | EventSubscription | TraceSubscription;
9
- export type SentryProfileWithTraceMeta = SentryProcessedProfile & {
10
- timestamp: number;
11
- active_thread_id: string;
12
- };
13
- declare class SentryDataCache {
14
- protected events: SentryEvent[];
15
- protected eventIds: Set<string>;
16
- protected sdks: Sdk[];
17
- protected traces: Trace[];
18
- protected tracesById: Map<string, Trace>;
19
- protected profilesByTraceId: Map<string, SentryProfileWithTraceMeta>;
20
- protected localTraceIds: Set<string>;
21
- protected envelopes: {
22
- envelope: Envelope;
23
- rawEnvelope: RawEventContext;
24
- }[];
25
- protected subscribers: Map<string, Subscription>;
26
- protected contextLinesProvider: string;
27
- constructor(initial?: (SentryEvent & {
28
- event_id?: string;
29
- })[]);
30
- setSidecarUrl(url: string): void;
31
- inferSdkFromEvent(event: SentryEvent): Sdk;
32
- pushEnvelope({ envelope, rawEnvelope }: {
33
- envelope: Envelope;
34
- rawEnvelope: RawEventContext;
35
- }): number;
36
- pushEvent(event: SentryEvent & {
37
- event_id?: string;
38
- }): Promise<void>;
39
- getEvents(): SentryEvent[];
40
- getTraces(): Trace[];
41
- getSdks(): Sdk[];
42
- getEnvelopes(): {
43
- envelope: Envelope;
44
- rawEnvelope: RawEventContext;
45
- }[];
46
- getEventById(id: string): SentryEvent | undefined;
47
- getTraceById(id: string): Trace | undefined;
48
- getProfileByTraceId(id: string): SentryProfileWithTraceMeta | undefined;
49
- getEventsByTrace(traceId: string, spanId?: string | null): SentryEvent[];
50
- resetData(): void;
51
- subscribe(...args: Subscription): () => void;
52
- /**
53
- * Mark a traceId as being seen in the local session.
54
- *
55
- * @param traceId
56
- */
57
- trackLocalTrace(traceId: string): void;
58
- /**
59
- * Determine if a traceId was seen in the local session.
60
- *
61
- * A result of `null` means "unknown", which implies there is no known
62
- * information about any session-initiated traces.
63
- */
64
- isTraceLocal(traceId: string): boolean | null;
65
- /**
66
- * Reverses the stack trace and tries to fill missing context lines
67
- * @param errorEvent
68
- * @returns
69
- */
70
- processStacktrace(errorEvent: SentryErrorEvent): Promise<void[]>;
71
- }
72
- declare const _default: SentryDataCache;
73
- export default _default;
74
- export declare function isErrorEvent(event: SentryEvent): event is SentryErrorEvent;
75
- export declare function isProfileEvent(event: SentryEvent): event is SentryProfileV1Event;
76
- export declare function isTraceEvent(event: SentryEvent): event is SentryTransactionEvent;