create-better-t-stack 3.0.4 → 3.0.5
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/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-DCya5jua.js → src-YT9TBJQT.js} +6 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -4809,16 +4809,17 @@ async function setupCloudflareD1(config) {
|
|
|
4809
4809
|
//#endregion
|
|
4810
4810
|
//#region src/helpers/database-providers/docker-compose-setup.ts
|
|
4811
4811
|
async function setupDockerCompose(config) {
|
|
4812
|
-
const { database, projectDir, projectName } = config;
|
|
4812
|
+
const { database, projectDir, projectName, backend } = config;
|
|
4813
4813
|
if (database === "none" || database === "sqlite") return;
|
|
4814
4814
|
try {
|
|
4815
|
-
await writeEnvFile$4(projectDir, database, projectName);
|
|
4815
|
+
await writeEnvFile$4(projectDir, database, projectName, backend);
|
|
4816
4816
|
} catch (error) {
|
|
4817
4817
|
if (error instanceof Error) console.error(`Error: ${error.message}`);
|
|
4818
4818
|
}
|
|
4819
4819
|
}
|
|
4820
|
-
async function writeEnvFile$4(projectDir, database, projectName) {
|
|
4821
|
-
const
|
|
4820
|
+
async function writeEnvFile$4(projectDir, database, projectName, backend) {
|
|
4821
|
+
const targetApp = backend === "self" ? "apps/web" : "apps/server";
|
|
4822
|
+
const envPath = path.join(projectDir, targetApp, ".env");
|
|
4822
4823
|
const variables = [{
|
|
4823
4824
|
key: "DATABASE_URL",
|
|
4824
4825
|
value: getDatabaseUrl(database, projectName),
|
|
@@ -6862,7 +6863,7 @@ async function createProject(options, cliInput) {
|
|
|
6862
6863
|
await copyBaseTemplate(projectDir, options);
|
|
6863
6864
|
await setupFrontendTemplates(projectDir, options);
|
|
6864
6865
|
await setupBackendFramework(projectDir, options);
|
|
6865
|
-
if (needsServerSetup) await setupDockerComposeTemplates(projectDir, options);
|
|
6866
|
+
if (needsServerSetup || isSelfBackend && options.dbSetup === "docker") await setupDockerComposeTemplates(projectDir, options);
|
|
6866
6867
|
await setupAuthTemplate(projectDir, options);
|
|
6867
6868
|
if (options.payments && options.payments !== "none") await setupPaymentsTemplate(projectDir, options);
|
|
6868
6869
|
if (options.examples.length > 0 && options.examples[0] !== "none") await setupExamplesTemplate(projectDir, options);
|
package/package.json
CHANGED