@sitecore-content-sdk/nextjs 2.1.0-canary.10 → 2.1.0-canary.12

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.
@@ -17,8 +17,7 @@ function analyticsProxyAdapter(request, response) {
17
17
  return {
18
18
  type: 'proxy',
19
19
  isBot: () => {
20
- const botCookie = (0, internal_1.getBotCookieServerSide)(request.cookies.toString());
21
- return !!botCookie || (0, internal_1.isBot)(request.headers.get('user-agent'));
20
+ return (0, internal_1.isBotServerSide)(request.cookies.toString(), request.headers.get('user-agent'));
22
21
  },
23
22
  getClientId: () => {
24
23
  return (0, exports.getClientId)(request);
@@ -1,4 +1,4 @@
1
- import { COOKIE_NAME_PREFIX, fetchClientIdFromEdgeProxy, getBotCookieServerSide, getDefaultCookieAttributes, getAnalyticsPlugin, isBot, } from '@sitecore-content-sdk/analytics-core/internal';
1
+ import { COOKIE_NAME_PREFIX, fetchClientIdFromEdgeProxy, isBotServerSide, getDefaultCookieAttributes, getAnalyticsPlugin, } from '@sitecore-content-sdk/analytics-core/internal';
2
2
  import { getCoreContext } from '@sitecore-content-sdk/core';
3
3
  /**
4
4
  * Creates a proxy-based analytics adapter that reads and writes the visitor ID
@@ -13,8 +13,7 @@ export function analyticsProxyAdapter(request, response) {
13
13
  return {
14
14
  type: 'proxy',
15
15
  isBot: () => {
16
- const botCookie = getBotCookieServerSide(request.cookies.toString());
17
- return !!botCookie || isBot(request.headers.get('user-agent'));
16
+ return isBotServerSide(request.cookies.toString(), request.headers.get('user-agent'));
18
17
  },
19
18
  getClientId: () => {
20
19
  return getClientId(request);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-content-sdk/nextjs",
3
- "version": "2.1.0-canary.10",
3
+ "version": "2.1.0-canary.12",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "sideEffects": false,
@@ -32,8 +32,8 @@
32
32
  "url": "https://github.com/sitecore/content-sdk/issues"
33
33
  },
34
34
  "devDependencies": {
35
- "@sitecore-content-sdk/analytics-core": "2.1.0-canary.10",
36
- "@sitecore-content-sdk/personalize": "2.1.0-canary.10",
35
+ "@sitecore-content-sdk/analytics-core": "2.1.0-canary.12",
36
+ "@sitecore-content-sdk/personalize": "2.1.0-canary.12",
37
37
  "@stylistic/eslint-plugin": "^5.2.2",
38
38
  "@testing-library/dom": "^10.4.0",
39
39
  "@testing-library/react": "^16.3.0",
@@ -91,10 +91,10 @@
91
91
  },
92
92
  "dependencies": {
93
93
  "@babel/parser": "^7.27.2",
94
- "@sitecore-content-sdk/content": "2.1.0-canary.10",
95
- "@sitecore-content-sdk/core": "2.1.0-canary.10",
96
- "@sitecore-content-sdk/events": "2.1.0-canary.10",
97
- "@sitecore-content-sdk/react": "2.1.0-canary.10",
94
+ "@sitecore-content-sdk/content": "2.1.0-canary.12",
95
+ "@sitecore-content-sdk/core": "2.1.0-canary.12",
96
+ "@sitecore-content-sdk/events": "2.1.0-canary.12",
97
+ "@sitecore-content-sdk/react": "2.1.0-canary.12",
98
98
  "recast": "^0.23.11",
99
99
  "regex-parser": "^2.3.1",
100
100
  "sync-disk-cache": "^2.1.0"
@@ -178,7 +178,7 @@
178
178
  },
179
179
  "description": "",
180
180
  "types": "types/index.d.ts",
181
- "gitHead": "f4f6bb8a4ac09e5d721e8a4a361c8ad980997e6c",
181
+ "gitHead": "608209f0b31dffb40d22f154843fbfe21fcd5f92",
182
182
  "files": [
183
183
  "dist",
184
184
  "types",
@@ -1 +1 @@
1
- {"version":3,"file":"analytics-adapter.d.ts","sourceRoot":"","sources":["../../../src/initialization/proxy/analytics-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,gBAAgB,EAEjB,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,YAAY,GACrB,qBAAqB,CA+DvB;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,SAAS,WAAW,KAAG,MAAM,GAAG,IAI3D,CAAC"}
1
+ {"version":3,"file":"analytics-adapter.d.ts","sourceRoot":"","sources":["../../../src/initialization/proxy/analytics-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,gBAAgB,EACjB,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,YAAY,GACrB,qBAAqB,CA8DvB;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,SAAS,WAAW,KAAG,MAAM,GAAG,IAI3D,CAAC"}