@flaredev/cli 0.9.1 → 0.10.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.
- package/dist/index.js +241 -37
- package/package.json +2 -2
- package/templates/app/components/dashboard/dashboard-sidebar.tsx +8 -8
- package/templates/app/lib/auth.ts +177 -154
- package/templates/app/lib/resource/store.ts +63 -8
- package/templates/locks/package-lock.json +32 -32
- package/templates/locks/pnpm-lock.yaml +105 -105
- package/templates/locks/yarn.lock +33 -33
- package/templates/next/lib/auth.ts +25 -2
|
@@ -85,15 +85,15 @@
|
|
|
85
85
|
integrity sha512-JBP1+Z7ZSNG/d4mRP+y8VC5dka3tZVMLEZRvS+rzQ4DGV1EoxRFQckcJTTkXbHSQiTj0DtNI01Zwb/V2fX0mvQ==
|
|
86
86
|
|
|
87
87
|
"@cloudflare/vite-plugin@^1.54.10":
|
|
88
|
-
version "1.62.
|
|
89
|
-
resolved "https://registry.yarnpkg.com/@cloudflare/vite-plugin/-/vite-plugin-1.62.
|
|
90
|
-
integrity sha512-
|
|
88
|
+
version "1.62.5"
|
|
89
|
+
resolved "https://registry.yarnpkg.com/@cloudflare/vite-plugin/-/vite-plugin-1.62.5.tgz#5df3631a7871693a27ec526a261135e3f397f1dd"
|
|
90
|
+
integrity sha512-qJJonL8EvKuSPfrwSMiDEPp+klxTU08pan1bgm/jc3LrYe9Hp4XUkIGAcQdgv7P9OZbe6AU+51iMUtQOt85J2w==
|
|
91
91
|
dependencies:
|
|
92
92
|
"@cloudflare/unenv-preset" "2.16.2"
|
|
93
93
|
miniflare "5.20261001.0-alpha"
|
|
94
94
|
unenv "2.0.0-rc.24"
|
|
95
95
|
workerd "1.20261001.1"
|
|
96
|
-
wrangler "4.
|
|
96
|
+
wrangler "4.147.0"
|
|
97
97
|
ws "8.21.0"
|
|
98
98
|
|
|
99
99
|
"@cloudflare/workerd-darwin-64@1.20261001.1":
|
|
@@ -947,9 +947,9 @@
|
|
|
947
947
|
integrity sha512-llBRm4dT4Z89aRsm6u2oEZ8tfwL/2l6BwpZ7JcyieouniDECM5AqNgr/y08zalEIvW3RSK4upYyybDcmjXqAow==
|
|
948
948
|
|
|
949
949
|
"@napi-rs/wasm-runtime@^1.1.4":
|
|
950
|
-
version "1.2.
|
|
951
|
-
resolved "https://registry.yarnpkg.com/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.
|
|
952
|
-
integrity sha512-
|
|
950
|
+
version "1.2.5"
|
|
951
|
+
resolved "https://registry.yarnpkg.com/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.5.tgz#8c728c07e2543d80e55ccb34158c4ae9d6bd13e8"
|
|
952
|
+
integrity sha512-HshSvXzmBxNzqejd3k/KemgQ3hdREUYFRRrgxOZ+gPljDIsO2SDZrVZMd4Z/HsxudQbE62OVyVFE8z9BCurfjA==
|
|
953
953
|
dependencies:
|
|
954
954
|
"@tybys/wasm-util" "^0.10.3"
|
|
955
955
|
|
|
@@ -2220,9 +2220,9 @@
|
|
|
2220
2220
|
integrity sha512-zH4WbVl47rNGxG8Y7XoWJAc8e0VQFQ+r8Cuh0crv1L2SuNovDD3jMtxQDjzoS1b9hYaZXbds0CjRo5tSm7F9Zw==
|
|
2221
2221
|
|
|
2222
2222
|
"@vitejs/plugin-react@^6.1.1":
|
|
2223
|
-
version "6.1.
|
|
2224
|
-
resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-6.1.
|
|
2225
|
-
integrity sha512-
|
|
2223
|
+
version "6.1.2"
|
|
2224
|
+
resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-6.1.2.tgz#924d47e890a78cdf2b72f3f41fe8ab98e089b81e"
|
|
2225
|
+
integrity sha512-fhJNGUdscQa4HkI0xFxwonWyhnVReCPDbXI7FH7jmzpnVCrFQI7PRrhWecO263610vOrs9tr2Y4xcf8uAdFxbw==
|
|
2226
2226
|
dependencies:
|
|
2227
2227
|
"@rolldown/pluginutils" "^1.0.1"
|
|
2228
2228
|
|
|
@@ -2249,9 +2249,9 @@ acorn-loose@^8.3.0:
|
|
|
2249
2249
|
acorn "^8.15.0"
|
|
2250
2250
|
|
|
2251
2251
|
acorn@^8.12.1, acorn@^8.15.0:
|
|
2252
|
-
version "8.
|
|
2253
|
-
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.
|
|
2254
|
-
integrity sha512-
|
|
2252
|
+
version "8.19.0"
|
|
2253
|
+
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.19.0.tgz#6b26fd97ce1cc9dc50bdf7ad305e9f1384d4f28a"
|
|
2254
|
+
integrity sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==
|
|
2255
2255
|
|
|
2256
2256
|
aria-hidden@^1.2.4:
|
|
2257
2257
|
version "1.2.6"
|
|
@@ -2867,9 +2867,9 @@ linebreak@^1.1.0:
|
|
|
2867
2867
|
unicode-trie "^2.0.0"
|
|
2868
2868
|
|
|
2869
2869
|
lucide-react@^1.46.0:
|
|
2870
|
-
version "1.
|
|
2871
|
-
resolved "https://registry.yarnpkg.com/lucide-react/-/lucide-react-1.
|
|
2872
|
-
integrity sha512-
|
|
2870
|
+
version "1.52.0"
|
|
2871
|
+
resolved "https://registry.yarnpkg.com/lucide-react/-/lucide-react-1.52.0.tgz#9945c4edc9550be7cc79808ec8a510c80512c727"
|
|
2872
|
+
integrity sha512-TUgPtl5ZI9WgxOcbu4ckaC5B3l1qxPQrCMgb6OfUB9owx/OvSJfcf93SMgUWAxRw5/1XDfh9uI5F5iNGXCcGDQ==
|
|
2873
2873
|
|
|
2874
2874
|
magic-string@^0.30.11, magic-string@^0.30.21:
|
|
2875
2875
|
version "0.30.21"
|
|
@@ -2879,9 +2879,9 @@ magic-string@^0.30.11, magic-string@^0.30.21:
|
|
|
2879
2879
|
"@jridgewell/sourcemap-codec" "^1.5.5"
|
|
2880
2880
|
|
|
2881
2881
|
magic-string@^1.2.3:
|
|
2882
|
-
version "1.4.
|
|
2883
|
-
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-1.4.
|
|
2884
|
-
integrity sha512-
|
|
2882
|
+
version "1.4.3"
|
|
2883
|
+
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-1.4.3.tgz#a0887990507b2ffbcdbc367a8759ed97e0b1233b"
|
|
2884
|
+
integrity sha512-z12OxmaPGE0F4xlpGdjuAUckipLpQlTAuAmyGhNoD7ODpYUzvDfvtxUbjM/jwznyP178oju/KDdyi220wNJ0RQ==
|
|
2885
2885
|
dependencies:
|
|
2886
2886
|
"@jridgewell/sourcemap-codec" "^1.6.0"
|
|
2887
2887
|
|
|
@@ -2910,10 +2910,10 @@ miniflare@5.20261001.0-alpha:
|
|
|
2910
2910
|
ws "8.21.0"
|
|
2911
2911
|
youch "4.1.0-beta.10"
|
|
2912
2912
|
|
|
2913
|
-
nanoid@^3.3.
|
|
2914
|
-
version "3.3.
|
|
2915
|
-
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.
|
|
2916
|
-
integrity sha512-
|
|
2913
|
+
nanoid@^3.3.19:
|
|
2914
|
+
version "3.3.20"
|
|
2915
|
+
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.20.tgz#dfd4444d85aa10111ef66ba85ed72e08ba0855d8"
|
|
2916
|
+
integrity sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==
|
|
2917
2917
|
|
|
2918
2918
|
nanostores@^1.3.0:
|
|
2919
2919
|
version "1.5.4"
|
|
@@ -2974,13 +2974,13 @@ postcss-value-parser@^4.0.2, postcss-value-parser@^4.2.0:
|
|
|
2974
2974
|
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
|
|
2975
2975
|
|
|
2976
2976
|
postcss@^8.5.16, postcss@^8.5.28:
|
|
2977
|
-
version "8.5.
|
|
2978
|
-
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.5.
|
|
2979
|
-
integrity sha512-
|
|
2977
|
+
version "8.5.29"
|
|
2978
|
+
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.5.29.tgz#086a0ded2c0257c71efb8c68776b477774714b4a"
|
|
2979
|
+
integrity sha512-49cGhUbXj8Qenv0iTMxA1cFBzxXoctpC9Ujd77t1WcbJIr6nF/eI7g/8MgxrYldFRuAXvja7xQRwavoW7kgrxQ==
|
|
2980
2980
|
dependencies:
|
|
2981
|
-
nanoid "^3.3.
|
|
2981
|
+
nanoid "^3.3.19"
|
|
2982
2982
|
picocolors "^1.1.1"
|
|
2983
|
-
source-map-js "^1.2.
|
|
2983
|
+
source-map-js "^1.2.2"
|
|
2984
2984
|
|
|
2985
2985
|
pvtsutils@^1.3.6:
|
|
2986
2986
|
version "1.3.6"
|
|
@@ -3239,7 +3239,7 @@ sonner@^2.0.8:
|
|
|
3239
3239
|
resolved "https://registry.yarnpkg.com/sonner/-/sonner-2.0.8.tgz#dbfa02bb4eb0924616800a4594e9a455a9a195ac"
|
|
3240
3240
|
integrity sha512-UM/ByIoFra8yzV75n1o0Puu0bw5U/9UNnDacrJNspekBewIfsQ3D6ez1nvlWpt7aTsO6rujQtifBpycwIivqlg==
|
|
3241
3241
|
|
|
3242
|
-
source-map-js@^1.2.1:
|
|
3242
|
+
source-map-js@^1.2.1, source-map-js@^1.2.2:
|
|
3243
3243
|
version "1.2.2"
|
|
3244
3244
|
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.2.tgz#79fb88d97535a21cb27162cb05d211b67acea4ab"
|
|
3245
3245
|
integrity sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==
|
|
@@ -3497,10 +3497,10 @@ workerd@1.20261001.1:
|
|
|
3497
3497
|
"@cloudflare/workerd-linux-arm64" "1.20261001.1"
|
|
3498
3498
|
"@cloudflare/workerd-windows-64" "1.20261001.1"
|
|
3499
3499
|
|
|
3500
|
-
wrangler@4.
|
|
3501
|
-
version "4.
|
|
3502
|
-
resolved "https://registry.yarnpkg.com/wrangler/-/wrangler-4.
|
|
3503
|
-
integrity sha512-
|
|
3500
|
+
wrangler@4.147.0, wrangler@^4.132.0:
|
|
3501
|
+
version "4.147.0"
|
|
3502
|
+
resolved "https://registry.yarnpkg.com/wrangler/-/wrangler-4.147.0.tgz#636f56e1d28c4cc046802d4f031e73030b1f53cd"
|
|
3503
|
+
integrity sha512-pQYRoiq8PTAxphaG69z8+GC1DkSGd19EDZehQ8zxjo/Ko3mRB6Qs1mTrd8ZuKAarLklIjTqr1lUdCK9r4q2hUg==
|
|
3504
3504
|
dependencies:
|
|
3505
3505
|
"@cloudflare/kv-asset-handler" "0.5.0"
|
|
3506
3506
|
"@cloudflare/unenv-preset" "2.16.2"
|
|
@@ -16,8 +16,31 @@ import { sendEmailCode, sendMagicLink, sendPasswordReset, sendTwoFactorCode, sen
|
|
|
16
16
|
|
|
17
17
|
const vars = process.env as Record<string, string | undefined>;
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Optional: set when serving from a custom domain (e.g. https://example.com).
|
|
21
|
+
*
|
|
22
|
+
* Better Auth compares the request's Origin header against this string, and an Origin never
|
|
23
|
+
* carries a trailing slash. So `https://example.com/` — which is what you get copying a
|
|
24
|
+
* domain out of a browser bar or the Vercel dashboard — matches nothing, and every sign-in
|
|
25
|
+
* comes back 403 with nothing in the log saying why. Correct it and say so: a warning that
|
|
26
|
+
* leaves sign-in broken is not much better than the silence it replaces.
|
|
27
|
+
*/
|
|
28
|
+
function authBaseURL(raw: string | undefined): string | undefined {
|
|
29
|
+
const value = raw?.trim();
|
|
30
|
+
if (!value) return undefined;
|
|
31
|
+
// Only a trailing slash is removed. A path stays: an app served under one legitimately
|
|
32
|
+
// sets BETTER_AUTH_URL to https://example.com/app.
|
|
33
|
+
const url = value.replace(/\/+$/, "");
|
|
34
|
+
if (url !== value) {
|
|
35
|
+
console.warn(`[auth] BETTER_AUTH_URL has a trailing slash, which never matches an Origin header and makes every sign-in 403. Using "${url}" — set BETTER_AUTH_URL to that to silence this.`);
|
|
36
|
+
}
|
|
37
|
+
if (url && !/^https?:\/\//.test(url)) {
|
|
38
|
+
console.warn(`[auth] BETTER_AUTH_URL ("${url}") has no scheme, so it cannot match an Origin. Set it to a full origin, e.g. https://example.com.`);
|
|
39
|
+
}
|
|
40
|
+
return url || undefined;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const configuredURL = authBaseURL(vars.BETTER_AUTH_URL);
|
|
21
44
|
|
|
22
45
|
/** A provider's credentials from the environment, when both are set. */
|
|
23
46
|
function credentials(prefix: string) {
|