@nextlytics/core 0.4.0-canary.101 → 0.4.0

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.
@@ -72,14 +72,10 @@ function createNextlyticsMiddleware(config, dispatchEvent, updateEvent) {
72
72
  return Response.json({ error: "Method not allowed" }, { status: 405 });
73
73
  }
74
74
  if (reqInfo.isNextjsInternal || reqInfo.isPrefetch || reqInfo.isStaticFile) {
75
- const response2 = import_server.NextResponse.next();
76
- response2.headers.set(import_server_component_context.headerNames.active, "1");
77
- return response2;
75
+ return void 0;
78
76
  }
79
77
  if (!reqInfo.isPageNavigation && !config.isApiPath(pathname)) {
80
- const response2 = import_server.NextResponse.next();
81
- response2.headers.set(import_server_component_context.headerNames.active, "1");
82
- return response2;
78
+ return void 0;
83
79
  }
84
80
  const pageRenderId = (0, import_uitils.generateId)();
85
81
  const serverContext = (0, import_uitils.createServerContext)(request);
@@ -7,7 +7,6 @@ declare const headerNames: {
7
7
  readonly search: "x-nl-search";
8
8
  readonly pageRenderId: "x-nl-page-render-id";
9
9
  readonly isSoftNavigation: "x-nl-is-soft-nav";
10
- readonly active: "x-nl-active";
11
10
  readonly scripts: "x-nl-scripts";
12
11
  };
13
12
  declare const LAST_PAGE_RENDER_ID_COOKIE = "last-page-render-id";
@@ -30,7 +30,6 @@ const headerNames = {
30
30
  search: `${HEADER_PREFIX}search`,
31
31
  pageRenderId: `${HEADER_PREFIX}page-render-id`,
32
32
  isSoftNavigation: `${HEADER_PREFIX}is-soft-nav`,
33
- active: `${HEADER_PREFIX}active`,
34
33
  scripts: `${HEADER_PREFIX}scripts`
35
34
  };
36
35
  const LAST_PAGE_RENDER_ID_COOKIE = "last-page-render-id";
package/dist/server.js CHANGED
@@ -179,9 +179,7 @@ function Nextlytics(userConfig) {
179
179
  const headersList = await (0, import_headers.headers)();
180
180
  const ctx = (0, import_server_component_context.restoreServerComponentContext)(headersList);
181
181
  if (!ctx) {
182
- if (!headersList.get(import_server_component_context.headerNames.active)) {
183
- console.warn("[Nextlytics] nextlyticsMiddleware should be added in order for Server to work");
184
- }
182
+ console.warn("[Nextlytics] nextlyticsMiddleware should be added in order for Server to work");
185
183
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
186
184
  }
187
185
  const requestCtx = await createRequestContext();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextlytics/core",
3
- "version": "0.4.0-canary.101",
3
+ "version": "0.4.0",
4
4
  "description": "Analytics library for Next.js",
5
5
  "license": "MIT",
6
6
  "repository": {