@better-auth/expo 0.7.0-beta.1 → 0.7.0

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 (41) hide show
  1. package/.turbo/turbo-build.log +14 -14
  2. package/LICENSE.md +17 -0
  3. package/dist/client.js +1 -1
  4. package/dist/client.mjs +1 -1
  5. package/dist/index.d.mts +3 -0
  6. package/dist/index.d.ts +3 -0
  7. package/dist/index.js +1 -1
  8. package/dist/index.mjs +1 -1
  9. package/package.json +3 -6
  10. package/src/client.ts +1 -1
  11. package/src/index.ts +15 -0
  12. package/examples/tanstack-example/node_modules/better-sqlite3/LICENSE +0 -21
  13. package/examples/tanstack-example/node_modules/better-sqlite3/README.md +0 -92
  14. package/examples/tanstack-example/node_modules/better-sqlite3/binding.gyp +0 -38
  15. package/examples/tanstack-example/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  16. package/examples/tanstack-example/node_modules/better-sqlite3/deps/common.gypi +0 -68
  17. package/examples/tanstack-example/node_modules/better-sqlite3/deps/copy.js +0 -31
  18. package/examples/tanstack-example/node_modules/better-sqlite3/deps/defines.gypi +0 -41
  19. package/examples/tanstack-example/node_modules/better-sqlite3/deps/download.sh +0 -122
  20. package/examples/tanstack-example/node_modules/better-sqlite3/deps/patches/1208.patch +0 -15
  21. package/examples/tanstack-example/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c +0 -260455
  22. package/examples/tanstack-example/node_modules/better-sqlite3/deps/sqlite3/sqlite3.h +0 -13574
  23. package/examples/tanstack-example/node_modules/better-sqlite3/deps/sqlite3/sqlite3ext.h +0 -719
  24. package/examples/tanstack-example/node_modules/better-sqlite3/deps/sqlite3.gyp +0 -80
  25. package/examples/tanstack-example/node_modules/better-sqlite3/deps/test_extension.c +0 -21
  26. package/examples/tanstack-example/node_modules/better-sqlite3/lib/database.js +0 -90
  27. package/examples/tanstack-example/node_modules/better-sqlite3/lib/index.js +0 -3
  28. package/examples/tanstack-example/node_modules/better-sqlite3/lib/methods/aggregate.js +0 -43
  29. package/examples/tanstack-example/node_modules/better-sqlite3/lib/methods/backup.js +0 -67
  30. package/examples/tanstack-example/node_modules/better-sqlite3/lib/methods/function.js +0 -31
  31. package/examples/tanstack-example/node_modules/better-sqlite3/lib/methods/inspect.js +0 -7
  32. package/examples/tanstack-example/node_modules/better-sqlite3/lib/methods/pragma.js +0 -12
  33. package/examples/tanstack-example/node_modules/better-sqlite3/lib/methods/serialize.js +0 -16
  34. package/examples/tanstack-example/node_modules/better-sqlite3/lib/methods/table.js +0 -189
  35. package/examples/tanstack-example/node_modules/better-sqlite3/lib/methods/transaction.js +0 -75
  36. package/examples/tanstack-example/node_modules/better-sqlite3/lib/methods/wrappers.js +0 -54
  37. package/examples/tanstack-example/node_modules/better-sqlite3/lib/sqlite-error.js +0 -20
  38. package/examples/tanstack-example/node_modules/better-sqlite3/lib/util.js +0 -12
  39. package/examples/tanstack-example/node_modules/better-sqlite3/package.json +0 -54
  40. package/examples/tanstack-example/node_modules/better-sqlite3/src/better_sqlite3.cpp +0 -2165
  41. package/examples/tanstack-example/node_modules/better-sqlite3/src/better_sqlite3.hpp +0 -1036
@@ -1,25 +1,25 @@
1
1
 
2
2
  
3
- > @better-auth/expo@0.6.3-beta.5 build /Users/beka/Desktop/Development/better-auth-1/packages/expo
3
+ > @better-auth/expo@0.7.0-beta.1 build /Users/beka/Desktop/Development/better-auth-1/packages/expo
4
4
  > tsup --dts --minify --clean
5
5
 
6
6
  CLI Building entry: {"index":"src/index.ts","client":"src/client.ts"}
7
7
  CLI Using tsconfig: tsconfig.json
8
- CLI tsup v8.3.0
8
+ CLI tsup v8.3.5
9
9
  CLI Using tsup config: /Users/beka/Desktop/Development/better-auth-1/packages/expo/tsup.config.ts
10
10
  CLI Target: es2022
11
11
  CLI Cleaning output folder
12
12
  ESM Build start
13
13
  CJS Build start
14
- CJS dist/index.js 1.06 KB
15
- CJS dist/client.js 2.86 KB
16
- CJS ⚡️ Build success in 38ms
17
- ESM dist/index.mjs 603.00 B
18
- ESM dist/client.mjs 2.23 KB
19
- ESM ⚡️ Build success in 42ms
20
- DTS Build start
21
- DTS ⚡️ Build success in 4229ms
22
- DTS dist/index.d.mts 558.00 B
23
- DTS dist/client.d.mts 7.18 KB
24
- DTS dist/index.d.ts 558.00 B
25
- DTS dist/client.d.ts 7.18 KB
14
+ CJS dist/index.js 1.19 KB
15
+ CJS dist/client.js 2.87 KB
16
+ CJS ⚡️ Build success in 17ms
17
+ ESM dist/index.mjs 736.00 B
18
+ ESM dist/client.mjs 2.24 KB
19
+ ESM ⚡️ Build success in 17ms
20
+ DTS Build start
21
+ DTS ⚡️ Build success in 3133ms
22
+ DTS dist/index.d.mts 677.00 B
23
+ DTS dist/client.d.mts 7.18 KB
24
+ DTS dist/index.d.ts 677.00 B
25
+ DTS dist/client.d.ts 7.18 KB
package/LICENSE.md ADDED
@@ -0,0 +1,17 @@
1
+ The MIT License (MIT)
2
+ Copyright (c) 2024 - present, Bereket Engida
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5
+ and associated documentation files (the "Software"), to deal in the Software without restriction,
6
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
7
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
8
+ is furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all copies or
11
+ substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
14
+ BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
16
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/dist/client.js CHANGED
@@ -1 +1 @@
1
- "use strict";var L=Object.create;var m=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var I=(e,t)=>{for(var r in t)m(e,r,{get:t[r],enumerable:!0})},h=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of x(t))!U.call(e,n)&&n!==r&&m(e,n,{get:()=>t[n],enumerable:!(i=R(t,n))||i.enumerable});return e};var d=(e,t,r)=>(r=e!=null?L(O(e)):{},h(t||!e||!e.__esModule?m(r,"default",{value:e,enumerable:!0}):r,e)),A=e=>h(m({},"__esModule",{value:!0}),e);var $={};I($,{expoClient:()=>D});module.exports=A($);var C=d(require("expo-web-browser")),k=d(require("expo-linking")),f=require("react-native"),P=d(require("expo-secure-store")),y=d(require("expo-constants"));function N(e){let t=new Map;return e.split(", ").forEach(i=>{let[n,...a]=i.split("; "),[l,o]=n.split("="),s={value:o};a.forEach(c=>{let[u,g]=c.split("=");s[u.toLowerCase()]=g}),t.set(l,s)}),t}function p(e){let t=N(e),r={};return t.forEach((i,n)=>{let a=i.expires,l=i["max-age"],o=a?new Date(String(a)):l?new Date(Date.now()+Number(l)):null;r[n]={value:i.value,expires:o}}),JSON.stringify(r)}function v(e){let t={};try{t=JSON.parse(e)}catch{}return Object.entries(t).reduce((i,[n,a])=>a.expires&&a.expires<new Date?i:`${i}; ${n}=${a.value}`,"")}function E(e){return k.createURL("",{scheme:e})}var D=e=>{let t=null,r=`${e.storagePrefix||"better-auth"}_cookie`,i=`${e.storagePrefix||"better-auth"}_session_data`,n=e.storage||P,a=e.scheme||y.default.platform?.scheme,l=f.Platform.OS==="web";if(!a&&!l)throw new Error("Scheme not found in app.json. Please provide a scheme in the options.");return{id:"expo",getActions(o,s){if(f.Platform.OS==="web")return{};t=s;let c=n.getItem(r);return c&&s.atoms.session.set({data:JSON.parse(c),error:null,isPending:!1}),{}},fetchPlugins:[{id:"expo",name:"Expo",hooks:{async onSuccess(o){if(l)return;let s=o.response.headers.get("set-cookie");if(s){let c=p(s||"");await n.setItem(r,c),t?.notify("$sessionSignal")}if(o.request.url.toString().includes("/get-session")&&!e.disableCache){let c=o.data;n.setItem(i,JSON.stringify(c))}if(o.data.redirect&&o.request.url.toString().includes("/sign-in")){let u=JSON.parse(o.request.body)?.callbackURL,g=o.data?.url,S=await C.openAuthSessionAsync(g,u);if(S.type!=="success")return;let w=new URL(S.url),b=String(w.searchParams.get("cookie"));if(!b)return;n.setItem(r,p(b)),t?.notify("$sessionSignal")}}},async init(o,s){if(l)return{url:o,options:s};s=s||{};let c=n.getItem(r),u=v(c||"{}");if(s.credentials="omit",s.headers={...s.headers,cookie:u,origin:E(a)},s.body?.callbackURL&&s.body.callbackURL.startsWith("/")){let g=k.createURL(s.body.callbackURL,{scheme:a});s.body.callbackURL=g}return o.includes("/sign-out")&&(await n.setItem(r,"{}"),t?.atoms.session?.set({data:null,error:null,isPending:!1}),n.setItem(i,"{}")),{url:o,options:s}}}]}};0&&(module.exports={expoClient});
1
+ "use strict";var x=Object.create;var m=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var I=(e,t)=>{for(var r in t)m(e,r,{get:t[r],enumerable:!0})},b=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of R(t))!U.call(e,o)&&o!==r&&m(e,o,{get:()=>t[o],enumerable:!(i=L(t,o))||i.enumerable});return e};var d=(e,t,r)=>(r=e!=null?x(O(e)):{},b(t||!e||!e.__esModule?m(r,"default",{value:e,enumerable:!0}):r,e)),A=e=>b(m({},"__esModule",{value:!0}),e);var $={};I($,{expoClient:()=>D});module.exports=A($);var C=d(require("expo-web-browser")),k=d(require("expo-linking")),f=require("react-native"),P=d(require("expo-secure-store")),y=d(require("expo-constants"));function N(e){let t=new Map;return e.split(", ").forEach(i=>{let[o,...a]=i.split("; "),[l,n]=o.split("="),s={value:n};a.forEach(c=>{let[u,g]=c.split("=");s[u.toLowerCase()]=g}),t.set(l,s)}),t}function h(e){let t=N(e),r={};return t.forEach((i,o)=>{let a=i.expires,l=i["max-age"],n=a?new Date(String(a)):l?new Date(Date.now()+Number(l)):null;r[o]={value:i.value,expires:n}}),JSON.stringify(r)}function v(e){let t={};try{t=JSON.parse(e)}catch{}return Object.entries(t).reduce((i,[o,a])=>a.expires&&a.expires<new Date?i:`${i}; ${o}=${a.value}`,"")}function E(e){return k.createURL("",{scheme:e})}var D=e=>{let t=null,r=`${e.storagePrefix||"better-auth"}_cookie`,i=`${e.storagePrefix||"better-auth"}_session_data`,o=e.storage||P,a=e.scheme||y.default.platform?.scheme,l=f.Platform.OS==="web";if(!a&&!l)throw new Error("Scheme not found in app.json. Please provide a scheme in the options.");return{id:"expo",getActions(n,s){if(f.Platform.OS==="web")return{};t=s;let c=o.getItem(r);return c&&s.atoms.session.set({data:JSON.parse(c),error:null,isPending:!1}),{}},fetchPlugins:[{id:"expo",name:"Expo",hooks:{async onSuccess(n){if(l)return;let s=n.response.headers.get("set-cookie");if(s){let c=h(s||"");await o.setItem(r,c),t?.notify("$sessionSignal")}if(n.request.url.toString().includes("/get-session")&&!e.disableCache){let c=n.data;o.setItem(i,JSON.stringify(c))}if(n.data.redirect&&n.request.url.toString().includes("/sign-in")){let u=JSON.parse(n.request.body)?.callbackURL,g=n.data?.url,p=await C.openAuthSessionAsync(g,u);if(p.type!=="success")return;let w=new URL(p.url),S=String(w.searchParams.get("cookie"));if(!S)return;o.setItem(r,h(S)),t?.notify("$sessionSignal")}}},async init(n,s){if(l)return{url:n,options:s};s=s||{};let c=o.getItem(r),u=v(c||"{}");if(s.credentials="omit",s.headers={...s.headers,cookie:u,"expo-origin":E(a)},s.body?.callbackURL&&s.body.callbackURL.startsWith("/")){let g=k.createURL(s.body.callbackURL,{scheme:a});s.body.callbackURL=g}return n.includes("/sign-out")&&(await o.setItem(r,"{}"),t?.atoms.session?.set({data:null,error:null,isPending:!1}),o.setItem(i,"{}")),{url:n,options:s}}}]}};0&&(module.exports={expoClient});
package/dist/client.mjs CHANGED
@@ -1 +1 @@
1
- import*as b from"expo-web-browser";import*as m from"expo-linking";import{Platform as k}from"react-native";import*as p from"expo-secure-store";import C from"expo-constants";function y(s){let r=new Map;return s.split(", ").forEach(o=>{let[n,...i]=o.split("; "),[l,t]=n.split("="),e={value:t};i.forEach(a=>{let[u,g]=a.split("=");e[u.toLowerCase()]=g}),r.set(l,e)}),r}function S(s){let r=y(s),c={};return r.forEach((o,n)=>{let i=o.expires,l=o["max-age"],t=i?new Date(String(i)):l?new Date(Date.now()+Number(l)):null;c[n]={value:o.value,expires:t}}),JSON.stringify(c)}function w(s){let r={};try{r=JSON.parse(s)}catch{}return Object.entries(r).reduce((o,[n,i])=>i.expires&&i.expires<new Date?o:`${o}; ${n}=${i.value}`,"")}function L(s){return m.createURL("",{scheme:s})}var O=s=>{let r=null,c=`${s.storagePrefix||"better-auth"}_cookie`,o=`${s.storagePrefix||"better-auth"}_session_data`,n=s.storage||p,i=s.scheme||C.platform?.scheme,l=k.OS==="web";if(!i&&!l)throw new Error("Scheme not found in app.json. Please provide a scheme in the options.");return{id:"expo",getActions(t,e){if(k.OS==="web")return{};r=e;let a=n.getItem(c);return a&&e.atoms.session.set({data:JSON.parse(a),error:null,isPending:!1}),{}},fetchPlugins:[{id:"expo",name:"Expo",hooks:{async onSuccess(t){if(l)return;let e=t.response.headers.get("set-cookie");if(e){let a=S(e||"");await n.setItem(c,a),r?.notify("$sessionSignal")}if(t.request.url.toString().includes("/get-session")&&!s.disableCache){let a=t.data;n.setItem(o,JSON.stringify(a))}if(t.data.redirect&&t.request.url.toString().includes("/sign-in")){let u=JSON.parse(t.request.body)?.callbackURL,g=t.data?.url,d=await b.openAuthSessionAsync(g,u);if(d.type!=="success")return;let h=new URL(d.url),f=String(h.searchParams.get("cookie"));if(!f)return;n.setItem(c,S(f)),r?.notify("$sessionSignal")}}},async init(t,e){if(l)return{url:t,options:e};e=e||{};let a=n.getItem(c),u=w(a||"{}");if(e.credentials="omit",e.headers={...e.headers,cookie:u,origin:L(i)},e.body?.callbackURL&&e.body.callbackURL.startsWith("/")){let g=m.createURL(e.body.callbackURL,{scheme:i});e.body.callbackURL=g}return t.includes("/sign-out")&&(await n.setItem(c,"{}"),r?.atoms.session?.set({data:null,error:null,isPending:!1}),n.setItem(o,"{}")),{url:t,options:e}}}]}};export{O as expoClient};
1
+ import*as S from"expo-web-browser";import*as m from"expo-linking";import{Platform as k}from"react-native";import*as h from"expo-secure-store";import C from"expo-constants";function y(s){let r=new Map;return s.split(", ").forEach(n=>{let[o,...i]=n.split("; "),[l,t]=o.split("="),e={value:t};i.forEach(a=>{let[u,g]=a.split("=");e[u.toLowerCase()]=g}),r.set(l,e)}),r}function p(s){let r=y(s),c={};return r.forEach((n,o)=>{let i=n.expires,l=n["max-age"],t=i?new Date(String(i)):l?new Date(Date.now()+Number(l)):null;c[o]={value:n.value,expires:t}}),JSON.stringify(c)}function w(s){let r={};try{r=JSON.parse(s)}catch{}return Object.entries(r).reduce((n,[o,i])=>i.expires&&i.expires<new Date?n:`${n}; ${o}=${i.value}`,"")}function x(s){return m.createURL("",{scheme:s})}var O=s=>{let r=null,c=`${s.storagePrefix||"better-auth"}_cookie`,n=`${s.storagePrefix||"better-auth"}_session_data`,o=s.storage||h,i=s.scheme||C.platform?.scheme,l=k.OS==="web";if(!i&&!l)throw new Error("Scheme not found in app.json. Please provide a scheme in the options.");return{id:"expo",getActions(t,e){if(k.OS==="web")return{};r=e;let a=o.getItem(c);return a&&e.atoms.session.set({data:JSON.parse(a),error:null,isPending:!1}),{}},fetchPlugins:[{id:"expo",name:"Expo",hooks:{async onSuccess(t){if(l)return;let e=t.response.headers.get("set-cookie");if(e){let a=p(e||"");await o.setItem(c,a),r?.notify("$sessionSignal")}if(t.request.url.toString().includes("/get-session")&&!s.disableCache){let a=t.data;o.setItem(n,JSON.stringify(a))}if(t.data.redirect&&t.request.url.toString().includes("/sign-in")){let u=JSON.parse(t.request.body)?.callbackURL,g=t.data?.url,d=await S.openAuthSessionAsync(g,u);if(d.type!=="success")return;let b=new URL(d.url),f=String(b.searchParams.get("cookie"));if(!f)return;o.setItem(c,p(f)),r?.notify("$sessionSignal")}}},async init(t,e){if(l)return{url:t,options:e};e=e||{};let a=o.getItem(c),u=w(a||"{}");if(e.credentials="omit",e.headers={...e.headers,cookie:u,"expo-origin":x(i)},e.body?.callbackURL&&e.body.callbackURL.startsWith("/")){let g=m.createURL(e.body.callbackURL,{scheme:i});e.body.callbackURL=g}return t.includes("/sign-out")&&(await o.setItem(c,"{}"),r?.atoms.session?.set({data:null,error:null,isPending:!1}),o.setItem(n,"{}")),{url:t,options:e}}}]}};export{O as expoClient};
package/dist/index.d.mts CHANGED
@@ -7,6 +7,9 @@ declare const expo: () => {
7
7
  trustedOrigins: string[] | undefined;
8
8
  };
9
9
  };
10
+ onRequest(request: Request, ctx: better_auth.AuthContext): Promise<{
11
+ request: Request;
12
+ } | undefined>;
10
13
  hooks: {
11
14
  after: {
12
15
  matcher(context: better_auth.HookEndpointContext<{}>): boolean;
package/dist/index.d.ts CHANGED
@@ -7,6 +7,9 @@ declare const expo: () => {
7
7
  trustedOrigins: string[] | undefined;
8
8
  };
9
9
  };
10
+ onRequest(request: Request, ctx: better_auth.AuthContext): Promise<{
11
+ request: Request;
12
+ } | undefined>;
10
13
  hooks: {
11
14
  after: {
12
15
  matcher(context: better_auth.HookEndpointContext<{}>): boolean;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var o=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var p=(e,t)=>{for(var s in t)o(e,s,{get:t[s],enumerable:!0})},g=(e,t,s,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of d(t))!h.call(e,r)&&r!==s&&o(e,r,{get:()=>t[r],enumerable:!(i=c(t,r))||i.enumerable});return e};var l=e=>g(o({},"__esModule",{value:!0}),e);var f={};p(f,{expo:()=>O});module.exports=l(f);var O=()=>({id:"expo",init:e=>({options:{trustedOrigins:process.env.NODE_ENV==="development"?[...e.options.trustedOrigins||[],"exp://"]:e.options.trustedOrigins}}),hooks:{after:[{matcher(e){return e.path?.startsWith("/callback")},handler:async e=>{let t=e.context.returned;if(t.status===302){let s=t.headers.get("location");if(!s||!e.context.trustedOrigins.filter(n=>!n.startsWith("http")).some(n=>s?.startsWith(n)))return;let u=t.headers.get("set-cookie");if(!u)return;let a=new URL(s);return a.searchParams.set("cookie",u),t.headers.set("location",a.toString()),{response:t}}}}]}});0&&(module.exports={expo});
1
+ "use strict";var o=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var h=(t,e)=>{for(var r in e)o(t,r,{get:e[r],enumerable:!0})},p=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of g(e))!d.call(t,s)&&s!==r&&o(t,s,{get:()=>e[s],enumerable:!(i=c(e,s))||i.enumerable});return t};var l=t=>p(o({},"__esModule",{value:!0}),t);var f={};h(f,{expo:()=>O});module.exports=l(f);var O=()=>({id:"expo",init:t=>({options:{trustedOrigins:process.env.NODE_ENV==="development"?[...t.options.trustedOrigins||[],"exp://"]:t.options.trustedOrigins}}),async onRequest(t,e){let r=t.headers.get("expo-origin");if(r)return t.headers.set("origin",r),{request:t}},hooks:{after:[{matcher(t){return t.path?.startsWith("/callback")},handler:async t=>{let e=t.context.returned;if(e.status===302){let r=e.headers.get("location");if(!r||!t.context.trustedOrigins.filter(n=>!n.startsWith("http")).some(n=>r?.startsWith(n)))return;let a=e.headers.get("set-cookie");if(!a)return;console.log({location:r});let u=new URL(r);return u.searchParams.set("cookie",a),e.headers.set("location",u.toString()),{response:e}}}}]}});0&&(module.exports={expo});
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- var a=()=>({id:"expo",init:t=>({options:{trustedOrigins:process.env.NODE_ENV==="development"?[...t.options.trustedOrigins||[],"exp://"]:t.options.trustedOrigins}}),hooks:{after:[{matcher(t){return t.path?.startsWith("/callback")},handler:async t=>{let e=t.context.returned;if(e.status===302){let s=e.headers.get("location");if(!s||!t.context.trustedOrigins.filter(r=>!r.startsWith("http")).some(r=>s?.startsWith(r)))return;let i=e.headers.get("set-cookie");if(!i)return;let n=new URL(s);return n.searchParams.set("cookie",i),e.headers.set("location",n.toString()),{response:e}}}}]}});export{a as expo};
1
+ var u=()=>({id:"expo",init:t=>({options:{trustedOrigins:process.env.NODE_ENV==="development"?[...t.options.trustedOrigins||[],"exp://"]:t.options.trustedOrigins}}),async onRequest(t,e){let r=t.headers.get("expo-origin");if(r)return t.headers.set("origin",r),{request:t}},hooks:{after:[{matcher(t){return t.path?.startsWith("/callback")},handler:async t=>{let e=t.context.returned;if(e.status===302){let r=e.headers.get("location");if(!r||!t.context.trustedOrigins.filter(s=>!s.startsWith("http")).some(s=>r?.startsWith(s)))return;let i=e.headers.get("set-cookie");if(!i)return;console.log({location:r});let n=new URL(r);return n.searchParams.set("cookie",i),e.headers.set("location",n.toString()),{response:e}}}}]}});export{u as expo};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/expo",
3
- "version": "0.7.0-beta.1",
3
+ "version": "0.7.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -27,13 +27,10 @@
27
27
  "expo-secure-store": "~13.0.2",
28
28
  "expo-web-browser": "~13.0.3",
29
29
  "vitest": "^1.6.0",
30
- "better-auth": "0.7.0-beta.1"
31
- },
32
- "dependencies": {
33
- "nanostores": "^0.11.2"
30
+ "better-auth": "0.7.0"
34
31
  },
35
32
  "peerDependencies": {
36
- "better-auth": "0.7.0-beta.1"
33
+ "better-auth": "0.7.0"
37
34
  },
38
35
  "scripts": {
39
36
  "test": "vitest",
package/src/client.ts CHANGED
@@ -168,7 +168,7 @@ export const expoClient = (opts: ExpoClientOptions) => {
168
168
  options.headers = {
169
169
  ...options.headers,
170
170
  cookie,
171
- origin: getOrigin(scheme!),
171
+ "expo-origin": getOrigin(scheme!),
172
172
  };
173
173
  if (options.body?.callbackURL) {
174
174
  if (options.body.callbackURL.startsWith("/")) {
package/src/index.ts CHANGED
@@ -14,6 +14,19 @@ export const expo = () => {
14
14
  },
15
15
  };
16
16
  },
17
+ async onRequest(request, ctx) {
18
+ /**
19
+ * To bypass origin check from expo, we need to set the origin header to the expo-origin header
20
+ */
21
+ const expoOrigin = request.headers.get("expo-origin");
22
+ if (!expoOrigin) {
23
+ return;
24
+ }
25
+ request.headers.set("origin", expoOrigin);
26
+ return {
27
+ request,
28
+ };
29
+ },
17
30
  hooks: {
18
31
  after: [
19
32
  {
@@ -37,9 +50,11 @@ export const expo = () => {
37
50
  return;
38
51
  }
39
52
  const cookie = response.headers.get("set-cookie");
53
+
40
54
  if (!cookie) {
41
55
  return;
42
56
  }
57
+ console.log({ location });
43
58
  const url = new URL(location);
44
59
  url.searchParams.set("cookie", cookie);
45
60
  response.headers.set("location", url.toString());
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2017 Joshua Wise
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,92 +0,0 @@
1
- # better-sqlite3 [![Build Status](https://github.com/JoshuaWise/better-sqlite3/actions/workflows/build.yml/badge.svg)](https://github.com/JoshuaWise/better-sqlite3/actions/workflows/build.yml?query=branch%3Amaster)
2
-
3
- The fastest and simplest library for SQLite3 in Node.js.
4
-
5
- - Full transaction support
6
- - High performance, efficiency, and safety
7
- - Easy-to-use synchronous API *(better concurrency than an asynchronous API... yes, you read that correctly)*
8
- - Support for user-defined functions, aggregates, virtual tables, and extensions
9
- - 64-bit integers *(invisible until you need them)*
10
- - Worker thread support *(for large/slow queries)*
11
-
12
- ## Help this project stay strong! &#128170;
13
-
14
- `better-sqlite3` is used by thousands of developers and engineers on a daily basis. Long nights and weekends were spent keeping this project strong and dependable, with no ask for compensation or funding, until now. If your company uses `better-sqlite3`, ask your manager to consider supporting the project:
15
-
16
- - [Become a GitHub sponsor](https://github.com/sponsors/JoshuaWise)
17
- - [Become a backer on Patreon](https://www.patreon.com/joshuawise)
18
- - [Make a one-time donation on PayPal](https://www.paypal.me/joshuathomaswise)
19
-
20
- ## How other libraries compare
21
-
22
- | |select 1 row &nbsp;`get()`&nbsp;|select 100 rows &nbsp;&nbsp;`all()`&nbsp;&nbsp;|select 100 rows `iterate()` 1-by-1|insert 1 row `run()`|insert 100 rows in a transaction|
23
- |---|---|---|---|---|---|
24
- |better-sqlite3|1x|1x|1x|1x|1x|
25
- |[sqlite](https://www.npmjs.com/package/sqlite) and [sqlite3](https://www.npmjs.com/package/sqlite3)|11.7x slower|2.9x slower|24.4x slower|2.8x slower|15.6x slower|
26
-
27
- > You can verify these results by [running the benchmark yourself](./docs/benchmark.md).
28
-
29
- ## Installation
30
-
31
- ```bash
32
- npm install better-sqlite3
33
- ```
34
-
35
- > You must be using Node.js v14.21.1 or above. Prebuilt binaries are available for [LTS versions](https://nodejs.org/en/about/releases/). If you have trouble installing, check the [troubleshooting guide](./docs/troubleshooting.md).
36
-
37
- ## Usage
38
-
39
- ```js
40
- const db = require('better-sqlite3')('foobar.db', options);
41
-
42
- const row = db.prepare('SELECT * FROM users WHERE id = ?').get(userId);
43
- console.log(row.firstName, row.lastName, row.email);
44
- ```
45
-
46
- Though not required, [it is generally important to set the WAL pragma for performance reasons](https://github.com/WiseLibs/better-sqlite3/blob/master/docs/performance.md).
47
-
48
- ```js
49
- db.pragma('journal_mode = WAL');
50
- ```
51
-
52
- ##### In ES6 module notation:
53
-
54
- ```js
55
- import Database from 'better-sqlite3';
56
- const db = new Database('foobar.db', options);
57
- db.pragma('journal_mode = WAL');
58
- ```
59
-
60
- ## Why should I use this instead of [node-sqlite3](https://github.com/mapbox/node-sqlite3)?
61
-
62
- - `node-sqlite3` uses asynchronous APIs for tasks that are either CPU-bound or serialized. That's not only bad design, but it wastes tons of resources. It also causes [mutex thrashing](https://en.wikipedia.org/wiki/Resource_contention) which has devastating effects on performance.
63
- - `node-sqlite3` exposes low-level (C language) memory management functions. `better-sqlite3` does it the JavaScript way, allowing the garbage collector to worry about memory management.
64
- - `better-sqlite3` is simpler to use, and it provides nice utilities for some operations that are very difficult or impossible in `node-sqlite3`.
65
- - `better-sqlite3` is much faster than `node-sqlite3` in most cases, and just as fast in all other cases.
66
-
67
- #### When is this library not appropriate?
68
-
69
- In most cases, if you're attempting something that cannot be reasonably accomplished with `better-sqlite3`, it probably cannot be reasonably accomplished with SQLite3 in general. For example, if you're executing queries that take one second to complete, and you expect to have many concurrent users executing those queries, no amount of asynchronicity will save you from SQLite3's serialized nature. Fortunately, SQLite3 is very *very* fast. With proper indexing, we've been able to achieve upward of 2000 queries per second with 5-way-joins in a 60 GB database, where each query was handling 5–50 kilobytes of real data.
70
-
71
- If you have a performance problem, the most likely causes are inefficient queries, improper indexing, or a lack of [WAL mode](./docs/performance.md)—not `better-sqlite3` itself. However, there are some cases where `better-sqlite3` could be inappropriate:
72
-
73
- - If you expect a high volume of concurrent reads each returning many megabytes of data (i.e., videos)
74
- - If you expect a high volume of concurrent writes (i.e., a social media site)
75
- - If your database's size is near the terabyte range
76
-
77
- For these situations, you should probably use a full-fledged RDBMS such as [PostgreSQL](https://www.postgresql.org/).
78
-
79
- # Documentation
80
-
81
- - [API documentation](./docs/api.md)
82
- - [Performance](./docs/performance.md) (also see [benchmark results](./docs/benchmark.md))
83
- - [64-bit integer support](./docs/integer.md)
84
- - [Worker thread support](./docs/threads.md)
85
- - [Unsafe mode (advanced)](./docs/unsafe.md)
86
- - [SQLite3 compilation (advanced)](./docs/compilation.md)
87
- - [Contribution rules](./docs/contribution.md)
88
- - [Code of conduct](./docs/conduct.md)
89
-
90
- # License
91
-
92
- [MIT](./LICENSE)
@@ -1,38 +0,0 @@
1
- # ===
2
- # This is the main GYP file, which builds better-sqlite3 with SQLite3 itself.
3
- # ===
4
-
5
- {
6
- 'includes': ['deps/common.gypi'],
7
- 'targets': [
8
- {
9
- 'target_name': 'better_sqlite3',
10
- 'dependencies': ['deps/sqlite3.gyp:sqlite3'],
11
- 'sources': ['src/better_sqlite3.cpp'],
12
- 'cflags_cc': ['-std=c++20'],
13
- 'xcode_settings': {
14
- 'OTHER_CPLUSPLUSFLAGS': ['-std=c++20', '-stdlib=libc++'],
15
- },
16
- 'msvs_settings': {
17
- 'VCCLCompilerTool': {
18
- 'AdditionalOptions': [
19
- '/std:c++20',
20
- ],
21
- },
22
- },
23
- 'conditions': [
24
- ['OS=="linux"', {
25
- 'ldflags': [
26
- '-Wl,-Bsymbolic',
27
- '-Wl,--exclude-libs,ALL',
28
- ],
29
- }],
30
- ],
31
- },
32
- {
33
- 'target_name': 'test_extension',
34
- 'dependencies': ['deps/sqlite3.gyp:sqlite3'],
35
- 'conditions': [['sqlite3 == ""', { 'sources': ['deps/test_extension.c'] }]],
36
- },
37
- ],
38
- }
@@ -1,68 +0,0 @@
1
- # ===
2
- # This configuration defines the differences between Release and Debug builds.
3
- # Some miscellaneous Windows settings are also defined here.
4
- # ===
5
-
6
- {
7
- 'variables': { 'sqlite3%': '' },
8
- 'target_defaults': {
9
- 'default_configuration': 'Release',
10
- 'msvs_settings': {
11
- 'VCCLCompilerTool': {
12
- 'ExceptionHandling': 1,
13
- },
14
- },
15
- 'conditions': [
16
- ['OS == "win"', {
17
- 'defines': ['WIN32'],
18
- }],
19
- ],
20
- 'configurations': {
21
- 'Debug': {
22
- 'defines!': [
23
- 'NDEBUG',
24
- ],
25
- 'defines': [
26
- 'DEBUG',
27
- '_DEBUG',
28
- 'SQLITE_DEBUG',
29
- 'SQLITE_MEMDEBUG',
30
- 'SQLITE_ENABLE_API_ARMOR',
31
- 'SQLITE_WIN32_MALLOC_VALIDATE',
32
- ],
33
- 'cflags': [
34
- '-O0',
35
- ],
36
- 'xcode_settings': {
37
- 'MACOSX_DEPLOYMENT_TARGET': '10.7',
38
- 'GCC_OPTIMIZATION_LEVEL': '0',
39
- 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES',
40
- },
41
- 'msvs_settings': {
42
- 'VCLinkerTool': {
43
- 'GenerateDebugInformation': 'true',
44
- },
45
- },
46
- },
47
- 'Release': {
48
- 'defines!': [
49
- 'DEBUG',
50
- '_DEBUG',
51
- ],
52
- 'defines': [
53
- 'NDEBUG',
54
- ],
55
- 'cflags': [
56
- '-O3',
57
- ],
58
- 'xcode_settings': {
59
- 'MACOSX_DEPLOYMENT_TARGET': '10.7',
60
- 'GCC_OPTIMIZATION_LEVEL': '3',
61
- 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
62
- 'DEAD_CODE_STRIPPING': 'YES',
63
- 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
64
- },
65
- },
66
- },
67
- },
68
- }
@@ -1,31 +0,0 @@
1
- 'use strict';
2
- const path = require('path');
3
- const fs = require('fs');
4
-
5
- const dest = process.argv[2];
6
- const source = path.resolve(path.sep, process.argv[3] || path.join(__dirname, 'sqlite3'));
7
- const files = [
8
- { filename: 'sqlite3.c', optional: false },
9
- { filename: 'sqlite3.h', optional: false },
10
- ];
11
-
12
- if (process.argv[3]) {
13
- // Support "_HAVE_SQLITE_CONFIG_H" in custom builds.
14
- files.push({ filename: 'config.h', optional: true });
15
- } else {
16
- // Required for some tests.
17
- files.push({ filename: 'sqlite3ext.h', optional: false });
18
- }
19
-
20
- for (const { filename, optional } of files) {
21
- const sourceFilepath = path.join(source, filename);
22
- const destFilepath = path.join(dest, filename);
23
-
24
- if (optional && !fs.existsSync(sourceFilepath)) {
25
- continue;
26
- }
27
-
28
- fs.accessSync(sourceFilepath);
29
- fs.mkdirSync(path.dirname(destFilepath), { recursive: true });
30
- fs.copyFileSync(sourceFilepath, destFilepath);
31
- }
@@ -1,41 +0,0 @@
1
- # THIS FILE IS AUTOMATICALLY GENERATED BY deps/download.sh (DO NOT EDIT)
2
-
3
- {
4
- 'defines': [
5
- 'HAVE_INT16_T=1',
6
- 'HAVE_INT32_T=1',
7
- 'HAVE_INT8_T=1',
8
- 'HAVE_STDINT_H=1',
9
- 'HAVE_UINT16_T=1',
10
- 'HAVE_UINT32_T=1',
11
- 'HAVE_UINT8_T=1',
12
- 'HAVE_USLEEP=1',
13
- 'SQLITE_DEFAULT_CACHE_SIZE=-16000',
14
- 'SQLITE_DEFAULT_FOREIGN_KEYS=1',
15
- 'SQLITE_DEFAULT_MEMSTATUS=0',
16
- 'SQLITE_DEFAULT_WAL_SYNCHRONOUS=1',
17
- 'SQLITE_DQS=0',
18
- 'SQLITE_ENABLE_COLUMN_METADATA',
19
- 'SQLITE_ENABLE_DBSTAT_VTAB',
20
- 'SQLITE_ENABLE_DESERIALIZE',
21
- 'SQLITE_ENABLE_FTS3',
22
- 'SQLITE_ENABLE_FTS3_PARENTHESIS',
23
- 'SQLITE_ENABLE_FTS4',
24
- 'SQLITE_ENABLE_FTS5',
25
- 'SQLITE_ENABLE_GEOPOLY',
26
- 'SQLITE_ENABLE_JSON1',
27
- 'SQLITE_ENABLE_MATH_FUNCTIONS',
28
- 'SQLITE_ENABLE_RTREE',
29
- 'SQLITE_ENABLE_STAT4',
30
- 'SQLITE_ENABLE_UPDATE_DELETE_LIMIT',
31
- 'SQLITE_LIKE_DOESNT_MATCH_BLOBS',
32
- 'SQLITE_OMIT_DEPRECATED',
33
- 'SQLITE_OMIT_PROGRESS_CALLBACK',
34
- 'SQLITE_OMIT_SHARED_CACHE',
35
- 'SQLITE_OMIT_TCL_VARIABLE',
36
- 'SQLITE_SOUNDEX',
37
- 'SQLITE_THREADSAFE=2',
38
- 'SQLITE_TRACE_SIZE_LIMIT=32',
39
- 'SQLITE_USE_URI=0',
40
- ],
41
- }
@@ -1,122 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- # ===
4
- # This script defines and generates the bundled SQLite3 unit (sqlite3.c).
5
- #
6
- # The following steps are taken:
7
- # 1. populate the shell environment with the defined compile-time options.
8
- # 2. download and extract the SQLite3 source code into a temporary directory.
9
- # 3. run "sh configure" and "make sqlite3.c" within the source directory.
10
- # 4. copy the generated amalgamation into the output directory (./sqlite3).
11
- # 5. export the defined compile-time options to a gyp file (./defines.gypi).
12
- # 6. update the docs (../docs/compilation.md) with details of this distribution.
13
- #
14
- # When a user builds better-sqlite3, the following steps are taken:
15
- # 1. node-gyp loads the previously exported compile-time options (defines.gypi).
16
- # 2. the copy.js script copies the bundled amalgamation into the build folder.
17
- # 3. node-gyp compiles the copied sqlite3.c along with better_sqlite3.cpp.
18
- # 4. node-gyp links the two resulting binaries to generate better_sqlite3.node.
19
- # ===
20
-
21
- YEAR="2024"
22
- VERSION="3470000"
23
-
24
- # Defines below are sorted alphabetically
25
- DEFINES="
26
- HAVE_INT16_T=1
27
- HAVE_INT32_T=1
28
- HAVE_INT8_T=1
29
- HAVE_STDINT_H=1
30
- HAVE_UINT16_T=1
31
- HAVE_UINT32_T=1
32
- HAVE_UINT8_T=1
33
- HAVE_USLEEP=1
34
- SQLITE_DEFAULT_CACHE_SIZE=-16000
35
- SQLITE_DEFAULT_FOREIGN_KEYS=1
36
- SQLITE_DEFAULT_MEMSTATUS=0
37
- SQLITE_DEFAULT_WAL_SYNCHRONOUS=1
38
- SQLITE_DQS=0
39
- SQLITE_ENABLE_COLUMN_METADATA
40
- SQLITE_ENABLE_DBSTAT_VTAB
41
- SQLITE_ENABLE_DESERIALIZE
42
- SQLITE_ENABLE_FTS3
43
- SQLITE_ENABLE_FTS3_PARENTHESIS
44
- SQLITE_ENABLE_FTS4
45
- SQLITE_ENABLE_FTS5
46
- SQLITE_ENABLE_GEOPOLY
47
- SQLITE_ENABLE_JSON1
48
- SQLITE_ENABLE_MATH_FUNCTIONS
49
- SQLITE_ENABLE_RTREE
50
- SQLITE_ENABLE_STAT4
51
- SQLITE_ENABLE_UPDATE_DELETE_LIMIT
52
- SQLITE_LIKE_DOESNT_MATCH_BLOBS
53
- SQLITE_OMIT_DEPRECATED
54
- SQLITE_OMIT_PROGRESS_CALLBACK
55
- SQLITE_OMIT_SHARED_CACHE
56
- SQLITE_OMIT_TCL_VARIABLE
57
- SQLITE_SOUNDEX
58
- SQLITE_THREADSAFE=2
59
- SQLITE_TRACE_SIZE_LIMIT=32
60
- SQLITE_USE_URI=0
61
- "
62
-
63
- # ========== START SCRIPT ========== #
64
-
65
- echo "setting up environment..."
66
- DEPS="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
67
- TEMP="$DEPS/temp"
68
- OUTPUT="$DEPS/sqlite3"
69
- rm -rf "$TEMP"
70
- rm -rf "$OUTPUT"
71
- mkdir -p "$TEMP"
72
- mkdir -p "$OUTPUT"
73
- export CFLAGS=`echo $(echo "$DEFINES" | sed -e "/^\s*$/d" -e "s/^/-D/")`
74
-
75
- echo "downloading source..."
76
- curl -#f "https://www.sqlite.org/$YEAR/sqlite-src-$VERSION.zip" > "$TEMP/source.zip" || exit 1
77
-
78
- echo "extracting source..."
79
- unzip "$TEMP/source.zip" -d "$TEMP" > /dev/null || exit 1
80
- cd "$TEMP/sqlite-src-$VERSION" || exit 1
81
-
82
- echo "configuring amalgamation..."
83
- sh configure > /dev/null || exit 1
84
-
85
- echo "building amalgamation..."
86
- make sqlite3.c > /dev/null || exit 1
87
-
88
- echo "copying amalgamation..."
89
- cp sqlite3.c sqlite3.h sqlite3ext.h "$OUTPUT/" || exit 1
90
-
91
- echo "applying patches..."
92
- cd "$DEPS" || exit 1
93
- for patch in patches/*.patch; do
94
- # If a patch fails, just skip it an move on.
95
- # By default `patch` tries to be clever and reverse the patch, so we have to specify `--forward`.
96
- # If the patch fails, we # don't write .orig and .rej files, so we have to specify `--no-backup-if-mismatch` and `--reject-file=-`.
97
- patch --batch --forward --no-backup-if-mismatch --reject-file=- -p2 < "$patch"
98
- done
99
-
100
- echo "updating gyp configs..."
101
- GYP="$DEPS/defines.gypi"
102
- printf "# THIS FILE IS AUTOMATICALLY GENERATED BY deps/download.sh (DO NOT EDIT)\n\n{\n 'defines': [\n" > "$GYP"
103
- printf "$DEFINES" | sed -e "/^\s*$/d" -e "s/\(.*\)/ '\1',/" >> "$GYP"
104
- printf " ],\n}\n" >> "$GYP"
105
-
106
- echo "updating docs..."
107
- DOCS="$DEPS/../docs/compilation.md"
108
- MAJOR=`expr "${VERSION:0:1}" + 0`
109
- MINOR=`expr "${VERSION:1:2}" + 0`
110
- PATCH=`expr "${VERSION:3:2}" + 0`
111
- sed -Ei.bak -e "s/version [0-9]+\.[0-9]+\.[0-9]+/version $MAJOR.$MINOR.$PATCH/g" "$DOCS"
112
- sed -i.bak -e "/^SQLITE_/,\$d" "$DOCS"
113
- sed -i.bak -e "/^HAVE_/,\$d" "$DOCS"
114
- rm "$DOCS".bak
115
- printf "$DEFINES" | sed -e "/^\s*$/d" >> "$DOCS"
116
- printf "\`\`\`\n" >> "$DOCS"
117
-
118
- echo "cleaning up..."
119
- cd - > /dev/null || exit 1
120
- rm -rf "$TEMP"
121
-
122
- echo "done!"
@@ -1,15 +0,0 @@
1
- diff --git a/deps/sqlite3/sqlite3.c b/deps/sqlite3/sqlite3.c
2
- index b1a807f..38bd1e6 100644
3
- --- a/deps/sqlite3/sqlite3.c
4
- +++ b/deps/sqlite3/sqlite3.c
5
- @@ -24887,8 +24887,8 @@ static const struct {
6
- /* 1 */ { 6, "minute", 7.7379e+12, 60.0 },
7
- /* 2 */ { 4, "hour", 1.2897e+11, 3600.0 },
8
- /* 3 */ { 3, "day", 5373485.0, 86400.0 },
9
- - /* 4 */ { 5, "month", 176546.0, 30.0*86400.0 },
10
- - /* 5 */ { 4, "year", 14713.0, 365.0*86400.0 },
11
- + /* 4 */ { 5, "month", 176546.0, 2592000.0 },
12
- + /* 5 */ { 4, "year", 14713.0, 31536000.0 },
13
- };
14
-
15
- /*