@hellocoop/nextjs 3.2.9-canary.0 → 3.2.9-canary.3

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 CHANGED
@@ -7,6 +7,9 @@ declare module 'next/server' {
7
7
  }
8
8
  }
9
9
  type HandlerFunction = (req: NextRequest) => Promise<NextResponse>;
10
- export declare const appAuth: (config: Config) => HandlerFunction;
10
+ export declare const appAuth: (config: Config) => {
11
+ GET: HandlerFunction;
12
+ POST: HandlerFunction;
13
+ };
11
14
  export {};
12
15
  //# sourceMappingURL=app.d.ts.map
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;AAElE,eAAO,MAAM,OAAO,WAAY,MAAM,KAAG,eA6BxC,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;AAiClE,eAAO,MAAM,OAAO,WAAY,MAAM;;;CAKrC,CAAA"}
package/dist/app.js CHANGED
@@ -81,7 +81,7 @@ const convertToHelloResponse = (res) => {
81
81
  },
82
82
  };
83
83
  };
84
- const appAuth = (config) => {
84
+ const appAuthHandler = (config) => {
85
85
  if (!api_1.isConfigured) {
86
86
  (0, api_1.configure)(config);
87
87
  }
@@ -107,4 +107,10 @@ const appAuth = (config) => {
107
107
  };
108
108
  return r;
109
109
  };
110
+ const appAuth = (config) => {
111
+ return {
112
+ GET: appAuthHandler(config),
113
+ POST: appAuthHandler(config),
114
+ };
115
+ };
110
116
  exports.appAuth = appAuth;
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,wBAAwB,CAAA;AAc1D,eAAO,MAAM,IAAI,QAAsB,OAAO,CAAC,IAAI,CASlD,CAAA"}
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,wBAAwB,CAAA;AAc1D,eAAO,MAAM,IAAI,QAAsB,OAAO,CAAC,IAAI,CAUlD,CAAA"}
package/dist/auth.js CHANGED
@@ -17,7 +17,8 @@ api_1.PackageMetadata.setMetadata(name, version);
17
17
  // https://nextjs.org/docs/app/api-reference/functions/unstable_cache
18
18
  const auth = async function () {
19
19
  var _a;
20
- const authCookie = (_a = (0, headers_1.cookies)().get(api_1.configuration.cookies.authName)) === null || _a === void 0 ? void 0 : _a.value;
20
+ const cookieStore = await (0, headers_1.cookies)();
21
+ const authCookie = (_a = cookieStore.get(api_1.configuration.cookies.authName)) === null || _a === void 0 ? void 0 : _a.value;
21
22
  if (!authCookie)
22
23
  return definitions_1.NotLoggedIn;
23
24
  const a = (await (0, helper_server_1.decryptObj)(authCookie, api_1.configuration.secret));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hellocoop/nextjs",
3
- "version": "3.2.9-canary.0",
3
+ "version": "3.2.9-canary.3",
4
4
  "description": "Next.js SDK for Hellō https://hello.dev",
5
5
  "repository": {
6
6
  "type": "git",
@@ -51,9 +51,9 @@
51
51
  "@types/cors": "^2.8.14",
52
52
  "@types/react": "^18.2.21",
53
53
  "eslint-config-next": "^13.5.1",
54
- "next": "^14.2.15",
55
- "react": "^18.2.0",
56
- "react-dom": "^18.2.0",
54
+ "next": "15.2.3",
55
+ "react": "^19.0.0",
56
+ "react-dom": "^19.0.0",
57
57
  "rimraf": "^5.0.1",
58
58
  "typescript": "^5.2.2"
59
59
  },
@@ -63,7 +63,7 @@
63
63
  "dependencies": {
64
64
  "@hellocoop/api": "^2.2.7",
65
65
  "@hellocoop/helper-server": "^2.2.1",
66
- "@hellocoop/react": "^3.1.9",
66
+ "@hellocoop/react": "^3.1.10-canary.0",
67
67
  "cookie": "^1.0.1",
68
68
  "cors": "^2.8.5",
69
69
  "swr": "^2.2.2"