authverse 1.1.7 → 1.1.8-beta.2

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 (24) hide show
  1. package/dist/index.cjs +384 -121
  2. package/dist/index.js +384 -121
  3. package/dist/template/proxy/proxy.ts +1 -1
  4. package/package.json +3 -3
  5. /package/dist/template/{TanstackState → TanstackStart}/components/AppleOAuthButton.tsx +0 -0
  6. /package/dist/template/{TanstackState → TanstackStart}/components/FacebookOAuthButton.tsx +0 -0
  7. /package/dist/template/{TanstackState → TanstackStart}/components/ForgetComponent.tsx +0 -0
  8. /package/dist/template/{TanstackState → TanstackStart}/components/GithubProviders.tsx +0 -0
  9. /package/dist/template/{TanstackState → TanstackStart}/components/GoogleOAuthButton.tsx +0 -0
  10. /package/dist/template/{TanstackState → TanstackStart}/components/LinkedInOAuthButton.tsx +0 -0
  11. /package/dist/template/{TanstackState → TanstackStart}/components/LoginComponent.tsx +0 -0
  12. /package/dist/template/{TanstackState → TanstackStart}/components/ResetComponent.tsx +0 -0
  13. /package/dist/template/{TanstackState → TanstackStart}/components/SingUpComponent.tsx +0 -0
  14. /package/dist/template/{TanstackState → TanstackStart}/components/TwitterOAuthButton.tsx +0 -0
  15. /package/dist/template/{TanstackState → TanstackStart}/lib/Mongodb/auth.ts +0 -0
  16. /package/dist/template/{TanstackState → TanstackStart}/lib/Mysql/auth.ts +0 -0
  17. /package/dist/template/{TanstackState → TanstackStart}/lib/Postgresql/auth.ts +0 -0
  18. /package/dist/template/{TanstackState → TanstackStart}/lib/auth-drizzle.ts +0 -0
  19. /package/dist/template/{TanstackState → TanstackStart}/middleware/auth.ts +0 -0
  20. /package/dist/template/{TanstackState → TanstackStart}/routes/$.ts +0 -0
  21. /package/dist/template/{TanstackState → TanstackStart}/routes/auth/forget.tsx +0 -0
  22. /package/dist/template/{TanstackState → TanstackStart}/routes/auth/login.tsx +0 -0
  23. /package/dist/template/{TanstackState → TanstackStart}/routes/auth/reset-password.tsx +0 -0
  24. /package/dist/template/{TanstackState → TanstackStart}/routes/auth/signup.tsx +0 -0
package/dist/index.cjs CHANGED
@@ -83,6 +83,14 @@ var runCommand = (cmd) => {
83
83
  }
84
84
  };
85
85
 
86
+ // utils/CreateFolder.ts
87
+ var CreateFolder = ({
88
+ srcFolder,
89
+ destFolder
90
+ }) => {
91
+ return `\u2022 ${srcFolder === "" ? "" : srcFolder + "/"}${destFolder}`;
92
+ };
93
+
86
94
  // script/authUi.ts
87
95
  var import_meta = {};
88
96
  var shadcnComponents = [
@@ -97,7 +105,8 @@ var shadcnComponents = [
97
105
  var authUiRun = async ({
98
106
  folder,
99
107
  packageJson: packageJson2,
100
- cmd
108
+ cmd,
109
+ database
101
110
  }) => {
102
111
  try {
103
112
  const projectDir = process.cwd();
@@ -198,7 +207,25 @@ ${layoutContent}`;
198
207
  }
199
208
  import_fs.default.writeFileSync(layoutPath, layoutContent, "utf-8");
200
209
  }
201
- console.log(import_chalk.default.green("\nSetup completed!\n"));
210
+ console.log(import_chalk.default.green("\nCompleted installation successfully"));
211
+ console.log(import_chalk.default.cyan("\nInstall Package:"));
212
+ console.log(import_chalk.default.white(`\u2022 ${database} schema
213
+ \u2022 better-auth`));
214
+ console.log(import_chalk.default.cyan("\nFiles created:"));
215
+ console.log(
216
+ import_chalk.default.white(
217
+ `${CreateFolder({ srcFolder: folder, destFolder: "lib/auth.ts" })}
218
+ ${CreateFolder({ srcFolder: folder, destFolder: "lib/auth-client.ts" })}
219
+ ${CreateFolder({ srcFolder: folder, destFolder: "app/api/auth/[...all]/route.ts" })}
220
+ ${CreateFolder({ srcFolder: folder, destFolder: "proxy.ts" })}
221
+ ${CreateFolder({ srcFolder: folder, destFolder: "components/authverse/LoginComponent.tsx" })}
222
+ ${CreateFolder({ srcFolder: folder, destFolder: "components/authverse/SingUpComponent.tsx" })}
223
+ ${CreateFolder({ srcFolder: folder, destFolder: "app/auth/layout.tsx" })}
224
+ ${CreateFolder({ srcFolder: folder, destFolder: "app/auth/login/page.tsx" })}
225
+ ${CreateFolder({ srcFolder: folder, destFolder: "app/auth/signup/page.tsx" })}
226
+ `
227
+ )
228
+ );
202
229
  } catch (error) {
203
230
  console.log(import_chalk.default.red("\nauthUi setup failed:"), error);
204
231
  }
@@ -395,12 +422,22 @@ BETTER_AUTH_URL=http://localhost:3000
395
422
  await authUiRun({
396
423
  folder: srcFolder,
397
424
  packageJson: packageJson2,
398
- cmd
425
+ cmd,
426
+ database: "prisma"
399
427
  });
400
428
  } else {
429
+ console.log(import_chalk2.default.green("\nCompleted installation successfully"));
430
+ console.log(import_chalk2.default.cyan("\nInstall Package:"));
431
+ console.log(import_chalk2.default.white(`\u2022 prisma ${database} schema
432
+ \u2022 better-auth`));
433
+ console.log(import_chalk2.default.cyan("\nFiles created:"));
401
434
  console.log(
402
- import_chalk2.default.green(
403
- "\nPrisma setup completed successfully and better-auth installed\n"
435
+ import_chalk2.default.white(
436
+ `${CreateFolder({ srcFolder, destFolder: "lib/auth.ts" })}
437
+ ${CreateFolder({ srcFolder, destFolder: "lib/auth-client.ts" })}
438
+ ${CreateFolder({ srcFolder, destFolder: "app/api/auth/[...all]/route.ts" })}
439
+ ${CreateFolder({ srcFolder, destFolder: "proxy.ts" })}
440
+ `
404
441
  )
405
442
  );
406
443
  }
@@ -567,12 +604,22 @@ BETTER_AUTH_URL=http://localhost:3000
567
604
  await authUiRun({
568
605
  folder: srcFolder,
569
606
  packageJson: packageJson2,
570
- cmd
607
+ cmd,
608
+ database: "drizzle"
571
609
  });
572
610
  } else {
611
+ console.log(import_chalk3.default.green("\nCompleted installation successfully"));
612
+ console.log(import_chalk3.default.cyan("\nInstall Package:"));
613
+ console.log(import_chalk3.default.white(`\u2022 drizzle schema
614
+ \u2022 better-auth`));
615
+ console.log(import_chalk3.default.cyan("\nFiles created:"));
573
616
  console.log(
574
- import_chalk3.default.green(
575
- "\nDrizzle setup completed successfully and better-auth installed\n"
617
+ import_chalk3.default.white(
618
+ `${CreateFolder({ srcFolder, destFolder: "lib/auth.ts" })}
619
+ ${CreateFolder({ srcFolder, destFolder: "lib/auth-client.ts" })}
620
+ ${CreateFolder({ srcFolder, destFolder: "app/api/auth/[...all]/route.ts" })}
621
+ ${CreateFolder({ srcFolder, destFolder: "proxy.ts" })}
622
+ `
576
623
  )
577
624
  );
578
625
  }
@@ -581,7 +628,7 @@ BETTER_AUTH_URL=http://localhost:3000
581
628
  }
582
629
  };
583
630
 
584
- // script/prismaRunTanstackState.ts
631
+ // script/prismaRunTanstackStart.ts
585
632
  var import_chalk5 = __toESM(require("chalk"), 1);
586
633
  var import_path5 = __toESM(require("path"), 1);
587
634
  var import_url5 = require("url");
@@ -604,7 +651,8 @@ var shadcnComponents2 = [
604
651
  ];
605
652
  var authUiTanstackState = async ({
606
653
  packageJson: packageJson2,
607
- cmd
654
+ cmd,
655
+ database
608
656
  }) => {
609
657
  try {
610
658
  const projectDir = process.cwd();
@@ -636,7 +684,7 @@ var authUiTanstackState = async ({
636
684
  const srcPath = import_path4.default.join(projectDir, "src");
637
685
  const componentPath = import_path4.default.resolve(
638
686
  __dirname,
639
- "./template/TanstackState/components"
687
+ "./template/TanstackStart/components"
640
688
  );
641
689
  const authversePathComponents = import_path4.default.join(
642
690
  srcPath,
@@ -660,7 +708,7 @@ var authUiTanstackState = async ({
660
708
  }
661
709
  const templateRoutesPage = import_path4.default.resolve(
662
710
  __dirname,
663
- "./template/TanstackState/routes/auth"
711
+ "./template/TanstackStart/routes/auth"
664
712
  );
665
713
  import_fs4.default.copyFileSync(
666
714
  `${templateRoutesPage}/login.tsx`,
@@ -685,15 +733,33 @@ ${rootContent}`;
685
733
  }
686
734
  import_fs4.default.writeFileSync(rootPath, rootContent, "utf-8");
687
735
  }
688
- console.log(import_chalk4.default.green("\nSetup completed!\n"));
736
+ console.log(import_chalk4.default.green("\nCompleted installation successfully"));
737
+ console.log(import_chalk4.default.cyan("\nInstall Package:"));
738
+ console.log(import_chalk4.default.white(`\u2022 ${database} schema
739
+ \u2022 better-auth`));
740
+ console.log(import_chalk4.default.cyan("\nFiles created:"));
741
+ console.log(
742
+ import_chalk4.default.white(
743
+ `\u2022 src/lib/auth.ts
744
+ \u2022 src/lib/auth-client.ts
745
+ \u2022 src/app/api/auth/[...all]/route.ts
746
+ \u2022 src/proxy.ts
747
+ \u2022 src/components/authverse/LoginComponent.tsx
748
+ \u2022 src/components/authverse/SingUpComponent.tsx
749
+ \u2022 src/app/auth/layout.tsx
750
+ \u2022 src/app/auth/login/page.tsx
751
+ \u2022 src/app/auth/signup/page.tsx
752
+ `
753
+ )
754
+ );
689
755
  } catch (error) {
690
756
  console.log(import_chalk4.default.red("Auth Ui Tanstack State Error: ", error));
691
757
  }
692
758
  };
693
759
 
694
- // script/prismaRunTanstackState.ts
760
+ // script/prismaRunTanstackStart.ts
695
761
  var import_meta5 = {};
696
- var prismaRunTanstackState = async ({
762
+ var prismaRunTanstackStart = async ({
697
763
  authUi,
698
764
  database,
699
765
  cmd
@@ -777,7 +843,7 @@ BETTER_AUTH_URL=http://localhost:3000
777
843
  }
778
844
  const authTemplatePath = import_path5.default.resolve(
779
845
  __dirname,
780
- `./template/TanstackState/lib/${database}/auth.ts`
846
+ `./template/TanstackStart/lib/${database}/auth.ts`
781
847
  );
782
848
  const authDestinationPath = import_path5.default.join(libPath, "auth.ts");
783
849
  import_fs5.default.copyFileSync(authTemplatePath, authDestinationPath);
@@ -793,13 +859,13 @@ BETTER_AUTH_URL=http://localhost:3000
793
859
  }
794
860
  const authMiddlewareTemplatePath = import_path5.default.resolve(
795
861
  __dirname,
796
- `./template/TanstackState/middleware/auth.ts`
862
+ `./template/TanstackStart/middleware/auth.ts`
797
863
  );
798
864
  const authMiddlewareDestinationPath = import_path5.default.join(middlewarePath, "auth.ts");
799
865
  import_fs5.default.copyFileSync(authMiddlewareTemplatePath, authMiddlewareDestinationPath);
800
866
  const fileRouteTemplatePath = import_path5.default.resolve(
801
867
  __dirname,
802
- `./template/TanstackState/routes/$.ts`
868
+ `./template/TanstackStart/routes/$.ts`
803
869
  );
804
870
  const fileRouteDestinationPath = import_path5.default.join(
805
871
  srcPath,
@@ -815,12 +881,22 @@ BETTER_AUTH_URL=http://localhost:3000
815
881
  if (authUi) {
816
882
  await authUiTanstackState({
817
883
  packageJson: packageJson2,
818
- cmd
884
+ cmd,
885
+ database: "prisma"
819
886
  });
820
887
  } else {
888
+ console.log(import_chalk5.default.green("\nCompleted installation successfully"));
889
+ console.log(import_chalk5.default.cyan("\nInstall Package:"));
890
+ console.log(import_chalk5.default.white(`\u2022 prisma ${database} schema
891
+ \u2022 better-auth`));
892
+ console.log(import_chalk5.default.cyan("\nFiles created:"));
821
893
  console.log(
822
- import_chalk5.default.green(
823
- "\nPrisma setup completed successfully and better-auth installed\n"
894
+ import_chalk5.default.white(
895
+ `\u2022 src/lib/auth.ts
896
+ \u2022 src/lib/auth-client.ts
897
+ \u2022 src/app/api/auth/[...all]/route.ts
898
+ \u2022 src/proxy.ts
899
+ `
824
900
  )
825
901
  );
826
902
  }
@@ -829,13 +905,13 @@ BETTER_AUTH_URL=http://localhost:3000
829
905
  }
830
906
  };
831
907
 
832
- // script/drizzleRunTanstackState.ts
908
+ // script/drizzleRunTanstackStart.ts
833
909
  var import_chalk6 = __toESM(require("chalk"), 1);
834
910
  var import_path6 = __toESM(require("path"), 1);
835
911
  var import_fs6 = __toESM(require("fs"), 1);
836
912
  var import_url6 = require("url");
837
913
  var import_meta6 = {};
838
- var drizzleRunTanstackState = async ({
914
+ var drizzleRunTanstackStart = async ({
839
915
  authUi,
840
916
  cmd
841
917
  }) => {
@@ -877,7 +953,7 @@ BETTER_AUTH_URL=http://localhost:3000
877
953
  }
878
954
  const authTemplatePath = import_path6.default.resolve(
879
955
  __dirname,
880
- "./template/TanstackState/lib/auth-drizzle.ts"
956
+ "./template/TanstackStart/lib/auth-drizzle.ts"
881
957
  );
882
958
  const authDestinationPath = import_path6.default.join(libPath, "auth.ts");
883
959
  import_fs6.default.copyFileSync(authTemplatePath, authDestinationPath);
@@ -911,13 +987,13 @@ BETTER_AUTH_URL=http://localhost:3000
911
987
  }
912
988
  const authMiddlewareTemplatePath = import_path6.default.resolve(
913
989
  __dirname,
914
- `./template/TanstackState/middleware/auth.ts`
990
+ `./template/TanstackStart/middleware/auth.ts`
915
991
  );
916
992
  const authMiddlewareDestinationPath = import_path6.default.join(middlewarePath, "auth.ts");
917
993
  import_fs6.default.copyFileSync(authMiddlewareTemplatePath, authMiddlewareDestinationPath);
918
994
  const fileRouteTemplatePath = import_path6.default.resolve(
919
995
  __dirname,
920
- `./template/TanstackState/routes/$.ts`
996
+ `./template/TanstackStart/routes/$.ts`
921
997
  );
922
998
  const fileRouteDestinationPath = import_path6.default.join(
923
999
  srcPath,
@@ -933,12 +1009,22 @@ BETTER_AUTH_URL=http://localhost:3000
933
1009
  if (authUi) {
934
1010
  await authUiTanstackState({
935
1011
  packageJson: packageJson2,
936
- cmd
1012
+ cmd,
1013
+ database: "drizzle"
937
1014
  });
938
1015
  } else {
1016
+ console.log(import_chalk6.default.green("\nCompleted installation successfully"));
1017
+ console.log(import_chalk6.default.cyan("\nInstall Package:"));
1018
+ console.log(import_chalk6.default.white(`\u2022 drizzle schema
1019
+ \u2022 better-auth`));
1020
+ console.log(import_chalk6.default.cyan("\nFiles created:"));
939
1021
  console.log(
940
- import_chalk6.default.green(
941
- "\nDrizzle setup completed successfully and better-auth installed\n"
1022
+ import_chalk6.default.white(
1023
+ `\u2022 src/lib/auth.ts
1024
+ \u2022 src/lib/auth-client.ts
1025
+ \u2022 src/app/api/auth/[...all]/route.ts
1026
+ \u2022 src/proxy.ts
1027
+ `
942
1028
  )
943
1029
  );
944
1030
  }
@@ -971,7 +1057,7 @@ var getFramework = async () => {
971
1057
  const hasTanstackState = packageJson2?.devDependencies?.["@tanstack/devtools-vite"] || packageJson2?.devDependencies?.["@tanstack/eslint-config"] || packageJson2?.devDependencies?.["@tanstack/react-start"];
972
1058
  if (hasTanstackState) {
973
1059
  return {
974
- framework: "tanstack state",
1060
+ framework: "tanstack start",
975
1061
  error: null
976
1062
  };
977
1063
  }
@@ -1024,15 +1110,15 @@ var initAnswer = async () => {
1024
1110
  cmd: false
1025
1111
  });
1026
1112
  }
1027
- if (framework === "tanstack state" && answers.orm === "Prisma") {
1028
- await prismaRunTanstackState({
1113
+ if (framework === "tanstack start" && answers.orm === "Prisma") {
1114
+ await prismaRunTanstackStart({
1029
1115
  authUi: answers.authUi,
1030
1116
  database: answers.database,
1031
1117
  cmd: false
1032
1118
  });
1033
1119
  }
1034
- if (framework === "tanstack state" && answers.orm === "Drizzle") {
1035
- await drizzleRunTanstackState({
1120
+ if (framework === "tanstack start" && answers.orm === "Drizzle") {
1121
+ await drizzleRunTanstackStart({
1036
1122
  authUi: answers.authUi,
1037
1123
  cmd: false
1038
1124
  });
@@ -1149,7 +1235,13 @@ GOOGLE_CLIENT_SECRET=
1149
1235
  if (import_fs8.default.existsSync(componentTemplate)) {
1150
1236
  import_fs8.default.copyFileSync(componentTemplate, componentDest);
1151
1237
  }
1152
- console.log(import_chalk8.default.green("Google provider added & merged successfully"));
1238
+ console.log(import_chalk8.default.green("Google provider added & merged successfully\n"));
1239
+ console.log(
1240
+ import_chalk8.default.white(
1241
+ `${CreateFolder({ srcFolder: folder, destFolder: "components/authverse/GoogleOAuthButton.tsx" })}
1242
+ `
1243
+ )
1244
+ );
1153
1245
  } catch (error) {
1154
1246
  console.log(import_chalk8.default.red("googleRun error:"), error);
1155
1247
  }
@@ -1259,19 +1351,25 @@ GITHUB_CLIENT_SECRET=
1259
1351
  if (import_fs9.default.existsSync(componentTemplate)) {
1260
1352
  import_fs9.default.copyFileSync(componentTemplate, componentDest);
1261
1353
  }
1262
- console.log(import_chalk9.default.green("GitHub provider added & merged successfully"));
1354
+ console.log(import_chalk9.default.green("GitHub provider added & merged successfully\n"));
1355
+ console.log(
1356
+ import_chalk9.default.white(
1357
+ `${CreateFolder({ srcFolder: folder, destFolder: "components/authverse/GithubOAuthButton.tsx" })}
1358
+ `
1359
+ )
1360
+ );
1263
1361
  } catch (error) {
1264
1362
  console.log(import_chalk9.default.red("githubRun error:"), error);
1265
1363
  }
1266
1364
  };
1267
1365
 
1268
- // oauth/googleTanstackState.ts
1366
+ // oauth/googleTanstackStart.ts
1269
1367
  var import_chalk10 = __toESM(require("chalk"), 1);
1270
1368
  var import_fs10 = __toESM(require("fs"), 1);
1271
1369
  var import_path10 = __toESM(require("path"), 1);
1272
1370
  var import_url9 = require("url");
1273
1371
  var import_meta9 = {};
1274
- var googleTanstackState = async () => {
1372
+ var googleTanstackStart = async () => {
1275
1373
  try {
1276
1374
  const __filename = (0, import_url9.fileURLToPath)(import_meta9.url);
1277
1375
  const __dirname = import_path10.default.dirname(__filename);
@@ -1353,7 +1451,7 @@ GOOGLE_CLIENT_SECRET=
1353
1451
  }
1354
1452
  const componentTemplate = import_path10.default.resolve(
1355
1453
  __dirname,
1356
- "./template/TanstackState/components/GoogleOAuthButton.tsx"
1454
+ "./template/TanstackStart/components/GoogleOAuthButton.tsx"
1357
1455
  );
1358
1456
  const componentsDir = import_path10.default.join(srcPath, "components", "authverse");
1359
1457
  if (!import_fs10.default.existsSync(componentsDir)) {
@@ -1363,19 +1461,22 @@ GOOGLE_CLIENT_SECRET=
1363
1461
  if (import_fs10.default.existsSync(componentTemplate)) {
1364
1462
  import_fs10.default.copyFileSync(componentTemplate, componentDest);
1365
1463
  }
1366
- console.log(import_chalk10.default.green("Google provider added & merged successfully"));
1464
+ console.log(import_chalk10.default.green("Google provider added & merged successfully\n"));
1465
+ console.log(
1466
+ import_chalk10.default.white("\u2022 src/components/authverse/GoogleOAuthButton.tsx")
1467
+ );
1367
1468
  } catch (error) {
1368
1469
  console.log(import_chalk10.default.red("googleRunTanstackState error:"), error);
1369
1470
  }
1370
1471
  };
1371
1472
 
1372
- // oauth/githubTanstackState.ts
1473
+ // oauth/githubTanstackStart.ts
1373
1474
  var import_chalk11 = __toESM(require("chalk"), 1);
1374
1475
  var import_fs11 = __toESM(require("fs"), 1);
1375
1476
  var import_path11 = __toESM(require("path"), 1);
1376
1477
  var import_url10 = require("url");
1377
1478
  var import_meta10 = {};
1378
- var githubTanstackState = async () => {
1479
+ var githubTanstackStart = async () => {
1379
1480
  try {
1380
1481
  const __filename = (0, import_url10.fileURLToPath)(import_meta10.url);
1381
1482
  const __dirname = import_path11.default.dirname(__filename);
@@ -1457,7 +1558,7 @@ GITHUB_CLIENT_SECRET=
1457
1558
  }
1458
1559
  const componentTemplate = import_path11.default.resolve(
1459
1560
  __dirname,
1460
- "./template/TanstackState/components/GithubOAuthButton.tsx"
1561
+ "./template/TanstackStart/components/GithubOAuthButton.tsx"
1461
1562
  );
1462
1563
  const componentsDir = import_path11.default.join(srcPath, "components", "authverse");
1463
1564
  if (!import_fs11.default.existsSync(componentsDir)) {
@@ -1467,7 +1568,10 @@ GITHUB_CLIENT_SECRET=
1467
1568
  if (import_fs11.default.existsSync(componentTemplate)) {
1468
1569
  import_fs11.default.copyFileSync(componentTemplate, componentDest);
1469
1570
  }
1470
- console.log(import_chalk11.default.green("Github provider added & merged successfully"));
1571
+ console.log(import_chalk11.default.green("Github provider added & merged successfully\n"));
1572
+ console.log(
1573
+ import_chalk11.default.white("\u2022 src/components/authverse/GithubOAuthButton.tsx")
1574
+ );
1471
1575
  } catch (error) {
1472
1576
  console.log(import_chalk11.default.red("githubRunTanstackState error:"), error);
1473
1577
  }
@@ -1577,19 +1681,25 @@ FACEBOOK_CLIENT_SECRET=
1577
1681
  if (import_fs12.default.existsSync(componentTemplate)) {
1578
1682
  import_fs12.default.copyFileSync(componentTemplate, componentDest);
1579
1683
  }
1580
- console.log(import_chalk12.default.green("Facebook provider added & merged successfully"));
1684
+ console.log(import_chalk12.default.green("Facebook provider added & merged successfully\n"));
1685
+ console.log(
1686
+ import_chalk12.default.white(
1687
+ `${CreateFolder({ srcFolder: folder, destFolder: "components/authverse/FacebookOAuthButton.tsx" })}
1688
+ `
1689
+ )
1690
+ );
1581
1691
  } catch (error) {
1582
1692
  console.log(import_chalk12.default.red("facebookRun error:"), error);
1583
1693
  }
1584
1694
  };
1585
1695
 
1586
- // oauth/facebookTanstackState.ts
1696
+ // oauth/facebookTanstackStart.ts
1587
1697
  var import_chalk13 = __toESM(require("chalk"), 1);
1588
1698
  var import_fs13 = __toESM(require("fs"), 1);
1589
1699
  var import_path13 = __toESM(require("path"), 1);
1590
1700
  var import_url12 = require("url");
1591
1701
  var import_meta12 = {};
1592
- var facebookTanstackState = async () => {
1702
+ var facebookTanstackStart = async () => {
1593
1703
  try {
1594
1704
  const __filename = (0, import_url12.fileURLToPath)(import_meta12.url);
1595
1705
  const __dirname = import_path13.default.dirname(__filename);
@@ -1671,7 +1781,7 @@ FACEBOOK_CLIENT_SECRET=
1671
1781
  }
1672
1782
  const componentTemplate = import_path13.default.resolve(
1673
1783
  __dirname,
1674
- "./template/TanstackState/components/FacebookOAuthButton.tsx"
1784
+ "./template/TanstackStart/components/FacebookOAuthButton.tsx"
1675
1785
  );
1676
1786
  const componentsDir = import_path13.default.join(srcPath, "components", "authverse");
1677
1787
  if (!import_fs13.default.existsSync(componentsDir)) {
@@ -1681,7 +1791,10 @@ FACEBOOK_CLIENT_SECRET=
1681
1791
  if (import_fs13.default.existsSync(componentTemplate)) {
1682
1792
  import_fs13.default.copyFileSync(componentTemplate, componentDest);
1683
1793
  }
1684
- console.log(import_chalk13.default.green("Facebook provider added & merged successfully"));
1794
+ console.log(import_chalk13.default.green("Facebook provider added & merged successfully\n"));
1795
+ console.log(
1796
+ import_chalk13.default.white("\u2022 src/components/authverse/FacebookOAuthButton.tsx")
1797
+ );
1685
1798
  } catch (error) {
1686
1799
  console.log(import_chalk13.default.red("facebookRunTanstackState error:"), error);
1687
1800
  }
@@ -1791,19 +1904,25 @@ LINKEDIN_CLIENT_SECRET=
1791
1904
  if (import_fs14.default.existsSync(componentTemplate)) {
1792
1905
  import_fs14.default.copyFileSync(componentTemplate, componentDest);
1793
1906
  }
1794
- console.log(import_chalk14.default.green("LinkedIn provider added & merged successfully"));
1907
+ console.log(import_chalk14.default.green("LinkedIn provider added & merged successfully\n"));
1908
+ console.log(
1909
+ import_chalk14.default.white(
1910
+ `${CreateFolder({ srcFolder: folder, destFolder: "components/authverse/LinkedInOAuthButton.tsx" })}
1911
+ `
1912
+ )
1913
+ );
1795
1914
  } catch (error) {
1796
1915
  console.log(import_chalk14.default.red("LinkedIn error:"), error);
1797
1916
  }
1798
1917
  };
1799
1918
 
1800
- // oauth/LinkedInTanstackState.ts
1919
+ // oauth/LinkedInTanstackStart.ts
1801
1920
  var import_chalk15 = __toESM(require("chalk"), 1);
1802
1921
  var import_fs15 = __toESM(require("fs"), 1);
1803
1922
  var import_path15 = __toESM(require("path"), 1);
1804
1923
  var import_url14 = require("url");
1805
1924
  var import_meta14 = {};
1806
- var LinkedInTanstackState = async () => {
1925
+ var LinkedInTanstackStart = async () => {
1807
1926
  try {
1808
1927
  const __filename = (0, import_url14.fileURLToPath)(import_meta14.url);
1809
1928
  const __dirname = import_path15.default.dirname(__filename);
@@ -1885,7 +2004,7 @@ LINKEDIN_CLIENT_SECRET=
1885
2004
  }
1886
2005
  const componentTemplate = import_path15.default.resolve(
1887
2006
  __dirname,
1888
- "./template/TanstackState/components/LinkedInOAuthButton.tsx"
2007
+ "./template/TanstackStart/components/LinkedInOAuthButton.tsx"
1889
2008
  );
1890
2009
  const componentsDir = import_path15.default.join(srcPath, "components", "authverse");
1891
2010
  if (!import_fs15.default.existsSync(componentsDir)) {
@@ -1895,7 +2014,10 @@ LINKEDIN_CLIENT_SECRET=
1895
2014
  if (import_fs15.default.existsSync(componentTemplate)) {
1896
2015
  import_fs15.default.copyFileSync(componentTemplate, componentDest);
1897
2016
  }
1898
- console.log(import_chalk15.default.green("LinkedIn provider added & merged successfully"));
2017
+ console.log(import_chalk15.default.green("LinkedIn provider added & merged successfully\n"));
2018
+ console.log(
2019
+ import_chalk15.default.white("\u2022 src/components/authverse/LinkedInOAuthButton.tsx")
2020
+ );
1899
2021
  } catch (error) {
1900
2022
  console.log(import_chalk15.default.red("LinkedInTanstackState error:"), error);
1901
2023
  }
@@ -2005,19 +2127,25 @@ TWITTER_CLIENT_SECRET=
2005
2127
  if (import_fs16.default.existsSync(componentTemplate)) {
2006
2128
  import_fs16.default.copyFileSync(componentTemplate, componentDest);
2007
2129
  }
2008
- console.log(import_chalk16.default.green("twitter provider added & merged successfully"));
2130
+ console.log(import_chalk16.default.green("Twitter provider added & merged successfully\n"));
2131
+ console.log(
2132
+ import_chalk16.default.white(
2133
+ `${CreateFolder({ srcFolder: folder, destFolder: "components/authverse/TwitterOAuthButton.tsx" })}
2134
+ `
2135
+ )
2136
+ );
2009
2137
  } catch (error) {
2010
2138
  console.log(import_chalk16.default.red("twitter error:"), error);
2011
2139
  }
2012
2140
  };
2013
2141
 
2014
- // oauth/twitterTanstackState.ts
2142
+ // oauth/twitterTanstackStart.ts
2015
2143
  var import_chalk17 = __toESM(require("chalk"), 1);
2016
2144
  var import_fs17 = __toESM(require("fs"), 1);
2017
2145
  var import_path17 = __toESM(require("path"), 1);
2018
2146
  var import_url16 = require("url");
2019
2147
  var import_meta16 = {};
2020
- var twitterTanstackState = async () => {
2148
+ var twitterTanstackStart = async () => {
2021
2149
  try {
2022
2150
  const __filename = (0, import_url16.fileURLToPath)(import_meta16.url);
2023
2151
  const __dirname = import_path17.default.dirname(__filename);
@@ -2099,7 +2227,7 @@ TWITTER_CLIENT_SECRET=
2099
2227
  }
2100
2228
  const componentTemplate = import_path17.default.resolve(
2101
2229
  __dirname,
2102
- "./template/TanstackState/components/twitterOAuthButton.tsx"
2230
+ "./template/TanstackStart/components/twitterOAuthButton.tsx"
2103
2231
  );
2104
2232
  const componentsDir = import_path17.default.join(srcPath, "components", "authverse");
2105
2233
  if (!import_fs17.default.existsSync(componentsDir)) {
@@ -2109,7 +2237,10 @@ TWITTER_CLIENT_SECRET=
2109
2237
  if (import_fs17.default.existsSync(componentTemplate)) {
2110
2238
  import_fs17.default.copyFileSync(componentTemplate, componentDest);
2111
2239
  }
2112
- console.log(import_chalk17.default.green("twitter provider added & merged successfully"));
2240
+ console.log(import_chalk17.default.green("twitter provider added & merged successfully\n"));
2241
+ console.log(
2242
+ import_chalk17.default.white("\u2022 src/components/authverse/twitterOAuthButton.tsx")
2243
+ );
2113
2244
  } catch (error) {
2114
2245
  console.log(import_chalk17.default.red("twitter tanstack state error:"), error);
2115
2246
  }
@@ -2236,19 +2367,25 @@ APPLE_BUNDLE_ID=
2236
2367
  if (import_fs18.default.existsSync(componentTemplate)) {
2237
2368
  import_fs18.default.copyFileSync(componentTemplate, componentDest);
2238
2369
  }
2239
- console.log(import_chalk18.default.green("Apple provider added & merged successfully"));
2370
+ console.log(import_chalk18.default.green("Apple provider added & merged successfully\n"));
2371
+ console.log(
2372
+ import_chalk18.default.white(
2373
+ `${CreateFolder({ srcFolder: folder, destFolder: "components/authverse/AppleOAuthButton.tsx" })}
2374
+ `
2375
+ )
2376
+ );
2240
2377
  } catch (error) {
2241
2378
  console.log(import_chalk18.default.red("apple next error:"), error);
2242
2379
  }
2243
2380
  };
2244
2381
 
2245
- // oauth/AppleTanstackState.ts
2382
+ // oauth/AppleTanstackStart.ts
2246
2383
  var import_chalk19 = __toESM(require("chalk"), 1);
2247
2384
  var import_fs19 = __toESM(require("fs"), 1);
2248
2385
  var import_path19 = __toESM(require("path"), 1);
2249
2386
  var import_url18 = require("url");
2250
2387
  var import_meta18 = {};
2251
- var AppleTanstackState = async () => {
2388
+ var AppleTanstackStart = async () => {
2252
2389
  try {
2253
2390
  const __filename = (0, import_url18.fileURLToPath)(import_meta18.url);
2254
2391
  const __dirname = import_path19.default.dirname(__filename);
@@ -2347,7 +2484,7 @@ APPLE_BUNDLE_ID=
2347
2484
  }
2348
2485
  const componentTemplate = import_path19.default.resolve(
2349
2486
  __dirname,
2350
- "./template/TanstackState/components/AppleOAuthButton.tsx"
2487
+ "./template/TanstackStart/components/AppleOAuthButton.tsx"
2351
2488
  );
2352
2489
  const componentsDir = import_path19.default.join(srcPath, "components", "authverse");
2353
2490
  if (!import_fs19.default.existsSync(componentsDir)) {
@@ -2357,7 +2494,8 @@ APPLE_BUNDLE_ID=
2357
2494
  if (import_fs19.default.existsSync(componentTemplate)) {
2358
2495
  import_fs19.default.copyFileSync(componentTemplate, componentDest);
2359
2496
  }
2360
- console.log(import_chalk19.default.green("Apple provider added & merged successfully"));
2497
+ console.log(import_chalk19.default.green("Apple provider added & merged successfully\n"));
2498
+ console.log(import_chalk19.default.white("\u2022 src/components/authverse/AppleOAuthButton.tsx"));
2361
2499
  } catch (error) {
2362
2500
  console.log(import_chalk19.default.red("apple tanstack state error:"), error);
2363
2501
  }
@@ -2376,30 +2514,30 @@ var Oauth = async ({ oauth }) => {
2376
2514
  } else if (framework === "Next js" && oauth == "github") {
2377
2515
  await githubNext();
2378
2516
  }
2379
- if (framework === "tanstack state" && oauth == "google") {
2380
- await googleTanstackState();
2381
- } else if (framework === "tanstack state" && oauth == "github") {
2382
- await githubTanstackState();
2517
+ if (framework === "tanstack start" && oauth == "google") {
2518
+ await googleTanstackStart();
2519
+ } else if (framework === "tanstack start" && oauth == "github") {
2520
+ await githubTanstackStart();
2383
2521
  }
2384
2522
  if (framework === "Next js" && oauth == "facebook") {
2385
2523
  await facebookNext();
2386
- } else if (framework === "tanstack state" && oauth == "facebook") {
2387
- await facebookTanstackState();
2524
+ } else if (framework === "tanstack start" && oauth == "facebook") {
2525
+ await facebookTanstackStart();
2388
2526
  }
2389
2527
  if (framework === "Next js" && oauth === "LinkedIn") {
2390
2528
  await LinkedInNext();
2391
- } else if (framework === "tanstack state" && oauth === "LinkedIn") {
2392
- await LinkedInTanstackState();
2529
+ } else if (framework === "tanstack start" && oauth === "LinkedIn") {
2530
+ await LinkedInTanstackStart();
2393
2531
  }
2394
2532
  if (framework === "Next js" && oauth === "twitter") {
2395
2533
  await twitterNext();
2396
- } else if (framework === "tanstack state" && oauth === "twitter") {
2397
- await twitterTanstackState();
2534
+ } else if (framework === "tanstack start" && oauth === "twitter") {
2535
+ await twitterTanstackStart();
2398
2536
  }
2399
2537
  if (framework === "Next js" && oauth === "apple") {
2400
2538
  await AppleNext();
2401
- } else if (framework === "tanstack state" && oauth === "apple") {
2402
- await AppleTanstackState();
2539
+ } else if (framework === "tanstack start" && oauth === "apple") {
2540
+ await AppleTanstackStart();
2403
2541
  }
2404
2542
  if (oauth !== "google" && oauth !== "github" && oauth !== "facebook" && oauth !== "LinkedIn" && oauth !== "twitter" && oauth !== "apple") {
2405
2543
  console.log(import_chalk20.default.red("Invalid oauth provider"));
@@ -2444,6 +2582,10 @@ var gmailRun = async () => {
2444
2582
  console.log(import_chalk21.default.cyan("\n\u2699\uFE0F Installing @react-email/components...\n"));
2445
2583
  packageManager("@react-email/components");
2446
2584
  }
2585
+ if (!packageJson2.dependencies?.["@react-email/render"]) {
2586
+ console.log(import_chalk21.default.cyan("\n\u2699\uFE0F Installing @react-email/render...\n"));
2587
+ packageManager("@react-email/render");
2588
+ }
2447
2589
  const envPath = import_path20.default.join(projectDir, ".env");
2448
2590
  const envContent = import_fs20.default.readFileSync(envPath, "utf8");
2449
2591
  if (!envContent.includes("GMAIL_HOST") && !envContent.includes("GMAIL_PORT") && !envContent.includes("GMAIL_SERVICE") && !envContent.includes("GMAIL_MAIL") && !envContent.includes("GMAIL_NAME") && !envContent.includes("GMAIL_PASSWORD")) {
@@ -2473,18 +2615,34 @@ GMAIL_PASSWORD=`);
2473
2615
  }
2474
2616
  const libDestinationPath = import_path20.default.join(libPath, "email.ts");
2475
2617
  import_fs20.default.copyFileSync(templatePath, libDestinationPath);
2618
+ console.log(import_chalk21.default.green("\nCompleted installation successfully"));
2619
+ console.log(import_chalk21.default.cyan("\nInstall Package:"));
2620
+ console.log(
2621
+ import_chalk21.default.white(
2622
+ `\u2022 nodemailer
2623
+ \u2022 @react-email/components
2624
+ \u2022 @react-email/render`
2625
+ )
2626
+ );
2627
+ console.log(import_chalk21.default.cyan("\nFiles created:"));
2628
+ console.log(
2629
+ import_chalk21.default.white(
2630
+ `${CreateFolder({ srcFolder, destFolder: "lib/email.ts" })}
2631
+ `
2632
+ )
2633
+ );
2476
2634
  } catch (error) {
2477
2635
  console.log(import_chalk21.default.red(error));
2478
2636
  }
2479
2637
  };
2480
2638
 
2481
- // email/gmailRunTanstackState.ts
2639
+ // email/gmailRunTanstackStart.ts
2482
2640
  var import_chalk22 = __toESM(require("chalk"), 1);
2483
2641
  var import_path21 = __toESM(require("path"), 1);
2484
2642
  var import_fs21 = __toESM(require("fs"), 1);
2485
2643
  var import_url20 = require("url");
2486
2644
  var import_meta20 = {};
2487
- var gmailRunTanstackState = async () => {
2645
+ var gmailRunTanstackStart = async () => {
2488
2646
  try {
2489
2647
  const projectDir = process.cwd();
2490
2648
  const packageJsonPath = import_path21.default.join(projectDir, "package.json");
@@ -2500,6 +2658,10 @@ var gmailRunTanstackState = async () => {
2500
2658
  console.log(import_chalk22.default.cyan("\n\u2699\uFE0F Installing @react-email/components...\n"));
2501
2659
  packageManager("@react-email/components");
2502
2660
  }
2661
+ if (!packageJson2.dependencies?.["@react-email/render"]) {
2662
+ console.log(import_chalk22.default.cyan("\n\u2699\uFE0F Installing @react-email/render...\n"));
2663
+ packageManager("@react-email/render");
2664
+ }
2503
2665
  const envPath = import_path21.default.join(projectDir, ".env");
2504
2666
  const envContent = import_fs21.default.readFileSync(envPath, "utf8");
2505
2667
  if (!envContent.includes("GMAIL_HOST") && !envContent.includes("GMAIL_PORT") && !envContent.includes("GMAIL_SERVICE") && !envContent.includes("GMAIL_MAIL") && !envContent.includes("GMAIL_NAME") && !envContent.includes("GMAIL_PASSWORD")) {
@@ -2529,6 +2691,17 @@ GMAIL_PASSWORD=`);
2529
2691
  }
2530
2692
  const libDestinationPath = import_path21.default.join(libPath, "email.ts");
2531
2693
  import_fs21.default.copyFileSync(templatePath, libDestinationPath);
2694
+ console.log(import_chalk22.default.green("\nCompleted installation successfully"));
2695
+ console.log(import_chalk22.default.cyan("\nInstall Package:"));
2696
+ console.log(
2697
+ import_chalk22.default.white(
2698
+ `\u2022 nodemailer
2699
+ \u2022 @react-email/components
2700
+ \u2022 @react-email/render`
2701
+ )
2702
+ );
2703
+ console.log(import_chalk22.default.cyan("\nFiles created:"));
2704
+ console.log(import_chalk22.default.white("\u2022 src/lib/email.ts\n"));
2532
2705
  } catch (error) {
2533
2706
  console.log(import_chalk22.default.red(error));
2534
2707
  }
@@ -2557,6 +2730,10 @@ var awsSesRun = async () => {
2557
2730
  console.log(import_chalk23.default.cyan("\n\u2699\uFE0F Installing @react-email/components...\n"));
2558
2731
  packageManager("@react-email/components");
2559
2732
  }
2733
+ if (!packageJson2.dependencies?.["@react-email/render"]) {
2734
+ console.log(import_chalk23.default.cyan("\n\u2699\uFE0F Installing @react-email/render...\n"));
2735
+ packageManager("@react-email/render");
2736
+ }
2560
2737
  const envPath = import_path22.default.join(projectDir, ".env");
2561
2738
  const envContent = import_fs22.default.readFileSync(envPath, "utf8");
2562
2739
  if (!envContent.includes("AWS_SES_HOST") && !envContent.includes("AWS_SES_PORT") && !envContent.includes("AWS_SES_SERVICE") && !envContent.includes("AWS_SES_USER") && !envContent.includes("AWS_SES_PASS") && !envContent.includes("AWS_SES_FROM")) {
@@ -2586,18 +2763,34 @@ AWS_SES_FROM=`);
2586
2763
  }
2587
2764
  const libDestinationPath = import_path22.default.join(libPath, "email.ts");
2588
2765
  import_fs22.default.copyFileSync(templatePath, libDestinationPath);
2766
+ console.log(import_chalk23.default.green("\nCompleted installation successfully"));
2767
+ console.log(import_chalk23.default.cyan("\nInstall Package:"));
2768
+ console.log(
2769
+ import_chalk23.default.white(
2770
+ `\u2022 nodemailer
2771
+ \u2022 @react-email/components
2772
+ \u2022 @react-email/render`
2773
+ )
2774
+ );
2775
+ console.log(import_chalk23.default.cyan("\nFiles created:"));
2776
+ console.log(
2777
+ import_chalk23.default.white(
2778
+ `${CreateFolder({ srcFolder, destFolder: "lib/email.ts" })}
2779
+ `
2780
+ )
2781
+ );
2589
2782
  } catch (error) {
2590
2783
  console.log(import_chalk23.default.red(error));
2591
2784
  }
2592
2785
  };
2593
2786
 
2594
- // email/awsSesRunTanstackState.ts
2787
+ // email/awsSesRunTanstackStart.ts
2595
2788
  var import_chalk24 = __toESM(require("chalk"), 1);
2596
2789
  var import_path23 = __toESM(require("path"), 1);
2597
2790
  var import_fs23 = __toESM(require("fs"), 1);
2598
2791
  var import_url22 = require("url");
2599
2792
  var import_meta22 = {};
2600
- var awsSesRunTanstackState = async () => {
2793
+ var awsSesRunTanstackStart = async () => {
2601
2794
  try {
2602
2795
  const projectDir = process.cwd();
2603
2796
  const packageJsonPath = import_path23.default.join(projectDir, "package.json");
@@ -2613,6 +2806,10 @@ var awsSesRunTanstackState = async () => {
2613
2806
  console.log(import_chalk24.default.cyan("\n\u2699\uFE0F Installing @react-email/components...\n"));
2614
2807
  packageManager("@react-email/components");
2615
2808
  }
2809
+ if (!packageJson2.dependencies?.["@react-email/render"]) {
2810
+ console.log(import_chalk24.default.cyan("\n\u2699\uFE0F Installing @react-email/render...\n"));
2811
+ packageManager("@react-email/render");
2812
+ }
2616
2813
  const envPath = import_path23.default.join(projectDir, ".env");
2617
2814
  const envContent = import_fs23.default.readFileSync(envPath, "utf8");
2618
2815
  if (!envContent.includes("AWS_SES_HOST") && !envContent.includes("AWS_SES_PORT") && !envContent.includes("AWS_SES_SERVICE") && !envContent.includes("AWS_SES_USER") && !envContent.includes("AWS_SES_PASS") && !envContent.includes("AWS_SES_FROM")) {
@@ -2642,6 +2839,17 @@ AWS_SES_FROM=`);
2642
2839
  }
2643
2840
  const libDestinationPath = import_path23.default.join(libPath, "email.ts");
2644
2841
  import_fs23.default.copyFileSync(templatePath, libDestinationPath);
2842
+ console.log(import_chalk24.default.green("\nCompleted installation successfully"));
2843
+ console.log(import_chalk24.default.cyan("\nInstall Package:"));
2844
+ console.log(
2845
+ import_chalk24.default.white(
2846
+ `\u2022 nodemailer
2847
+ \u2022 @react-email/components
2848
+ \u2022 @react-email/render`
2849
+ )
2850
+ );
2851
+ console.log(import_chalk24.default.cyan("\nFiles created:"));
2852
+ console.log(import_chalk24.default.white("\u2022 src/lib/email.ts\n"));
2645
2853
  } catch (error) {
2646
2854
  console.log(import_chalk24.default.red(error));
2647
2855
  }
@@ -2669,6 +2877,10 @@ var resendRun = async () => {
2669
2877
  console.log(import_chalk25.default.cyan("\n\u2699\uFE0F Installing @react-email/components...\n"));
2670
2878
  packageManager("@react-email/components");
2671
2879
  }
2880
+ if (!packageJson2.dependencies?.["@react-email/render"]) {
2881
+ console.log(import_chalk25.default.cyan("\n\u2699\uFE0F Installing @react-email/render...\n"));
2882
+ packageManager("@react-email/render");
2883
+ }
2672
2884
  const envPath = import_path24.default.join(projectDir, ".env");
2673
2885
  const envContent = import_fs24.default.readFileSync(envPath, "utf8");
2674
2886
  if (!envContent.includes("RESEND_API_KEY") && !envContent.includes("EMAIL_SENDER_NAME") && !envContent.includes("EMAIL_SENDER_ADDRESS")) {
@@ -2692,18 +2904,32 @@ EMAIL_SENDER_ADDRESS=`);
2692
2904
  }
2693
2905
  const libDestinationPath = import_path24.default.join(libPath, "email.ts");
2694
2906
  import_fs24.default.copyFileSync(templatePath, libDestinationPath);
2907
+ console.log(import_chalk25.default.green("\nCompleted installation successfully"));
2908
+ console.log(import_chalk25.default.cyan("\nInstall Package:"));
2909
+ console.log(
2910
+ import_chalk25.default.white(`\u2022 resend
2911
+ \u2022 @react-email/components
2912
+ \u2022 @react-email/render`)
2913
+ );
2914
+ console.log(import_chalk25.default.cyan("\nFiles created:"));
2915
+ console.log(
2916
+ import_chalk25.default.white(
2917
+ `${CreateFolder({ srcFolder, destFolder: "lib/email.ts" })}
2918
+ `
2919
+ )
2920
+ );
2695
2921
  } catch (error) {
2696
2922
  console.log(import_chalk25.default.red(error));
2697
2923
  }
2698
2924
  };
2699
2925
 
2700
- // email/resendRunTanstackState.ts
2926
+ // email/resendRunTanstackStart.ts
2701
2927
  var import_chalk26 = __toESM(require("chalk"), 1);
2702
2928
  var import_path25 = __toESM(require("path"), 1);
2703
2929
  var import_fs25 = __toESM(require("fs"), 1);
2704
2930
  var import_url24 = require("url");
2705
2931
  var import_meta24 = {};
2706
- var resendRunTanstackState = async () => {
2932
+ var resendRunTanstackStart = async () => {
2707
2933
  try {
2708
2934
  const projectDir = process.cwd();
2709
2935
  const packageJsonPath = import_path25.default.join(projectDir, "package.json");
@@ -2741,6 +2967,15 @@ EMAIL_SENDER_ADDRESS=`);
2741
2967
  }
2742
2968
  const libDestinationPath = import_path25.default.join(libPath, "email.ts");
2743
2969
  import_fs25.default.copyFileSync(templatePath, libDestinationPath);
2970
+ console.log(import_chalk26.default.green("\nCompleted installation successfully"));
2971
+ console.log(import_chalk26.default.cyan("\nInstall Package:"));
2972
+ console.log(
2973
+ import_chalk26.default.white(`\u2022 resend
2974
+ \u2022 @react-email/components
2975
+ \u2022 @react-email/render`)
2976
+ );
2977
+ console.log(import_chalk26.default.cyan("\nFiles created:"));
2978
+ console.log(import_chalk26.default.white("\u2022 src/lib/email.ts\n"));
2744
2979
  } catch (error) {
2745
2980
  console.log(import_chalk26.default.red(error));
2746
2981
  }
@@ -2772,7 +3007,7 @@ var email = async () => {
2772
3007
  }
2773
3008
  }
2774
3009
  }
2775
- if (framework === "tanstack state") {
3010
+ if (framework === "tanstack start") {
2776
3011
  const srcFolderTanstackState = import_path26.default.join(projectDir, "src");
2777
3012
  const libPathTanstackState = import_path26.default.join(
2778
3013
  srcFolderTanstackState,
@@ -2803,20 +3038,20 @@ var email = async () => {
2803
3038
  if (answers.emailProvider === "Gmail" && framework === "Next js") {
2804
3039
  await gmailRun();
2805
3040
  }
2806
- if (answers.emailProvider === "Gmail" && framework === "tanstack state") {
2807
- await gmailRunTanstackState();
3041
+ if (answers.emailProvider === "Gmail" && framework === "tanstack start") {
3042
+ await gmailRunTanstackStart();
2808
3043
  }
2809
3044
  if (answers.emailProvider === "AWS SES" && framework === "Next js") {
2810
3045
  await awsSesRun();
2811
3046
  }
2812
- if (answers.emailProvider === "AWS SES" && framework === "tanstack state") {
2813
- await awsSesRunTanstackState();
3047
+ if (answers.emailProvider === "AWS SES" && framework === "tanstack start") {
3048
+ await awsSesRunTanstackStart();
2814
3049
  }
2815
3050
  if (answers.emailProvider === "Resend" && framework === "Next js") {
2816
3051
  await resendRun();
2817
3052
  }
2818
- if (answers.emailProvider === "Resend" && framework === "tanstack state") {
2819
- await resendRunTanstackState();
3053
+ if (answers.emailProvider === "Resend" && framework === "tanstack start") {
3054
+ await resendRunTanstackStart();
2820
3055
  }
2821
3056
  };
2822
3057
 
@@ -2839,7 +3074,7 @@ var forgetNext = async () => {
2839
3074
  return;
2840
3075
  }
2841
3076
  let content = import_fs27.default.readFileSync(authFilePath, "utf8");
2842
- const codeAdded = ` sendResetPassword: async ({ user, url, token }) => {
3077
+ const codeAdded = `sendResetPassword: async ({ user, url, token }) => {
2843
3078
  await sendEmail({
2844
3079
  email: user.email!,
2845
3080
  subject: "Reset your password",
@@ -2871,25 +3106,28 @@ var forgetNext = async () => {
2871
3106
  emailAndPasswordStart,
2872
3107
  emailAndPasswordEnd
2873
3108
  );
2874
- if (emailAndPasswordContent.includes("sendResetPassword:")) {
2875
- content = content.replace(
2876
- /sendResetPassword:\s*async\s*\([^)]*\)[^{]*\{[^}]*\}[^,]*/,
2877
- codeAdded
2878
- );
2879
- } else {
3109
+ if (!emailAndPasswordContent.includes("sendResetPassword:")) {
2880
3110
  const before = content.substring(0, emailAndPasswordEnd);
2881
3111
  const after = content.substring(emailAndPasswordEnd);
2882
- content = before + `
2883
- ${codeAdded}` + after;
3112
+ content = before + `${codeAdded}` + after;
2884
3113
  }
2885
3114
  import_fs27.default.writeFileSync(authFilePath, content, "utf8");
2886
3115
  if (!content.includes("import { sendEmail }")) {
3116
+ const lastImportIndex = content.lastIndexOf("import");
3117
+ const nextLineAfterLastImport = content.indexOf("\n", lastImportIndex) + 1;
3118
+ const beforeImports = content.substring(0, nextLineAfterLastImport);
3119
+ const afterImports = content.substring(nextLineAfterLastImport);
3120
+ const newImports = `import { sendEmail } from "./email";
3121
+ `;
3122
+ content = beforeImports + newImports + afterImports;
3123
+ import_fs27.default.writeFileSync(authFilePath, content, "utf8");
3124
+ }
3125
+ if (!content.includes("import ForgotPasswordEmail from")) {
2887
3126
  const lastImportIndex = content.lastIndexOf("import");
2888
3127
  const nextLineAfterLastImport = content.indexOf("\n", lastImportIndex) + 1;
2889
3128
  const beforeImports = content.substring(0, nextLineAfterLastImport);
2890
3129
  const afterImports = content.substring(nextLineAfterLastImport);
2891
3130
  const newImports = `import ForgotPasswordEmail from "@/components/email/reset-password";
2892
- import { sendEmail } from "./email";
2893
3131
  `;
2894
3132
  content = beforeImports + newImports + afterImports;
2895
3133
  import_fs27.default.writeFileSync(authFilePath, content, "utf8");
@@ -2980,8 +3218,16 @@ import { sendEmail } from "./email";
2980
3218
  `${authTemplatePath}/reset-password/page.tsx`,
2981
3219
  resetPageDestinationPath
2982
3220
  );
3221
+ console.log(import_chalk28.default.green("\nCompleted installation successfully"));
2983
3222
  console.log(
2984
- import_chalk28.default.green("Successfully added forget and reset-password pages")
3223
+ import_chalk28.default.white(
3224
+ `${CreateFolder({ srcFolder: folder, destFolder: "components/authverse/ForgetComponent.tsx" })}
3225
+ ${CreateFolder({ srcFolder: folder, destFolder: "components/authverse/ResetComponent.tsx" })}
3226
+ ${CreateFolder({ srcFolder: folder, destFolder: "components/email/reset-password.tsx" })}
3227
+ ${CreateFolder({ srcFolder: folder, destFolder: "app/auth/forget/page.tsx" })}
3228
+ ${CreateFolder({ srcFolder: folder, destFolder: "app/auth/reset-password/page.tsx" })}
3229
+ `
3230
+ )
2985
3231
  );
2986
3232
  } else {
2987
3233
  console.log(
@@ -3047,25 +3293,28 @@ var forgetTanstack = async () => {
3047
3293
  emailAndPasswordStart,
3048
3294
  emailAndPasswordEnd
3049
3295
  );
3050
- if (emailAndPasswordContent.includes("sendResetPassword:")) {
3051
- content = content.replace(
3052
- /sendResetPassword:\s*async\s*\([^)]*\)[^{]*\{[^}]*\}[^,]*/,
3053
- codeAdded
3054
- );
3055
- } else {
3296
+ if (!emailAndPasswordContent.includes("sendResetPassword:")) {
3056
3297
  const before = content.substring(0, emailAndPasswordEnd);
3057
3298
  const after = content.substring(emailAndPasswordEnd);
3058
- content = before + `
3059
- ${codeAdded}` + after;
3299
+ content = before + `${codeAdded}` + after;
3060
3300
  }
3061
3301
  import_fs28.default.writeFileSync(authFilePath, content, "utf8");
3062
3302
  if (!content.includes("import { sendEmail }")) {
3303
+ const lastImportIndex = content.lastIndexOf("import");
3304
+ const nextLineAfterLastImport = content.indexOf("\n", lastImportIndex) + 1;
3305
+ const beforeImports = content.substring(0, nextLineAfterLastImport);
3306
+ const afterImports = content.substring(nextLineAfterLastImport);
3307
+ const newImports = `import { sendEmail } from "./email";
3308
+ `;
3309
+ content = beforeImports + newImports + afterImports;
3310
+ import_fs28.default.writeFileSync(authFilePath, content, "utf8");
3311
+ }
3312
+ if (!content.includes("import ForgotPasswordEmail from")) {
3063
3313
  const lastImportIndex = content.lastIndexOf("import");
3064
3314
  const nextLineAfterLastImport = content.indexOf("\n", lastImportIndex) + 1;
3065
3315
  const beforeImports = content.substring(0, nextLineAfterLastImport);
3066
3316
  const afterImports = content.substring(nextLineAfterLastImport);
3067
3317
  const newImports = `import ForgotPasswordEmail from "@/components/email/reset-password";
3068
- import { sendEmail } from "./email";
3069
3318
  `;
3070
3319
  content = beforeImports + newImports + afterImports;
3071
3320
  import_fs28.default.writeFileSync(authFilePath, content, "utf8");
@@ -3087,7 +3336,7 @@ import { sendEmail } from "./email";
3087
3336
  }
3088
3337
  const forgetComponentPath = import_path28.default.resolve(
3089
3338
  __dirname,
3090
- "./template/TanstackState/components/ForgetComponent.tsx"
3339
+ "./template/TanstackStart/components/ForgetComponent.tsx"
3091
3340
  );
3092
3341
  const componentsDestinationPath = import_path28.default.join(
3093
3342
  srcPath,
@@ -3106,7 +3355,7 @@ import { sendEmail } from "./email";
3106
3355
  }
3107
3356
  const resetComponentPath = import_path28.default.resolve(
3108
3357
  __dirname,
3109
- "./template/TanstackState/components/ResetComponent.tsx"
3358
+ "./template/TanstackStart/components/ResetComponent.tsx"
3110
3359
  );
3111
3360
  const resetDestinationPath = import_path28.default.join(
3112
3361
  componentsDestinationPath,
@@ -3117,7 +3366,7 @@ import { sendEmail } from "./email";
3117
3366
  }
3118
3367
  const authTemplatePath = import_path28.default.resolve(
3119
3368
  __dirname,
3120
- "./template/TanstackState/routes/auth"
3369
+ "./template/TanstackStart/routes/auth"
3121
3370
  );
3122
3371
  const routesDestinationPath = import_path28.default.join(srcPath, "routes", "auth");
3123
3372
  if (!import_fs28.default.existsSync(routesDestinationPath)) {
@@ -3139,8 +3388,16 @@ import { sendEmail } from "./email";
3139
3388
  `${authTemplatePath}/reset-password.tsx`,
3140
3389
  resetPageDestinationPath
3141
3390
  );
3391
+ console.log(import_chalk29.default.green("\nCompleted installation successfully"));
3142
3392
  console.log(
3143
- import_chalk29.default.green("Successfully added forget and reset-password pages")
3393
+ import_chalk29.default.white(
3394
+ `\u2022 src/components/authverse/ForgetComponent.tsx
3395
+ \u2022 src/components/authverse/ResetComponent.tsx
3396
+ \u2022 src/components/email/reset-password.tsx
3397
+ \u2022 src/routes/auth/forget.tsx
3398
+ \u2022 src/routes/auth/reset-password.tsx
3399
+ `
3400
+ )
3144
3401
  );
3145
3402
  } else {
3146
3403
  console.log(
@@ -3163,7 +3420,7 @@ var forget = async () => {
3163
3420
  if (framework === "Next js") {
3164
3421
  return forgetNext();
3165
3422
  }
3166
- if (framework === "tanstack state") {
3423
+ if (framework === "tanstack start") {
3167
3424
  return forgetTanstack();
3168
3425
  }
3169
3426
  };
@@ -3266,7 +3523,12 @@ var verifyNext = async () => {
3266
3523
  if (import_fs29.default.existsSync(templatePath) && !import_fs29.default.existsSync(destFile)) {
3267
3524
  import_fs29.default.copyFileSync(templatePath, destFile);
3268
3525
  }
3269
- console.log(import_chalk31.default.green("Email verification successfully configured"));
3526
+ console.log(import_chalk31.default.green("\nCompleted installation successfully"));
3527
+ console.log(
3528
+ import_chalk31.default.white(
3529
+ `${CreateFolder({ srcFolder: folder, destFolder: "components/email/EmailVerification.tsx" })}`
3530
+ )
3531
+ );
3270
3532
  } catch (error) {
3271
3533
  console.log(import_chalk31.default.red(String(error)));
3272
3534
  }
@@ -3366,7 +3628,8 @@ var verifyTanstack = async () => {
3366
3628
  if (import_fs30.default.existsSync(templatePath) && !import_fs30.default.existsSync(destFile)) {
3367
3629
  import_fs30.default.copyFileSync(templatePath, destFile);
3368
3630
  }
3369
- console.log(import_chalk32.default.green("Email verification successfully configured"));
3631
+ console.log(import_chalk32.default.green("\nCompleted installation successfully"));
3632
+ console.log(import_chalk32.default.white(`\u2022 src/components/email/EmailVerification.tsx`));
3370
3633
  } catch (error) {
3371
3634
  console.log(import_chalk32.default.red(String(error)));
3372
3635
  }
@@ -3383,7 +3646,7 @@ var verification = async () => {
3383
3646
  if (framework === "Next js") {
3384
3647
  await verifyNext();
3385
3648
  }
3386
- if (framework === "tanstack state") {
3649
+ if (framework === "tanstack start") {
3387
3650
  await verifyTanstack();
3388
3651
  }
3389
3652
  } catch (error) {
@@ -3413,15 +3676,15 @@ var initCmd = async (cmd) => {
3413
3676
  cmd: true
3414
3677
  });
3415
3678
  }
3416
- if (framework === "tanstack state" && cmd.orm === "prisma") {
3417
- await prismaRunTanstackState({
3679
+ if (framework === "tanstack start" && cmd.orm === "prisma") {
3680
+ await prismaRunTanstackStart({
3418
3681
  authUi: cmd.authUi === "yes" ? true : false,
3419
3682
  database: cmd.db,
3420
3683
  cmd: true
3421
3684
  });
3422
3685
  }
3423
- if (framework === "tanstack state" && cmd.orm === "drizzle") {
3424
- await drizzleRunTanstackState({
3686
+ if (framework === "tanstack start" && cmd.orm === "drizzle") {
3687
+ await drizzleRunTanstackStart({
3425
3688
  authUi: cmd.authUi === "yes" ? true : false,
3426
3689
  cmd: true
3427
3690
  });