@nextsparkjs/core 0.1.0-beta.122 → 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/styles/classes.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextsparkjs/core",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.124",
|
|
4
4
|
"description": "NextSpark - The complete SaaS framework for Next.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "NextSpark <hello@nextspark.dev>",
|
|
@@ -454,7 +454,7 @@
|
|
|
454
454
|
"tailwind-merge": "^3.3.1",
|
|
455
455
|
"uuid": "^13.0.0",
|
|
456
456
|
"zod": "^4.1.5",
|
|
457
|
-
"@nextsparkjs/testing": "0.1.0-beta.
|
|
457
|
+
"@nextsparkjs/testing": "0.1.0-beta.124"
|
|
458
458
|
},
|
|
459
459
|
"scripts": {
|
|
460
460
|
"postinstall": "node scripts/postinstall.mjs || true",
|
|
@@ -17,27 +17,30 @@ const packageRoot = path.join(__dirname, '..', '..'); // scripts/db/ -> core/
|
|
|
17
17
|
const isMonorepoMode = fs.existsSync(path.join(projectRoot, 'packages', 'core'));
|
|
18
18
|
const rootDir = projectRoot; // For backward compatibility with code below
|
|
19
19
|
|
|
20
|
-
// Read .env
|
|
20
|
+
// Read environment variables: prefer .env file if it exists, fallback to process.env (e.g. Vercel/CI)
|
|
21
21
|
const envPath = path.join(projectRoot, '.env');
|
|
22
|
-
const envContent = fs.readFileSync(envPath, 'utf8');
|
|
23
|
-
const envLines = envContent.split('\n');
|
|
24
22
|
|
|
25
|
-
let DATABASE_URL = null;
|
|
26
|
-
let ACTIVE_THEME = null;
|
|
23
|
+
let DATABASE_URL = process.env.DATABASE_URL ?? null;
|
|
24
|
+
let ACTIVE_THEME = process.env.NEXT_PUBLIC_ACTIVE_THEME ?? null;
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const value = valueParts.join('=').replace(/^["']|["']$/g, '').trim();
|
|
26
|
+
if (fs.existsSync(envPath)) {
|
|
27
|
+
const envContent = fs.readFileSync(envPath, 'utf8');
|
|
28
|
+
const envLines = envContent.split('\n');
|
|
32
29
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
envLines.forEach(line => {
|
|
31
|
+
if (line && !line.startsWith('#')) {
|
|
32
|
+
const [key, ...valueParts] = line.split('=');
|
|
33
|
+
const value = valueParts.join('=').replace(/^["']|["']$/g, '').trim();
|
|
34
|
+
|
|
35
|
+
if (key?.trim() === 'DATABASE_URL' && valueParts.length > 0) {
|
|
36
|
+
DATABASE_URL = value;
|
|
37
|
+
}
|
|
38
|
+
if (key?.trim() === 'NEXT_PUBLIC_ACTIVE_THEME' && valueParts.length > 0) {
|
|
39
|
+
ACTIVE_THEME = value;
|
|
40
|
+
}
|
|
38
41
|
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
41
44
|
|
|
42
45
|
if (!DATABASE_URL) {
|
|
43
46
|
console.error("❌ DATABASE_URL not found in environment variables");
|