@enonic/nextjs-adapter 2.0.0-B1 → 2.0.0-B2

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.
Files changed (2) hide show
  1. package/package.json +5 -5
  2. package/server/index.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enonic/nextjs-adapter",
3
- "version": "2.0.0-B1",
3
+ "version": "2.0.0-B2",
4
4
  "license": "Apache-2.0",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -22,13 +22,13 @@
22
22
  },
23
23
  "devDependencies": {
24
24
  "@enonic/eslint-config": "^1.1.0",
25
- "@types/node": "^20.4.4",
26
- "@types/react": "18.2.15",
25
+ "@types/node": "^20.4.5",
26
+ "@types/react": "18.2.17",
27
27
  "@types/react-dom": "18.2.7",
28
28
  "@typescript-eslint/eslint-plugin": "^5.61.0",
29
29
  "@typescript-eslint/parser": "^5.62.0",
30
- "eslint": "^8.45.0",
31
- "eslint-plugin-react": "^7.33.0",
30
+ "eslint": "^8.46.0",
31
+ "eslint-plugin-react": "^7.33.1",
32
32
  "typescript": "^5.1.6"
33
33
  }
34
34
  }
package/server/index.js CHANGED
@@ -97,7 +97,7 @@ exports.default = (function (next) { return __awaiter(void 0, void 0, void 0, fu
97
97
  return [3 /*break*/, 5];
98
98
  case 3:
99
99
  tokenParam = parsedUrl.searchParams.get('token');
100
- if (tokenParam !== process.env.API_TOKEN) {
100
+ if (tokenParam !== process.env.ENONIC_API_TOKEN) {
101
101
  // XP hijacks 401 to show login page, so send 407 instead
102
102
  res.statusCode = 407;
103
103
  res.end(JSON.stringify({ message: 'Invalid token' }));