@netlify/plugin-nextjs 4.7.0 → 4.7.1
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.
- package/lib/index.js +10 -4
- package/package.json +7 -4
package/lib/index.js
CHANGED
|
@@ -43,11 +43,17 @@ const plugin = {
|
|
|
43
43
|
failBuild,
|
|
44
44
|
});
|
|
45
45
|
if ((0, utils_1.isNextAuthInstalled)()) {
|
|
46
|
-
console.log(`NextAuth package detected, setting NEXTAUTH_URL environment variable to ${process.env.URL}`);
|
|
47
46
|
const config = await (0, config_1.getRequiredServerFiles)(publish);
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
const userDefinedNextAuthUrl = config.config.env.NEXTAUTH_URL;
|
|
48
|
+
if (userDefinedNextAuthUrl) {
|
|
49
|
+
console.log(`NextAuth package detected, NEXTAUTH_URL environment variable set by user to ${userDefinedNextAuthUrl}`);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
const nextAuthUrl = `${process.env.URL}${basePath}`;
|
|
53
|
+
console.log(`NextAuth package detected, setting NEXTAUTH_URL environment variable to ${nextAuthUrl}`);
|
|
54
|
+
config.config.env.NEXTAUTH_URL = nextAuthUrl;
|
|
55
|
+
await (0, config_1.updateRequiredServerFiles)(publish, config);
|
|
56
|
+
}
|
|
51
57
|
}
|
|
52
58
|
const buildId = (0, fs_extra_1.readFileSync)((0, path_1.join)(publish, 'BUILD_ID'), 'utf8').trim();
|
|
53
59
|
(0, config_1.configureHandlerFunctions)({ netlifyConfig, ignore, publish: (0, path_1.relative)(process.cwd(), publish) });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/plugin-nextjs",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.1",
|
|
4
4
|
"description": "Run Next.js seamlessly on Netlify",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -10,13 +10,12 @@
|
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@netlify/functions": "^1.0.0",
|
|
13
|
-
"@netlify/ipx": "^
|
|
13
|
+
"@netlify/ipx": "^1.0.1",
|
|
14
14
|
"@vercel/node-bridge": "^2.1.0",
|
|
15
15
|
"chalk": "^4.1.2",
|
|
16
16
|
"fs-extra": "^10.0.0",
|
|
17
17
|
"globby": "^11.0.4",
|
|
18
18
|
"moize": "^6.1.0",
|
|
19
|
-
"next": "^12.1.4",
|
|
20
19
|
"node-fetch": "^2.6.6",
|
|
21
20
|
"node-stream-zip": "^1.15.0",
|
|
22
21
|
"outdent": "^0.8.0",
|
|
@@ -29,10 +28,11 @@
|
|
|
29
28
|
},
|
|
30
29
|
"devDependencies": {
|
|
31
30
|
"@delucis/if-env": "^1.1.2",
|
|
32
|
-
"@netlify/build": "^27.
|
|
31
|
+
"@netlify/build": "^27.1.3",
|
|
33
32
|
"@types/fs-extra": "^9.0.13",
|
|
34
33
|
"@types/jest": "^27.4.1",
|
|
35
34
|
"@types/node": "^17.0.25",
|
|
35
|
+
"next": "^12.1.6",
|
|
36
36
|
"npm-run-all": "^4.1.5",
|
|
37
37
|
"typescript": "^4.6.3"
|
|
38
38
|
},
|
|
@@ -46,6 +46,9 @@
|
|
|
46
46
|
"watch": "tsc --watch",
|
|
47
47
|
"prepare": "npm run build"
|
|
48
48
|
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"next": "*"
|
|
51
|
+
},
|
|
49
52
|
"repository": {
|
|
50
53
|
"type": "git",
|
|
51
54
|
"url": "git+https://github.com/netlify/netlify-plugin-nextjs.git"
|