@instantdb/react 0.22.105-experimental.drewh-cookie-sync-url-encode.21052075851.1 → 0.22.105

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.
@@ -5,7 +5,7 @@ const headers_js_1 = require("next/headers.js");
5
5
  const getUserFromInstantCookie = async (appId) => {
6
6
  const cookieStore = await (0, headers_js_1.cookies)();
7
7
  const userJSON = cookieStore.get('instant_user_' + appId);
8
- const user = userJSON ? JSON.parse(decodeURIComponent(userJSON.value)) : null;
8
+ const user = userJSON ? JSON.parse(userJSON.value) : null;
9
9
  return user;
10
10
  };
11
11
  exports.getUserFromInstantCookie = getUserFromInstantCookie;
@@ -1 +1 @@
1
- {"version":3,"file":"getUserFromInstantCookie.js","sourceRoot":"","sources":["../../../src/next-ssr/getUserFromInstantCookie.ts"],"names":[],"mappings":";;;AACA,gDAA0C;AAEnC,MAAM,wBAAwB,GAAG,KAAK,EAC3C,KAAa,EACS,EAAE;IACxB,MAAM,WAAW,GAAG,MAAM,IAAA,oBAAO,GAAE,CAAC;IACpC,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,eAAe,GAAG,KAAK,CAAC,CAAC;IAC1D,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9E,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAPW,QAAA,wBAAwB,4BAOnC","sourcesContent":["import { User } from '@instantdb/core';\nimport { cookies } from 'next/headers.js';\n\nexport const getUserFromInstantCookie = async (\n appId: string,\n): Promise<User | null> => {\n const cookieStore = await cookies();\n const userJSON = cookieStore.get('instant_user_' + appId);\n const user = userJSON ? JSON.parse(decodeURIComponent(userJSON.value)) : null;\n return user;\n};\n"]}
1
+ {"version":3,"file":"getUserFromInstantCookie.js","sourceRoot":"","sources":["../../../src/next-ssr/getUserFromInstantCookie.ts"],"names":[],"mappings":";;;AACA,gDAA0C;AAEnC,MAAM,wBAAwB,GAAG,KAAK,EAC3C,KAAa,EACS,EAAE;IACxB,MAAM,WAAW,GAAG,MAAM,IAAA,oBAAO,GAAE,CAAC;IACpC,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,eAAe,GAAG,KAAK,CAAC,CAAC;IAC1D,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1D,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAPW,QAAA,wBAAwB,4BAOnC","sourcesContent":["import { User } from '@instantdb/core';\nimport { cookies } from 'next/headers.js';\n\nexport const getUserFromInstantCookie = async (\n appId: string,\n): Promise<User | null> => {\n const cookieStore = await cookies();\n const userJSON = cookieStore.get('instant_user_' + appId);\n const user = userJSON ? JSON.parse(userJSON.value) : null;\n return user;\n};\n"]}
@@ -2,7 +2,7 @@ import { cookies } from 'next/headers.js';
2
2
  export const getUserFromInstantCookie = async (appId) => {
3
3
  const cookieStore = await cookies();
4
4
  const userJSON = cookieStore.get('instant_user_' + appId);
5
- const user = userJSON ? JSON.parse(decodeURIComponent(userJSON.value)) : null;
5
+ const user = userJSON ? JSON.parse(userJSON.value) : null;
6
6
  return user;
7
7
  };
8
8
  //# sourceMappingURL=getUserFromInstantCookie.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getUserFromInstantCookie.js","sourceRoot":"","sources":["../../../src/next-ssr/getUserFromInstantCookie.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,EAC3C,KAAa,EACS,EAAE;IACxB,MAAM,WAAW,GAAG,MAAM,OAAO,EAAE,CAAC;IACpC,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,eAAe,GAAG,KAAK,CAAC,CAAC;IAC1D,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9E,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["import { User } from '@instantdb/core';\nimport { cookies } from 'next/headers.js';\n\nexport const getUserFromInstantCookie = async (\n appId: string,\n): Promise<User | null> => {\n const cookieStore = await cookies();\n const userJSON = cookieStore.get('instant_user_' + appId);\n const user = userJSON ? JSON.parse(decodeURIComponent(userJSON.value)) : null;\n return user;\n};\n"]}
1
+ {"version":3,"file":"getUserFromInstantCookie.js","sourceRoot":"","sources":["../../../src/next-ssr/getUserFromInstantCookie.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,EAC3C,KAAa,EACS,EAAE;IACxB,MAAM,WAAW,GAAG,MAAM,OAAO,EAAE,CAAC;IACpC,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,eAAe,GAAG,KAAK,CAAC,CAAC;IAC1D,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1D,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["import { User } from '@instantdb/core';\nimport { cookies } from 'next/headers.js';\n\nexport const getUserFromInstantCookie = async (\n appId: string,\n): Promise<User | null> => {\n const cookieStore = await cookies();\n const userJSON = cookieStore.get('instant_user_' + appId);\n const user = userJSON ? JSON.parse(userJSON.value) : null;\n return user;\n};\n"]}