@nextsparkjs/cli 0.1.0-beta.123 → 0.1.0-beta.124
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 +11 -7
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -4755,14 +4755,16 @@ async function dbMigrateCommand() {
|
|
|
4755
4755
|
}
|
|
4756
4756
|
spinner.succeed("Core package found");
|
|
4757
4757
|
const projectEnv = loadProjectEnv4(projectRoot);
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4758
|
+
const DATABASE_URL = projectEnv.DATABASE_URL || process.env.DATABASE_URL;
|
|
4759
|
+
const ACTIVE_THEME = projectEnv.NEXT_PUBLIC_ACTIVE_THEME || process.env.NEXT_PUBLIC_ACTIVE_THEME;
|
|
4760
|
+
if (!DATABASE_URL) {
|
|
4761
|
+
spinner.fail("DATABASE_URL not found in environment");
|
|
4762
|
+
console.error(chalk16.red("Please configure DATABASE_URL in your .env file or environment variables"));
|
|
4761
4763
|
process.exit(1);
|
|
4762
4764
|
}
|
|
4763
|
-
if (!
|
|
4764
|
-
spinner.fail("NEXT_PUBLIC_ACTIVE_THEME not found in
|
|
4765
|
-
console.error(chalk16.red("Please configure NEXT_PUBLIC_ACTIVE_THEME in your .env file"));
|
|
4765
|
+
if (!ACTIVE_THEME) {
|
|
4766
|
+
spinner.fail("NEXT_PUBLIC_ACTIVE_THEME not found in environment");
|
|
4767
|
+
console.error(chalk16.red("Please configure NEXT_PUBLIC_ACTIVE_THEME in your .env file or environment variables"));
|
|
4766
4768
|
process.exit(1);
|
|
4767
4769
|
}
|
|
4768
4770
|
spinner.start("Running database migrations...");
|
|
@@ -4770,8 +4772,10 @@ async function dbMigrateCommand() {
|
|
|
4770
4772
|
cwd: projectRoot,
|
|
4771
4773
|
stdio: "inherit",
|
|
4772
4774
|
env: {
|
|
4773
|
-
...projectEnv,
|
|
4774
4775
|
...process.env,
|
|
4776
|
+
...projectEnv,
|
|
4777
|
+
DATABASE_URL,
|
|
4778
|
+
NEXT_PUBLIC_ACTIVE_THEME: ACTIVE_THEME,
|
|
4775
4779
|
NEXTSPARK_PROJECT_ROOT: projectRoot,
|
|
4776
4780
|
NEXTSPARK_CORE_DIR: coreDir
|
|
4777
4781
|
}
|