@sitecore-jss/sitecore-jss-nextjs 21.3.0-canary.23 → 21.3.0-canary.25

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.
@@ -18,8 +18,7 @@ class MiddlewareBase {
18
18
  }
19
19
  excludeRoute(pathname) {
20
20
  var _a, _b;
21
- return (pathname.includes('.') || // Ignore files
22
- pathname.startsWith('/api/') || // Ignore Next.js API calls
21
+ return (pathname.startsWith('/api/') || // Ignore Next.js API calls
23
22
  pathname.startsWith('/sitecore/') || // Ignore Sitecore API calls
24
23
  pathname.startsWith('/_next') || // Ignore next service calls
25
24
  (((_a = this.config) === null || _a === void 0 ? void 0 : _a.excludeRoute) && ((_b = this.config) === null || _b === void 0 ? void 0 : _b.excludeRoute(pathname))));
@@ -84,5 +84,9 @@ class MultisiteMiddleware extends middleware_1.MiddlewareBase {
84
84
  }
85
85
  });
86
86
  }
87
+ excludeRoute(pathname) {
88
+ // ignore files
89
+ return pathname.includes('.') || super.excludeRoute(pathname);
90
+ }
87
91
  }
88
92
  exports.MultisiteMiddleware = MultisiteMiddleware;
@@ -162,5 +162,9 @@ class PersonalizeMiddleware extends middleware_1.MiddlewareBase {
162
162
  },
163
163
  };
164
164
  }
165
+ excludeRoute(pathname) {
166
+ // ignore files
167
+ return pathname.includes('.') || super.excludeRoute(pathname);
168
+ }
165
169
  }
166
170
  exports.PersonalizeMiddleware = PersonalizeMiddleware;
@@ -15,8 +15,7 @@ export class MiddlewareBase {
15
15
  }
16
16
  excludeRoute(pathname) {
17
17
  var _a, _b;
18
- return (pathname.includes('.') || // Ignore files
19
- pathname.startsWith('/api/') || // Ignore Next.js API calls
18
+ return (pathname.startsWith('/api/') || // Ignore Next.js API calls
20
19
  pathname.startsWith('/sitecore/') || // Ignore Sitecore API calls
21
20
  pathname.startsWith('/_next') || // Ignore next service calls
22
21
  (((_a = this.config) === null || _a === void 0 ? void 0 : _a.excludeRoute) && ((_b = this.config) === null || _b === void 0 ? void 0 : _b.excludeRoute(pathname))));
@@ -81,4 +81,8 @@ export class MultisiteMiddleware extends MiddlewareBase {
81
81
  }
82
82
  });
83
83
  }
84
+ excludeRoute(pathname) {
85
+ // ignore files
86
+ return pathname.includes('.') || super.excludeRoute(pathname);
87
+ }
84
88
  }
@@ -159,4 +159,8 @@ export class PersonalizeMiddleware extends MiddlewareBase {
159
159
  },
160
160
  };
161
161
  }
162
+ excludeRoute(pathname) {
163
+ // ignore files
164
+ return pathname.includes('.') || super.excludeRoute(pathname);
165
+ }
162
166
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-jss/sitecore-jss-nextjs",
3
- "version": "21.3.0-canary.23",
3
+ "version": "21.3.0-canary.25",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "sideEffects": false,
@@ -70,9 +70,9 @@
70
70
  "react-dom": "^18.2.0"
71
71
  },
72
72
  "dependencies": {
73
- "@sitecore-jss/sitecore-jss": "^21.3.0-canary.23",
74
- "@sitecore-jss/sitecore-jss-dev-tools": "^21.3.0-canary.23",
75
- "@sitecore-jss/sitecore-jss-react": "^21.3.0-canary.23",
73
+ "@sitecore-jss/sitecore-jss": "^21.3.0-canary.25",
74
+ "@sitecore-jss/sitecore-jss-dev-tools": "^21.3.0-canary.25",
75
+ "@sitecore-jss/sitecore-jss-react": "^21.3.0-canary.25",
76
76
  "@vercel/kv": "^0.2.1",
77
77
  "node-html-parser": "^6.1.4",
78
78
  "prop-types": "^15.8.1",
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "description": "",
83
83
  "types": "types/index.d.ts",
84
- "gitHead": "81ee22018e59ae48f080af90492f960b24153096",
84
+ "gitHead": "2c96ee66f2d88f73d66135fed33166ac8502ab4e",
85
85
  "files": [
86
86
  "dist",
87
87
  "types",
@@ -20,5 +20,6 @@ export declare class MultisiteMiddleware extends MiddlewareBase {
20
20
  * @returns middleware handler
21
21
  */
22
22
  getHandler(): (req: NextRequest, res?: NextResponse) => Promise<NextResponse>;
23
+ protected excludeRoute(pathname: string): boolean | undefined;
23
24
  private handler;
24
25
  }
@@ -39,5 +39,6 @@ export declare class PersonalizeMiddleware extends MiddlewareBase {
39
39
  protected getBrowserId(req: NextRequest): string | undefined;
40
40
  protected setBrowserId(res: NextResponse, browserId: string): void;
41
41
  protected getExperienceParams(req: NextRequest): ExperienceParams;
42
+ protected excludeRoute(pathname: string): boolean | undefined;
42
43
  private handler;
43
44
  }