create-better-t-stack 3.0.4 → 3.0.6
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-D1Mtpx_b.js} +6 -6
- 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),
|
|
@@ -6605,7 +6606,6 @@ async function setupWorkspaceDependencies(projectDir, options) {
|
|
|
6605
6606
|
const webDeps = {};
|
|
6606
6607
|
webDeps[`@${projectName}/api`] = workspaceVersion;
|
|
6607
6608
|
webDeps[`@${projectName}/auth`] = workspaceVersion;
|
|
6608
|
-
webDeps[`@${projectName}/db`] = workspaceVersion;
|
|
6609
6609
|
if (Object.keys(webDeps).length > 0) await addPackageDependency({
|
|
6610
6610
|
customDependencies: webDeps,
|
|
6611
6611
|
projectDir: webPackageDir
|
|
@@ -6862,7 +6862,7 @@ async function createProject(options, cliInput) {
|
|
|
6862
6862
|
await copyBaseTemplate(projectDir, options);
|
|
6863
6863
|
await setupFrontendTemplates(projectDir, options);
|
|
6864
6864
|
await setupBackendFramework(projectDir, options);
|
|
6865
|
-
if (needsServerSetup) await setupDockerComposeTemplates(projectDir, options);
|
|
6865
|
+
if (needsServerSetup || isSelfBackend && options.dbSetup === "docker") await setupDockerComposeTemplates(projectDir, options);
|
|
6866
6866
|
await setupAuthTemplate(projectDir, options);
|
|
6867
6867
|
if (options.payments && options.payments !== "none") await setupPaymentsTemplate(projectDir, options);
|
|
6868
6868
|
if (options.examples.length > 0 && options.examples[0] !== "none") await setupExamplesTemplate(projectDir, options);
|
package/package.json
CHANGED