vibe-design-system 2.8.59 → 2.8.63

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/bin/init.js CHANGED
@@ -488,6 +488,19 @@ function ensureVdsCore(projectRoot) {
488
488
  console.log("📦 vds-core/ hazır.");
489
489
  }
490
490
 
491
+ /**
492
+ * Computes a deterministic Storybook port based on the project root path.
493
+ * Each project gets a consistent unique port (6100–6899) so switching between
494
+ * projects doesn't cause "story not found" errors from stale browser URLs.
495
+ */
496
+ function computeProjectPort(projectRoot) {
497
+ let h = 5381;
498
+ for (let i = 0; i < projectRoot.length; i++) {
499
+ h = ((h << 5) + h + projectRoot.charCodeAt(i)) & 0x7fffffff;
500
+ }
501
+ return 6100 + (h % 800);
502
+ }
503
+
491
504
  // ADIM 4 — package.json scriptleri
492
505
  function addScripts(projectRoot) {
493
506
  const pkgPath = path.join(projectRoot, "package.json");
@@ -508,7 +521,8 @@ function addScripts(projectRoot) {
508
521
  changed = true;
509
522
  }
510
523
  if (!scripts.storybook) {
511
- scripts.storybook = "storybook dev -p 6006";
524
+ const sbPort = computeProjectPort(projectRoot);
525
+ scripts.storybook = `storybook dev -p ${sbPort}`;
512
526
  changed = true;
513
527
  }
514
528
  if (!scripts["build-storybook"]) {
@@ -714,13 +728,15 @@ runSetupStorybookProviders(projectRoot);
714
728
  runStorybookAdapt(projectRoot);
715
729
 
716
730
  // ADIM 8
731
+ const _finalPort = computeProjectPort(projectRoot);
717
732
  console.log("\n✅ VDS kuruldu!");
733
+ console.log(`→ Storybook: http://localhost:${_finalPort}`);
718
734
  console.log("→ npm run vds:stories — tarama + story + provider (tek komut)");
719
735
  console.log("→ npm run vds:watch — otomatik güncelleme (watch modu)");
720
736
  console.log("\nNot: Storybook başlarken (Node 24+) DEP0190 uyarısı çıkarsa Storybook kaynaklıdır, güvenle yok sayabilirsiniz.\n");
721
737
 
722
738
  // ADIM 10 — Storybook'u otomatik başlat
723
- console.log("🚀 Storybook başlatılıyor → http://localhost:6006\n");
739
+ console.log(`🚀 Storybook başlatılıyor → http://localhost:${_finalPort}\n`);
724
740
  const sbProc = spawn("npm", ["run", "storybook"], {
725
741
  stdio: "inherit",
726
742
  cwd: projectRoot,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-design-system",
3
- "version": "2.8.59",
3
+ "version": "2.8.63",
4
4
  "description": "Auto-generate design systems for vibe coding projects",
5
5
  "homepage": "https://vibedesign.tech",
6
6
  "repository": {