@hellocoop/nextjs 3.3.7 → 3.3.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.
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +18 -2
- package/package.json +3 -3
package/dist/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAEvD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAE7C,OAAO,EAOH,MAAM,EACT,MAAM,gBAAgB,CAAA;AAEvB,OAAO,QAAQ,aAAa,CAAC;IACzB,UAAU,WAAW;QACjB,IAAI,CAAC,EAAE,IAAI,CAAA;KACd;CACJ;AA6FD,KAAK,eAAe,GAAG,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,YAAY,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAEvD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAE7C,OAAO,EAOH,MAAM,EACT,MAAM,gBAAgB,CAAA;AAEvB,OAAO,QAAQ,aAAa,CAAC;IACzB,UAAU,WAAW;QACjB,IAAI,CAAC,EAAE,IAAI,CAAA;KACd;CACJ;AA6FD,KAAK,eAAe,GAAG,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,YAAY,CAAC,CAAA;AAkDlE,eAAO,MAAM,OAAO,WAAY,MAAM;;;CAKrC,CAAA"}
|
package/dist/app.js
CHANGED
|
@@ -93,8 +93,24 @@ const appAuthHandler = (config) => {
|
|
|
93
93
|
const helloReq = convertToHelloRequest(req, internalResponse);
|
|
94
94
|
const helloRes = convertToHelloResponse(internalResponse);
|
|
95
95
|
await (0, api_1.router)(helloReq, helloRes);
|
|
96
|
-
if (internalResponse.redirect)
|
|
97
|
-
|
|
96
|
+
if (internalResponse.redirect) {
|
|
97
|
+
// For relative redirects, just set Location header directly to avoid host/protocol issues
|
|
98
|
+
// For absolute redirects, use NextResponse.redirect
|
|
99
|
+
if (internalResponse.redirect.startsWith('http://') ||
|
|
100
|
+
internalResponse.redirect.startsWith('https://')) {
|
|
101
|
+
return server_1.NextResponse.redirect(internalResponse.redirect, {
|
|
102
|
+
headers: internalResponse.headers,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
// Relative redirect - set Location header directly
|
|
107
|
+
internalResponse.headers.set('Location', internalResponse.redirect);
|
|
108
|
+
return new server_1.NextResponse(null, {
|
|
109
|
+
status: 302,
|
|
110
|
+
headers: internalResponse.headers,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
98
114
|
if (internalResponse.json)
|
|
99
115
|
return server_1.NextResponse.json(internalResponse.json, {
|
|
100
116
|
headers: internalResponse.headers,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hellocoop/nextjs",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.12",
|
|
4
4
|
"description": "Next.js SDK for Hellō https://hello.dev",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
"node": ">=18"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@hellocoop/api": "^2.4.
|
|
64
|
+
"@hellocoop/api": "^2.4.6",
|
|
65
65
|
"@hellocoop/helper-server": "^2.2.3",
|
|
66
66
|
"@hellocoop/react": "^3.2.3",
|
|
67
67
|
"cookie": "^1.0.1",
|
|
68
68
|
"cors": "^2.8.5",
|
|
69
69
|
"swr": "^2.2.2"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "1b0b85847497968fe18765fdc64741e0d1ebb8c4"
|
|
72
72
|
}
|