@nextsparkjs/cli 0.1.0-beta.126 → 0.1.0-beta.128

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 (2) hide show
  1. package/dist/cli.js +27 -11
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1457,8 +1457,7 @@ function generateBillingPlans(billingModel, currency) {
1457
1457
  api_calls: 1000,
1458
1458
  storage_gb: 1,
1459
1459
  },
1460
- stripePriceIdMonthly: null,
1461
- stripePriceIdYearly: null,
1460
+ providerPriceIds: { monthly: null, yearly: null },
1462
1461
  },
1463
1462
  // Pro Plan - ${currencySymbol}29/month
1464
1463
  {
@@ -1484,8 +1483,7 @@ function generateBillingPlans(billingModel, currency) {
1484
1483
  api_calls: 100000,
1485
1484
  storage_gb: 50,
1486
1485
  },
1487
- stripePriceIdMonthly: 'price_pro_monthly',
1488
- stripePriceIdYearly: 'price_pro_yearly',
1486
+ providerPriceIds: { monthly: 'price_pro_monthly', yearly: 'price_pro_yearly' },
1489
1487
  },
1490
1488
  ]`;
1491
1489
  }
@@ -1512,8 +1510,7 @@ function generateBillingPlans(billingModel, currency) {
1512
1510
  api_calls: 10000,
1513
1511
  storage_gb: 10,
1514
1512
  },
1515
- stripePriceIdMonthly: 'price_starter_monthly',
1516
- stripePriceIdYearly: 'price_starter_yearly',
1513
+ providerPriceIds: { monthly: 'price_starter_monthly', yearly: 'price_starter_yearly' },
1517
1514
  },
1518
1515
  // Pro Plan - ${currencySymbol}29/month
1519
1516
  {
@@ -1539,8 +1536,7 @@ function generateBillingPlans(billingModel, currency) {
1539
1536
  api_calls: 100000,
1540
1537
  storage_gb: 50,
1541
1538
  },
1542
- stripePriceIdMonthly: 'price_pro_monthly',
1543
- stripePriceIdYearly: 'price_pro_yearly',
1539
+ providerPriceIds: { monthly: 'price_pro_monthly', yearly: 'price_pro_yearly' },
1544
1540
  },
1545
1541
  // Business Plan - ${currencySymbol}79/month
1546
1542
  {
@@ -1569,8 +1565,7 @@ function generateBillingPlans(billingModel, currency) {
1569
1565
  api_calls: 500000,
1570
1566
  storage_gb: 200,
1571
1567
  },
1572
- stripePriceIdMonthly: 'price_business_monthly',
1573
- stripePriceIdYearly: 'price_business_yearly',
1568
+ providerPriceIds: { monthly: 'price_business_monthly', yearly: 'price_business_yearly' },
1574
1569
  },
1575
1570
  ]`;
1576
1571
  }
@@ -4810,7 +4805,7 @@ async function dbSeedCommand() {
4810
4805
  }
4811
4806
 
4812
4807
  // src/commands/sync-app.ts
4813
- import { existsSync as existsSync11, readdirSync as readdirSync2, mkdirSync as mkdirSync4, copyFileSync, readFileSync as readFileSync10 } from "fs";
4808
+ import { existsSync as existsSync11, readdirSync as readdirSync2, mkdirSync as mkdirSync4, copyFileSync, readFileSync as readFileSync10, writeFileSync as writeFileSync4 } from "fs";
4814
4809
  import { join as join12, dirname as dirname4, relative } from "path";
4815
4810
  import chalk17 from "chalk";
4816
4811
  import ora11 from "ora";
@@ -4994,6 +4989,27 @@ async function syncAppCommand(options) {
4994
4989
  if (rootUpdated + rootCreated > 0) {
4995
4990
  console.log(chalk17.gray(` Root files: ${rootUpdated} updated, ${rootCreated} created`));
4996
4991
  }
4992
+ const globalsCssPath = join12(appDir, "globals.css");
4993
+ if (existsSync11(globalsCssPath)) {
4994
+ const envPath = join12(projectRoot, ".env");
4995
+ let activeTheme = process.env.NEXT_PUBLIC_ACTIVE_THEME;
4996
+ if (!activeTheme && existsSync11(envPath)) {
4997
+ const envContent = readFileSync10(envPath, "utf-8");
4998
+ const match = envContent.match(/NEXT_PUBLIC_ACTIVE_THEME=["']?([^"'\s\n]+)["']?/);
4999
+ if (match) activeTheme = match[1];
5000
+ }
5001
+ if (activeTheme && activeTheme !== "default") {
5002
+ const globalsCss = readFileSync10(globalsCssPath, "utf-8");
5003
+ const fixed = globalsCss.replace(
5004
+ /@import\s+["'][^"']*themes\/[^"']*\/styles\/globals\.css["'];?/,
5005
+ `@import "../contents/themes/${activeTheme}/styles/globals.css";`
5006
+ );
5007
+ if (fixed !== globalsCss) {
5008
+ writeFileSync4(globalsCssPath, fixed, "utf-8");
5009
+ console.log(chalk17.gray(` Fixed globals.css \u2192 themes/${activeTheme}`));
5010
+ }
5011
+ }
5012
+ }
4997
5013
  }
4998
5014
  console.log(chalk17.green("\n \u2705 Sync complete!\n"));
4999
5015
  if (customFiles.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextsparkjs/cli",
3
- "version": "0.1.0-beta.126",
3
+ "version": "0.1.0-beta.128",
4
4
  "description": "NextSpark CLI - Complete development toolkit",
5
5
  "type": "module",
6
6
  "bin": {