@better-t-stack/template-generator 3.21.6 → 3.22.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.d.mts +3 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +136 -160
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -692,13 +692,13 @@ const dependencyVersionMap = {
|
|
|
692
692
|
"@trpc/server": "^11.7.2",
|
|
693
693
|
"@trpc/client": "^11.7.2",
|
|
694
694
|
next: "^16.1.1",
|
|
695
|
-
convex: "^1.
|
|
695
|
+
convex: "^1.32.0",
|
|
696
696
|
"@convex-dev/react-query": "^0.1.0",
|
|
697
697
|
"@convex-dev/agent": "^0.3.2",
|
|
698
698
|
"convex-svelte": "^0.0.12",
|
|
699
699
|
"convex-nuxt": "0.1.5",
|
|
700
700
|
"convex-vue": "^0.1.5",
|
|
701
|
-
"@convex-dev/better-auth": "^0.10.
|
|
701
|
+
"@convex-dev/better-auth": "^0.10.11",
|
|
702
702
|
"@tanstack/svelte-query": "^5.85.3",
|
|
703
703
|
"@tanstack/svelte-query-devtools": "^5.85.3",
|
|
704
704
|
"@tanstack/vue-query-devtools": "^5.90.2",
|
|
@@ -1474,7 +1474,8 @@ function processAuthPlugins(vfs, config) {
|
|
|
1474
1474
|
if (pluginsProp?.isKind(SyntaxKind.PropertyAssignment)) {
|
|
1475
1475
|
const arrayLiteral = pluginsProp.getInitializerIfKind(SyntaxKind.ArrayLiteralExpression);
|
|
1476
1476
|
if (arrayLiteral) pluginsToAdd.forEach((plugin) => {
|
|
1477
|
-
|
|
1477
|
+
const normalizedPlugin = plugin.replace(/\s/g, "");
|
|
1478
|
+
if (!arrayLiteral.getElements().some((element) => element.getText().replace(/\s/g, "") === normalizedPlugin)) arrayLiteral.addElement(plugin);
|
|
1478
1479
|
});
|
|
1479
1480
|
} else configObject.addPropertyAssignment({
|
|
1480
1481
|
name: "plugins",
|
|
@@ -1776,18 +1777,22 @@ function getConvexVar(frontend) {
|
|
|
1776
1777
|
if (hasTanstackStart) return "VITE_CONVEX_URL";
|
|
1777
1778
|
return "VITE_CONVEX_URL";
|
|
1778
1779
|
}
|
|
1779
|
-
function
|
|
1780
|
+
function escapeRegExp(value) {
|
|
1781
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1782
|
+
}
|
|
1783
|
+
function addEnvVariablesToContent(currentContent, variables, options = {}) {
|
|
1780
1784
|
let envContent = currentContent || "";
|
|
1781
1785
|
let contentToAdd = "";
|
|
1782
1786
|
for (const { key, value, condition, comment } of variables) if (condition) {
|
|
1783
|
-
const regex = new RegExp(`^${key}=.*$`, "m");
|
|
1784
1787
|
const valueToWrite = value ?? "";
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
+
const lineToWrite = options.commentOutEmptyValues === true && valueToWrite.trim() === "" ? `# ${key}=${valueToWrite}` : `${key}=${valueToWrite}`;
|
|
1789
|
+
const lineRegex = new RegExp(`^\\s*#?\\s*${escapeRegExp(key)}=.*$`, "m");
|
|
1790
|
+
if (lineRegex.test(envContent)) {
|
|
1791
|
+
const existingMatch = envContent.match(lineRegex);
|
|
1792
|
+
if (existingMatch && existingMatch[0] !== lineToWrite) envContent = envContent.replace(lineRegex, lineToWrite);
|
|
1788
1793
|
} else {
|
|
1789
1794
|
if (comment) contentToAdd += `# ${comment}\n`;
|
|
1790
|
-
contentToAdd += `${
|
|
1795
|
+
contentToAdd += `${lineToWrite}\n`;
|
|
1791
1796
|
}
|
|
1792
1797
|
}
|
|
1793
1798
|
if (contentToAdd) {
|
|
@@ -1796,10 +1801,10 @@ function addEnvVariablesToContent(currentContent, variables) {
|
|
|
1796
1801
|
}
|
|
1797
1802
|
return `${envContent.trimEnd()}\n`;
|
|
1798
1803
|
}
|
|
1799
|
-
function writeEnvFile(vfs, envPath, variables) {
|
|
1804
|
+
function writeEnvFile(vfs, envPath, variables, options = {}) {
|
|
1800
1805
|
let currentContent = "";
|
|
1801
1806
|
if (vfs.exists(envPath)) currentContent = vfs.readFile(envPath) || "";
|
|
1802
|
-
const newContent = addEnvVariablesToContent(currentContent, variables);
|
|
1807
|
+
const newContent = addEnvVariablesToContent(currentContent, variables, options);
|
|
1803
1808
|
vfs.writeFile(envPath, newContent);
|
|
1804
1809
|
}
|
|
1805
1810
|
function buildClientVars(frontend, backend, auth) {
|
|
@@ -1884,6 +1889,7 @@ function buildConvexBackendVars(frontend, auth, examples) {
|
|
|
1884
1889
|
const hasNextJs = frontend.includes("next");
|
|
1885
1890
|
const hasNative = frontend.includes("native-bare") || frontend.includes("native-uniwind") || frontend.includes("native-unistyles");
|
|
1886
1891
|
const hasWeb = frontend.includes("react-router") || frontend.includes("tanstack-router") || frontend.includes("tanstack-start") || hasNextJs || frontend.includes("nuxt") || frontend.includes("solid") || frontend.includes("svelte") || frontend.includes("astro");
|
|
1892
|
+
const defaultSiteUrl = hasNative && !hasWeb ? "http://localhost:8081" : "http://localhost:3001";
|
|
1887
1893
|
const vars = [];
|
|
1888
1894
|
if (examples?.includes("ai")) vars.push({
|
|
1889
1895
|
key: "GOOGLE_GENERATIVE_AI_API_KEY",
|
|
@@ -1905,15 +1911,23 @@ function buildConvexBackendVars(frontend, auth, examples) {
|
|
|
1905
1911
|
comment: "Same as CONVEX_URL but ends in .site"
|
|
1906
1912
|
}, {
|
|
1907
1913
|
key: "SITE_URL",
|
|
1908
|
-
value:
|
|
1914
|
+
value: defaultSiteUrl,
|
|
1909
1915
|
condition: true,
|
|
1910
1916
|
comment: "Web app URL for authentication"
|
|
1911
1917
|
});
|
|
1918
|
+
else if (hasNative) vars.push({
|
|
1919
|
+
key: "SITE_URL",
|
|
1920
|
+
value: defaultSiteUrl,
|
|
1921
|
+
condition: true,
|
|
1922
|
+
comment: "Web app URL for authentication (for Expo web support)"
|
|
1923
|
+
});
|
|
1912
1924
|
}
|
|
1913
1925
|
return vars;
|
|
1914
1926
|
}
|
|
1915
1927
|
function buildConvexCommentBlocks(frontend, auth, examples) {
|
|
1928
|
+
const hasNative = frontend.includes("native-bare") || frontend.includes("native-uniwind") || frontend.includes("native-unistyles");
|
|
1916
1929
|
const hasWeb = frontend.includes("react-router") || frontend.includes("tanstack-router") || frontend.includes("tanstack-start") || frontend.includes("next") || frontend.includes("nuxt") || frontend.includes("solid") || frontend.includes("svelte") || frontend.includes("astro");
|
|
1930
|
+
const defaultSiteUrl = hasNative && !hasWeb ? "http://localhost:8081" : "http://localhost:3001";
|
|
1917
1931
|
let commentBlocks = "";
|
|
1918
1932
|
if (examples?.includes("ai")) commentBlocks += `# Set Google AI API key for AI agent
|
|
1919
1933
|
# npx convex env set GOOGLE_GENERATIVE_AI_API_KEY=your_google_api_key
|
|
@@ -1921,7 +1935,7 @@ function buildConvexCommentBlocks(frontend, auth, examples) {
|
|
|
1921
1935
|
`;
|
|
1922
1936
|
if (auth === "better-auth") commentBlocks += `# Set Convex environment variables
|
|
1923
1937
|
# npx convex env set BETTER_AUTH_SECRET=$(openssl rand -base64 32)
|
|
1924
|
-
${hasWeb ?
|
|
1938
|
+
${hasWeb || hasNative ? `# npx convex env set SITE_URL ${defaultSiteUrl}\n` : ""}`;
|
|
1925
1939
|
return commentBlocks;
|
|
1926
1940
|
}
|
|
1927
1941
|
function buildServerVars(backend, frontend, auth, database, dbSetup, runtime, webDeploy, serverDeploy, payments, examples) {
|
|
@@ -2019,7 +2033,7 @@ function processEnvVariables(vfs, config) {
|
|
|
2019
2033
|
if (convexBackendVars.length > 0) {
|
|
2020
2034
|
let existingContent = "";
|
|
2021
2035
|
if (vfs.exists(envLocalPath)) existingContent = vfs.readFile(envLocalPath) || "";
|
|
2022
|
-
const contentWithVars = addEnvVariablesToContent(existingContent, convexBackendVars);
|
|
2036
|
+
const contentWithVars = addEnvVariablesToContent(existingContent, convexBackendVars, { commentOutEmptyValues: true });
|
|
2023
2037
|
vfs.writeFile(envLocalPath, contentWithVars);
|
|
2024
2038
|
}
|
|
2025
2039
|
}
|
|
@@ -5089,45 +5103,40 @@ export default {
|
|
|
5089
5103
|
} satisfies AuthConfig;
|
|
5090
5104
|
`],
|
|
5091
5105
|
["auth/better-auth/convex/backend/convex/auth.ts.hbs", `import { createClient, type GenericCtx } from "@convex-dev/better-auth";
|
|
5092
|
-
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
5093
|
-
import { convex } from "@convex-dev/better-auth/plugins";
|
|
5094
|
-
import { expo } from "@better-auth/expo";
|
|
5095
|
-
{{else if (or (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "nuxt") (includes frontend "svelte") (includes frontend "solid"))}}
|
|
5106
|
+
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles") (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "nuxt") (includes frontend "svelte") (includes frontend "solid"))}}
|
|
5096
5107
|
import { convex, crossDomain } from "@convex-dev/better-auth/plugins";
|
|
5097
5108
|
{{else}}
|
|
5098
5109
|
import { convex } from "@convex-dev/better-auth/plugins";
|
|
5099
5110
|
{{/if}}
|
|
5111
|
+
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
5112
|
+
import { expo } from "@better-auth/expo";
|
|
5113
|
+
{{/if}}
|
|
5100
5114
|
import { components } from "./_generated/api";
|
|
5101
5115
|
import type { DataModel } from "./_generated/dataModel";
|
|
5102
5116
|
import { query } from "./_generated/server";
|
|
5103
|
-
import { betterAuth } from "better-auth";
|
|
5117
|
+
import { betterAuth } from "better-auth/minimal";
|
|
5104
5118
|
import authConfig from "./auth.config";
|
|
5105
5119
|
|
|
5106
|
-
{{#if (or (includes frontend "tanstack-start") (includes frontend "next"))}}
|
|
5107
|
-
const siteUrl = process.env.SITE_URL
|
|
5108
|
-
{{else if (or (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "nuxt") (includes frontend "svelte") (includes frontend "solid"))}}
|
|
5109
|
-
const siteUrl = process.env.SITE_URL!;
|
|
5120
|
+
{{#if (or (includes frontend "tanstack-start") (includes frontend "next") (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "nuxt") (includes frontend "svelte") (includes frontend "solid") (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
5121
|
+
const siteUrl = process.env.SITE_URL{{#if (or (includes frontend "tanstack-start") (includes frontend "next") (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "nuxt") (includes frontend "svelte") (includes frontend "solid"))}}!{{else}} || "http://localhost:8081"{{/if}};
|
|
5110
5122
|
{{/if}}
|
|
5111
5123
|
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
5112
|
-
const nativeAppUrl = process.env.NATIVE_APP_URL || "
|
|
5124
|
+
const nativeAppUrl = process.env.NATIVE_APP_URL || "{{projectName}}://";
|
|
5113
5125
|
{{/if}}
|
|
5114
5126
|
|
|
5115
5127
|
export const authComponent = createClient<DataModel>(components.betterAuth);
|
|
5116
5128
|
|
|
5117
5129
|
function createAuth(ctx: GenericCtx<DataModel>) {
|
|
5118
5130
|
return betterAuth({
|
|
5119
|
-
{{#if (
|
|
5131
|
+
{{#if (or (includes frontend "tanstack-start") (includes frontend "next"))}}
|
|
5120
5132
|
baseURL: siteUrl,
|
|
5133
|
+
{{/if}}
|
|
5134
|
+
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
5121
5135
|
trustedOrigins: [siteUrl, nativeAppUrl, ...(process.env.NODE_ENV === "development" ? ["exp://", "exp://**", "exp://192.168.*.*:*/**"] : [])],
|
|
5122
|
-
{{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")))}}
|
|
5123
|
-
trustedOrigins: [siteUrl, nativeAppUrl, ...(process.env.NODE_ENV === "development" ? ["exp://", "exp://**", "exp://192.168.*.*:*/**"] : [])],
|
|
5124
|
-
{{else if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
5125
|
-
trustedOrigins: [nativeAppUrl, ...(process.env.NODE_ENV === "development" ? ["exp://", "exp://**", "exp://192.168.*.*:*/**"] : [])],
|
|
5126
|
-
{{else if (or (includes frontend "tanstack-start") (includes frontend "next"))}}
|
|
5127
|
-
baseURL: siteUrl,
|
|
5128
|
-
trustedOrigins: [siteUrl],
|
|
5129
5136
|
{{else if (or (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "nuxt") (includes frontend "svelte") (includes frontend "solid"))}}
|
|
5130
5137
|
trustedOrigins: [siteUrl],
|
|
5138
|
+
{{else if (or (includes frontend "tanstack-start") (includes frontend "next"))}}
|
|
5139
|
+
trustedOrigins: [siteUrl],
|
|
5131
5140
|
{{/if}}
|
|
5132
5141
|
database: authComponent.adapter(ctx),
|
|
5133
5142
|
emailAndPassword: {
|
|
@@ -5137,7 +5146,8 @@ function createAuth(ctx: GenericCtx<DataModel>) {
|
|
|
5137
5146
|
plugins: [
|
|
5138
5147
|
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
5139
5148
|
expo(),
|
|
5140
|
-
{{
|
|
5149
|
+
{{/if}}
|
|
5150
|
+
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles") (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "nuxt") (includes frontend "svelte") (includes frontend "solid"))}}
|
|
5141
5151
|
crossDomain({ siteUrl }),
|
|
5142
5152
|
{{/if}}
|
|
5143
5153
|
convex({
|
|
@@ -5162,7 +5172,7 @@ import { authComponent, createAuth } from "./auth";
|
|
|
5162
5172
|
|
|
5163
5173
|
const http = httpRouter();
|
|
5164
5174
|
|
|
5165
|
-
{{#if (or (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "nuxt") (includes frontend "svelte") (includes frontend "solid"))}}
|
|
5175
|
+
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles") (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "nuxt") (includes frontend "svelte") (includes frontend "solid"))}}
|
|
5166
5176
|
authComponent.registerRoutes(http, createAuth, { cors: true });
|
|
5167
5177
|
{{else}}
|
|
5168
5178
|
authComponent.registerRoutes(http, createAuth);
|
|
@@ -5667,21 +5677,24 @@ const styles = StyleSheet.create({
|
|
|
5667
5677
|
export { SignUp };
|
|
5668
5678
|
`],
|
|
5669
5679
|
["auth/better-auth/convex/native/base/lib/auth-client.ts.hbs", `import { createAuthClient } from "better-auth/react";
|
|
5670
|
-
import { convexClient } from "@convex-dev/better-auth/client/plugins";
|
|
5680
|
+
import { convexClient, crossDomainClient } from "@convex-dev/better-auth/client/plugins";
|
|
5671
5681
|
import { expoClient } from "@better-auth/expo/client";
|
|
5672
5682
|
import Constants from "expo-constants";
|
|
5673
5683
|
import * as SecureStore from "expo-secure-store";
|
|
5684
|
+
import { Platform } from "react-native";
|
|
5674
5685
|
import { env } from "@{{projectName}}/env/native";
|
|
5675
5686
|
|
|
5676
5687
|
export const authClient = createAuthClient({
|
|
5677
5688
|
baseURL: env.EXPO_PUBLIC_CONVEX_SITE_URL,
|
|
5678
5689
|
plugins: [
|
|
5679
|
-
expoClient({
|
|
5680
|
-
scheme: Constants.expoConfig?.scheme as string,
|
|
5681
|
-
storagePrefix: Constants.expoConfig?.scheme as string,
|
|
5682
|
-
storage: SecureStore,
|
|
5683
|
-
}),
|
|
5684
5690
|
convexClient(),
|
|
5691
|
+
Platform.OS === "web"
|
|
5692
|
+
? crossDomainClient()
|
|
5693
|
+
: expoClient({
|
|
5694
|
+
scheme: Constants.expoConfig?.scheme as string,
|
|
5695
|
+
storagePrefix: Constants.expoConfig?.scheme as string,
|
|
5696
|
+
storage: SecureStore,
|
|
5697
|
+
}),
|
|
5685
5698
|
],
|
|
5686
5699
|
});
|
|
5687
5700
|
`],
|
|
@@ -7232,8 +7245,9 @@ import { env } from "@{{projectName}}/env/web";
|
|
|
7232
7245
|
|
|
7233
7246
|
export const authClient = createAuthClient({
|
|
7234
7247
|
baseURL: env.VITE_CONVEX_SITE_URL,
|
|
7235
|
-
plugins: [
|
|
7236
|
-
})
|
|
7248
|
+
plugins: [crossDomainClient(), convexClient()],
|
|
7249
|
+
});
|
|
7250
|
+
`],
|
|
7237
7251
|
["auth/better-auth/convex/web/react/tanstack-router/src/routes/dashboard.tsx.hbs", `import SignInForm from "@/components/sign-in-form";
|
|
7238
7252
|
import SignUpForm from "@/components/sign-up-form";
|
|
7239
7253
|
import UserMenu from "@/components/user-menu";
|
|
@@ -9683,7 +9697,7 @@ export const auth = betterAuth({
|
|
|
9683
9697
|
trustedOrigins: [
|
|
9684
9698
|
env.CORS_ORIGIN,
|
|
9685
9699
|
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
9686
|
-
"
|
|
9700
|
+
"{{projectName}}://",
|
|
9687
9701
|
...(env.NODE_ENV === "development"
|
|
9688
9702
|
? [
|
|
9689
9703
|
"exp://",
|
|
@@ -9754,7 +9768,7 @@ export const auth = betterAuth({
|
|
|
9754
9768
|
trustedOrigins: [
|
|
9755
9769
|
env.CORS_ORIGIN,
|
|
9756
9770
|
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
9757
|
-
"
|
|
9771
|
+
"{{projectName}}://",
|
|
9758
9772
|
...(env.NODE_ENV === "development"
|
|
9759
9773
|
? [
|
|
9760
9774
|
"exp://",
|
|
@@ -9824,7 +9838,7 @@ export const auth = betterAuth({
|
|
|
9824
9838
|
trustedOrigins: [
|
|
9825
9839
|
env.CORS_ORIGIN,
|
|
9826
9840
|
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
9827
|
-
"
|
|
9841
|
+
"{{projectName}}://",
|
|
9828
9842
|
...(env.NODE_ENV === "development"
|
|
9829
9843
|
? [
|
|
9830
9844
|
"exp://",
|
|
@@ -9901,7 +9915,7 @@ export const auth = betterAuth({
|
|
|
9901
9915
|
trustedOrigins: [
|
|
9902
9916
|
env.CORS_ORIGIN,
|
|
9903
9917
|
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
9904
|
-
"
|
|
9918
|
+
"{{projectName}}://",
|
|
9905
9919
|
...(env.NODE_ENV === "development"
|
|
9906
9920
|
? [
|
|
9907
9921
|
"exp://",
|
|
@@ -9963,7 +9977,7 @@ export const auth = betterAuth({
|
|
|
9963
9977
|
trustedOrigins: [
|
|
9964
9978
|
env.CORS_ORIGIN,
|
|
9965
9979
|
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
|
|
9966
|
-
"
|
|
9980
|
+
"{{projectName}}://",
|
|
9967
9981
|
...(env.NODE_ENV === "development"
|
|
9968
9982
|
? [
|
|
9969
9983
|
"exp://",
|
|
@@ -10009,7 +10023,8 @@ export const auth = betterAuth({
|
|
|
10009
10023
|
],
|
|
10010
10024
|
{{/if}}
|
|
10011
10025
|
});
|
|
10012
|
-
{{/if}}
|
|
10026
|
+
{{/if}}
|
|
10027
|
+
`],
|
|
10013
10028
|
["auth/better-auth/server/base/tsconfig.json.hbs", `{
|
|
10014
10029
|
"extends": "@{{projectName}}/config/tsconfig.base.json",
|
|
10015
10030
|
"compilerOptions": {
|
|
@@ -22759,9 +22774,8 @@ web-build/
|
|
|
22759
22774
|
"version": "1.0.0",
|
|
22760
22775
|
"orientation": "portrait",
|
|
22761
22776
|
"icon": "./assets/images/icon.png",
|
|
22762
|
-
"scheme": "
|
|
22777
|
+
"scheme": "{{projectName}}",
|
|
22763
22778
|
"userInterfaceStyle": "automatic",
|
|
22764
|
-
"newArchEnabled": true,
|
|
22765
22779
|
"ios": {
|
|
22766
22780
|
"supportsTablet": true
|
|
22767
22781
|
},
|
|
@@ -22772,7 +22786,6 @@ web-build/
|
|
|
22772
22786
|
"backgroundImage": "./assets/images/android-icon-background.png",
|
|
22773
22787
|
"monochromeImage": "./assets/images/android-icon-monochrome.png"
|
|
22774
22788
|
},
|
|
22775
|
-
"edgeToEdgeEnabled": true,
|
|
22776
22789
|
"predictiveBackGestureEnabled": false,
|
|
22777
22790
|
"package": "com.anonymous.mybettertapp"
|
|
22778
22791
|
},
|
|
@@ -22801,7 +22814,6 @@ web-build/
|
|
|
22801
22814
|
}
|
|
22802
22815
|
}
|
|
22803
22816
|
}
|
|
22804
|
-
|
|
22805
22817
|
`],
|
|
22806
22818
|
["frontend/native/bare/app/_layout.tsx.hbs", `{{#if (includes examples "ai")}}
|
|
22807
22819
|
import "@/polyfills";
|
|
@@ -22844,10 +22856,8 @@ import { queryClient } from "@/utils/trpc";
|
|
|
22844
22856
|
import { queryClient } from "@/utils/orpc";
|
|
22845
22857
|
{{/if}}
|
|
22846
22858
|
import { NAV_THEME } from "@/lib/constants";
|
|
22847
|
-
import React, { useRef } from "react";
|
|
22848
22859
|
import { useColorScheme } from "@/lib/use-color-scheme";
|
|
22849
|
-
import {
|
|
22850
|
-
import { setAndroidNavigationBar } from "@/lib/android-navigation-bar";
|
|
22860
|
+
import { StyleSheet } from "react-native";
|
|
22851
22861
|
|
|
22852
22862
|
const LIGHT_THEME: Theme = {
|
|
22853
22863
|
...DefaultTheme,
|
|
@@ -22868,11 +22878,6 @@ const convex = new ConvexReactClient(env.EXPO_PUBLIC_CONVEX_URL, {
|
|
|
22868
22878
|
});
|
|
22869
22879
|
{{/if}}
|
|
22870
22880
|
|
|
22871
|
-
const useIsomorphicLayoutEffect =
|
|
22872
|
-
Platform.OS === "web" && typeof window === "undefined"
|
|
22873
|
-
? React.useEffect
|
|
22874
|
-
: React.useLayoutEffect;
|
|
22875
|
-
|
|
22876
22881
|
const styles = StyleSheet.create({
|
|
22877
22882
|
container: {
|
|
22878
22883
|
flex: 1,
|
|
@@ -22880,22 +22885,7 @@ const styles = StyleSheet.create({
|
|
|
22880
22885
|
});
|
|
22881
22886
|
|
|
22882
22887
|
export default function RootLayout() {
|
|
22883
|
-
const
|
|
22884
|
-
const { colorScheme, isDarkColorScheme } = useColorScheme();
|
|
22885
|
-
const [isColorSchemeLoaded, setIsColorSchemeLoaded] = React.useState(false);
|
|
22886
|
-
|
|
22887
|
-
useIsomorphicLayoutEffect(() => {
|
|
22888
|
-
if (hasMounted.current) {
|
|
22889
|
-
return;
|
|
22890
|
-
}
|
|
22891
|
-
setAndroidNavigationBar(colorScheme);
|
|
22892
|
-
setIsColorSchemeLoaded(true);
|
|
22893
|
-
hasMounted.current = true;
|
|
22894
|
-
}, []);
|
|
22895
|
-
|
|
22896
|
-
if (!isColorSchemeLoaded) {
|
|
22897
|
-
return null;
|
|
22898
|
-
}
|
|
22888
|
+
const { isDarkColorScheme } = useColorScheme();
|
|
22899
22889
|
|
|
22900
22890
|
return (
|
|
22901
22891
|
<>
|
|
@@ -22967,7 +22957,8 @@ export default function RootLayout() {
|
|
|
22967
22957
|
{{/if}}
|
|
22968
22958
|
</>
|
|
22969
22959
|
);
|
|
22970
|
-
}
|
|
22960
|
+
}
|
|
22961
|
+
`],
|
|
22971
22962
|
["frontend/native/bare/app/(drawer)/_layout.tsx.hbs", `import { Ionicons, MaterialIcons } from "@expo/vector-icons";
|
|
22972
22963
|
import { Link } from "expo-router";
|
|
22973
22964
|
import { Drawer } from "expo-router/drawer";
|
|
@@ -23607,19 +23598,6 @@ export const TabBarIcon = (props: {
|
|
|
23607
23598
|
return <FontAwesome size={24} style=\\{{ marginBottom: -3 }} {...props} />;
|
|
23608
23599
|
};
|
|
23609
23600
|
|
|
23610
|
-
`],
|
|
23611
|
-
["frontend/native/bare/lib/android-navigation-bar.tsx.hbs", `import * as NavigationBar from "expo-navigation-bar";
|
|
23612
|
-
import { Platform } from "react-native";
|
|
23613
|
-
import { NAV_THEME } from "@/lib/constants";
|
|
23614
|
-
|
|
23615
|
-
export async function setAndroidNavigationBar(theme: "light" | "dark") {
|
|
23616
|
-
if (Platform.OS !== "android") return;
|
|
23617
|
-
await NavigationBar.setButtonStyleAsync(theme === "dark" ? "light" : "dark");
|
|
23618
|
-
await NavigationBar.setBackgroundColorAsync(
|
|
23619
|
-
theme === "dark" ? NAV_THEME.dark.background : NAV_THEME.light.background,
|
|
23620
|
-
);
|
|
23621
|
-
}
|
|
23622
|
-
|
|
23623
23601
|
`],
|
|
23624
23602
|
["frontend/native/bare/lib/constants.ts.hbs", `export const NAV_THEME = {
|
|
23625
23603
|
light: {
|
|
@@ -23667,10 +23645,7 @@ const { getDefaultConfig } = require("expo/metro-config");
|
|
|
23667
23645
|
|
|
23668
23646
|
const config = getDefaultConfig(__dirname);
|
|
23669
23647
|
|
|
23670
|
-
config.resolver.unstable_enablePackageExports = true;
|
|
23671
|
-
|
|
23672
23648
|
module.exports = config;
|
|
23673
|
-
|
|
23674
23649
|
`],
|
|
23675
23650
|
["frontend/native/bare/package.json.hbs", `{
|
|
23676
23651
|
"name": "native",
|
|
@@ -23693,31 +23668,31 @@ module.exports = config;
|
|
|
23693
23668
|
"@stardazed/streams-text-encoding": "^1.0.2",
|
|
23694
23669
|
"@ungap/structured-clone": "^1.3.0",
|
|
23695
23670
|
{{/if}}
|
|
23696
|
-
"expo": "^
|
|
23697
|
-
"expo-constants": "~
|
|
23698
|
-
"expo-crypto": "~
|
|
23699
|
-
"expo-
|
|
23700
|
-
"expo-
|
|
23701
|
-
"expo-network": "~
|
|
23702
|
-
"expo-router": "~
|
|
23703
|
-
"expo-secure-store": "~
|
|
23704
|
-
"expo-splash-screen": "~
|
|
23705
|
-
"expo-status-bar": "~
|
|
23706
|
-
"expo-system-ui": "~
|
|
23707
|
-
"expo-web-browser": "~
|
|
23708
|
-
"react": "19.
|
|
23709
|
-
"react-dom": "19.
|
|
23710
|
-
"react-native": "0.
|
|
23711
|
-
"react-native-gesture-handler": "~2.
|
|
23712
|
-
"react-native-reanimated": "
|
|
23671
|
+
"expo": "^55.0.0",
|
|
23672
|
+
"expo-constants": "~55.0.7",
|
|
23673
|
+
"expo-crypto": "~55.0.8",
|
|
23674
|
+
"expo-font": "~55.0.4",
|
|
23675
|
+
"expo-linking": "~55.0.7",
|
|
23676
|
+
"expo-network": "~55.0.8",
|
|
23677
|
+
"expo-router": "~55.0.2",
|
|
23678
|
+
"expo-secure-store": "~55.0.8",
|
|
23679
|
+
"expo-splash-screen": "~55.0.9",
|
|
23680
|
+
"expo-status-bar": "~55.0.4",
|
|
23681
|
+
"expo-system-ui": "~55.0.9",
|
|
23682
|
+
"expo-web-browser": "~55.0.9",
|
|
23683
|
+
"react": "19.2.0",
|
|
23684
|
+
"react-dom": "19.2.0",
|
|
23685
|
+
"react-native": "0.83.2",
|
|
23686
|
+
"react-native-gesture-handler": "~2.30.0",
|
|
23687
|
+
"react-native-reanimated": "4.2.1",
|
|
23713
23688
|
"react-native-safe-area-context": "~5.6.0",
|
|
23714
|
-
"react-native-screens": "~4.
|
|
23689
|
+
"react-native-screens": "~4.23.0",
|
|
23715
23690
|
"react-native-web": "^0.21.0",
|
|
23716
|
-
"react-native-worklets": "
|
|
23691
|
+
"react-native-worklets": "0.7.2"
|
|
23717
23692
|
},
|
|
23718
23693
|
"devDependencies": {
|
|
23719
23694
|
"@babel/core": "^7.26.10",
|
|
23720
|
-
"@types/react": "~19.
|
|
23695
|
+
"@types/react": "~19.2.10"
|
|
23721
23696
|
},
|
|
23722
23697
|
"private": true
|
|
23723
23698
|
}
|
|
@@ -23775,9 +23750,8 @@ android
|
|
|
23775
23750
|
"version": "1.0.0",
|
|
23776
23751
|
"orientation": "portrait",
|
|
23777
23752
|
"icon": "./assets/images/icon.png",
|
|
23778
|
-
"scheme": "
|
|
23753
|
+
"scheme": "{{projectName}}",
|
|
23779
23754
|
"userInterfaceStyle": "automatic",
|
|
23780
|
-
"newArchEnabled": true,
|
|
23781
23755
|
"ios": {
|
|
23782
23756
|
"supportsTablet": true
|
|
23783
23757
|
},
|
|
@@ -23788,7 +23762,6 @@ android
|
|
|
23788
23762
|
"backgroundImage": "./assets/images/android-icon-background.png",
|
|
23789
23763
|
"monochromeImage": "./assets/images/android-icon-monochrome.png"
|
|
23790
23764
|
},
|
|
23791
|
-
"edgeToEdgeEnabled": true,
|
|
23792
23765
|
"predictiveBackGestureEnabled": false,
|
|
23793
23766
|
"package": "com.anonymous.mybettertapp"
|
|
23794
23767
|
},
|
|
@@ -24781,42 +24754,44 @@ module.exports = config;
|
|
|
24781
24754
|
"@stardazed/streams-text-encoding": "^1.0.2",
|
|
24782
24755
|
"@ungap/structured-clone": "^1.3.0",
|
|
24783
24756
|
{{/if}}
|
|
24784
|
-
"babel-preset-expo": "~
|
|
24785
|
-
"expo": "
|
|
24786
|
-
"expo-constants": "~
|
|
24787
|
-
"expo-crypto": "~
|
|
24788
|
-
"expo-
|
|
24789
|
-
"expo-
|
|
24790
|
-
"expo-
|
|
24791
|
-
"expo-
|
|
24792
|
-
"expo-
|
|
24793
|
-
|
|
24794
|
-
"expo-
|
|
24795
|
-
"expo-
|
|
24796
|
-
"expo-
|
|
24797
|
-
"
|
|
24798
|
-
"react
|
|
24799
|
-
"react-
|
|
24757
|
+
"babel-preset-expo": "~55.0.8",
|
|
24758
|
+
"expo": "^55.0.0",
|
|
24759
|
+
"expo-constants": "~55.0.7",
|
|
24760
|
+
"expo-crypto": "~55.0.8",
|
|
24761
|
+
"expo-dev-client": "~55.0.9",
|
|
24762
|
+
"expo-font": "~55.0.4",
|
|
24763
|
+
"expo-linking": "~55.0.7",
|
|
24764
|
+
"expo-network": "~55.0.8",
|
|
24765
|
+
"expo-router": "~55.0.2",
|
|
24766
|
+
"expo-secure-store": "~55.0.8",
|
|
24767
|
+
"expo-splash-screen": "~55.0.9",
|
|
24768
|
+
"expo-status-bar": "~55.0.4",
|
|
24769
|
+
"expo-system-ui": "~55.0.9",
|
|
24770
|
+
"expo-web-browser": "~55.0.9",
|
|
24771
|
+
"react": "19.2.0",
|
|
24772
|
+
"react-dom": "19.2.0",
|
|
24773
|
+
"react-native": "0.83.2",
|
|
24800
24774
|
"react-native-edge-to-edge": "^1.7.0",
|
|
24801
|
-
"react-native-gesture-handler": "~2.
|
|
24775
|
+
"react-native-gesture-handler": "~2.30.0",
|
|
24802
24776
|
"react-native-nitro-modules": "^0.33.2",
|
|
24803
|
-
"react-native-reanimated": "
|
|
24777
|
+
"react-native-reanimated": "4.2.1",
|
|
24804
24778
|
"react-native-safe-area-context": "~5.6.0",
|
|
24805
|
-
"react-native-screens": "~4.
|
|
24779
|
+
"react-native-screens": "~4.23.0",
|
|
24806
24780
|
"react-native-unistyles": "^3.0.22",
|
|
24807
24781
|
"react-native-web": "^0.21.2",
|
|
24808
|
-
"react-native-worklets": "
|
|
24782
|
+
"react-native-worklets": "0.7.2"
|
|
24809
24783
|
},
|
|
24810
24784
|
"devDependencies": {
|
|
24811
24785
|
"ajv": "^8.17.1",
|
|
24812
24786
|
"@babel/core": "^7.28.0",
|
|
24813
|
-
"@types/react": "~19.
|
|
24787
|
+
"@types/react": "~19.2.10"
|
|
24814
24788
|
}
|
|
24815
24789
|
}
|
|
24816
24790
|
`],
|
|
24817
24791
|
["frontend/native/unistyles/theme.ts.hbs", `const sharedColors = {
|
|
24818
24792
|
success: "#22C55E",
|
|
24819
24793
|
destructive: "#EF4444",
|
|
24794
|
+
destructiveForeground: "#FFFFFF",
|
|
24820
24795
|
warning: "#F59E0B",
|
|
24821
24796
|
info: "#3B82F6",
|
|
24822
24797
|
} as const;
|
|
@@ -25736,7 +25711,7 @@ module.exports = uniwindConfig;
|
|
|
25736
25711
|
"web": "expo start --web"
|
|
25737
25712
|
},
|
|
25738
25713
|
"dependencies": {
|
|
25739
|
-
"@expo/metro-runtime": "~
|
|
25714
|
+
"@expo/metro-runtime": "~55.0.6",
|
|
25740
25715
|
"@expo/vector-icons": "^15.0.3",
|
|
25741
25716
|
"@gorhom/bottom-sheet": "^5",
|
|
25742
25717
|
"@react-navigation/drawer": "^7.3.9",
|
|
@@ -25745,35 +25720,36 @@ module.exports = uniwindConfig;
|
|
|
25745
25720
|
"@stardazed/streams-text-encoding": "^1.0.2",
|
|
25746
25721
|
"@ungap/structured-clone": "^1.3.0",
|
|
25747
25722
|
{{/if}}
|
|
25748
|
-
"expo": "^
|
|
25749
|
-
"expo-constants": "~
|
|
25750
|
-
"expo-font": "~
|
|
25751
|
-
"expo-haptics": "
|
|
25752
|
-
"expo-linking": "~
|
|
25753
|
-
"expo-network": "~
|
|
25754
|
-
"expo-router": "~
|
|
25755
|
-
"expo-secure-store": "~
|
|
25756
|
-
"expo-status-bar": "~
|
|
25757
|
-
"
|
|
25758
|
-
"
|
|
25759
|
-
"react
|
|
25760
|
-
"react-
|
|
25761
|
-
"react-native
|
|
25762
|
-
"react-native-
|
|
25763
|
-
"react-native-
|
|
25723
|
+
"expo": "^55.0.0",
|
|
25724
|
+
"expo-constants": "~55.0.7",
|
|
25725
|
+
"expo-font": "~55.0.4",
|
|
25726
|
+
"expo-haptics": "~55.0.8",
|
|
25727
|
+
"expo-linking": "~55.0.7",
|
|
25728
|
+
"expo-network": "~55.0.8",
|
|
25729
|
+
"expo-router": "~55.0.2",
|
|
25730
|
+
"expo-secure-store": "~55.0.8",
|
|
25731
|
+
"expo-status-bar": "~55.0.4",
|
|
25732
|
+
"expo-web-browser": "~55.0.9",
|
|
25733
|
+
"heroui-native": "^1.0.0-rc.3",
|
|
25734
|
+
"react": "19.2.0",
|
|
25735
|
+
"react-dom": "19.2.0",
|
|
25736
|
+
"react-native": "0.83.2",
|
|
25737
|
+
"react-native-gesture-handler": "~2.30.0",
|
|
25738
|
+
"react-native-keyboard-controller": "1.20.7",
|
|
25739
|
+
"react-native-reanimated": "4.2.1",
|
|
25764
25740
|
"react-native-safe-area-context": "~5.6.0",
|
|
25765
|
-
"react-native-screens": "~4.
|
|
25766
|
-
"react-native-svg": "15.
|
|
25741
|
+
"react-native-screens": "~4.23.0",
|
|
25742
|
+
"react-native-svg": "15.15.3",
|
|
25767
25743
|
"react-native-web": "^0.21.0",
|
|
25768
|
-
"react-native-worklets": "0.
|
|
25744
|
+
"react-native-worklets": "0.7.2",
|
|
25769
25745
|
"tailwind-merge": "^3.4.0",
|
|
25770
25746
|
"tailwind-variants": "^3.2.2",
|
|
25771
25747
|
"tailwindcss": "^4.1.18",
|
|
25772
|
-
"uniwind": "^1.
|
|
25748
|
+
"uniwind": "^1.4.0"
|
|
25773
25749
|
},
|
|
25774
25750
|
"devDependencies": {
|
|
25775
25751
|
"@types/node": "^24.10.0",
|
|
25776
|
-
"@types/react": "~19.
|
|
25752
|
+
"@types/react": "~19.2.10"
|
|
25777
25753
|
}
|
|
25778
25754
|
}
|
|
25779
25755
|
`],
|
|
@@ -30085,7 +30061,7 @@ function SuccessPage() {
|
|
|
30085
30061
|
</div>
|
|
30086
30062
|
`]
|
|
30087
30063
|
]);
|
|
30088
|
-
const TEMPLATE_COUNT =
|
|
30064
|
+
const TEMPLATE_COUNT = 435;
|
|
30089
30065
|
|
|
30090
30066
|
//#endregion
|
|
30091
30067
|
export { EMBEDDED_TEMPLATES, GeneratorError, Handlebars, TEMPLATE_COUNT, VirtualFileSystem, dependencyVersionMap, generate, generateReproducibleCommand, isBinaryFile, processAddonTemplates, processAddonsDeps, processFileContent, processTemplateString, transformFilename, writeBtsConfigToVfs };
|