@sitecore-content-sdk/nextjs 2.0.2-canary.3 → 2.0.2-canary.5

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.
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BotTrackingProxy = void 0;
7
+ const core_1 = require("@sitecore-content-sdk/core");
8
+ const analytics_core_1 = require("@sitecore-content-sdk/analytics-core");
9
+ const events_1 = require("@sitecore-content-sdk/events");
10
+ const internal_1 = require("@sitecore-content-sdk/events/internal");
11
+ const proxy_1 = require("./proxy");
12
+ const debug_1 = __importDefault(require("../debug"));
13
+ const analytics_adapter_1 = require("../initialization/proxy/analytics-adapter");
14
+ /**
15
+ * Next.js proxy that runs bot detection once per request and sets the bot cookie.
16
+ * Run first in the proxy chain to ensure that the bot cookie is set before other proxies run.
17
+ * @public
18
+ */
19
+ class BotTrackingProxy extends proxy_1.ProxyBase {
20
+ constructor(config) {
21
+ super(config);
22
+ this.config = config;
23
+ this.handle = async (req, res) => {
24
+ try {
25
+ const isDisabled = (this.config.skip && this.config.skip(req, res)) || false;
26
+ debug_1.default.common('bot tracking proxy start: %o', {
27
+ pathname: req.nextUrl.pathname,
28
+ headers: this.extractDebugHeaders(req.headers),
29
+ });
30
+ if (isDisabled) {
31
+ debug_1.default.common('bot tracking proxy skipped (disabled)');
32
+ return res;
33
+ }
34
+ if (this.isPreview(req)) {
35
+ debug_1.default.common('bot tracking proxy skipped (preview)');
36
+ return res;
37
+ }
38
+ if (this.shouldSkipForLocalEnvironment(req)) {
39
+ debug_1.default.common('bot tracking proxy skipped (local environment)');
40
+ return res;
41
+ }
42
+ if (!(0, internal_1.isBot)(req.headers.get('user-agent'))) {
43
+ debug_1.default.common('bot tracking proxy skipped (not a bot)');
44
+ return res;
45
+ }
46
+ if (this.isPrefetch(req)) {
47
+ debug_1.default.common('bot tracking proxy skipped (prefetch)');
48
+ return res;
49
+ }
50
+ const site = this.getSite(req, res);
51
+ const botTracking = async () => {
52
+ await (0, core_1.initContentSdk)({
53
+ config: {
54
+ contextId: this.config.contextId,
55
+ edgeUrl: this.config.edgeUrl,
56
+ siteName: site.name,
57
+ },
58
+ plugins: [
59
+ (0, analytics_core_1.analyticsPlugin)({
60
+ options: {
61
+ enableCookie: false,
62
+ },
63
+ adapter: (0, analytics_adapter_1.analyticsProxyAdapter)(req, res),
64
+ }),
65
+ (0, events_1.eventsPlugin)(),
66
+ ],
67
+ });
68
+ await (0, events_1.botPageView)();
69
+ };
70
+ res.cookies.set(internal_1.BOT_DETECTION_COOKIE, '1', {
71
+ secure: true,
72
+ sameSite: 'lax',
73
+ path: '/',
74
+ });
75
+ if (this.config.fetchEvent) {
76
+ this.config.fetchEvent.waitUntil(botTracking());
77
+ }
78
+ else {
79
+ await botTracking();
80
+ }
81
+ debug_1.default.common('bot tracking proxy end: %o', {
82
+ pathname: req.nextUrl.pathname,
83
+ cookies: res.cookies,
84
+ });
85
+ return res;
86
+ }
87
+ catch (error) {
88
+ debug_1.default.common('bot tracking proxy error: %o', error);
89
+ return res;
90
+ }
91
+ };
92
+ }
93
+ /**
94
+ * @param {NextRequest} req - Incoming request
95
+ * @returns True when bot tracking should be skipped for a local / dev environment.
96
+ * @internal
97
+ */
98
+ shouldSkipForLocalEnvironment(req) {
99
+ // Allow bot tracking in local environment for development purposes
100
+ if (process.env.SITECORE_ENABLE_BOT_TRACKING === 'true') {
101
+ return false;
102
+ }
103
+ if (process.env.NODE_ENV === 'development') {
104
+ return true;
105
+ }
106
+ const hostName = (this.getHostHeader(req) ||
107
+ req.nextUrl.hostname ||
108
+ this.defaultHostname ||
109
+ '').toLowerCase();
110
+ return (hostName === 'localhost' ||
111
+ hostName === '127.0.0.1' ||
112
+ hostName === '::1' ||
113
+ hostName === '[::1]');
114
+ }
115
+ }
116
+ exports.BotTrackingProxy = BotTrackingProxy;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.debug = exports.REDIRECT_TYPE_SERVER_TRANSFER = exports.REDIRECT_TYPE_302 = exports.REDIRECT_TYPE_301 = exports.RedirectsService = exports.PersonalizeService = exports.LocaleProxy = exports.AppRouterMultisiteProxy = exports.MultisiteProxy = exports.PersonalizeProxy = exports.RedirectsProxy = exports.defineProxy = exports.ProxyHandler = exports.ProxyBase = void 0;
6
+ exports.debug = exports.REDIRECT_TYPE_SERVER_TRANSFER = exports.REDIRECT_TYPE_302 = exports.REDIRECT_TYPE_301 = exports.RedirectsService = exports.BotTrackingProxy = exports.PersonalizeService = exports.LocaleProxy = exports.AppRouterMultisiteProxy = exports.MultisiteProxy = exports.PersonalizeProxy = exports.RedirectsProxy = exports.defineProxy = exports.ProxyHandler = exports.ProxyBase = void 0;
7
7
  var proxy_1 = require("./proxy");
8
8
  Object.defineProperty(exports, "ProxyBase", { enumerable: true, get: function () { return proxy_1.ProxyBase; } });
9
9
  Object.defineProperty(exports, "ProxyHandler", { enumerable: true, get: function () { return proxy_1.ProxyHandler; } });
@@ -20,6 +20,8 @@ var locale_proxy_1 = require("./locale-proxy");
20
20
  Object.defineProperty(exports, "LocaleProxy", { enumerable: true, get: function () { return locale_proxy_1.LocaleProxy; } });
21
21
  var personalize_1 = require("@sitecore-content-sdk/content/personalize");
22
22
  Object.defineProperty(exports, "PersonalizeService", { enumerable: true, get: function () { return personalize_1.PersonalizeService; } });
23
+ var bot_tracking_proxy_1 = require("./bot-tracking-proxy");
24
+ Object.defineProperty(exports, "BotTrackingProxy", { enumerable: true, get: function () { return bot_tracking_proxy_1.BotTrackingProxy; } });
23
25
  var site_1 = require("@sitecore-content-sdk/content/site");
24
26
  Object.defineProperty(exports, "RedirectsService", { enumerable: true, get: function () { return site_1.RedirectsService; } });
25
27
  Object.defineProperty(exports, "REDIRECT_TYPE_301", { enumerable: true, get: function () { return site_1.REDIRECT_TYPE_301; } });
@@ -5,13 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PersonalizeProxy = void 0;
7
7
  const personalize_1 = require("@sitecore-content-sdk/content/personalize");
8
- const proxy_1 = require("./proxy");
9
8
  const core_1 = require("@sitecore-content-sdk/core");
10
9
  const personalize_2 = require("@sitecore-content-sdk/personalize");
11
- const debug_1 = __importDefault(require("../debug"));
10
+ const internal_1 = require("@sitecore-content-sdk/events/internal");
12
11
  const analytics_core_1 = require("@sitecore-content-sdk/analytics-core");
13
- const analytics_adapter_1 = require("../initialization/proxy/analytics-adapter");
14
12
  const personalize_3 = require("@sitecore-content-sdk/personalize");
13
+ const analytics_adapter_1 = require("../initialization/proxy/analytics-adapter");
14
+ const proxy_1 = require("./proxy");
15
+ const debug_1 = __importDefault(require("../debug"));
15
16
  const personalize_adapter_1 = require("../initialization/proxy/personalize-adapter");
16
17
  /**
17
18
  * Proxy / handler to support Sitecore Personalize
@@ -26,11 +27,13 @@ class PersonalizeProxy extends proxy_1.ProxyBase {
26
27
  super(config);
27
28
  this.config = config;
28
29
  this.handle = async (req, res) => {
30
+ var _a, _b;
29
31
  if (!this.config.enabled) {
30
32
  debug_1.default.personalize('skipped (personalize proxy is disabled globally)');
31
33
  return res;
32
34
  }
33
35
  try {
36
+ const skipForBot = (_a = this.config.skipForBot) !== null && _a !== void 0 ? _a : true;
34
37
  const pathname = req.nextUrl.pathname;
35
38
  const language = this.getLanguage(req, res);
36
39
  const hostname = this.getHostHeader(req) || this.defaultHostname;
@@ -52,6 +55,10 @@ class PersonalizeProxy extends proxy_1.ProxyBase {
52
55
  debug_1.default.personalize('skipped (%s)', res.redirected ? 'redirected' : 'preview');
53
56
  return res;
54
57
  }
58
+ if (skipForBot && ((_b = req.cookies.get(internal_1.BOT_DETECTION_COOKIE)) === null || _b === void 0 ? void 0 : _b.value)) {
59
+ debug_1.default.personalize('skipped (bot request)');
60
+ return res;
61
+ }
55
62
  const site = this.getSite(req, res);
56
63
  // Get personalization info from Experience Edge
57
64
  // personalizeService is guaranteed to be non-null here because disabled() check passed
@@ -17,6 +17,37 @@ exports.LOCALE_HEADER_NAME = 'x-sc-locale';
17
17
  class ProxyHandler {
18
18
  }
19
19
  exports.ProxyHandler = ProxyHandler;
20
+ /**
21
+ * Hostname from a `Host` or `x-forwarded-host` value, without port.
22
+ * - `[::1]:3000` → `::1`
23
+ * - `127.0.0.1:3000` → `127.0.0.1`
24
+ * - `example.com:443` → `example.com`
25
+ * - `::1` → `::1` (does not treat `:1` as a port)
26
+ * @param {string} host - Raw header value
27
+ */
28
+ function getHostnameFromHostHeader(host) {
29
+ const trimmed = host.trim();
30
+ // Bracketed IPv6: "[...]:port" or "[...]"
31
+ if (trimmed.startsWith('[')) {
32
+ const end = trimmed.indexOf(']');
33
+ if (end !== -1) {
34
+ return trimmed.slice(1, end).toLowerCase();
35
+ }
36
+ }
37
+ // Unbracketed IPv6 (e.g. ::1, 2001:db8::1) — never strip on last ":digits"
38
+ if (trimmed.includes('::')) {
39
+ return trimmed.toLowerCase();
40
+ }
41
+ // IPv4 or DNS name with ":port" (port = decimal digits only)
42
+ const lastColon = trimmed.lastIndexOf(':');
43
+ if (lastColon > 0) {
44
+ const after = trimmed.slice(lastColon + 1);
45
+ if (/^\d+$/.test(after)) {
46
+ return trimmed.slice(0, lastColon).toLowerCase();
47
+ }
48
+ }
49
+ return trimmed.toLowerCase();
50
+ }
20
51
  /**
21
52
  * Base proxy class with common methods
22
53
  * @public
@@ -113,8 +144,7 @@ class ProxyBase extends ProxyHandler {
113
144
  * @param {NextRequest} req request
114
145
  */
115
146
  getHostHeader(req) {
116
- var _a;
117
- return req.headers.get('x-forwarded-host') || ((_a = req.headers.get('host')) === null || _a === void 0 ? void 0 : _a.split(':')[0]);
147
+ return getHostnameFromHostHeader(req.headers.get('x-forwarded-host') || req.headers.get('host') || '');
118
148
  }
119
149
  /**
120
150
  * Get site information. If site name is stored in cookie, use it, otherwise resolve by hostname
@@ -0,0 +1,109 @@
1
+ import { initContentSdk } from '@sitecore-content-sdk/core';
2
+ import { analyticsPlugin } from '@sitecore-content-sdk/analytics-core';
3
+ import { eventsPlugin, botPageView, } from '@sitecore-content-sdk/events';
4
+ import { isBot, BOT_DETECTION_COOKIE } from '@sitecore-content-sdk/events/internal';
5
+ import { ProxyBase } from './proxy';
6
+ import debug from '../debug';
7
+ import { analyticsProxyAdapter } from '../initialization/proxy/analytics-adapter';
8
+ /**
9
+ * Next.js proxy that runs bot detection once per request and sets the bot cookie.
10
+ * Run first in the proxy chain to ensure that the bot cookie is set before other proxies run.
11
+ * @public
12
+ */
13
+ export class BotTrackingProxy extends ProxyBase {
14
+ constructor(config) {
15
+ super(config);
16
+ this.config = config;
17
+ this.handle = async (req, res) => {
18
+ try {
19
+ const isDisabled = (this.config.skip && this.config.skip(req, res)) || false;
20
+ debug.common('bot tracking proxy start: %o', {
21
+ pathname: req.nextUrl.pathname,
22
+ headers: this.extractDebugHeaders(req.headers),
23
+ });
24
+ if (isDisabled) {
25
+ debug.common('bot tracking proxy skipped (disabled)');
26
+ return res;
27
+ }
28
+ if (this.isPreview(req)) {
29
+ debug.common('bot tracking proxy skipped (preview)');
30
+ return res;
31
+ }
32
+ if (this.shouldSkipForLocalEnvironment(req)) {
33
+ debug.common('bot tracking proxy skipped (local environment)');
34
+ return res;
35
+ }
36
+ if (!isBot(req.headers.get('user-agent'))) {
37
+ debug.common('bot tracking proxy skipped (not a bot)');
38
+ return res;
39
+ }
40
+ if (this.isPrefetch(req)) {
41
+ debug.common('bot tracking proxy skipped (prefetch)');
42
+ return res;
43
+ }
44
+ const site = this.getSite(req, res);
45
+ const botTracking = async () => {
46
+ await initContentSdk({
47
+ config: {
48
+ contextId: this.config.contextId,
49
+ edgeUrl: this.config.edgeUrl,
50
+ siteName: site.name,
51
+ },
52
+ plugins: [
53
+ analyticsPlugin({
54
+ options: {
55
+ enableCookie: false,
56
+ },
57
+ adapter: analyticsProxyAdapter(req, res),
58
+ }),
59
+ eventsPlugin(),
60
+ ],
61
+ });
62
+ await botPageView();
63
+ };
64
+ res.cookies.set(BOT_DETECTION_COOKIE, '1', {
65
+ secure: true,
66
+ sameSite: 'lax',
67
+ path: '/',
68
+ });
69
+ if (this.config.fetchEvent) {
70
+ this.config.fetchEvent.waitUntil(botTracking());
71
+ }
72
+ else {
73
+ await botTracking();
74
+ }
75
+ debug.common('bot tracking proxy end: %o', {
76
+ pathname: req.nextUrl.pathname,
77
+ cookies: res.cookies,
78
+ });
79
+ return res;
80
+ }
81
+ catch (error) {
82
+ debug.common('bot tracking proxy error: %o', error);
83
+ return res;
84
+ }
85
+ };
86
+ }
87
+ /**
88
+ * @param {NextRequest} req - Incoming request
89
+ * @returns True when bot tracking should be skipped for a local / dev environment.
90
+ * @internal
91
+ */
92
+ shouldSkipForLocalEnvironment(req) {
93
+ // Allow bot tracking in local environment for development purposes
94
+ if (process.env.SITECORE_ENABLE_BOT_TRACKING === 'true') {
95
+ return false;
96
+ }
97
+ if (process.env.NODE_ENV === 'development') {
98
+ return true;
99
+ }
100
+ const hostName = (this.getHostHeader(req) ||
101
+ req.nextUrl.hostname ||
102
+ this.defaultHostname ||
103
+ '').toLowerCase();
104
+ return (hostName === 'localhost' ||
105
+ hostName === '127.0.0.1' ||
106
+ hostName === '::1' ||
107
+ hostName === '[::1]');
108
+ }
109
+ }
@@ -5,5 +5,6 @@ export { MultisiteProxy } from './multisite-proxy';
5
5
  export { AppRouterMultisiteProxy } from './app-router-multisite-proxy';
6
6
  export { LocaleProxy } from './locale-proxy';
7
7
  export { PersonalizeService, } from '@sitecore-content-sdk/content/personalize';
8
+ export { BotTrackingProxy } from './bot-tracking-proxy';
8
9
  export { RedirectsService, REDIRECT_TYPE_301, REDIRECT_TYPE_302, REDIRECT_TYPE_SERVER_TRANSFER, } from '@sitecore-content-sdk/content/site';
9
10
  export { default as debug } from '../debug';
@@ -1,11 +1,12 @@
1
1
  import { PersonalizeService, getPersonalizedRewrite, CdpHelper, DEFAULT_VARIANT, } from '@sitecore-content-sdk/content/personalize';
2
- import { ProxyBase, REWRITE_HEADER_NAME } from './proxy';
3
2
  import { initContentSdk } from '@sitecore-content-sdk/core';
4
3
  import { personalize } from '@sitecore-content-sdk/personalize';
5
- import debug from '../debug';
4
+ import { BOT_DETECTION_COOKIE } from '@sitecore-content-sdk/events/internal';
6
5
  import { analyticsPlugin } from '@sitecore-content-sdk/analytics-core';
7
- import { analyticsProxyAdapter } from '../initialization/proxy/analytics-adapter';
8
6
  import { personalizeServerPlugin } from '@sitecore-content-sdk/personalize';
7
+ import { analyticsProxyAdapter } from '../initialization/proxy/analytics-adapter';
8
+ import { ProxyBase, REWRITE_HEADER_NAME } from './proxy';
9
+ import debug from '../debug';
9
10
  import { personalizeProxyAdapter } from '../initialization/proxy/personalize-adapter';
10
11
  /**
11
12
  * Proxy / handler to support Sitecore Personalize
@@ -20,11 +21,13 @@ export class PersonalizeProxy extends ProxyBase {
20
21
  super(config);
21
22
  this.config = config;
22
23
  this.handle = async (req, res) => {
24
+ var _a, _b;
23
25
  if (!this.config.enabled) {
24
26
  debug.personalize('skipped (personalize proxy is disabled globally)');
25
27
  return res;
26
28
  }
27
29
  try {
30
+ const skipForBot = (_a = this.config.skipForBot) !== null && _a !== void 0 ? _a : true;
28
31
  const pathname = req.nextUrl.pathname;
29
32
  const language = this.getLanguage(req, res);
30
33
  const hostname = this.getHostHeader(req) || this.defaultHostname;
@@ -46,6 +49,10 @@ export class PersonalizeProxy extends ProxyBase {
46
49
  debug.personalize('skipped (%s)', res.redirected ? 'redirected' : 'preview');
47
50
  return res;
48
51
  }
52
+ if (skipForBot && ((_b = req.cookies.get(BOT_DETECTION_COOKIE)) === null || _b === void 0 ? void 0 : _b.value)) {
53
+ debug.personalize('skipped (bot request)');
54
+ return res;
55
+ }
49
56
  const site = this.getSite(req, res);
50
57
  // Get personalization info from Experience Edge
51
58
  // personalizeService is guaranteed to be non-null here because disabled() check passed
@@ -10,6 +10,37 @@ export const LOCALE_HEADER_NAME = 'x-sc-locale';
10
10
  */
11
11
  export class ProxyHandler {
12
12
  }
13
+ /**
14
+ * Hostname from a `Host` or `x-forwarded-host` value, without port.
15
+ * - `[::1]:3000` → `::1`
16
+ * - `127.0.0.1:3000` → `127.0.0.1`
17
+ * - `example.com:443` → `example.com`
18
+ * - `::1` → `::1` (does not treat `:1` as a port)
19
+ * @param {string} host - Raw header value
20
+ */
21
+ function getHostnameFromHostHeader(host) {
22
+ const trimmed = host.trim();
23
+ // Bracketed IPv6: "[...]:port" or "[...]"
24
+ if (trimmed.startsWith('[')) {
25
+ const end = trimmed.indexOf(']');
26
+ if (end !== -1) {
27
+ return trimmed.slice(1, end).toLowerCase();
28
+ }
29
+ }
30
+ // Unbracketed IPv6 (e.g. ::1, 2001:db8::1) — never strip on last ":digits"
31
+ if (trimmed.includes('::')) {
32
+ return trimmed.toLowerCase();
33
+ }
34
+ // IPv4 or DNS name with ":port" (port = decimal digits only)
35
+ const lastColon = trimmed.lastIndexOf(':');
36
+ if (lastColon > 0) {
37
+ const after = trimmed.slice(lastColon + 1);
38
+ if (/^\d+$/.test(after)) {
39
+ return trimmed.slice(0, lastColon).toLowerCase();
40
+ }
41
+ }
42
+ return trimmed.toLowerCase();
43
+ }
13
44
  /**
14
45
  * Base proxy class with common methods
15
46
  * @public
@@ -106,8 +137,7 @@ export class ProxyBase extends ProxyHandler {
106
137
  * @param {NextRequest} req request
107
138
  */
108
139
  getHostHeader(req) {
109
- var _a;
110
- return req.headers.get('x-forwarded-host') || ((_a = req.headers.get('host')) === null || _a === void 0 ? void 0 : _a.split(':')[0]);
140
+ return getHostnameFromHostHeader(req.headers.get('x-forwarded-host') || req.headers.get('host') || '');
111
141
  }
112
142
  /**
113
143
  * Get site information. If site name is stored in cookie, use it, otherwise resolve by hostname
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-content-sdk/nextjs",
3
- "version": "2.0.2-canary.3",
3
+ "version": "2.0.2-canary.5",
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.0.2-canary.3",
36
- "@sitecore-content-sdk/personalize": "2.0.2-canary.3",
35
+ "@sitecore-content-sdk/analytics-core": "2.0.2-canary.5",
36
+ "@sitecore-content-sdk/personalize": "2.0.2-canary.5",
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,9 +91,10 @@
91
91
  },
92
92
  "dependencies": {
93
93
  "@babel/parser": "^7.27.2",
94
- "@sitecore-content-sdk/content": "2.0.2-canary.3",
95
- "@sitecore-content-sdk/core": "2.0.2-canary.3",
96
- "@sitecore-content-sdk/react": "2.0.2-canary.3",
94
+ "@sitecore-content-sdk/content": "2.0.2-canary.5",
95
+ "@sitecore-content-sdk/core": "2.0.2-canary.5",
96
+ "@sitecore-content-sdk/events": "2.0.2-canary.5",
97
+ "@sitecore-content-sdk/react": "2.0.2-canary.5",
97
98
  "recast": "^0.23.11",
98
99
  "regex-parser": "^2.3.1",
99
100
  "sync-disk-cache": "^2.1.0"
@@ -177,7 +178,7 @@
177
178
  },
178
179
  "description": "",
179
180
  "types": "types/index.d.ts",
180
- "gitHead": "1267357f33f77951ffd3a2b09662ac03a1326d65",
181
+ "gitHead": "fdb8c65ed47243b18782342f18bca673484e8904",
181
182
  "files": [
182
183
  "dist",
183
184
  "types",
@@ -0,0 +1,33 @@
1
+ import { NextFetchEvent, NextRequest, NextResponse } from 'next/server';
2
+ import { SitecoreConfig } from '@sitecore-content-sdk/content/config';
3
+ import { ProxyBase, ProxyBaseConfig } from './proxy';
4
+ /**
5
+ * Configuration for BotTrackingProxy.
6
+ * @public
7
+ */
8
+ export type BotTrackingProxyConfig = SitecoreConfig['api']['edge'] & Omit<ProxyBaseConfig, 'defaultLanguage'> & {
9
+ /**
10
+ * Fetch event to run the bot tracking in the background to not block the request.
11
+ * If not provided, the bot tracking will run synchronously.
12
+ * Read more about `fetchEvent` in the [Next.js documentation](https://nextjs.org/docs/app/api-reference/file-conventions/proxy#waituntil-and-nextfetchevent)
13
+ * @param {NextFetchEvent} fetchEvent - Fetch event to run the bot tracking in the background.
14
+ */
15
+ fetchEvent?: NextFetchEvent;
16
+ };
17
+ /**
18
+ * Next.js proxy that runs bot detection once per request and sets the bot cookie.
19
+ * Run first in the proxy chain to ensure that the bot cookie is set before other proxies run.
20
+ * @public
21
+ */
22
+ export declare class BotTrackingProxy extends ProxyBase {
23
+ protected config: BotTrackingProxyConfig;
24
+ constructor(config: BotTrackingProxyConfig);
25
+ handle: (req: NextRequest, res: NextResponse) => Promise<NextResponse>;
26
+ /**
27
+ * @param {NextRequest} req - Incoming request
28
+ * @returns True when bot tracking should be skipped for a local / dev environment.
29
+ * @internal
30
+ */
31
+ protected shouldSkipForLocalEnvironment(req: NextRequest): boolean;
32
+ }
33
+ //# sourceMappingURL=bot-tracking-proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bot-tracking-proxy.d.ts","sourceRoot":"","sources":["../../src/proxy/bot-tracking-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAOtE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAIrD;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,GAChE,IAAI,CAAC,eAAe,EAAE,iBAAiB,CAAC,GAAG;IACzC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B,CAAC;AAEJ;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,SAAS;IACjC,SAAS,CAAC,MAAM,EAAE,sBAAsB;gBAA9B,MAAM,EAAE,sBAAsB;IAIpD,MAAM,GAAU,KAAK,WAAW,EAAE,KAAK,YAAY,KAAG,OAAO,CAAC,YAAY,CAAC,CA+EzE;IAEF;;;;OAIG;IACH,SAAS,CAAC,6BAA6B,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO;CAwBnE"}
@@ -5,6 +5,7 @@ export { MultisiteProxy, MultisiteProxyConfig } from './multisite-proxy';
5
5
  export { AppRouterMultisiteProxy } from './app-router-multisite-proxy';
6
6
  export { LocaleProxy, LocaleProxyConfig } from './locale-proxy';
7
7
  export { PersonalizeService, PersonalizeServiceConfig, } from '@sitecore-content-sdk/content/personalize';
8
+ export { BotTrackingProxy, BotTrackingProxyConfig } from './bot-tracking-proxy';
8
9
  export { RedirectsService, RedirectsServiceConfig, REDIRECT_TYPE_301, REDIRECT_TYPE_302, REDIRECT_TYPE_SERVER_TRANSFER, RedirectInfo, } from '@sitecore-content-sdk/content/site';
9
10
  export { default as debug } from '../debug';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/proxy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,6BAA6B,EAC7B,YAAY,GACb,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/proxy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,6BAA6B,EAC7B,YAAY,GACb,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,UAAU,CAAC"}
@@ -19,6 +19,11 @@ export type PersonalizeProxyConfig = ProxyBaseConfig & SitecoreConfig['api']['ed
19
19
  personalizeService?: PersonalizeService;
20
20
  getExtraUtmParams?: (req: NextRequest) => Partial<ExperienceParams['utm']>;
21
21
  extractGeoDataCb?: (req?: NextRequest) => Promise<PersonalizeGeoData> | PersonalizeGeoData;
22
+ /**
23
+ * Skip personalize proxy for bot requests marked by the bot tracking proxy.
24
+ * Default is `true`.
25
+ */
26
+ skipForBot?: boolean;
22
27
  };
23
28
  /**
24
29
  * Object model of Experience Context data
@@ -1 +1 @@
1
- {"version":3,"file":"personalize-proxy.d.ts","sourceRoot":"","sources":["../../src/proxy/personalize-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,kBAAkB,EAElB,eAAe,EAGhB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAuB,MAAM,SAAS,CAAC;AAG1E,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAO3C;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAClD,cAAc,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,GAC7B,cAAc,CAAC,aAAa,CAAC,GAAG;IAC9B,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3E,gBAAgB,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAAC;CAC5F,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,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,EACV,GAAG,GACJ,EAAE;QACD,MAAM,EAAE,gBAAgB,CAAC;QACzB,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;QACtB,GAAG,CAAC,EAAE,kBAAkB,CAAC;KAC1B;mBAec,MAAM;;IAIrB;;;;;OAKG;IACH,SAAS,CAAC,wBAAwB,CAChC,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,MAAM,GACf,oBAAoB,EAAE;CA8C1B"}
@@ -97,7 +97,7 @@ export declare abstract class ProxyBase extends ProxyHandler {
97
97
  * Extract 'host' header
98
98
  * @param {NextRequest} req request
99
99
  */
100
- protected getHostHeader(req: NextRequest): string | undefined;
100
+ protected getHostHeader(req: NextRequest): string;
101
101
  /**
102
102
  * Get site information. If site name is stored in cookie, use it, otherwise resolve by hostname
103
103
  * - If site can't be resolved by site name cookie use default site info based on provided parameters
@@ -1 +1 @@
1
- {"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/proxy/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,QAAQ,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAEL,oBAAoB,EACrB,MAAM,sCAAsC,CAAC;AAI9C,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAClD,eAAO,MAAM,kBAAkB,gBAAgB,CAAC;AAEhD;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;OAIG;IACH,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,KAAK,OAAO,CAAC;IACxD;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAC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