@monoscopetech/browser 0.6.0 → 0.7.1
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 +144 -27
- package/dist/breadcrumbs.d.ts +9 -0
- package/dist/breadcrumbs.js +13 -0
- package/dist/errors.d.ts +17 -0
- package/dist/errors.js +107 -0
- package/dist/index.d.ts +20 -1
- package/dist/index.js +161 -14
- package/dist/monoscope.min.js +5 -5
- package/dist/monoscope.min.js.map +1 -1
- package/dist/monoscope.umd.js +5 -5
- package/dist/monoscope.umd.js.map +1 -1
- package/dist/react.d.ts +28 -0
- package/dist/react.js +59 -0
- package/dist/replay.d.ts +11 -2
- package/dist/replay.js +89 -73
- package/dist/router.d.ts +13 -0
- package/dist/router.js +65 -0
- package/dist/tracing.d.ts +22 -2
- package/dist/tracing.js +194 -43
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +7 -2
- package/dist/web-vitals.d.ts +10 -0
- package/dist/web-vitals.js +31 -0
- package/package.json +40 -6
package/dist/tracing.js
CHANGED
|
@@ -9,86 +9,237 @@ import { W3CTraceContextPropagator } from "@opentelemetry/core";
|
|
|
9
9
|
import { resourceFromAttributes } from "@opentelemetry/resources";
|
|
10
10
|
import { ATTR_SERVICE_NAME } from "@opentelemetry/semantic-conventions";
|
|
11
11
|
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
|
|
12
|
+
import { context, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
13
|
+
const MONOSCOPE_TRACER = "monoscope";
|
|
12
14
|
export class OpenTelemetryManager {
|
|
13
|
-
constructor(config, sessionId) {
|
|
15
|
+
constructor(config, sessionId, tabId) {
|
|
16
|
+
this.longTaskObserver = null;
|
|
17
|
+
this.resourceObserver = null;
|
|
18
|
+
this._enabled = true;
|
|
19
|
+
this._configured = false;
|
|
20
|
+
this.pageSpan = null;
|
|
21
|
+
this.pageContext = null;
|
|
22
|
+
this.endPageSpanHandler = null;
|
|
14
23
|
this.config = config;
|
|
15
24
|
this.sessionId = sessionId;
|
|
25
|
+
this.tabId = tabId;
|
|
16
26
|
this.provider = this.createProvider();
|
|
17
27
|
}
|
|
18
28
|
createProvider() {
|
|
19
|
-
const { serviceName, resourceAttributes, exporterEndpoint, projectId } = this.config;
|
|
20
|
-
const resource = resourceFromAttributes({
|
|
21
|
-
[ATTR_SERVICE_NAME]: serviceName,
|
|
22
|
-
"at-project-id": projectId,
|
|
23
|
-
...(resourceAttributes || {}),
|
|
24
|
-
});
|
|
25
|
-
const otlpExporter = new OTLPTraceExporter({
|
|
26
|
-
url: exporterEndpoint || "https://otelcol.apitoolkit.io/v1/traces",
|
|
27
|
-
headers: {},
|
|
28
|
-
});
|
|
29
|
+
const { serviceName, resourceAttributes = {}, exporterEndpoint, projectId } = this.config;
|
|
29
30
|
return new WebTracerProvider({
|
|
30
|
-
resource
|
|
31
|
-
|
|
31
|
+
resource: resourceFromAttributes({
|
|
32
|
+
[ATTR_SERVICE_NAME]: serviceName,
|
|
33
|
+
"at-project-id": projectId,
|
|
34
|
+
...resourceAttributes,
|
|
35
|
+
}),
|
|
36
|
+
spanProcessors: [new BatchSpanProcessor(new OTLPTraceExporter({
|
|
37
|
+
url: exporterEndpoint || "https://otelcol.apitoolkit.io/v1/traces",
|
|
38
|
+
headers: {},
|
|
39
|
+
}))],
|
|
32
40
|
});
|
|
33
41
|
}
|
|
42
|
+
commonAttrs() {
|
|
43
|
+
const attrs = {
|
|
44
|
+
"session.id": this.sessionId,
|
|
45
|
+
"tab.id": this.tabId,
|
|
46
|
+
"page.url": location.href,
|
|
47
|
+
"page.title": document.title,
|
|
48
|
+
};
|
|
49
|
+
if (document.referrer)
|
|
50
|
+
attrs["page.referrer"] = document.referrer;
|
|
51
|
+
return attrs;
|
|
52
|
+
}
|
|
53
|
+
applyCommonAttrs(span) {
|
|
54
|
+
for (const [k, v] of Object.entries(this.commonAttrs()))
|
|
55
|
+
span.setAttribute(k, v);
|
|
56
|
+
if (this.config.user) {
|
|
57
|
+
for (const [k, v] of Object.entries(this.config.user)) {
|
|
58
|
+
if (v !== undefined)
|
|
59
|
+
span.setAttribute(`user.${k}`, v);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
34
63
|
configure() {
|
|
64
|
+
if (typeof window === "undefined" || this._configured)
|
|
65
|
+
return;
|
|
66
|
+
this._configured = true;
|
|
67
|
+
const rate = Math.max(0, Math.min(1, this.config.sampleRate ?? 1));
|
|
68
|
+
if (Math.random() >= rate) {
|
|
69
|
+
this._enabled = false;
|
|
70
|
+
if (this.config.debug)
|
|
71
|
+
console.log("MonoscopeOTel: sampled out");
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
35
74
|
this.provider.register({
|
|
36
75
|
contextManager: new ZoneContextManager(),
|
|
37
76
|
propagator: new W3CTraceContextPropagator(),
|
|
38
77
|
});
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
];
|
|
78
|
+
// Default to same-origin only to avoid leaking trace context to third parties
|
|
79
|
+
const headerUrls = this.config.propagateTraceHeaderCorsUrls || [new RegExp(`^${location.origin}`)];
|
|
42
80
|
const ignoreUrls = [
|
|
43
81
|
/^https?:\/\/(?:[^\/]+\.)?apitoolkit\.io\//,
|
|
44
82
|
/^https?:\/\/(?:[^\/]+\.)?monoscope\.tech\//,
|
|
45
83
|
];
|
|
84
|
+
const addAttrs = (span) => this.applyCommonAttrs(span);
|
|
46
85
|
registerInstrumentations({
|
|
47
86
|
tracerProvider: this.provider,
|
|
48
87
|
instrumentations: [
|
|
49
88
|
...(this.config.instrumentations || []),
|
|
50
89
|
new DocumentLoadInstrumentation({
|
|
51
90
|
ignoreNetworkEvents: !this.config.enableNetworkEvents,
|
|
52
|
-
applyCustomAttributesOnSpan: {
|
|
53
|
-
documentLoad: (span) => {
|
|
54
|
-
span.setAttribute("session.id", this.sessionId);
|
|
55
|
-
this.setUserAttributes(span);
|
|
56
|
-
},
|
|
57
|
-
},
|
|
91
|
+
applyCustomAttributesOnSpan: { documentLoad: addAttrs },
|
|
58
92
|
}),
|
|
59
93
|
new XMLHttpRequestInstrumentation({
|
|
60
|
-
propagateTraceHeaderCorsUrls: headerUrls,
|
|
61
|
-
ignoreUrls,
|
|
62
|
-
applyCustomAttributesOnSpan: (span) => {
|
|
63
|
-
span.setAttribute("session.id", this.sessionId);
|
|
64
|
-
this.setUserAttributes(span);
|
|
65
|
-
},
|
|
94
|
+
propagateTraceHeaderCorsUrls: headerUrls, ignoreUrls, applyCustomAttributesOnSpan: addAttrs,
|
|
66
95
|
}),
|
|
67
96
|
new FetchInstrumentation({
|
|
68
|
-
propagateTraceHeaderCorsUrls: headerUrls,
|
|
69
|
-
ignoreUrls,
|
|
70
|
-
applyCustomAttributesOnSpan: (span) => {
|
|
71
|
-
span.setAttribute("session.id", this.sessionId);
|
|
72
|
-
this.setUserAttributes(span);
|
|
73
|
-
},
|
|
97
|
+
propagateTraceHeaderCorsUrls: headerUrls, ignoreUrls, applyCustomAttributesOnSpan: addAttrs,
|
|
74
98
|
}),
|
|
75
99
|
],
|
|
76
100
|
});
|
|
101
|
+
this.startPageSpan();
|
|
102
|
+
this.observeLongTasks();
|
|
103
|
+
this.observeResourceTiming();
|
|
77
104
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
105
|
+
startPageSpan() {
|
|
106
|
+
const tracer = trace.getTracer(MONOSCOPE_TRACER);
|
|
107
|
+
this.pageSpan = tracer.startSpan("browser.session", { attributes: this.commonAttrs() });
|
|
108
|
+
this.pageContext = trace.setSpan(context.active(), this.pageSpan);
|
|
109
|
+
this.endPageSpanHandler = () => { this.pageSpan?.end(); this.pageSpan = null; };
|
|
110
|
+
window.addEventListener("pagehide", this.endPageSpanHandler);
|
|
111
|
+
window.addEventListener("beforeunload", this.endPageSpanHandler);
|
|
112
|
+
}
|
|
113
|
+
getPageContext() { return this.pageContext; }
|
|
114
|
+
withPageContext(fn) {
|
|
115
|
+
if (this.pageContext)
|
|
116
|
+
return context.with(this.pageContext, fn);
|
|
117
|
+
return fn();
|
|
118
|
+
}
|
|
119
|
+
emitSpan(name, attrs, configure) {
|
|
120
|
+
try {
|
|
121
|
+
const tracer = trace.getTracer(MONOSCOPE_TRACER);
|
|
122
|
+
this.withPageContext(() => tracer.startActiveSpan(name, (span) => {
|
|
123
|
+
this.applyCommonAttrs(span);
|
|
124
|
+
for (const [k, v] of Object.entries(attrs))
|
|
125
|
+
span.setAttribute(k, v);
|
|
126
|
+
configure?.(span);
|
|
127
|
+
span.end();
|
|
128
|
+
}));
|
|
129
|
+
}
|
|
130
|
+
catch (e) {
|
|
131
|
+
if (this.config.debug)
|
|
132
|
+
console.warn("Monoscope: span emit failed for", name, e);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
observeLongTasks() {
|
|
136
|
+
if (typeof PerformanceObserver === "undefined")
|
|
137
|
+
return;
|
|
138
|
+
try {
|
|
139
|
+
this.longTaskObserver = new PerformanceObserver((list) => {
|
|
140
|
+
if (!this._enabled)
|
|
141
|
+
return;
|
|
142
|
+
for (const entry of list.getEntries()) {
|
|
143
|
+
try {
|
|
144
|
+
const attrs = {
|
|
145
|
+
"longtask.duration": entry.duration,
|
|
146
|
+
"longtask.name": entry.name,
|
|
147
|
+
};
|
|
148
|
+
const attr = entry.attribution;
|
|
149
|
+
if (attr?.[0]?.containerSrc)
|
|
150
|
+
attrs["longtask.script"] = attr[0].containerSrc;
|
|
151
|
+
if (attr?.[0]?.containerName)
|
|
152
|
+
attrs["longtask.container"] = attr[0].containerName;
|
|
153
|
+
this.emitSpan("longtask", attrs);
|
|
154
|
+
}
|
|
155
|
+
catch (e) {
|
|
156
|
+
if (this.config.debug)
|
|
157
|
+
console.warn("Monoscope: failed to process longtask entry", e);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
this.longTaskObserver.observe({ type: "longtask", buffered: true });
|
|
162
|
+
}
|
|
163
|
+
catch (e) {
|
|
164
|
+
console.warn("Monoscope: longtask observation not supported", e);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
observeResourceTiming() {
|
|
168
|
+
if (typeof PerformanceObserver === "undefined")
|
|
169
|
+
return;
|
|
170
|
+
const threshold = this.config.resourceTimingThresholdMs ?? 200;
|
|
171
|
+
try {
|
|
172
|
+
this.resourceObserver = new PerformanceObserver((list) => {
|
|
173
|
+
if (!this._enabled)
|
|
174
|
+
return;
|
|
175
|
+
for (const entry of list.getEntries()) {
|
|
176
|
+
if (entry.duration < threshold)
|
|
177
|
+
continue;
|
|
178
|
+
try {
|
|
179
|
+
const re = entry;
|
|
180
|
+
this.emitSpan("resource", {
|
|
181
|
+
"resource.name": re.name,
|
|
182
|
+
"resource.duration": re.duration,
|
|
183
|
+
"resource.type": re.initiatorType,
|
|
184
|
+
"resource.transferSize": re.transferSize,
|
|
185
|
+
"resource.encodedBodySize": re.encodedBodySize,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
catch (e) {
|
|
189
|
+
if (this.config.debug)
|
|
190
|
+
console.warn("Monoscope: failed to process resource entry", e);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
this.resourceObserver.observe({ type: "resource", buffered: false });
|
|
195
|
+
}
|
|
196
|
+
catch (e) {
|
|
197
|
+
console.warn("Monoscope: resource timing not supported", e);
|
|
83
198
|
}
|
|
84
199
|
}
|
|
200
|
+
startSpan(name, fn) {
|
|
201
|
+
const tracer = trace.getTracer(MONOSCOPE_TRACER);
|
|
202
|
+
return this.withPageContext(() => tracer.startActiveSpan(name, (span) => {
|
|
203
|
+
this.applyCommonAttrs(span);
|
|
204
|
+
try {
|
|
205
|
+
const result = fn(span);
|
|
206
|
+
if (result instanceof Promise) {
|
|
207
|
+
return result.then((v) => { span.end(); return v; }, (e) => {
|
|
208
|
+
span.setStatus({ code: SpanStatusCode.ERROR, message: String(e) });
|
|
209
|
+
span.end();
|
|
210
|
+
throw e;
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
span.end();
|
|
214
|
+
return result;
|
|
215
|
+
}
|
|
216
|
+
catch (e) {
|
|
217
|
+
span.setStatus({ code: SpanStatusCode.ERROR, message: String(e) });
|
|
218
|
+
span.end();
|
|
219
|
+
throw e;
|
|
220
|
+
}
|
|
221
|
+
}));
|
|
222
|
+
}
|
|
223
|
+
recordEvent(name, attributes = {}) {
|
|
224
|
+
this.emitSpan(name, attributes);
|
|
225
|
+
}
|
|
226
|
+
updateSessionId(sessionId) { this.sessionId = sessionId; }
|
|
227
|
+
setEnabled(enabled) { this._enabled = enabled; }
|
|
85
228
|
async shutdown() {
|
|
229
|
+
this.longTaskObserver?.disconnect();
|
|
230
|
+
this.resourceObserver?.disconnect();
|
|
231
|
+
if (this.endPageSpanHandler && typeof window !== "undefined") {
|
|
232
|
+
this.endPageSpanHandler();
|
|
233
|
+
window.removeEventListener("pagehide", this.endPageSpanHandler);
|
|
234
|
+
window.removeEventListener("beforeunload", this.endPageSpanHandler);
|
|
235
|
+
this.endPageSpanHandler = null;
|
|
236
|
+
}
|
|
237
|
+
this.pageSpan = null;
|
|
238
|
+
this.pageContext = null;
|
|
239
|
+
this._configured = false;
|
|
86
240
|
await this.provider.shutdown();
|
|
87
241
|
}
|
|
88
242
|
setUser(newConfig) {
|
|
89
|
-
this.config = {
|
|
90
|
-
...this.config,
|
|
91
|
-
user: { ...this.config.user, ...newConfig },
|
|
92
|
-
};
|
|
243
|
+
this.config = { ...this.config, user: { ...this.config.user, ...newConfig } };
|
|
93
244
|
}
|
|
94
245
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/replay.ts","../src/tracing.ts","../src/types.ts"],"version":"5.
|
|
1
|
+
{"root":["../src/breadcrumbs.ts","../src/errors.ts","../src/index.ts","../src/react.tsx","../src/replay.ts","../src/router.ts","../src/tracing.ts","../src/types.ts","../src/web-vitals.ts"],"version":"5.9.3"}
|
package/dist/types.d.ts
CHANGED
|
@@ -5,10 +5,15 @@ export type MonoscopeConfig = {
|
|
|
5
5
|
propagateTraceHeaderCorsUrls?: RegExp[];
|
|
6
6
|
projectId: string;
|
|
7
7
|
resourceAttributes?: Record<string, string>;
|
|
8
|
-
instrumentations?:
|
|
8
|
+
instrumentations?: unknown[];
|
|
9
9
|
replayEventsBaseUrl?: string;
|
|
10
10
|
enableNetworkEvents?: boolean;
|
|
11
11
|
user?: MonoscopeUser;
|
|
12
|
+
debug?: boolean;
|
|
13
|
+
sampleRate?: number;
|
|
14
|
+
replaySampleRate?: number;
|
|
15
|
+
enabled?: boolean;
|
|
16
|
+
resourceTimingThresholdMs?: number;
|
|
12
17
|
};
|
|
13
18
|
export type MonoscopeUser = {
|
|
14
19
|
email?: string;
|
|
@@ -16,7 +21,7 @@ export type MonoscopeUser = {
|
|
|
16
21
|
name?: string;
|
|
17
22
|
id?: string;
|
|
18
23
|
roles?: string[];
|
|
19
|
-
} & Record<string, string>;
|
|
24
|
+
} & Record<string, string | string[] | undefined>;
|
|
20
25
|
declare global {
|
|
21
26
|
interface Window {
|
|
22
27
|
monoscope: Monoscope;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type EmitFn = (name: string, attrs: Record<string, string | number>) => void;
|
|
2
|
+
export declare class WebVitalsCollector {
|
|
3
|
+
private emit;
|
|
4
|
+
private _enabled;
|
|
5
|
+
private _active;
|
|
6
|
+
constructor(emit: EmitFn);
|
|
7
|
+
start(): Promise<void>;
|
|
8
|
+
setEnabled(enabled: boolean): void;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export class WebVitalsCollector {
|
|
2
|
+
constructor(emit) {
|
|
3
|
+
this._enabled = true;
|
|
4
|
+
this._active = false;
|
|
5
|
+
this.emit = emit;
|
|
6
|
+
}
|
|
7
|
+
async start() {
|
|
8
|
+
if (typeof window === "undefined" || this._active)
|
|
9
|
+
return;
|
|
10
|
+
this._active = true;
|
|
11
|
+
try {
|
|
12
|
+
const { onCLS, onINP, onLCP, onFCP, onTTFB } = await import("web-vitals");
|
|
13
|
+
const report = (m) => {
|
|
14
|
+
if (!this._enabled)
|
|
15
|
+
return;
|
|
16
|
+
this.emit(`web-vital.${m.name}`, {
|
|
17
|
+
"vital.name": m.name,
|
|
18
|
+
"vital.value": m.value,
|
|
19
|
+
"vital.rating": m.rating,
|
|
20
|
+
"vital.id": m.id,
|
|
21
|
+
"vital.navigationType": m.navigationType,
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
[onCLS, onINP, onLCP, onFCP, onTTFB].forEach(fn => fn(report));
|
|
25
|
+
}
|
|
26
|
+
catch (e) {
|
|
27
|
+
console.warn("Monoscope: web-vitals collection failed to initialize", e);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
setEnabled(enabled) { this._enabled = enabled; }
|
|
31
|
+
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monoscopetech/browser",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"unpkg": "dist/monoscope.umd.js",
|
|
8
8
|
"browser": "dist/monoscope.umd.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./react": {
|
|
16
|
+
"types": "./dist/react.d.ts",
|
|
17
|
+
"import": "./dist/react.js",
|
|
18
|
+
"default": "./dist/react.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
9
21
|
"scripts": {
|
|
10
22
|
"build": "npx tsc --build && rollup -c",
|
|
23
|
+
"test": "vitest run",
|
|
24
|
+
"test:e2e": "playwright test",
|
|
11
25
|
"lint": "eslint src --ext .ts",
|
|
12
26
|
"prepublishOnly": "pnpm run build"
|
|
13
27
|
},
|
|
14
28
|
"dependencies": {
|
|
29
|
+
"@opentelemetry/api": "^1.9.0",
|
|
15
30
|
"@opentelemetry/context-zone": "^2.0.1",
|
|
16
31
|
"@opentelemetry/core": "^2.0.1",
|
|
17
32
|
"@opentelemetry/exporter-logs-otlp-http": "^0.203.0",
|
|
@@ -20,6 +35,7 @@
|
|
|
20
35
|
"@opentelemetry/instrumentation": "^0.203.0",
|
|
21
36
|
"@opentelemetry/instrumentation-document-load": "^0.48.0",
|
|
22
37
|
"@opentelemetry/instrumentation-fetch": "^0.203.0",
|
|
38
|
+
"@opentelemetry/instrumentation-user-interaction": "^0.58.0",
|
|
23
39
|
"@opentelemetry/instrumentation-xml-http-request": "^0.203.0",
|
|
24
40
|
"@opentelemetry/resources": "^2.0.1",
|
|
25
41
|
"@opentelemetry/sdk-trace-base": "^2.0.1",
|
|
@@ -27,27 +43,45 @@
|
|
|
27
43
|
"@opentelemetry/semantic-conventions": "^1.36.0",
|
|
28
44
|
"@rrweb/rrweb-plugin-console-record": "2.0.0-alpha.18",
|
|
29
45
|
"rrweb": "2.0.0-alpha.4",
|
|
30
|
-
"
|
|
46
|
+
"web-vitals": "^4.2.0"
|
|
31
47
|
},
|
|
32
48
|
"files": [
|
|
33
49
|
"dist"
|
|
34
50
|
],
|
|
51
|
+
"repository": {
|
|
52
|
+
"type": "git",
|
|
53
|
+
"url": "git+https://github.com/monoscope-tech/monoscope-web.git"
|
|
54
|
+
},
|
|
35
55
|
"publishConfig": {
|
|
36
|
-
"access": "public"
|
|
56
|
+
"access": "public",
|
|
57
|
+
"provenance": true
|
|
37
58
|
},
|
|
38
59
|
"keywords": [],
|
|
39
60
|
"author": "",
|
|
40
61
|
"license": "MIT",
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"react": ">=17"
|
|
64
|
+
},
|
|
65
|
+
"peerDependenciesMeta": {
|
|
66
|
+
"react": {
|
|
67
|
+
"optional": true
|
|
68
|
+
}
|
|
69
|
+
},
|
|
41
70
|
"devDependencies": {
|
|
71
|
+
"@playwright/test": "^1.58.2",
|
|
42
72
|
"@rollup/plugin-commonjs": "^25.0.0",
|
|
43
73
|
"@rollup/plugin-json": "^6.1.0",
|
|
44
74
|
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
45
|
-
"@rollup/plugin-terser": "^0.
|
|
75
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
46
76
|
"@rollup/plugin-typescript": "^11.0.0",
|
|
47
|
-
"@
|
|
77
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
78
|
+
"@testing-library/react": "^16.3.2",
|
|
79
|
+
"@types/react": "^19.0.0",
|
|
48
80
|
"buffer": "^5.5.0||^6.0.0",
|
|
81
|
+
"jsdom": "^29.0.1",
|
|
49
82
|
"rollup": "^4.0.0",
|
|
50
83
|
"tslib": "^2.8.1",
|
|
51
|
-
"typescript": "^5.0.0"
|
|
84
|
+
"typescript": "^5.0.0",
|
|
85
|
+
"vitest": "^4.1.1"
|
|
52
86
|
}
|
|
53
87
|
}
|