@logbrew/next 0.1.6 → 0.1.7

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
@@ -232,7 +232,7 @@ import {
232
232
  const client = createLogBrewNextBrowserClient({
233
233
  clientKey: "LOGBREW_CLIENT_KEY",
234
234
  sdkName: "my-next-app",
235
- sdkVersion: "0.1.6"
235
+ sdkVersion: "0.1.7"
236
236
  });
237
237
 
238
238
  const routePatterns = [
@@ -269,7 +269,7 @@ import { createLogBrewNextClient } from "@logbrew/next";
269
269
  const client = createLogBrewNextClient({
270
270
  serverApiKey: "LOGBREW_SERVER_API_KEY",
271
271
  sdkName: "my-next-app",
272
- sdkVersion: "0.1.6"
272
+ sdkVersion: "0.1.7"
273
273
  });
274
274
  ```
275
275
 
package/client.cjs CHANGED
@@ -7,16 +7,13 @@ const {
7
7
  parseTraceparent
8
8
  } = require("@logbrew/sdk");
9
9
 
10
- const DEFAULT_SDK_NAME = "logbrew-next-client";
11
- const DEFAULT_SDK_VERSION = "0.1.6";
12
-
13
10
  function createLogBrewNextBrowserClient({
14
11
  apiKey,
15
12
  clientKey,
16
13
  context,
17
14
  eventFilter,
18
- sdkName = DEFAULT_SDK_NAME,
19
- sdkVersion = DEFAULT_SDK_VERSION,
15
+ sdkName = "logbrew-next-client",
16
+ sdkVersion = "0.1.7",
20
17
  maxQueueSize,
21
18
  maxRetries = 2,
22
19
  onEventDropped
package/client.js CHANGED
@@ -7,16 +7,13 @@ import {
7
7
  parseTraceparent
8
8
  } from "@logbrew/sdk";
9
9
 
10
- const DEFAULT_SDK_NAME = "logbrew-next-client";
11
- const DEFAULT_SDK_VERSION = "0.1.6";
12
-
13
10
  export function createLogBrewNextBrowserClient({
14
11
  apiKey,
15
12
  clientKey,
16
13
  context,
17
14
  eventFilter,
18
- sdkName = DEFAULT_SDK_NAME,
19
- sdkVersion = DEFAULT_SDK_VERSION,
15
+ sdkName = "logbrew-next-client",
16
+ sdkVersion = "0.1.7",
20
17
  maxQueueSize,
21
18
  maxRetries = 2,
22
19
  onEventDropped
@@ -24,7 +24,7 @@ const event = captureNextNavigation(client, {
24
24
  });
25
25
 
26
26
  const payload = JSON.parse(client.previewJson());
27
- if (!event || event.attributes.metadata.routeTemplate !== "/projects/[projectId]/settings" || event.attributes.metadata.operation !== "browser.navigation" || payload.sdk.version !== "0.1.6") {
27
+ if (!event || event.attributes.metadata.routeTemplate !== "/projects/[projectId]/settings" || event.attributes.metadata.operation !== "browser.navigation" || payload.sdk.version !== "0.1.7") {
28
28
  throw new Error(`unexpected Next client route span: ${JSON.stringify(event)}`);
29
29
  }
30
30
 
@@ -12,7 +12,7 @@ const POST = withLogBrewRouteHandler(
12
12
  serverApiKey: "LOGBREW_SERVER_API_KEY",
13
13
  captureRequests: false,
14
14
  sdkName: "logbrew-next-readme-example",
15
- sdkVersion: "0.1.6",
15
+ sdkVersion: "0.1.7",
16
16
  transport
17
17
  }
18
18
  );
@@ -12,7 +12,7 @@ const POST = withLogBrewRouteHandler(
12
12
  serverApiKey: "LOGBREW_SERVER_API_KEY",
13
13
  captureRequests: false,
14
14
  sdkName: "logbrew-next-real-user-smoke",
15
- sdkVersion: "0.1.6",
15
+ sdkVersion: "0.1.7",
16
16
  maxRetries: 1,
17
17
  transport
18
18
  }
package/index.cjs CHANGED
@@ -6,8 +6,6 @@ const {
6
6
  } = require("@logbrew/sdk");
7
7
  const { createNodeFetchTransport } = require("@logbrew/node");
8
8
 
9
- const DEFAULT_SDK_NAME = "logbrew-next";
10
- const DEFAULT_SDK_VERSION = "0.1.6";
11
9
  const MAX_REQUEST_ERROR_MESSAGE_LENGTH = 2048;
12
10
  const MAX_REQUEST_ROUTE_PATH_LENGTH = 512;
13
11
  const NEXT_RENDER_SOURCES = new Set([
@@ -25,8 +23,8 @@ function createLogBrewNextClient({
25
23
  apiKey,
26
24
  serverApiKey,
27
25
  context,
28
- sdkName = DEFAULT_SDK_NAME,
29
- sdkVersion = DEFAULT_SDK_VERSION,
26
+ sdkName = "logbrew-next",
27
+ sdkVersion = "0.1.7",
30
28
  maxRetries = 2
31
29
  } = {}) {
32
30
  const authKey = serverApiKey ?? apiKey ?? readEnvServerApiKey() ?? readEnvApiKey();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logbrew/next",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Next.js App Router helpers for the public LogBrew JavaScript SDK.",
5
5
  "type": "module",
6
6
  "main": "./index.cjs",