@better-t-stack/template-generator 3.19.2 → 3.19.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/index.d.mts +2 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +87 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -79,8 +79,8 @@ declare const TEMPLATE_COUNT = 435;
|
|
|
79
79
|
//#region src/utils/add-deps.d.ts
|
|
80
80
|
declare const dependencyVersionMap: {
|
|
81
81
|
readonly typescript: "^5";
|
|
82
|
-
readonly "better-auth": "^1.4.
|
|
83
|
-
readonly "@better-auth/expo": "^1.4.
|
|
82
|
+
readonly "better-auth": "^1.4.18";
|
|
83
|
+
readonly "@better-auth/expo": "^1.4.18";
|
|
84
84
|
readonly "@clerk/nextjs": "^6.31.5";
|
|
85
85
|
readonly "@clerk/clerk-react": "^5.45.0";
|
|
86
86
|
readonly "@clerk/tanstack-react-start": "^0.26.3";
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/core/virtual-fs.ts","../src/core/template-processor.ts","../src/template-handlers/utils.ts","../src/template-handlers/addons.ts","../src/generator.ts","../src/processors/addons-deps.ts","../src/bts-config.ts","../src/templates.generated.ts","../src/utils/add-deps.ts","../src/utils/reproducible-command.ts"],"sourcesContent":[],"mappings":";;;;;;;cAOa,iBAAA;;;;;;EAAA,QAAA,CAAA,QAAA,EAAA,MAAiB,CAAA,EAAA,MAAA,GAAA,SAAA;EA6Ea,MAAA,CAAA,IAAA,EAAA,MAAA,CAAA,EAAA,OAAA;EAkCX,UAAA,CAAA,QAAA,EAAA,MAAA,CAAA,EAAA,OAAA;EAAgB,eAcrC,CAAA,OAAA,EAAA,MAAA,CAAA,EAAA,OAAA;EAAA,KAGJ,CAAA,OAAA,EAAA,MAAA,CAAA,EAAA,IAAA;EAAA,UAAA,CAAA,QAAA,EAAA,MAAA,CAAA,EAAA,OAAA;;2CAnDoC;;ECzE3B,WAAA,CAAA,CAAA,EAAA,MAAA,EAAA;EAIA,iBAAY,CAAA,CAAA,EAAA,MAAA,EAAA;EAIZ,YAAA,CAAA,CAAA,EAAA,MAAiB;EAUjB,iBAAA,CAAA,CAAA,EAAkB,MAAA;6BDyFF;;eAAgB,MAAA,CAcrC;EE9HC,KAAA,CAAA,CAAA,EF8HD,MAAA,CAGJ,GEjIoB;;;;ECAL,QAAA,aAAA;;;;iBFKN,qBAAA,2BAAgD;iBAIhD,YAAA;iBAIA,iBAAA;iBAUA,kBAAA,6CAGL;;;KC1BC,YAAA,GAAe;;;iBCAL,qBAAA,MACf,8BACM,sBACH,gBACP;;;;;AHHH;;;;;;;;;ACIA;AAIA;AAIgB,iBG8BM,QAAA,CH9BW,OAAA,EG+BtB,gBH/BsB,CAAA,EGgC9B,OHhC8B,CGgCtB,MHhCsB,CGgCf,eHhCe,EGgCE,cHhCF,CAAA,CAAA;;;iBIJjB,iBAAA,MAAuB,2BAA2B;;;;;;;iBCLlD,mBAAA,MACT,kCACU;;;cCTJ,oBAAoB;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/core/virtual-fs.ts","../src/core/template-processor.ts","../src/template-handlers/utils.ts","../src/template-handlers/addons.ts","../src/generator.ts","../src/processors/addons-deps.ts","../src/bts-config.ts","../src/templates.generated.ts","../src/utils/add-deps.ts","../src/utils/reproducible-command.ts"],"sourcesContent":[],"mappings":";;;;;;;cAOa,iBAAA;;;;;;EAAA,QAAA,CAAA,QAAA,EAAA,MAAiB,CAAA,EAAA,MAAA,GAAA,SAAA;EA6Ea,MAAA,CAAA,IAAA,EAAA,MAAA,CAAA,EAAA,OAAA;EAkCX,UAAA,CAAA,QAAA,EAAA,MAAA,CAAA,EAAA,OAAA;EAAgB,eAcrC,CAAA,OAAA,EAAA,MAAA,CAAA,EAAA,OAAA;EAAA,KAGJ,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;EACM,SAAA,gCAAA,EAAA,QAAA;EACH,SAAA,oBAAA,EAAA,QAAA;EACP,SAAA,6BAAA,EAAA,QAAA;EAAO,SAAA,QAAA,EAAA,SAAA;;;;ECuCY,SAAA,gBAAQ,EAAA,QAAA;EACnB,SAAA,MAAA,EAAA,SAAA;EACO,SAAA,KAAA,EAAA,SAAA;EAAiB,SAAA,KAAA,EAAA,QAAA;EAAxB,SAAA,QAAA,EAAA,SAAA;EAAR,SAAA,aAAA,EAAA,SAAA;EAAO,SAAA,GAAA,EAAA,SAAA;;;;ECpCM,SAAA,gBAAiB,EAAA,QAAM;;;;ECLvB,SAAA,mBAAmB,EAAA,QAC5B;;;;ECRM,SAAA,gBAiiyBX,EAAA,QAjiyB+B;EAmiyBpB,SAAA,aAAc,EAAA,SAAA;;;;ECzhyBd,SAAA,EAAA,EAAA,QAAA;EA8ID,SAAA,gBAAqB,EAAA,QAAA;;;;ECzJjB,SAAA,kBAAA,EAAA,QAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KDyJ/B,qBAAA,gBAAqC;;;iBCzJjC,2BAAA,SAAoC"}
|
package/dist/index.mjs
CHANGED
|
@@ -599,8 +599,8 @@ function renameDevScriptsForAlchemy(vfs, config) {
|
|
|
599
599
|
//#region src/utils/add-deps.ts
|
|
600
600
|
const dependencyVersionMap = {
|
|
601
601
|
typescript: "^5",
|
|
602
|
-
"better-auth": "^1.4.
|
|
603
|
-
"@better-auth/expo": "^1.4.
|
|
602
|
+
"better-auth": "^1.4.18",
|
|
603
|
+
"@better-auth/expo": "^1.4.18",
|
|
604
604
|
"@clerk/nextjs": "^6.31.5",
|
|
605
605
|
"@clerk/clerk-react": "^5.45.0",
|
|
606
606
|
"@clerk/tanstack-react-start": "^0.26.3",
|
|
@@ -3918,6 +3918,7 @@ import type { AppRouterClient } from "@{{projectName}}/api/routers/index";
|
|
|
3918
3918
|
import { env } from "@{{projectName}}/env/native";
|
|
3919
3919
|
{{#if (eq auth "better-auth")}}
|
|
3920
3920
|
import { authClient } from "@/lib/auth-client";
|
|
3921
|
+
import { Platform } from "react-native";
|
|
3921
3922
|
{{/if}}
|
|
3922
3923
|
|
|
3923
3924
|
export const queryClient = new QueryClient({
|
|
@@ -3939,7 +3940,19 @@ export const link = new RPCLink({
|
|
|
3939
3940
|
url: \`\${env.EXPO_PUBLIC_SERVER_URL}/rpc\`,
|
|
3940
3941
|
{{/if}}
|
|
3941
3942
|
{{#if (eq auth "better-auth")}}
|
|
3943
|
+
fetch:
|
|
3944
|
+
Platform.OS !== "web"
|
|
3945
|
+
? undefined
|
|
3946
|
+
: function (url, options) {
|
|
3947
|
+
return fetch(url, {
|
|
3948
|
+
...options,
|
|
3949
|
+
credentials: "include",
|
|
3950
|
+
});
|
|
3951
|
+
},
|
|
3942
3952
|
headers() {
|
|
3953
|
+
if (Platform.OS === "web") {
|
|
3954
|
+
return {};
|
|
3955
|
+
}
|
|
3943
3956
|
const headers = new Map<string, string>();
|
|
3944
3957
|
const cookies = authClient.getCookie();
|
|
3945
3958
|
if (cookies) {
|
|
@@ -4602,6 +4615,7 @@ export const Route = createFileRoute('/api/trpc/$')({
|
|
|
4602
4615
|
`],
|
|
4603
4616
|
["api/trpc/native/utils/trpc.ts.hbs", `{{#if (eq auth "better-auth")}}
|
|
4604
4617
|
import { authClient } from "@/lib/auth-client";
|
|
4618
|
+
import { Platform } from "react-native";
|
|
4605
4619
|
{{/if}}
|
|
4606
4620
|
import { QueryClient } from "@tanstack/react-query";
|
|
4607
4621
|
import { createTRPCClient, httpBatchLink } from "@trpc/client";
|
|
@@ -4620,7 +4634,19 @@ const trpcClient = createTRPCClient<AppRouter>({
|
|
|
4620
4634
|
url: \`\${env.EXPO_PUBLIC_SERVER_URL}/trpc\`,
|
|
4621
4635
|
{{/if}}
|
|
4622
4636
|
{{#if (eq auth "better-auth")}}
|
|
4637
|
+
fetch:
|
|
4638
|
+
Platform.OS !== "web"
|
|
4639
|
+
? undefined
|
|
4640
|
+
: function (url, options) {
|
|
4641
|
+
return fetch(url, {
|
|
4642
|
+
...options,
|
|
4643
|
+
credentials: "include",
|
|
4644
|
+
});
|
|
4645
|
+
},
|
|
4623
4646
|
headers() {
|
|
4647
|
+
if (Platform.OS === "web") {
|
|
4648
|
+
return {};
|
|
4649
|
+
}
|
|
4624
4650
|
const headers = new Map<string, string>();
|
|
4625
4651
|
const cookies = authClient.getCookie();
|
|
4626
4652
|
if (cookies) {
|
|
@@ -5064,11 +5090,11 @@ function createAuth(ctx: GenericCtx<DataModel>) {
|
|
|
5064
5090
|
return betterAuth({
|
|
5065
5091
|
{{#if (and (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles")) (or (includes frontend "tanstack-start") (includes frontend "next")))}}
|
|
5066
5092
|
baseURL: siteUrl,
|
|
5067
|
-
trustedOrigins: [siteUrl, nativeAppUrl],
|
|
5093
|
+
trustedOrigins: [siteUrl, nativeAppUrl, ...(process.env.NODE_ENV === "development" ? ["exp://", "exp://**", "exp://192.168.*.*:*/**"] : [])],
|
|
5068
5094
|
{{else if (and (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles")) (or (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "nuxt") (includes frontend "svelte") (includes frontend "solid")))}}
|
|
5069
|
-
trustedOrigins: [siteUrl, nativeAppUrl],
|
|
5095
|
+
trustedOrigins: [siteUrl, nativeAppUrl, ...(process.env.NODE_ENV === "development" ? ["exp://", "exp://**", "exp://192.168.*.*:*/**"] : [])],
|
|
5070
5096
|
{{else if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
5071
|
-
trustedOrigins: [nativeAppUrl],
|
|
5097
|
+
trustedOrigins: [nativeAppUrl, ...(process.env.NODE_ENV === "development" ? ["exp://", "exp://**", "exp://192.168.*.*:*/**"] : [])],
|
|
5072
5098
|
{{else if (or (includes frontend "tanstack-start") (includes frontend "next"))}}
|
|
5073
5099
|
baseURL: siteUrl,
|
|
5074
5100
|
trustedOrigins: [siteUrl],
|
|
@@ -8515,7 +8541,15 @@ export const auth = betterAuth({
|
|
|
8515
8541
|
trustedOrigins: [
|
|
8516
8542
|
env.CORS_ORIGIN,
|
|
8517
8543
|
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
8518
|
-
"mybettertapp://",
|
|
8544
|
+
"mybettertapp://",
|
|
8545
|
+
...(env.NODE_ENV === "development"
|
|
8546
|
+
? [
|
|
8547
|
+
"exp://",
|
|
8548
|
+
"exp://**",
|
|
8549
|
+
"exp://192.168.*.*:*/**",
|
|
8550
|
+
"http://localhost:8081",
|
|
8551
|
+
]
|
|
8552
|
+
: []),
|
|
8519
8553
|
{{/if}}
|
|
8520
8554
|
],
|
|
8521
8555
|
emailAndPassword: {
|
|
@@ -8578,7 +8612,15 @@ export const auth = betterAuth({
|
|
|
8578
8612
|
trustedOrigins: [
|
|
8579
8613
|
env.CORS_ORIGIN,
|
|
8580
8614
|
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
8581
|
-
"mybettertapp://",
|
|
8615
|
+
"mybettertapp://",
|
|
8616
|
+
...(env.NODE_ENV === "development"
|
|
8617
|
+
? [
|
|
8618
|
+
"exp://",
|
|
8619
|
+
"exp://**",
|
|
8620
|
+
"exp://192.168.*.*:*/**",
|
|
8621
|
+
"http://localhost:8081",
|
|
8622
|
+
]
|
|
8623
|
+
: []),
|
|
8582
8624
|
{{/if}}
|
|
8583
8625
|
],
|
|
8584
8626
|
emailAndPassword: {
|
|
@@ -8640,7 +8682,15 @@ export const auth = betterAuth({
|
|
|
8640
8682
|
trustedOrigins: [
|
|
8641
8683
|
env.CORS_ORIGIN,
|
|
8642
8684
|
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
8643
|
-
"mybettertapp://",
|
|
8685
|
+
"mybettertapp://",
|
|
8686
|
+
...(env.NODE_ENV === "development"
|
|
8687
|
+
? [
|
|
8688
|
+
"exp://",
|
|
8689
|
+
"exp://**",
|
|
8690
|
+
"exp://192.168.*.*:*/**",
|
|
8691
|
+
"http://localhost:8081",
|
|
8692
|
+
]
|
|
8693
|
+
: []),
|
|
8644
8694
|
{{/if}}
|
|
8645
8695
|
],
|
|
8646
8696
|
emailAndPassword: {
|
|
@@ -8709,7 +8759,15 @@ export const auth = betterAuth({
|
|
|
8709
8759
|
trustedOrigins: [
|
|
8710
8760
|
env.CORS_ORIGIN,
|
|
8711
8761
|
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
8712
|
-
"mybettertapp://",
|
|
8762
|
+
"mybettertapp://",
|
|
8763
|
+
...(env.NODE_ENV === "development"
|
|
8764
|
+
? [
|
|
8765
|
+
"exp://",
|
|
8766
|
+
"exp://**",
|
|
8767
|
+
"exp://192.168.*.*:*/**",
|
|
8768
|
+
"http://localhost:8081",
|
|
8769
|
+
]
|
|
8770
|
+
: []),
|
|
8713
8771
|
{{/if}}
|
|
8714
8772
|
],
|
|
8715
8773
|
emailAndPassword: {
|
|
@@ -8763,7 +8821,15 @@ export const auth = betterAuth({
|
|
|
8763
8821
|
trustedOrigins: [
|
|
8764
8822
|
env.CORS_ORIGIN,
|
|
8765
8823
|
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
8766
|
-
"mybettertapp://",
|
|
8824
|
+
"mybettertapp://",
|
|
8825
|
+
...(env.NODE_ENV === "development"
|
|
8826
|
+
? [
|
|
8827
|
+
"exp://",
|
|
8828
|
+
"exp://**",
|
|
8829
|
+
"exp://192.168.*.*:*/**",
|
|
8830
|
+
"http://localhost:8081",
|
|
8831
|
+
]
|
|
8832
|
+
: []),
|
|
8767
8833
|
{{/if}}
|
|
8768
8834
|
],
|
|
8769
8835
|
emailAndPassword: {
|
|
@@ -23529,19 +23595,21 @@ module.exports = config;
|
|
|
23529
23595
|
"web": "expo start --web"
|
|
23530
23596
|
},
|
|
23531
23597
|
"dependencies": {
|
|
23532
|
-
"@expo/vector-icons": "^15.0.
|
|
23533
|
-
"@react-navigation/bottom-tabs": "^7.
|
|
23534
|
-
"@react-navigation/drawer": "^7.
|
|
23535
|
-
"@react-navigation/native": "^7.1.
|
|
23598
|
+
"@expo/vector-icons": "^15.0.3",
|
|
23599
|
+
"@react-navigation/bottom-tabs": "^7.4.0",
|
|
23600
|
+
"@react-navigation/drawer": "^7.5.0",
|
|
23601
|
+
"@react-navigation/native": "^7.1.8",
|
|
23536
23602
|
{{#if (includes examples "ai")}}
|
|
23537
23603
|
"@stardazed/streams-text-encoding": "^1.0.2",
|
|
23538
23604
|
"@ungap/structured-clone": "^1.3.0",
|
|
23539
23605
|
{{/if}}
|
|
23540
23606
|
"@tanstack/react-form": "^1.0.5",
|
|
23541
|
-
"expo": "
|
|
23607
|
+
"babel-preset-expo": "~54.0.10",
|
|
23608
|
+
"expo": "~54.0.33",
|
|
23542
23609
|
"expo-constants": "~18.0.8",
|
|
23543
23610
|
"expo-crypto": "~15.0.6",
|
|
23544
23611
|
"expo-linking": "~8.0.7",
|
|
23612
|
+
"expo-network": "~8.0.8",
|
|
23545
23613
|
"expo-router": "~6.0.0",
|
|
23546
23614
|
"expo-secure-store": "~15.0.6",
|
|
23547
23615
|
"expo-splash-screen": "~31.0.8",
|
|
@@ -23551,15 +23619,15 @@ module.exports = config;
|
|
|
23551
23619
|
"expo-web-browser": "~15.0.6",
|
|
23552
23620
|
"react": "19.1.0",
|
|
23553
23621
|
"react-dom": "19.1.0",
|
|
23554
|
-
"react-native": "0.81.
|
|
23622
|
+
"react-native": "0.81.5",
|
|
23555
23623
|
"react-native-edge-to-edge": "^1.7.0",
|
|
23556
23624
|
"react-native-gesture-handler": "~2.28.0",
|
|
23557
|
-
"react-native-nitro-modules": "^0.
|
|
23625
|
+
"react-native-nitro-modules": "^0.33.2",
|
|
23558
23626
|
"react-native-reanimated": "~4.1.0",
|
|
23559
23627
|
"react-native-safe-area-context": "~5.6.0",
|
|
23560
23628
|
"react-native-screens": "~4.16.0",
|
|
23561
|
-
"react-native-unistyles": "^3.0.
|
|
23562
|
-
"react-native-web": "^0.21.
|
|
23629
|
+
"react-native-unistyles": "^3.0.22",
|
|
23630
|
+
"react-native-web": "^0.21.2",
|
|
23563
23631
|
"react-native-worklets": "^0.5.1"
|
|
23564
23632
|
},
|
|
23565
23633
|
"devDependencies": {
|