@use-tusk/drift-node-sdk 0.1.34 → 0.1.36

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/dist/index.d.cts CHANGED
@@ -1,85 +1,3 @@
1
- import { NextConfig } from "next";
2
-
3
- //#region src/nextjs/types.d.ts
4
-
5
- /**
6
- * Options for configuring Tusk Drift's Next.js integration.
7
- */
8
- interface TuskDriftNextOptions {
9
- /**
10
- * Enable debug logging for Tusk Drift's Next.js integration.
11
- * When enabled, logs information about configuration changes and version detection.
12
- *
13
- * @default false
14
- */
15
- debug?: boolean;
16
- /**
17
- * Disable automatic setting of `experimental.instrumentationHook`.
18
- * Use this if you want to manually control the instrumentation hook setting.
19
- *
20
- * @default false
21
- */
22
- disableInstrumentationHook?: boolean;
23
- /**
24
- * Suppress all warnings from Tusk Drift's Next.js integration.
25
- * Not recommended unless you know what you're doing.
26
- *
27
- * @default false
28
- */
29
- suppressWarnings?: boolean;
30
- }
31
- //#endregion
32
- //#region src/nextjs/withTuskDrift.d.ts
33
- /**
34
- * Wraps your Next.js configuration with Tusk Drift instrumentation setup.
35
- *
36
- * This function automatically configures Next.js to work with Tusk Drift by:
37
- * - Enabling the Next.js instrumentation hook (for Next.js < 15.0.0-rc.1)
38
- * - Configuring server external packages to prevent bundling of core instrumentation packages
39
- * - Supporting both webpack and Turbopack bundlers
40
- * - Preserving your existing Next.js configuration and webpack customizations
41
- *
42
- * @param nextConfig - Your existing Next.js configuration object (optional)
43
- * @param options - Additional options to configure Tusk Drift's behavior (optional)
44
- * @returns The wrapped Next.js configuration with Tusk Drift instrumentation enabled
45
- *
46
- * @example
47
- * Basic usage:
48
- * ```javascript
49
- * // next.config.js
50
- * const { withTuskDrift } = require('@use-tusk/drift-node-sdk');
51
- *
52
- * module.exports = withTuskDrift({
53
- * // Your Next.js config
54
- * });
55
- * ```
56
- *
57
- * @example
58
- * With debug logging:
59
- * ```javascript
60
- * // next.config.js
61
- * const { withTuskDrift } = require('@use-tusk/drift-node-sdk');
62
- *
63
- * module.exports = withTuskDrift(
64
- * {
65
- * // Your Next.js config
66
- * },
67
- * {
68
- * debug: true,
69
- * }
70
- * );
71
- * ```
72
- *
73
- * @remarks
74
- * The following packages are added as server externals for both webpack and Turbopack:
75
- * - `require-in-the-middle` - Required for CommonJS module interception
76
- * - `jsonpath` - Required for schema manipulation
77
- * - Additional packages when TUSK_DRIFT_MODE is RECORD or REPLAY (e.g., database clients, etc.)
78
- *
79
- * Works with both webpack (default) and Turbopack (`next dev --turbo`).
80
- */
81
- declare function withTuskDrift(nextConfig?: NextConfig, options?: TuskDriftNextOptions): NextConfig;
82
- //#endregion
83
1
  //#region src/core/types.d.ts
84
2
 
85
3
  type OneOf<T extends object> = { [K in keyof T]: Required<Pick<T, K>> & Partial<Record<Exclude<keyof T, K>, null>> }[keyof T];
@@ -251,5 +169,5 @@ interface TuskDriftPublicAPI {
251
169
  }
252
170
  declare const TuskDrift: TuskDriftPublicAPI;
253
171
  //#endregion
254
- export { TuskDrift, type TuskDriftNextOptions, withTuskDrift };
172
+ export { TuskDrift };
255
173
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -1,85 +1,3 @@
1
- import { NextConfig } from "next";
2
-
3
- //#region src/nextjs/types.d.ts
4
-
5
- /**
6
- * Options for configuring Tusk Drift's Next.js integration.
7
- */
8
- interface TuskDriftNextOptions {
9
- /**
10
- * Enable debug logging for Tusk Drift's Next.js integration.
11
- * When enabled, logs information about configuration changes and version detection.
12
- *
13
- * @default false
14
- */
15
- debug?: boolean;
16
- /**
17
- * Disable automatic setting of `experimental.instrumentationHook`.
18
- * Use this if you want to manually control the instrumentation hook setting.
19
- *
20
- * @default false
21
- */
22
- disableInstrumentationHook?: boolean;
23
- /**
24
- * Suppress all warnings from Tusk Drift's Next.js integration.
25
- * Not recommended unless you know what you're doing.
26
- *
27
- * @default false
28
- */
29
- suppressWarnings?: boolean;
30
- }
31
- //#endregion
32
- //#region src/nextjs/withTuskDrift.d.ts
33
- /**
34
- * Wraps your Next.js configuration with Tusk Drift instrumentation setup.
35
- *
36
- * This function automatically configures Next.js to work with Tusk Drift by:
37
- * - Enabling the Next.js instrumentation hook (for Next.js < 15.0.0-rc.1)
38
- * - Configuring server external packages to prevent bundling of core instrumentation packages
39
- * - Supporting both webpack and Turbopack bundlers
40
- * - Preserving your existing Next.js configuration and webpack customizations
41
- *
42
- * @param nextConfig - Your existing Next.js configuration object (optional)
43
- * @param options - Additional options to configure Tusk Drift's behavior (optional)
44
- * @returns The wrapped Next.js configuration with Tusk Drift instrumentation enabled
45
- *
46
- * @example
47
- * Basic usage:
48
- * ```javascript
49
- * // next.config.js
50
- * const { withTuskDrift } = require('@use-tusk/drift-node-sdk');
51
- *
52
- * module.exports = withTuskDrift({
53
- * // Your Next.js config
54
- * });
55
- * ```
56
- *
57
- * @example
58
- * With debug logging:
59
- * ```javascript
60
- * // next.config.js
61
- * const { withTuskDrift } = require('@use-tusk/drift-node-sdk');
62
- *
63
- * module.exports = withTuskDrift(
64
- * {
65
- * // Your Next.js config
66
- * },
67
- * {
68
- * debug: true,
69
- * }
70
- * );
71
- * ```
72
- *
73
- * @remarks
74
- * The following packages are added as server externals for both webpack and Turbopack:
75
- * - `require-in-the-middle` - Required for CommonJS module interception
76
- * - `jsonpath` - Required for schema manipulation
77
- * - Additional packages when TUSK_DRIFT_MODE is RECORD or REPLAY (e.g., database clients, etc.)
78
- *
79
- * Works with both webpack (default) and Turbopack (`next dev --turbo`).
80
- */
81
- declare function withTuskDrift(nextConfig?: NextConfig, options?: TuskDriftNextOptions): NextConfig;
82
- //#endregion
83
1
  //#region src/core/types.d.ts
84
2
 
85
3
  type OneOf<T extends object> = { [K in keyof T]: Required<Pick<T, K>> & Partial<Record<Exclude<keyof T, K>, null>> }[keyof T];
@@ -251,5 +169,5 @@ interface TuskDriftPublicAPI {
251
169
  }
252
170
  declare const TuskDrift: TuskDriftPublicAPI;
253
171
  //#endregion
254
- export { TuskDrift, type TuskDriftNextOptions, withTuskDrift };
172
+ export { TuskDrift };
255
173
  //# sourceMappingURL=index.d.ts.map