create-better-t-stack 3.11.0-pr750.6c25d46 → 3.11.1

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 (118) hide show
  1. package/dist/cli.d.mts +1 -0
  2. package/dist/cli.mjs +8 -0
  3. package/dist/index.d.mts +351 -0
  4. package/dist/index.mjs +4 -0
  5. package/dist/src-Dc2OdxbP.mjs +7248 -0
  6. package/package.json +25 -35
  7. package/templates/addons/turborepo/turbo.json.hbs +5 -0
  8. package/templates/auth/better-auth/convex/backend/convex/auth.ts.hbs +3 -5
  9. package/templates/auth/better-auth/convex/backend/convex/privateData.ts.hbs +13 -12
  10. package/templates/auth/better-auth/convex/web/react/next/src/lib/auth-client.ts.hbs +2 -2
  11. package/templates/auth/better-auth/convex/web/react/next/src/lib/auth-server.ts.hbs +1 -0
  12. package/templates/deploy/alchemy/alchemy.run.ts.hbs +2 -2
  13. package/templates/frontend/react/tanstack-start/src/router.tsx.hbs +17 -29
  14. package/templates/frontend/react/tanstack-start/src/routes/__root.tsx.hbs +2 -4
  15. package/bin/create-better-t-stack +0 -98
  16. package/src/api.ts +0 -203
  17. package/src/cli.ts +0 -185
  18. package/src/constants.ts +0 -270
  19. package/src/helpers/addons/addons-setup.ts +0 -201
  20. package/src/helpers/addons/examples-setup.ts +0 -137
  21. package/src/helpers/addons/fumadocs-setup.ts +0 -99
  22. package/src/helpers/addons/oxlint-setup.ts +0 -36
  23. package/src/helpers/addons/ruler-setup.ts +0 -135
  24. package/src/helpers/addons/starlight-setup.ts +0 -45
  25. package/src/helpers/addons/tauri-setup.ts +0 -90
  26. package/src/helpers/addons/tui-setup.ts +0 -64
  27. package/src/helpers/addons/ultracite-setup.ts +0 -228
  28. package/src/helpers/addons/vite-pwa-setup.ts +0 -59
  29. package/src/helpers/addons/wxt-setup.ts +0 -86
  30. package/src/helpers/core/add-addons.ts +0 -85
  31. package/src/helpers/core/add-deployment.ts +0 -102
  32. package/src/helpers/core/api-setup.ts +0 -280
  33. package/src/helpers/core/auth-setup.ts +0 -203
  34. package/src/helpers/core/backend-setup.ts +0 -69
  35. package/src/helpers/core/command-handlers.ts +0 -354
  36. package/src/helpers/core/convex-codegen.ts +0 -14
  37. package/src/helpers/core/create-project.ts +0 -134
  38. package/src/helpers/core/create-readme.ts +0 -694
  39. package/src/helpers/core/db-setup.ts +0 -184
  40. package/src/helpers/core/detect-project-config.ts +0 -41
  41. package/src/helpers/core/env-setup.ts +0 -481
  42. package/src/helpers/core/git.ts +0 -23
  43. package/src/helpers/core/install-dependencies.ts +0 -29
  44. package/src/helpers/core/payments-setup.ts +0 -48
  45. package/src/helpers/core/post-installation.ts +0 -403
  46. package/src/helpers/core/project-config.ts +0 -250
  47. package/src/helpers/core/runtime-setup.ts +0 -76
  48. package/src/helpers/core/template-manager.ts +0 -917
  49. package/src/helpers/core/workspace-setup.ts +0 -184
  50. package/src/helpers/database-providers/d1-setup.ts +0 -28
  51. package/src/helpers/database-providers/docker-compose-setup.ts +0 -50
  52. package/src/helpers/database-providers/mongodb-atlas-setup.ts +0 -182
  53. package/src/helpers/database-providers/neon-setup.ts +0 -240
  54. package/src/helpers/database-providers/planetscale-setup.ts +0 -78
  55. package/src/helpers/database-providers/prisma-postgres-setup.ts +0 -193
  56. package/src/helpers/database-providers/supabase-setup.ts +0 -196
  57. package/src/helpers/database-providers/turso-setup.ts +0 -309
  58. package/src/helpers/deployment/alchemy/alchemy-combined-setup.ts +0 -80
  59. package/src/helpers/deployment/alchemy/alchemy-next-setup.ts +0 -52
  60. package/src/helpers/deployment/alchemy/alchemy-nuxt-setup.ts +0 -105
  61. package/src/helpers/deployment/alchemy/alchemy-react-router-setup.ts +0 -33
  62. package/src/helpers/deployment/alchemy/alchemy-solid-setup.ts +0 -33
  63. package/src/helpers/deployment/alchemy/alchemy-svelte-setup.ts +0 -99
  64. package/src/helpers/deployment/alchemy/alchemy-tanstack-router-setup.ts +0 -34
  65. package/src/helpers/deployment/alchemy/alchemy-tanstack-start-setup.ts +0 -99
  66. package/src/helpers/deployment/alchemy/env-dts-setup.ts +0 -76
  67. package/src/helpers/deployment/alchemy/index.ts +0 -7
  68. package/src/helpers/deployment/server-deploy-setup.ts +0 -55
  69. package/src/helpers/deployment/web-deploy-setup.ts +0 -58
  70. package/src/index.ts +0 -51
  71. package/src/prompts/addons.ts +0 -200
  72. package/src/prompts/api.ts +0 -49
  73. package/src/prompts/auth.ts +0 -84
  74. package/src/prompts/backend.ts +0 -83
  75. package/src/prompts/config-prompts.ts +0 -138
  76. package/src/prompts/database-setup.ts +0 -112
  77. package/src/prompts/database.ts +0 -57
  78. package/src/prompts/examples.ts +0 -60
  79. package/src/prompts/frontend.ts +0 -118
  80. package/src/prompts/git.ts +0 -16
  81. package/src/prompts/install.ts +0 -16
  82. package/src/prompts/orm.ts +0 -53
  83. package/src/prompts/package-manager.ts +0 -32
  84. package/src/prompts/payments.ts +0 -50
  85. package/src/prompts/project-name.ts +0 -86
  86. package/src/prompts/runtime.ts +0 -47
  87. package/src/prompts/server-deploy.ts +0 -91
  88. package/src/prompts/web-deploy.ts +0 -107
  89. package/src/tui/app.tsx +0 -1062
  90. package/src/types.ts +0 -70
  91. package/src/utils/add-package-deps.ts +0 -57
  92. package/src/utils/analytics.ts +0 -39
  93. package/src/utils/better-auth-plugin-setup.ts +0 -71
  94. package/src/utils/bts-config.ts +0 -122
  95. package/src/utils/command-exists.ts +0 -16
  96. package/src/utils/compatibility-rules.ts +0 -337
  97. package/src/utils/compatibility.ts +0 -11
  98. package/src/utils/config-processing.ts +0 -130
  99. package/src/utils/config-validation.ts +0 -470
  100. package/src/utils/display-config.ts +0 -96
  101. package/src/utils/docker-utils.ts +0 -70
  102. package/src/utils/errors.ts +0 -30
  103. package/src/utils/file-formatter.ts +0 -11
  104. package/src/utils/generate-reproducible-command.ts +0 -53
  105. package/src/utils/get-latest-cli-version.ts +0 -27
  106. package/src/utils/get-package-manager.ts +0 -13
  107. package/src/utils/open-url.ts +0 -18
  108. package/src/utils/package-runner.ts +0 -23
  109. package/src/utils/project-directory.ts +0 -102
  110. package/src/utils/project-name-validation.ts +0 -43
  111. package/src/utils/render-title.ts +0 -48
  112. package/src/utils/setup-catalogs.ts +0 -192
  113. package/src/utils/sponsors.ts +0 -101
  114. package/src/utils/telemetry.ts +0 -19
  115. package/src/utils/template-processor.ts +0 -64
  116. package/src/utils/templates.ts +0 -94
  117. package/src/utils/ts-morph.ts +0 -26
  118. package/src/validation.ts +0 -117
@@ -1,354 +0,0 @@
1
- import path from "node:path";
2
- import { intro, log, outro } from "@clack/prompts";
3
- import consola from "consola";
4
- import fs from "fs-extra";
5
- import pc from "picocolors";
6
- import { getDefaultConfig } from "../../constants";
7
- import { getAddonsToAdd } from "../../prompts/addons";
8
- import { gatherConfig } from "../../prompts/config-prompts";
9
- import { getProjectName } from "../../prompts/project-name";
10
- import { getServerDeploymentToAdd } from "../../prompts/server-deploy";
11
- import { getDeploymentToAdd } from "../../prompts/web-deploy";
12
- import type { AddInput, CreateInput, DirectoryConflict, ProjectConfig } from "../../types";
13
- import { trackProjectCreation } from "../../utils/analytics";
14
-
15
- import { displayConfig } from "../../utils/display-config";
16
- import { exitWithError, handleError } from "../../utils/errors";
17
- import { generateReproducibleCommand } from "../../utils/generate-reproducible-command";
18
- import { handleDirectoryConflict, setupProjectDirectory } from "../../utils/project-directory";
19
- import { renderTitle } from "../../utils/render-title";
20
- import { getTemplateConfig, getTemplateDescription } from "../../utils/templates";
21
- import {
22
- getProvidedFlags,
23
- processAndValidateFlags,
24
- processProvidedFlagsWithoutValidation,
25
- validateConfigCompatibility,
26
- } from "../../validation";
27
- import { addAddonsToProject } from "./add-addons";
28
- import { addDeploymentToProject } from "./add-deployment";
29
- import { createProject } from "./create-project";
30
- import { detectProjectConfig } from "./detect-project-config";
31
- import { installDependencies } from "./install-dependencies";
32
-
33
- export async function createProjectHandler(input: CreateInput & { projectName?: string }) {
34
- const startTime = Date.now();
35
- const timeScaffolded = new Date().toISOString();
36
-
37
- if (input.renderTitle !== false) {
38
- renderTitle();
39
- }
40
- intro(pc.magenta("Creating a new Better-T-Stack project"));
41
-
42
- if (input.yolo) {
43
- consola.fatal("YOLO mode enabled - skipping checks. Things may break!");
44
- }
45
-
46
- let currentPathInput: string;
47
- if (input.yes && input.projectName) {
48
- currentPathInput = input.projectName;
49
- } else if (input.yes) {
50
- const defaultConfig = getDefaultConfig();
51
- let defaultName: string = defaultConfig.relativePath;
52
- let counter = 1;
53
- while (
54
- (await fs.pathExists(path.resolve(process.cwd(), defaultName))) &&
55
- (await fs.readdir(path.resolve(process.cwd(), defaultName))).length > 0
56
- ) {
57
- defaultName = `${defaultConfig.projectName}-${counter}`;
58
- counter++;
59
- }
60
- currentPathInput = defaultName;
61
- } else {
62
- currentPathInput = await getProjectName(input.projectName);
63
- }
64
-
65
- let finalPathInput: string;
66
- let shouldClearDirectory: boolean;
67
-
68
- try {
69
- if (input.directoryConflict) {
70
- const result = await handleDirectoryConflictProgrammatically(
71
- currentPathInput,
72
- input.directoryConflict,
73
- );
74
- finalPathInput = result.finalPathInput;
75
- shouldClearDirectory = result.shouldClearDirectory;
76
- } else {
77
- const result = await handleDirectoryConflict(currentPathInput);
78
- finalPathInput = result.finalPathInput;
79
- shouldClearDirectory = result.shouldClearDirectory;
80
- }
81
- } catch (error) {
82
- const elapsedTimeMs = Date.now() - startTime;
83
- return {
84
- success: false,
85
- projectConfig: {
86
- projectName: "",
87
- projectDir: "",
88
- relativePath: "",
89
- database: "none",
90
- orm: "none",
91
- backend: "none",
92
- runtime: "none",
93
- frontend: [],
94
- addons: [],
95
- examples: [],
96
- auth: "none",
97
- payments: "none",
98
- git: false,
99
- packageManager: "npm",
100
- install: false,
101
- dbSetup: "none",
102
- api: "none",
103
- webDeploy: "none",
104
- serverDeploy: "none",
105
- } satisfies ProjectConfig,
106
- reproducibleCommand: "",
107
- timeScaffolded,
108
- elapsedTimeMs,
109
- projectDirectory: "",
110
- relativePath: "",
111
- error: error instanceof Error ? error.message : String(error),
112
- };
113
- }
114
-
115
- const { finalResolvedPath, finalBaseName } = await setupProjectDirectory(
116
- finalPathInput,
117
- shouldClearDirectory,
118
- );
119
-
120
- const originalInput = {
121
- ...input,
122
- projectDirectory: input.projectName,
123
- };
124
-
125
- const providedFlags = getProvidedFlags(originalInput);
126
-
127
- let cliInput = originalInput;
128
-
129
- if (input.template && input.template !== "none") {
130
- const templateConfig = getTemplateConfig(input.template);
131
- if (templateConfig) {
132
- const templateName = input.template.toUpperCase();
133
- const templateDescription = getTemplateDescription(input.template);
134
- log.message(pc.bold(pc.cyan(`Using template: ${pc.white(templateName)}`)));
135
- log.message(pc.dim(` ${templateDescription}`));
136
- const userOverrides: Record<string, unknown> = {};
137
- for (const [key, value] of Object.entries(originalInput)) {
138
- if (value !== undefined) {
139
- userOverrides[key] = value;
140
- }
141
- }
142
- cliInput = {
143
- ...templateConfig,
144
- ...userOverrides,
145
- template: input.template,
146
- projectDirectory: originalInput.projectDirectory,
147
- };
148
- }
149
- }
150
-
151
- let config: ProjectConfig;
152
- if (cliInput.yes) {
153
- const flagConfig = processProvidedFlagsWithoutValidation(cliInput, finalBaseName);
154
-
155
- config = {
156
- ...getDefaultConfig(),
157
- ...flagConfig,
158
- projectName: finalBaseName,
159
- projectDir: finalResolvedPath,
160
- relativePath: finalPathInput,
161
- };
162
-
163
- validateConfigCompatibility(config, providedFlags, cliInput);
164
-
165
- log.info(pc.yellow("Using default/flag options (config prompts skipped):"));
166
- log.message(displayConfig(config));
167
- } else {
168
- const flagConfig = processAndValidateFlags(cliInput, providedFlags, finalBaseName);
169
- const { projectName: _projectNameFromFlags, ...otherFlags } = flagConfig;
170
-
171
- if (Object.keys(otherFlags).length > 0) {
172
- log.info(pc.yellow("Using these pre-selected options:"));
173
- log.message(displayConfig(otherFlags));
174
- log.message("");
175
- }
176
-
177
- config = await gatherConfig(flagConfig, finalBaseName, finalResolvedPath, finalPathInput);
178
- }
179
-
180
- await createProject(config, {
181
- manualDb: cliInput.manualDb ?? input.manualDb,
182
- });
183
-
184
- const reproducibleCommand = generateReproducibleCommand(config);
185
- log.success(
186
- pc.blue(`You can reproduce this setup with the following command:\n${reproducibleCommand}`),
187
- );
188
-
189
- await trackProjectCreation(config, input.disableAnalytics);
190
-
191
- const elapsedTimeMs = Date.now() - startTime;
192
- const elapsedTimeInSeconds = (elapsedTimeMs / 1000).toFixed(2);
193
- outro(pc.magenta(`Project created successfully in ${pc.bold(elapsedTimeInSeconds)} seconds!`));
194
-
195
- return {
196
- success: true,
197
- projectConfig: config,
198
- reproducibleCommand,
199
- timeScaffolded,
200
- elapsedTimeMs,
201
- projectDirectory: config.projectDir,
202
- relativePath: config.relativePath,
203
- };
204
- }
205
-
206
- async function handleDirectoryConflictProgrammatically(
207
- currentPathInput: string,
208
- strategy: DirectoryConflict,
209
- ) {
210
- const currentPath = path.resolve(process.cwd(), currentPathInput);
211
-
212
- if (!(await fs.pathExists(currentPath))) {
213
- return { finalPathInput: currentPathInput, shouldClearDirectory: false };
214
- }
215
-
216
- const dirContents = await fs.readdir(currentPath);
217
- const isNotEmpty = dirContents.length > 0;
218
-
219
- if (!isNotEmpty) {
220
- return { finalPathInput: currentPathInput, shouldClearDirectory: false };
221
- }
222
-
223
- switch (strategy) {
224
- case "overwrite":
225
- return { finalPathInput: currentPathInput, shouldClearDirectory: true };
226
-
227
- case "merge":
228
- return { finalPathInput: currentPathInput, shouldClearDirectory: false };
229
-
230
- case "increment": {
231
- let counter = 1;
232
- const baseName = currentPathInput;
233
- let finalPathInput = `${baseName}-${counter}`;
234
-
235
- while (
236
- (await fs.pathExists(path.resolve(process.cwd(), finalPathInput))) &&
237
- (await fs.readdir(path.resolve(process.cwd(), finalPathInput))).length > 0
238
- ) {
239
- counter++;
240
- finalPathInput = `${baseName}-${counter}`;
241
- }
242
-
243
- return { finalPathInput, shouldClearDirectory: false };
244
- }
245
-
246
- case "error":
247
- throw new Error(
248
- `Directory "${currentPathInput}" already exists and is not empty. Use directoryConflict: "overwrite", "merge", or "increment" to handle this.`,
249
- );
250
-
251
- default:
252
- throw new Error(`Unknown directory conflict strategy: ${strategy}`);
253
- }
254
- }
255
-
256
- export async function addAddonsHandler(input: AddInput) {
257
- try {
258
- const projectDir = input.projectDir || process.cwd();
259
- const detectedConfig = await detectProjectConfig(projectDir);
260
-
261
- if (!detectedConfig) {
262
- exitWithError(
263
- "Could not detect project configuration. Please ensure this is a valid Better-T-Stack project.",
264
- );
265
- }
266
-
267
- if (!input.addons || input.addons.length === 0) {
268
- const addonsPrompt = await getAddonsToAdd(
269
- detectedConfig.frontend || [],
270
- detectedConfig.addons || [],
271
- detectedConfig.auth,
272
- );
273
-
274
- if (addonsPrompt.length > 0) {
275
- input.addons = addonsPrompt;
276
- }
277
- }
278
-
279
- if (!input.webDeploy) {
280
- const deploymentPrompt = await getDeploymentToAdd(
281
- detectedConfig.frontend || [],
282
- detectedConfig.webDeploy,
283
- );
284
-
285
- if (deploymentPrompt !== "none") {
286
- input.webDeploy = deploymentPrompt;
287
- }
288
- }
289
-
290
- if (!input.serverDeploy) {
291
- const serverDeploymentPrompt = await getServerDeploymentToAdd(
292
- detectedConfig.runtime,
293
- detectedConfig.serverDeploy,
294
- detectedConfig.backend,
295
- );
296
-
297
- if (serverDeploymentPrompt !== "none") {
298
- input.serverDeploy = serverDeploymentPrompt;
299
- }
300
- }
301
-
302
- const packageManager = input.packageManager || detectedConfig.packageManager || "npm";
303
-
304
- let somethingAdded = false;
305
-
306
- if (input.addons && input.addons.length > 0) {
307
- await addAddonsToProject({
308
- ...input,
309
- install: false,
310
- suppressInstallMessage: true,
311
- addons: input.addons,
312
- });
313
- somethingAdded = true;
314
- }
315
-
316
- if (input.webDeploy && input.webDeploy !== "none") {
317
- await addDeploymentToProject({
318
- ...input,
319
- install: false,
320
- suppressInstallMessage: true,
321
- webDeploy: input.webDeploy,
322
- });
323
- somethingAdded = true;
324
- }
325
-
326
- if (input.serverDeploy && input.serverDeploy !== "none") {
327
- await addDeploymentToProject({
328
- ...input,
329
- install: false,
330
- suppressInstallMessage: true,
331
- serverDeploy: input.serverDeploy,
332
- });
333
- somethingAdded = true;
334
- }
335
-
336
- if (!somethingAdded) {
337
- outro(pc.yellow("No addons or deployment configurations to add."));
338
- return;
339
- }
340
-
341
- if (input.install) {
342
- await installDependencies({
343
- projectDir,
344
- packageManager,
345
- });
346
- } else {
347
- log.info(`Run ${pc.bold(`${packageManager} install`)} to install dependencies`);
348
- }
349
-
350
- outro("Add command completed successfully!");
351
- } catch (error) {
352
- handleError(error, "Failed to add addons or deployment");
353
- }
354
- }
@@ -1,14 +0,0 @@
1
- import path from "node:path";
2
- import { $ } from "bun";
3
- import type { PackageManager } from "../../types";
4
- import { getPackageExecutionCommand } from "../../utils/package-runner";
5
-
6
- // having problems running this in convex + better-auth
7
- export async function runConvexCodegen(
8
- projectDir: string,
9
- packageManager: PackageManager | null | undefined,
10
- ) {
11
- const backendDir = path.join(projectDir, "packages/backend");
12
- const cmd = getPackageExecutionCommand(packageManager, "convex codegen");
13
- await $`${{ raw: cmd }}`.cwd(backendDir);
14
- }
@@ -1,134 +0,0 @@
1
- import { log } from "@clack/prompts";
2
- import fs from "fs-extra";
3
- import type { ProjectConfig } from "../../types";
4
- import { writeBtsConfig } from "../../utils/bts-config";
5
- import { exitWithError } from "../../utils/errors";
6
- import { setupCatalogs } from "../../utils/setup-catalogs";
7
- import { setupAddons } from "../addons/addons-setup";
8
- import { setupExamples } from "../addons/examples-setup";
9
- import { setupApi } from "../core/api-setup";
10
- import { setupBackendDependencies } from "../core/backend-setup";
11
- import { setupDatabase } from "../core/db-setup";
12
- import { setupRuntime } from "../core/runtime-setup";
13
- import { setupServerDeploy } from "../deployment/server-deploy-setup";
14
- import { setupWebDeploy } from "../deployment/web-deploy-setup";
15
- import { setupAuth } from "./auth-setup";
16
- import { createReadme } from "./create-readme";
17
- import { setupEnvironmentVariables } from "./env-setup";
18
- import { initializeGit } from "./git";
19
- import { installDependencies } from "./install-dependencies";
20
- import { setupPayments } from "./payments-setup";
21
- import { displayPostInstallInstructions } from "./post-installation";
22
- import { updatePackageConfigurations } from "./project-config";
23
- import {
24
- copyBaseTemplate,
25
- handleExtras,
26
- setupAddonsTemplate,
27
- setupAuthTemplate,
28
- setupBackendFramework,
29
- setupDeploymentTemplates,
30
- setupDockerComposeTemplates,
31
- setupExamplesTemplate,
32
- setupFrontendTemplates,
33
- setupPaymentsTemplate,
34
- } from "./template-manager";
35
-
36
- export async function createProject(options: ProjectConfig, cliInput?: { manualDb?: boolean }) {
37
- const projectDir = options.projectDir;
38
- const isConvex = options.backend === "convex";
39
- const isSelfBackend = options.backend === "self";
40
- const needsServerSetup = !isConvex && !isSelfBackend;
41
-
42
- try {
43
- await fs.ensureDir(projectDir);
44
-
45
- await copyBaseTemplate(projectDir, options);
46
- await setupFrontendTemplates(projectDir, options);
47
-
48
- await setupBackendFramework(projectDir, options);
49
-
50
- if (needsServerSetup || (isSelfBackend && options.dbSetup === "docker")) {
51
- await setupDockerComposeTemplates(projectDir, options);
52
- }
53
-
54
- await setupAuthTemplate(projectDir, options);
55
- if (options.payments && options.payments !== "none") {
56
- await setupPaymentsTemplate(projectDir, options);
57
- }
58
- if (options.examples.length > 0 && options.examples[0] !== "none") {
59
- await setupExamplesTemplate(projectDir, options);
60
- }
61
- await setupAddonsTemplate(projectDir, options);
62
-
63
- await setupDeploymentTemplates(projectDir, options);
64
-
65
- await setupApi(options);
66
-
67
- if (isConvex || needsServerSetup) {
68
- await setupBackendDependencies(options);
69
- }
70
-
71
- if (!isConvex) {
72
- if (needsServerSetup) {
73
- await setupRuntime(options);
74
- }
75
- await setupDatabase(options, cliInput);
76
- }
77
-
78
- if (options.examples.length > 0 && options.examples[0] !== "none") {
79
- await setupExamples(options);
80
- }
81
-
82
- if (options.addons.length > 0 && options.addons[0] !== "none") {
83
- await setupAddons(options);
84
- }
85
-
86
- if (options.auth && options.auth !== "none") {
87
- await setupAuth(options);
88
- }
89
-
90
- if (options.payments && options.payments !== "none") {
91
- await setupPayments(options);
92
- }
93
-
94
- await handleExtras(projectDir, options);
95
-
96
- await setupEnvironmentVariables(options);
97
- await updatePackageConfigurations(projectDir, options);
98
-
99
- await setupWebDeploy(options);
100
- await setupServerDeploy(options);
101
-
102
- await setupCatalogs(projectDir, options);
103
-
104
- await createReadme(projectDir, options);
105
-
106
- await writeBtsConfig(options);
107
-
108
- log.success("Project template successfully scaffolded!");
109
-
110
- if (options.install) {
111
- await installDependencies({
112
- projectDir,
113
- packageManager: options.packageManager,
114
- });
115
- }
116
-
117
- await initializeGit(projectDir, options.git);
118
-
119
- await displayPostInstallInstructions({
120
- ...options,
121
- depsInstalled: options.install,
122
- });
123
-
124
- return projectDir;
125
- } catch (error) {
126
- if (error instanceof Error) {
127
- console.error(error.stack);
128
- exitWithError(`Error during project creation: ${error.message}`);
129
- } else {
130
- console.error(error);
131
- exitWithError(`An unexpected error occurred: ${String(error)}`);
132
- }
133
- }
134
- }