@interfere/next 12.0.0 → 12.0.2

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 CHANGED
@@ -160,7 +160,7 @@ Identity is automatically cleared when the SDK is closed. Call `identity.clear()
160
160
 
161
161
  ## Consent Management
162
162
 
163
- By default, all SDK features are active. To gate features behind user consent, pass a `consent` prop to the provider:
163
+ Omitting consent preserves the SDK defaults. To deny analytics and replay from startup, pass `consent: false` to `init()` before mounting the provider. Use the provider’s `consent` prop to keep the current decision synchronized:
164
164
 
165
165
  ```tsx
166
166
  // app/layout.tsx
@@ -191,7 +191,7 @@ export default function RootLayout({
191
191
  | `analytics` | Page events, rage clicks, fingerprint | Yes |
192
192
  | `replay` | Session replay | Yes |
193
193
 
194
- Omitting the `consent` prop preserves consent supplied to `init()`, including later updates through `consent.set()`. If no initial consent was supplied, omitting the prop allows all features. Passing the prop enables only `necessary` plugins and explicitly consented categories.
194
+ Omitting the `consent` prop preserves consent supplied to `init()`, including later updates through `consent.set()`. If no initial consent was supplied, omitting the prop allows all features. Consent controls analytics and replay permission; it does not enable plugins disabled in configuration. Objects replace the current decision, and omitted categories remain allowed. Errors, logs, tracing, and session storage are not disabled by this setting.
195
195
 
196
196
  ### Imperative API
197
197
 
@@ -200,9 +200,10 @@ Use `consent.set()` and `consent.get()` from the `useInterfere` hook:
200
200
  ```tsx
201
201
  const { consent } = useInterfere();
202
202
 
203
- consent.set({ analytics: true, replay: true }); // selective
204
- consent.set(); // grant all
205
- consent.get(); // current state, or null if no gating
203
+ consent.set(false);
204
+ consent.set(true);
205
+ consent.set({ analytics: true, replay: false });
206
+ consent.get();
206
207
  ```
207
208
 
208
209
  ### Integration with consent libraries
@@ -233,7 +234,7 @@ To set consent before React renders (avoiding any window where non-consented plu
233
234
  // instrumentation-client.ts
234
235
  import { init } from "@interfere/next/instrument-client";
235
236
 
236
- init({ consent: { analytics: false, replay: false } });
237
+ await init({ consent: false });
237
238
  ```
238
239
 
239
240
  The provider's `consent` prop will then keep it in sync as the user updates their preferences.
@@ -1,10 +1,10 @@
1
1
  import { capture, span } from "@interfere/react/api";
2
2
  import { Kernel, KernelInternalOptions, KernelOptions, KernelOptions as KernelOptions$1 } from "@interfere/react/internal/kernel";
3
- import { ConsentCategory, ConsentState, GateableCategory } from "@interfere/types/sdk/plugins/manifest";
3
+ import { ConsentCategory, ConsentInput, ConsentState, GateableCategory } from "@interfere/types/sdk/plugins/manifest";
4
4
  //#region src/instrument-client.d.ts
5
5
  export declare const close: () => Promise<void>, consent: {
6
6
  get: () => import("@interfere/types/sdk/plugins/manifest").ConsentState | null;
7
- set: (value?: import("@interfere/types/sdk/plugins/manifest").ConsentState) => void;
7
+ set: (value?: import("@interfere/types/sdk/plugins/manifest").ConsentInput) => void;
8
8
  }, getKernel: () => import("@interfere/react/internal/kernel").Kernel, getKernelOrNull: () => import("@interfere/react/internal/kernel").Kernel | null, identity: {
9
9
  clear: () => void;
10
10
  get: () => import("@interfere/types/sdk/identify").IdentifyParams | null;
@@ -12,4 +12,4 @@ export declare const close: () => Promise<void>, consent: {
12
12
  }, subscribeToKernel: (listener: () => void) => () => void;
13
13
  export declare function init(opts?: KernelOptions$1): Promise<import("@interfere/react/internal/kernel").Kernel | null>;
14
14
  //#endregion
15
- export { type ConsentCategory, type ConsentState, type GateableCategory, type Kernel, type KernelInternalOptions, type KernelOptions, capture, span };
15
+ export { type ConsentCategory, type ConsentInput, type ConsentState, type GateableCategory, type Kernel, type KernelInternalOptions, type KernelOptions, capture, span };
package/dist/package.mjs CHANGED
@@ -1 +1 @@
1
- var name=`@interfere/next`,version=`12.0.0`;export{name,version};
1
+ var name=`@interfere/next`,version=`12.0.2`;export{name,version};
@@ -1,9 +1,9 @@
1
1
  import { PluginOverrides, useInterfere, useSession } from "@interfere/react/provider";
2
2
  import { PropsWithChildren } from "react";
3
- import { ConsentCategory, ConsentState, ConsentState as ConsentState$1, GateableCategory } from "@interfere/types/sdk/plugins/manifest";
3
+ import { ConsentCategory, ConsentInput, ConsentInput as ConsentInput$1, ConsentState, GateableCategory } from "@interfere/types/sdk/plugins/manifest";
4
4
  //#region src/provider.d.ts
5
5
  interface InterfereProviderProps extends PropsWithChildren {
6
- consent?: ConsentState$1 | undefined;
6
+ consent?: ConsentInput$1 | undefined;
7
7
  errorBoundary?: boolean;
8
8
  plugins?: PluginOverrides | undefined;
9
9
  }
@@ -17,4 +17,4 @@ interface InterfereProviderProps extends PropsWithChildren {
17
17
  */
18
18
  export declare function InterfereProvider({ children, consent, plugins, errorBoundary }: InterfereProviderProps): import("react").JSX.Element;
19
19
  //#endregion
20
- export { type ConsentCategory, type ConsentState, type GateableCategory, useInterfere, useSession };
20
+ export { type ConsentCategory, type ConsentInput, type ConsentState, type GateableCategory, useInterfere, useSession };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interfere/next",
3
- "version": "12.0.0",
3
+ "version": "12.0.2",
4
4
  "description": "Build software that never breaks.",
5
5
  "keywords": [
6
6
  "error-tracking",
@@ -24,7 +24,9 @@
24
24
  "dist"
25
25
  ],
26
26
  "type": "module",
27
- "sideEffects": false,
27
+ "sideEffects": [
28
+ "./dist/instrumentation-client.mjs"
29
+ ],
28
30
  "exports": {
29
31
  "./config": {
30
32
  "monorepo": "./src/config.ts",
@@ -89,17 +91,17 @@
89
91
  },
90
92
  "scripts": {
91
93
  "build": "tsdown",
92
- "test": "vitest run",
94
+ "test": "vitest run --config ../../../../vitest.config.ts",
93
95
  "test:e2e": "playwright test",
94
- "typecheck": "tsc --noEmit"
96
+ "typecheck": "bun check"
95
97
  },
96
98
  "dependencies": {
97
- "@interfere/build": "^0.2.0",
99
+ "@interfere/build": "^0.2.2",
98
100
  "@interfere/constants": "^9.1.0",
99
101
  "@interfere/helpers": "^9.2.0",
100
- "@interfere/javascript": "^0.2.0",
101
- "@interfere/react": "^12.0.0",
102
- "@interfere/types": "^10.2.0",
102
+ "@interfere/javascript": "^0.2.1",
103
+ "@interfere/react": "^12.0.2",
104
+ "@interfere/types": "^10.2.1",
103
105
  "@opentelemetry/api": "^1.9.1",
104
106
  "@opentelemetry/api-logs": "^0.222.0",
105
107
  "@opentelemetry/baggage-span-processor": "^0.5.0",
@@ -118,6 +120,7 @@
118
120
  "zod": "^4.5.4"
119
121
  },
120
122
  "devDependencies": {
123
+ "@interfere/test-utils": "^10.0.0",
121
124
  "@interfere/typescript-config": "^9.0.2",
122
125
  "@interfere/vitest-config": "0.0.0",
123
126
  "@playwright/test": "^1.63.0",