@interfere/next 0.0.9 → 0.0.11
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 +308 -0
- package/dist/__tests__/build/with-interfere-coverage.test.d.ts +2 -0
- package/dist/__tests__/build/with-interfere-coverage.test.d.ts.map +1 -0
- package/dist/__tests__/build/with-interfere-coverage.test.js +338 -0
- package/dist/__tests__/build/with-interfere-coverage.test.js.map +1 -0
- package/dist/__tests__/build/with-interfere.test.d.ts +2 -0
- package/dist/__tests__/build/with-interfere.test.d.ts.map +1 -0
- package/dist/__tests__/build/with-interfere.test.js +466 -0
- package/dist/__tests__/build/with-interfere.test.js.map +1 -0
- package/dist/__tests__/core/client.test.d.ts.map +1 -0
- package/dist/__tests__/core/client.test.js +373 -0
- package/dist/__tests__/core/client.test.js.map +1 -0
- package/dist/__tests__/core/encoders.test.d.ts.map +1 -0
- package/dist/{core → __tests__/core}/encoders.test.js +20 -19
- package/dist/__tests__/core/encoders.test.js.map +1 -0
- package/dist/__tests__/core/rage-click.test.d.ts +2 -0
- package/dist/__tests__/core/rage-click.test.d.ts.map +1 -0
- package/dist/__tests__/core/rage-click.test.js +121 -0
- package/dist/__tests__/core/rage-click.test.js.map +1 -0
- package/dist/__tests__/core/session-manager.test.d.ts +2 -0
- package/dist/__tests__/core/session-manager.test.d.ts.map +1 -0
- package/dist/__tests__/core/session-manager.test.js +1132 -0
- package/dist/__tests__/core/session-manager.test.js.map +1 -0
- package/dist/__tests__/integration/release-upload.test.d.ts +2 -0
- package/dist/__tests__/integration/release-upload.test.d.ts.map +1 -0
- package/dist/__tests__/integration/release-upload.test.js +173 -0
- package/dist/__tests__/integration/release-upload.test.js.map +1 -0
- package/dist/__tests__/session/persistence.test.d.ts +2 -0
- package/dist/__tests__/session/persistence.test.d.ts.map +1 -0
- package/dist/__tests__/session/persistence.test.js +129 -0
- package/dist/__tests__/session/persistence.test.js.map +1 -0
- package/dist/__tests__/session/session-summary.test.d.ts +2 -0
- package/dist/__tests__/session/session-summary.test.d.ts.map +1 -0
- package/dist/__tests__/session/session-summary.test.js +763 -0
- package/dist/__tests__/session/session-summary.test.js.map +1 -0
- package/dist/build/index.d.ts +3 -0
- package/dist/build/index.d.ts.map +1 -0
- package/dist/build/index.js +2 -0
- package/dist/build/index.js.map +1 -0
- package/dist/build/with-interfere.d.ts +54 -0
- package/dist/build/with-interfere.d.ts.map +1 -0
- package/dist/build/with-interfere.js +267 -0
- package/dist/build/with-interfere.js.map +1 -0
- package/dist/core/client-core.d.ts +27 -0
- package/dist/core/client-core.d.ts.map +1 -0
- package/dist/core/client-core.js +152 -0
- package/dist/core/client-core.js.map +1 -0
- package/dist/core/client.d.ts +71 -18
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/client.js +107 -97
- package/dist/core/client.js.map +1 -1
- package/dist/core/constants.d.ts +12 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/constants.js +17 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/core/debug.d.ts +47 -0
- package/dist/core/debug.d.ts.map +1 -0
- package/dist/core/debug.js +79 -0
- package/dist/core/debug.js.map +1 -0
- package/dist/core/error-handlers.d.ts +14 -0
- package/dist/core/error-handlers.d.ts.map +1 -0
- package/dist/core/error-handlers.js +192 -0
- package/dist/core/error-handlers.js.map +1 -0
- package/dist/core/runtime.d.ts +7 -0
- package/dist/core/runtime.d.ts.map +1 -0
- package/dist/core/runtime.js +16 -0
- package/dist/core/runtime.js.map +1 -0
- package/dist/index.d.ts +10 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/next/middleware.d.ts +8 -0
- package/dist/next/middleware.d.ts.map +1 -0
- package/dist/next/middleware.js +139 -0
- package/dist/next/middleware.js.map +1 -0
- package/dist/persistence/storage.d.ts +5 -0
- package/dist/persistence/storage.d.ts.map +1 -0
- package/dist/persistence/storage.js +67 -0
- package/dist/persistence/storage.js.map +1 -0
- package/dist/react/provider.d.ts +12 -7
- package/dist/react/provider.d.ts.map +1 -1
- package/dist/react/provider.jsx +37 -10
- package/dist/react/provider.jsx.map +1 -1
- package/dist/session/constants.d.ts +19 -0
- package/dist/session/constants.d.ts.map +1 -0
- package/dist/session/constants.js +34 -0
- package/dist/session/constants.js.map +1 -0
- package/dist/session/persistence.d.ts +58 -0
- package/dist/session/persistence.d.ts.map +1 -0
- package/dist/session/persistence.js +180 -0
- package/dist/session/persistence.js.map +1 -0
- package/dist/session/rage-click.d.ts +17 -0
- package/dist/session/rage-click.d.ts.map +1 -0
- package/dist/session/rage-click.js +104 -0
- package/dist/session/rage-click.js.map +1 -0
- package/dist/session/replay.d.ts +3 -0
- package/dist/session/replay.d.ts.map +1 -0
- package/dist/session/replay.js +109 -0
- package/dist/session/replay.js.map +1 -0
- package/dist/session/session-manager.d.ts +126 -0
- package/dist/session/session-manager.d.ts.map +1 -0
- package/dist/session/session-manager.js +635 -0
- package/dist/session/session-manager.js.map +1 -0
- package/dist/session/session-summary.d.ts +3 -0
- package/dist/session/session-summary.d.ts.map +1 -0
- package/dist/session/session-summary.js +214 -0
- package/dist/session/session-summary.js.map +1 -0
- package/dist/types/storage.d.ts +7 -0
- package/dist/types/storage.d.ts.map +1 -0
- package/dist/types/storage.js +2 -0
- package/dist/types/storage.js.map +1 -0
- package/package.json +28 -9
- package/dist/core/client.test.d.ts.map +0 -1
- package/dist/core/client.test.js +0 -227
- package/dist/core/client.test.js.map +0 -1
- package/dist/core/encoders.test.d.ts.map +0 -1
- package/dist/core/encoders.test.js.map +0 -1
- package/dist/edge/edge.d.ts +0 -11
- package/dist/edge/edge.d.ts.map +0 -1
- package/dist/edge/edge.js +0 -41
- package/dist/edge/edge.js.map +0 -1
- package/dist/edge/edge.test.d.ts +0 -2
- package/dist/edge/edge.test.d.ts.map +0 -1
- package/dist/edge/edge.test.js +0 -109
- package/dist/edge/edge.test.js.map +0 -1
- package/dist/server/server.d.ts +0 -6
- package/dist/server/server.d.ts.map +0 -1
- package/dist/server/server.js +0 -35
- package/dist/server/server.js.map +0 -1
- package/dist/server/server.test.d.ts +0 -2
- package/dist/server/server.test.d.ts.map +0 -1
- package/dist/server/server.test.js +0 -88
- package/dist/server/server.test.js.map +0 -1
- /package/dist/{core → __tests__/core}/client.test.d.ts +0 -0
- /package/dist/{core → __tests__/core}/encoders.test.d.ts +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
# @interfere/next
|
|
2
|
+
|
|
3
|
+
Official Next.js SDK for Interfere error monitoring and analytics.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @interfere/next
|
|
9
|
+
# or
|
|
10
|
+
yarn add @interfere/next
|
|
11
|
+
# or
|
|
12
|
+
pnpm add @interfere/next
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
### 1. Initialize the SDK
|
|
18
|
+
|
|
19
|
+
Create a file to initialize Interfere (e.g., `lib/interfere.ts`):
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { init } from '@interfere/next';
|
|
23
|
+
|
|
24
|
+
export const interfere = init({
|
|
25
|
+
project: process.env.NEXT_PUBLIC_INTERFERE_PROJECT_ID!,
|
|
26
|
+
options: {
|
|
27
|
+
env: process.env.NODE_ENV as 'development' | 'preview' | 'production',
|
|
28
|
+
debug: process.env.NODE_ENV === 'development',
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 2. Add Error Boundary (App Directory)
|
|
34
|
+
|
|
35
|
+
In your root layout (`app/layout.tsx`):
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
import { InterfereProvider, InterfereErrorBoundary } from '@interfere/next';
|
|
39
|
+
import { interfere } from '@/lib/interfere';
|
|
40
|
+
|
|
41
|
+
export default function RootLayout({
|
|
42
|
+
children,
|
|
43
|
+
}: {
|
|
44
|
+
children: React.ReactNode;
|
|
45
|
+
}) {
|
|
46
|
+
return (
|
|
47
|
+
<html lang="en">
|
|
48
|
+
<body>
|
|
49
|
+
<InterfereProvider>
|
|
50
|
+
<InterfereErrorBoundary>
|
|
51
|
+
{children}
|
|
52
|
+
</InterfereErrorBoundary>
|
|
53
|
+
</InterfereProvider>
|
|
54
|
+
</body>
|
|
55
|
+
</html>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 3. Add Error Handler (App Directory)
|
|
61
|
+
|
|
62
|
+
Create `app/error.tsx`:
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
'use client';
|
|
66
|
+
|
|
67
|
+
import { useEffect } from 'react';
|
|
68
|
+
import { captureErrorBoundaryError } from '@interfere/next';
|
|
69
|
+
|
|
70
|
+
export default function Error({
|
|
71
|
+
error,
|
|
72
|
+
reset,
|
|
73
|
+
}: {
|
|
74
|
+
error: Error & { digest?: string };
|
|
75
|
+
reset: () => void;
|
|
76
|
+
}) {
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
captureErrorBoundaryError(error, {
|
|
79
|
+
componentStack: error.stack || '',
|
|
80
|
+
});
|
|
81
|
+
}, [error]);
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<div>
|
|
85
|
+
<h2>Something went wrong!</h2>
|
|
86
|
+
<button onClick={() => reset()}>Try again</button>
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 4. Add Global Error Handler
|
|
93
|
+
|
|
94
|
+
Create `app/global-error.tsx`:
|
|
95
|
+
|
|
96
|
+
```tsx
|
|
97
|
+
'use client';
|
|
98
|
+
|
|
99
|
+
import { createInterfereErrorHandler } from '@interfere/next';
|
|
100
|
+
|
|
101
|
+
const errorHandler = createInterfereErrorHandler();
|
|
102
|
+
|
|
103
|
+
export default function GlobalError({
|
|
104
|
+
error,
|
|
105
|
+
reset,
|
|
106
|
+
}: {
|
|
107
|
+
error: Error & { digest?: string };
|
|
108
|
+
reset: () => void;
|
|
109
|
+
}) {
|
|
110
|
+
errorHandler(error, { digest: error.digest });
|
|
111
|
+
|
|
112
|
+
return (
|
|
113
|
+
<html>
|
|
114
|
+
<body>
|
|
115
|
+
<h2>Something went wrong!</h2>
|
|
116
|
+
<button onClick={() => reset()}>Try again</button>
|
|
117
|
+
</body>
|
|
118
|
+
</html>
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## API Routes
|
|
124
|
+
|
|
125
|
+
### Automatic Error Capture
|
|
126
|
+
|
|
127
|
+
Wrap your API route handlers:
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
// app/api/users/route.ts
|
|
131
|
+
import { withInterfereApiRoute } from '@interfere/next';
|
|
132
|
+
|
|
133
|
+
export const GET = withInterfereApiRoute(async (request) => {
|
|
134
|
+
// Your API logic here
|
|
135
|
+
const users = await fetchUsers();
|
|
136
|
+
return Response.json(users);
|
|
137
|
+
});
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Manual Error Capture
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
// app/api/webhook/route.ts
|
|
144
|
+
import { captureServerError } from '@interfere/next';
|
|
145
|
+
|
|
146
|
+
export async function POST(request: Request) {
|
|
147
|
+
try {
|
|
148
|
+
const body = await request.json();
|
|
149
|
+
// Process webhook
|
|
150
|
+
} catch (error) {
|
|
151
|
+
captureServerError(error, request, {
|
|
152
|
+
pathname: '/api/webhook',
|
|
153
|
+
type: 'webhook_error',
|
|
154
|
+
});
|
|
155
|
+
return Response.json({ error: 'Webhook failed' }, { status: 500 });
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Middleware
|
|
161
|
+
|
|
162
|
+
Wrap your middleware to capture errors:
|
|
163
|
+
|
|
164
|
+
```typescript
|
|
165
|
+
// middleware.ts
|
|
166
|
+
import { withInterfereMiddleware } from '@interfere/next';
|
|
167
|
+
import { NextResponse } from 'next/server';
|
|
168
|
+
|
|
169
|
+
export default withInterfereMiddleware(async (request) => {
|
|
170
|
+
// Your middleware logic
|
|
171
|
+
return NextResponse.next();
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
export const config = {
|
|
175
|
+
matcher: '/api/:path*',
|
|
176
|
+
};
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Server Components
|
|
180
|
+
|
|
181
|
+
Wrap async server components:
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
// app/dashboard/page.tsx
|
|
185
|
+
import { withInterfereServerComponent } from '@interfere/next';
|
|
186
|
+
|
|
187
|
+
async function DashboardPage() {
|
|
188
|
+
const data = await fetchDashboardData();
|
|
189
|
+
return <Dashboard data={data} />;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export default withInterfereServerComponent(DashboardPage, 'DashboardPage');
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Custom Event Capture
|
|
196
|
+
|
|
197
|
+
Capture custom events and errors:
|
|
198
|
+
|
|
199
|
+
```typescript
|
|
200
|
+
import { capture, captureServerError } from '@interfere/next';
|
|
201
|
+
|
|
202
|
+
// Capture custom events
|
|
203
|
+
capture('custom', {
|
|
204
|
+
action: 'user_signup',
|
|
205
|
+
userId: user.id,
|
|
206
|
+
plan: 'premium',
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
// Capture handled errors
|
|
210
|
+
try {
|
|
211
|
+
await riskyOperation();
|
|
212
|
+
} catch (error) {
|
|
213
|
+
captureServerError(error, undefined, {
|
|
214
|
+
operation: 'risky_operation',
|
|
215
|
+
context: { userId: user.id },
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## React Hook
|
|
221
|
+
|
|
222
|
+
Use the `useInterfere` hook in client components:
|
|
223
|
+
|
|
224
|
+
```tsx
|
|
225
|
+
'use client';
|
|
226
|
+
|
|
227
|
+
import { useInterfere } from '@interfere/next';
|
|
228
|
+
|
|
229
|
+
export function Button() {
|
|
230
|
+
const { capture } = useInterfere();
|
|
231
|
+
|
|
232
|
+
const handleClick = () => {
|
|
233
|
+
capture('ui_event', {
|
|
234
|
+
action: 'button_click',
|
|
235
|
+
label: 'cta_button',
|
|
236
|
+
});
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
return <button onClick={handleClick}>Click me</button>;
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## Configuration Options
|
|
244
|
+
|
|
245
|
+
```typescript
|
|
246
|
+
init({
|
|
247
|
+
project: 'if_proj_xxx', // Your project ID
|
|
248
|
+
options: {
|
|
249
|
+
env: 'production', // 'development' | 'preview' | 'production'
|
|
250
|
+
flushInterval: 5000, // Flush interval in ms (client-side only)
|
|
251
|
+
debug: false, // Enable debug logging
|
|
252
|
+
sessionId: 'custom-session-id', // Optional custom session ID
|
|
253
|
+
},
|
|
254
|
+
});
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
## Event Types
|
|
258
|
+
|
|
259
|
+
The SDK automatically captures these event types:
|
|
260
|
+
|
|
261
|
+
- `error` - Client-side errors (unhandled errors, promise rejections)
|
|
262
|
+
- `server_error` - Server-side errors in API routes and server components
|
|
263
|
+
- `edge_error` - Edge runtime errors in middleware
|
|
264
|
+
- `server_req` - Server request events (API routes)
|
|
265
|
+
- `edge_req` - Edge request events (middleware)
|
|
266
|
+
- `ui_event` - User interface events
|
|
267
|
+
- `custom` - Custom application events
|
|
268
|
+
- `network` - Network request events (coming soon)
|
|
269
|
+
- `rage_click` - rage clicks
|
|
270
|
+
|
|
271
|
+
## Best Practices
|
|
272
|
+
|
|
273
|
+
1. **Initialize Early**: Initialize Interfere as early as possible in your application lifecycle.
|
|
274
|
+
|
|
275
|
+
2. **Use Error Boundaries**: Always wrap your app with `InterfereErrorBoundary` to catch React errors.
|
|
276
|
+
|
|
277
|
+
3. **Wrap Async Functions**: Use `withErrorCapture` or specific wrappers for automatic error tracking.
|
|
278
|
+
|
|
279
|
+
4. **Add Context**: Include relevant context when capturing errors manually:
|
|
280
|
+
```typescript
|
|
281
|
+
captureServerError(error, request, {
|
|
282
|
+
userId: session.userId,
|
|
283
|
+
action: 'update_profile',
|
|
284
|
+
metadata: { ... },
|
|
285
|
+
});
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
5. **Environment Variables**: Store your project ID in environment variables:
|
|
289
|
+
```bash
|
|
290
|
+
NEXT_PUBLIC_INTERFERE_PROJECT_ID=if_proj_xxx
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## TypeScript
|
|
294
|
+
|
|
295
|
+
The SDK is fully typed. Import types as needed:
|
|
296
|
+
|
|
297
|
+
```typescript
|
|
298
|
+
import type {
|
|
299
|
+
Config,
|
|
300
|
+
InitConfig,
|
|
301
|
+
EventType,
|
|
302
|
+
Envelope,
|
|
303
|
+
} from '@interfere/next';
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
## License
|
|
307
|
+
|
|
308
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"with-interfere-coverage.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/build/with-interfere-coverage.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import { execSync } from "node:child_process";
|
|
2
|
+
import * as fs from "node:fs";
|
|
3
|
+
import { glob } from "glob";
|
|
4
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
5
|
+
import { withInterfere } from "../../build/with-interfere.js";
|
|
6
|
+
// Test constants
|
|
7
|
+
const TEST_SURFACE_ID = "test-surface";
|
|
8
|
+
const TEST_CLERK_ORG_ID = "org_123";
|
|
9
|
+
const TEST_API_KEY = "test-api-key";
|
|
10
|
+
const MOCK_GIT_SHA = "abc123def456789";
|
|
11
|
+
// Mock modules
|
|
12
|
+
vi.mock("node:child_process");
|
|
13
|
+
vi.mock("node:fs", () => ({
|
|
14
|
+
promises: {
|
|
15
|
+
readFile: vi.fn(),
|
|
16
|
+
},
|
|
17
|
+
}));
|
|
18
|
+
vi.mock("glob");
|
|
19
|
+
vi.mock("node-fetch", () => ({
|
|
20
|
+
default: vi.fn(() => Promise.resolve({
|
|
21
|
+
ok: true,
|
|
22
|
+
text: () => Promise.resolve("Success"),
|
|
23
|
+
})),
|
|
24
|
+
}));
|
|
25
|
+
vi.mock("form-data", () => {
|
|
26
|
+
return {
|
|
27
|
+
default: class FormData {
|
|
28
|
+
append() { }
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
describe("withInterfere - Coverage Tests", () => {
|
|
33
|
+
beforeEach(() => {
|
|
34
|
+
vi.clearAllMocks();
|
|
35
|
+
// Reset environment variables using vi.stubEnv
|
|
36
|
+
vi.stubEnv("INTERFERE_API_KEY", undefined);
|
|
37
|
+
vi.stubEnv("VERCEL_URL", undefined);
|
|
38
|
+
vi.stubEnv("VERCEL_DEPLOYMENT_ID", undefined);
|
|
39
|
+
vi.stubEnv("NODE_ENV", undefined);
|
|
40
|
+
vi.stubEnv("DEPLOY_URL", undefined);
|
|
41
|
+
// Mock Git commands
|
|
42
|
+
vi.mocked(execSync).mockImplementation((command) => {
|
|
43
|
+
const cmd = String(command);
|
|
44
|
+
if (cmd.includes("git rev-parse HEAD")) {
|
|
45
|
+
return `${MOCK_GIT_SHA}\n`;
|
|
46
|
+
}
|
|
47
|
+
if (cmd.includes("git rev-parse --abbrev-ref HEAD")) {
|
|
48
|
+
return "main\n";
|
|
49
|
+
}
|
|
50
|
+
if (cmd.includes("git log -1 --pretty=%B")) {
|
|
51
|
+
return "feat: test commit\n";
|
|
52
|
+
}
|
|
53
|
+
throw new Error("Unknown command");
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
afterEach(() => {
|
|
57
|
+
vi.resetAllMocks();
|
|
58
|
+
});
|
|
59
|
+
describe("Webpack plugin execution paths", () => {
|
|
60
|
+
it("should execute upload when source maps are found", async () => {
|
|
61
|
+
// Mock glob to return source maps
|
|
62
|
+
vi.mocked(glob).mockResolvedValue([
|
|
63
|
+
".next/static/chunks/app.js.map",
|
|
64
|
+
".next/static/chunks/pages.js.map",
|
|
65
|
+
]);
|
|
66
|
+
// Mock file reading
|
|
67
|
+
vi.mocked(fs.promises.readFile).mockResolvedValue('{"version":3,"sources":["test.js"]}');
|
|
68
|
+
const wrapper = withInterfere({
|
|
69
|
+
surface: TEST_SURFACE_ID,
|
|
70
|
+
clerkOrgId: TEST_CLERK_ORG_ID,
|
|
71
|
+
apiKey: TEST_API_KEY,
|
|
72
|
+
});
|
|
73
|
+
const config = wrapper({});
|
|
74
|
+
// Get webpack config
|
|
75
|
+
const webpackConfig = { devtool: "eval", plugins: [] };
|
|
76
|
+
const context = {
|
|
77
|
+
isServer: false,
|
|
78
|
+
dev: false,
|
|
79
|
+
buildId: "test-build",
|
|
80
|
+
};
|
|
81
|
+
const result = config.webpack(webpackConfig, context);
|
|
82
|
+
// Execute the plugin
|
|
83
|
+
const plugin = result.plugins[0];
|
|
84
|
+
const compiler = {
|
|
85
|
+
hooks: {
|
|
86
|
+
afterEmit: {
|
|
87
|
+
tapPromise: vi.fn(async (name, callback) => {
|
|
88
|
+
await callback();
|
|
89
|
+
}),
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
await plugin.apply(compiler);
|
|
94
|
+
// Verify glob was called
|
|
95
|
+
expect(glob).toHaveBeenCalledWith(".next/**/*.js.map", expect.objectContaining({
|
|
96
|
+
cwd: process.cwd(),
|
|
97
|
+
absolute: false,
|
|
98
|
+
}));
|
|
99
|
+
// Verify files were read
|
|
100
|
+
expect(fs.promises.readFile).toHaveBeenCalledTimes(2);
|
|
101
|
+
});
|
|
102
|
+
it("should handle glob errors gracefully", async () => {
|
|
103
|
+
vi.mocked(glob).mockRejectedValue(new Error("Glob failed"));
|
|
104
|
+
const consoleSpy = vi.spyOn(console, "error").mockImplementation(() => { });
|
|
105
|
+
const wrapper = withInterfere({
|
|
106
|
+
surface: TEST_SURFACE_ID,
|
|
107
|
+
clerkOrgId: TEST_CLERK_ORG_ID,
|
|
108
|
+
apiKey: TEST_API_KEY,
|
|
109
|
+
});
|
|
110
|
+
const config = wrapper({});
|
|
111
|
+
const webpackConfig = { devtool: "eval", plugins: [] };
|
|
112
|
+
const context = { isServer: false, dev: false, buildId: "test-build" };
|
|
113
|
+
const result = config.webpack(webpackConfig, context);
|
|
114
|
+
const plugin = result.plugins[0];
|
|
115
|
+
const compiler = {
|
|
116
|
+
hooks: {
|
|
117
|
+
afterEmit: {
|
|
118
|
+
tapPromise: vi.fn(async (name, callback) => {
|
|
119
|
+
await callback();
|
|
120
|
+
}),
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
await plugin.apply(compiler);
|
|
125
|
+
// The error is caught and logged by the webpack plugin wrapper
|
|
126
|
+
expect(glob).toHaveBeenCalled();
|
|
127
|
+
});
|
|
128
|
+
it("should skip upload when no Git SHA available", async () => {
|
|
129
|
+
vi.mocked(execSync).mockImplementation(() => {
|
|
130
|
+
throw new Error("Not a git repository");
|
|
131
|
+
});
|
|
132
|
+
const consoleSpy = vi.spyOn(console, "warn").mockImplementation(() => { });
|
|
133
|
+
const wrapper = withInterfere({
|
|
134
|
+
surface: TEST_SURFACE_ID,
|
|
135
|
+
clerkOrgId: TEST_CLERK_ORG_ID,
|
|
136
|
+
apiKey: TEST_API_KEY,
|
|
137
|
+
});
|
|
138
|
+
const config = wrapper({});
|
|
139
|
+
const webpackConfig = { devtool: "eval", plugins: [] };
|
|
140
|
+
const context = { isServer: false, dev: false, buildId: "test-build" };
|
|
141
|
+
const result = config.webpack(webpackConfig, context);
|
|
142
|
+
const plugin = result.plugins[0];
|
|
143
|
+
const compiler = {
|
|
144
|
+
hooks: {
|
|
145
|
+
afterEmit: {
|
|
146
|
+
tapPromise: vi.fn(async (name, callback) => {
|
|
147
|
+
await callback();
|
|
148
|
+
}),
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
await plugin.apply(compiler);
|
|
153
|
+
expect(consoleSpy).toHaveBeenCalledWith("[Interfere] Could not determine Git SHA, skipping source map upload");
|
|
154
|
+
// Glob should not be called
|
|
155
|
+
expect(glob).not.toHaveBeenCalled();
|
|
156
|
+
});
|
|
157
|
+
it("should handle file read errors", async () => {
|
|
158
|
+
vi.mocked(glob).mockResolvedValue([".next/static/chunks/app.js.map"]);
|
|
159
|
+
vi.mocked(fs.promises.readFile).mockRejectedValue(new Error("Read failed"));
|
|
160
|
+
const consoleSpy = vi.spyOn(console, "error").mockImplementation(() => { });
|
|
161
|
+
const wrapper = withInterfere({
|
|
162
|
+
surface: TEST_SURFACE_ID,
|
|
163
|
+
clerkOrgId: TEST_CLERK_ORG_ID,
|
|
164
|
+
apiKey: TEST_API_KEY,
|
|
165
|
+
});
|
|
166
|
+
const config = wrapper({});
|
|
167
|
+
const webpackConfig = { devtool: "eval", plugins: [] };
|
|
168
|
+
const context = { isServer: false, dev: false, buildId: "test-build" };
|
|
169
|
+
const result = config.webpack(webpackConfig, context);
|
|
170
|
+
const plugin = result.plugins[0];
|
|
171
|
+
const compiler = {
|
|
172
|
+
hooks: {
|
|
173
|
+
afterEmit: {
|
|
174
|
+
tapPromise: vi.fn(async (name, callback) => {
|
|
175
|
+
await callback();
|
|
176
|
+
}),
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
await plugin.apply(compiler);
|
|
181
|
+
// The error is caught and logged by the webpack plugin wrapper
|
|
182
|
+
expect(fs.promises.readFile).toHaveBeenCalled();
|
|
183
|
+
});
|
|
184
|
+
it("should handle many source maps (chunking)", async () => {
|
|
185
|
+
// Create 250 source maps to test chunking
|
|
186
|
+
const sourceMaps = Array.from({ length: 250 }, (_, i) => `.next/static/chunks/file-${i}.js.map`);
|
|
187
|
+
vi.mocked(glob).mockResolvedValue(sourceMaps);
|
|
188
|
+
vi.mocked(fs.promises.readFile).mockResolvedValue('{"version":3}');
|
|
189
|
+
const wrapper = withInterfere({
|
|
190
|
+
surface: TEST_SURFACE_ID,
|
|
191
|
+
clerkOrgId: TEST_CLERK_ORG_ID,
|
|
192
|
+
apiKey: TEST_API_KEY,
|
|
193
|
+
debug: true,
|
|
194
|
+
});
|
|
195
|
+
const config = wrapper({});
|
|
196
|
+
const webpackConfig = { devtool: "eval", plugins: [] };
|
|
197
|
+
const context = { isServer: false, dev: false, buildId: "test-build" };
|
|
198
|
+
const result = config.webpack(webpackConfig, context);
|
|
199
|
+
const plugin = result.plugins[0];
|
|
200
|
+
const compiler = {
|
|
201
|
+
hooks: {
|
|
202
|
+
afterEmit: {
|
|
203
|
+
tapPromise: vi.fn(async (name, callback) => {
|
|
204
|
+
await callback();
|
|
205
|
+
}),
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
await plugin.apply(compiler);
|
|
210
|
+
// Should read all 250 files
|
|
211
|
+
expect(fs.promises.readFile).toHaveBeenCalledTimes(250);
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
describe("Environment variable handling", () => {
|
|
215
|
+
it("should use VERCEL_DEPLOYMENT_ID for release ID", () => {
|
|
216
|
+
vi.stubEnv("VERCEL_DEPLOYMENT_ID", "deploy-123");
|
|
217
|
+
const wrapper = withInterfere({
|
|
218
|
+
surface: TEST_SURFACE_ID,
|
|
219
|
+
clerkOrgId: TEST_CLERK_ORG_ID,
|
|
220
|
+
apiKey: TEST_API_KEY,
|
|
221
|
+
});
|
|
222
|
+
const config = wrapper({});
|
|
223
|
+
expect(config.env?.NEXT_PUBLIC_INTERFERE_RELEASE_ID).toBe("deploy-123");
|
|
224
|
+
});
|
|
225
|
+
it("should extract deployment ID from VERCEL_URL", () => {
|
|
226
|
+
vi.stubEnv("VERCEL_URL", "my-app-abc123.vercel.app");
|
|
227
|
+
const wrapper = withInterfere({
|
|
228
|
+
surface: TEST_SURFACE_ID,
|
|
229
|
+
clerkOrgId: TEST_CLERK_ORG_ID,
|
|
230
|
+
apiKey: TEST_API_KEY,
|
|
231
|
+
});
|
|
232
|
+
const config = wrapper({});
|
|
233
|
+
expect(config.env?.NEXT_PUBLIC_INTERFERE_RELEASE_ID).toBe("my-app-abc123");
|
|
234
|
+
});
|
|
235
|
+
it("should use NODE_ENV for environment", () => {
|
|
236
|
+
vi.stubEnv("NODE_ENV", "staging");
|
|
237
|
+
const wrapper = withInterfere({
|
|
238
|
+
surface: TEST_SURFACE_ID,
|
|
239
|
+
clerkOrgId: TEST_CLERK_ORG_ID,
|
|
240
|
+
apiKey: TEST_API_KEY,
|
|
241
|
+
});
|
|
242
|
+
const config = wrapper({});
|
|
243
|
+
// We can't directly test the environment used in upload,
|
|
244
|
+
// but we can verify the config is created properly
|
|
245
|
+
expect(config).toBeDefined();
|
|
246
|
+
});
|
|
247
|
+
it("should handle DEPLOY_URL", () => {
|
|
248
|
+
vi.stubEnv("DEPLOY_URL", "https://my-app.example.com");
|
|
249
|
+
const wrapper = withInterfere({
|
|
250
|
+
surface: TEST_SURFACE_ID,
|
|
251
|
+
clerkOrgId: TEST_CLERK_ORG_ID,
|
|
252
|
+
apiKey: TEST_API_KEY,
|
|
253
|
+
});
|
|
254
|
+
const config = wrapper({});
|
|
255
|
+
expect(config).toBeDefined();
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
describe("Edge cases", () => {
|
|
259
|
+
it("should handle undefined nextConfig", () => {
|
|
260
|
+
const wrapper = withInterfere({
|
|
261
|
+
surface: TEST_SURFACE_ID,
|
|
262
|
+
clerkOrgId: TEST_CLERK_ORG_ID,
|
|
263
|
+
apiKey: TEST_API_KEY,
|
|
264
|
+
});
|
|
265
|
+
const config = wrapper(undefined);
|
|
266
|
+
expect(config).toBeDefined();
|
|
267
|
+
expect(config.productionBrowserSourceMaps).toBe(true);
|
|
268
|
+
});
|
|
269
|
+
it("should preserve complex webpack configurations", () => {
|
|
270
|
+
const originalWebpack = vi.fn((config, context) => ({
|
|
271
|
+
...config,
|
|
272
|
+
module: {
|
|
273
|
+
rules: [{ test: /\.tsx?$/, use: "ts-loader" }],
|
|
274
|
+
},
|
|
275
|
+
resolve: {
|
|
276
|
+
extensions: [".ts", ".tsx", ".js"],
|
|
277
|
+
},
|
|
278
|
+
}));
|
|
279
|
+
const wrapper = withInterfere({
|
|
280
|
+
surface: TEST_SURFACE_ID,
|
|
281
|
+
clerkOrgId: TEST_CLERK_ORG_ID,
|
|
282
|
+
apiKey: TEST_API_KEY,
|
|
283
|
+
});
|
|
284
|
+
const config = wrapper({
|
|
285
|
+
webpack: originalWebpack,
|
|
286
|
+
});
|
|
287
|
+
const webpackConfig = { devtool: "eval", plugins: [] };
|
|
288
|
+
const context = { isServer: false, dev: true, buildId: "test" };
|
|
289
|
+
const result = config.webpack(webpackConfig, context);
|
|
290
|
+
expect(originalWebpack).toHaveBeenCalled();
|
|
291
|
+
expect(result.module).toBeDefined();
|
|
292
|
+
expect(result.resolve).toBeDefined();
|
|
293
|
+
});
|
|
294
|
+
it("should handle server-side webpack context", () => {
|
|
295
|
+
const wrapper = withInterfere({
|
|
296
|
+
surface: TEST_SURFACE_ID,
|
|
297
|
+
clerkOrgId: TEST_CLERK_ORG_ID,
|
|
298
|
+
apiKey: TEST_API_KEY,
|
|
299
|
+
});
|
|
300
|
+
const config = wrapper({});
|
|
301
|
+
const webpackConfig = { devtool: "eval", plugins: [] };
|
|
302
|
+
const context = { isServer: true, dev: false, buildId: "test" };
|
|
303
|
+
const result = config.webpack(webpackConfig, context);
|
|
304
|
+
// Should not modify server-side builds
|
|
305
|
+
expect(result.devtool).toBe("eval");
|
|
306
|
+
expect(result.plugins).toHaveLength(0);
|
|
307
|
+
});
|
|
308
|
+
it("should handle development webpack context", () => {
|
|
309
|
+
const wrapper = withInterfere({
|
|
310
|
+
surface: TEST_SURFACE_ID,
|
|
311
|
+
clerkOrgId: TEST_CLERK_ORG_ID,
|
|
312
|
+
apiKey: TEST_API_KEY,
|
|
313
|
+
});
|
|
314
|
+
const config = wrapper({});
|
|
315
|
+
const webpackConfig = { devtool: "eval", plugins: [] };
|
|
316
|
+
const context = { isServer: false, dev: true, buildId: "test" };
|
|
317
|
+
const result = config.webpack(webpackConfig, context);
|
|
318
|
+
// Should not modify development builds
|
|
319
|
+
expect(result.devtool).toBe("eval");
|
|
320
|
+
expect(result.plugins).toHaveLength(0);
|
|
321
|
+
});
|
|
322
|
+
it("should handle disabled mode even with API key", () => {
|
|
323
|
+
const wrapper = withInterfere({
|
|
324
|
+
surface: TEST_SURFACE_ID,
|
|
325
|
+
clerkOrgId: TEST_CLERK_ORG_ID,
|
|
326
|
+
apiKey: TEST_API_KEY,
|
|
327
|
+
disabled: true,
|
|
328
|
+
});
|
|
329
|
+
const config = wrapper({});
|
|
330
|
+
const webpackConfig = { devtool: "eval", plugins: [] };
|
|
331
|
+
const context = { isServer: false, dev: false, buildId: "test" };
|
|
332
|
+
const result = config.webpack(webpackConfig, context);
|
|
333
|
+
// Should not add plugin when disabled
|
|
334
|
+
expect(result.plugins).toHaveLength(0);
|
|
335
|
+
});
|
|
336
|
+
});
|
|
337
|
+
});
|
|
338
|
+
//# sourceMappingURL=with-interfere-coverage.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"with-interfere-coverage.test.js","sourceRoot":"","sources":["../../../src/__tests__/build/with-interfere-coverage.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,EAAE,a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