@atlashub/smartstack-cli 2.5.3 → 2.6.1

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 (44) hide show
  1. package/.documentation/business-analyse.html +4 -4
  2. package/.documentation/commands.html +2 -2
  3. package/.documentation/index.html +2 -2
  4. package/.documentation/js/app.js +2 -2
  5. package/dist/index.js +163 -56
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/templates/mcp-scaffolding/component.tsx.hbs +14 -14
  9. package/templates/mcp-scaffolding/controller.cs.hbs +6 -5
  10. package/templates/skills/_resources/docs-manifest-schema.md +3 -3
  11. package/templates/skills/_resources/mcp-validate-documentation-spec.md +6 -6
  12. package/templates/skills/apex/steps/step-04b-doc-sync.md +4 -4
  13. package/templates/skills/apex/steps/step-05-examine.md +1 -1
  14. package/templates/skills/apex/templates/04b-doc-sync.md +1 -1
  15. package/templates/skills/application/SKILL.md +33 -16
  16. package/templates/skills/application/steps/step-00-init.md +86 -3
  17. package/templates/skills/application/steps/step-01-navigation.md +34 -0
  18. package/templates/skills/application/steps/step-02-permissions.md +37 -0
  19. package/templates/skills/application/steps/step-03-roles.md +23 -2
  20. package/templates/skills/application/steps/step-03b-provider.md +251 -0
  21. package/templates/skills/application/steps/step-04-backend.md +75 -0
  22. package/templates/skills/application/steps/step-05-frontend.md +149 -10
  23. package/templates/skills/application/steps/step-06-migration.md +27 -15
  24. package/templates/skills/application/steps/step-07-tests.md +404 -0
  25. package/templates/skills/application/steps/step-08-documentation.md +137 -0
  26. package/templates/skills/application/templates-frontend.md +133 -26
  27. package/templates/skills/application/templates-seed.md +116 -0
  28. package/templates/skills/business-analyse/SKILL.md +1 -1
  29. package/templates/skills/business-analyse/questionnaire/07-ui.md +15 -0
  30. package/templates/skills/business-analyse/questionnaire/10-documentation.md +2 -2
  31. package/templates/skills/business-analyse/schemas/feature-schema.json +96 -7
  32. package/templates/skills/business-analyse/steps/step-03-specify.md +134 -5
  33. package/templates/skills/business-analyse/steps/step-05-handoff.md +61 -8
  34. package/templates/skills/business-analyse/templates/tpl-frd.md +1 -1
  35. package/templates/skills/business-analyse/templates-frd.md +8 -8
  36. package/templates/skills/business-analyse/templates-react.md +26 -26
  37. package/templates/skills/documentation/SKILL.md +6 -6
  38. package/templates/skills/documentation/data-schema.md +70 -44
  39. package/templates/skills/documentation/templates.md +6 -6
  40. package/templates/skills/ralph-loop/SKILL.md +1 -2
  41. package/templates/skills/ralph-loop/steps/step-01-task.md +1 -1
  42. package/templates/skills/ui-components/SKILL.md +33 -2
  43. package/templates/skills/ui-components/patterns/dashboard-chart.md +327 -0
  44. package/templates/skills/ui-components/style-guide.md +27 -0
@@ -633,7 +633,7 @@ default → step-00 → step-01 (full) →
633
633
  <rect x="0" y="0" width="130" height="80" rx="10" fill="url(#specifyGrad)"/>
634
634
  <text x="65" y="25" text-anchor="middle" fill="white" font-size="10" font-weight="700">STEP 02</text>
635
635
  <text x="65" y="42" text-anchor="middle" fill="white" font-size="13" font-weight="600">Specify</text>
636
- <text x="65" y="60" text-anchor="middle" fill="rgba(255,255,255,0.6)" font-size="9">Use cases, FRD</text>
636
+ <text x="65" y="60" text-anchor="middle" fill="rgba(255,255,255,0.6)" font-size="9">Use cases, Specs</text>
637
637
  <text x="65" y="72" text-anchor="middle" fill="rgba(255,255,255,0.6)" font-size="9">Permissions, Gherkin</text>
638
638
  </g>
639
639
 
@@ -788,10 +788,10 @@ default &rarr; step-00 &rarr; step-01 (full) &rarr;
788
788
  </div>
789
789
  <div class="command-body">
790
790
  <p data-lang="fr">
791
- <strong>Mission :</strong> Decouverte fusionnee + analyse metier (BRD). Exploration du codebase, questionnaire progressif, regles metier, entites, suggestions proactives.
791
+ <strong>Mission :</strong> Decouverte fusionnee + analyse metier. Exploration du codebase, questionnaire progressif, regles metier, entites, suggestions proactives.
792
792
  </p>
793
793
  <p data-lang="en">
794
- <strong>Mission:</strong> Merged discovery + business analysis (BRD). Codebase exploration, progressive questionnaire, business rules, entities, proactive suggestions.
794
+ <strong>Mission:</strong> Merged discovery + business analysis. Codebase exploration, progressive questionnaire, business rules, entities, proactive suggestions.
795
795
  </p>
796
796
 
797
797
  <h4 data-lang="fr">Detection du type de feature</h4>
@@ -980,7 +980,7 @@ default &rarr; step-00 &rarr; step-01 (full) &rarr;
980
980
  <div class="command-header">
981
981
  <code class="command-name">step-02-specify</code>
982
982
  <span class="badge badge-purple">Sonnet</span>
983
- <span class="badge badge-teal">FRD</span>
983
+ <span class="badge badge-teal">Spec</span>
984
984
  </div>
985
985
  <div class="command-body">
986
986
  <p data-lang="fr">
@@ -358,8 +358,8 @@
358
358
  <td><code>/business-analyse 4-specify</code></td>
359
359
  <td><span class="badge badge-purple">ULTRATHINK</span></td>
360
360
  <td>
361
- <span data-lang="fr">Specification fonctionnelle (FRD)</span>
362
- <span data-lang="en">Functional Requirements Document (FRD)</span>
361
+ <span data-lang="fr">Specification fonctionnelle</span>
362
+ <span data-lang="en">Functional Specification</span>
363
363
  </td>
364
364
  <td><a href="business-analyse.html#phase-4">BA</a></td>
365
365
  </tr>
@@ -192,8 +192,8 @@
192
192
  </div>
193
193
  </div>
194
194
  <div class="card-body">
195
- <p data-lang="fr">Workflow de specification fonctionnelle et technique en 6 phases. Questions adaptatives, BRD/FRD, prompts autonomes pour developpeurs.</p>
196
- <p data-lang="en">Functional and technical specification workflow in 6 phases. Adaptive questions, BRD/FRD, autonomous prompts for developers.</p>
195
+ <p data-lang="fr">Workflow de specification fonctionnelle et technique en 6 phases. Questions adaptatives, exigences metier, prompts autonomes pour developpeurs.</p>
196
+ <p data-lang="en">Functional and technical specification workflow in 6 phases. Adaptive questions, business requirements, autonomous prompts for developers.</p>
197
197
  <span class="tag tag-workflow">7 commands</span>
198
198
  </div>
199
199
  </a>
@@ -442,11 +442,11 @@ function initSearch() {
442
442
 
443
443
  // Business Analyse
444
444
  { page: 'business-analyse.html', icon: '📊', title: { fr: 'Business Analyse', en: 'Business Analyse' }, section: '', anchor: '',
445
- keywords: 'business analyse analysis specification brd frd requirements exigences babok' },
445
+ keywords: 'business analyse analysis specification requirements exigences babok' },
446
446
  { page: 'business-analyse.html', icon: '📊', title: { fr: 'Business Analyse', en: 'Business Analyse' }, section: { fr: 'Discovery', en: 'Discovery' }, anchor: 'phase-2',
447
447
  keywords: 'discover discovery questionnaire questions adaptatives ultrathink elicitation' },
448
448
  { page: 'business-analyse.html', icon: '📊', title: { fr: 'Business Analyse', en: 'Business Analyse' }, section: { fr: 'Specification', en: 'Specification' }, anchor: 'phase-4',
449
- keywords: 'specify specification frd use cases wireframes gherkin acceptance criteria' },
449
+ keywords: 'specify specification use cases wireframes gherkin acceptance criteria' },
450
450
  { page: 'business-analyse.html', icon: '📊', title: { fr: 'Business Analyse', en: 'Business Analyse' }, section: { fr: 'Handoff', en: 'Handoff' }, anchor: 'phase-6',
451
451
  keywords: 'handoff dev prompt developer implementation autonome autonomous' },
452
452
 
package/dist/index.js CHANGED
@@ -116644,16 +116644,7 @@ EndGlobal
116644
116644
  ]
116645
116645
  }
116646
116646
  ];
116647
- let smartstackVersion = null;
116648
- if (config.preview) {
116649
- logger.info("Fetching latest SmartStack preview version from NuGet...");
116650
- smartstackVersion = await getLatestNuGetVersion("SmartStack", true);
116651
- if (smartstackVersion) {
116652
- logger.info(`Latest preview version: ${source_default.cyan(smartstackVersion)}`);
116653
- } else {
116654
- logger.warning("Could not fetch latest version, using --prerelease fallback");
116655
- }
116656
- }
116647
+ const smartstackVersion = config.smartStackVersion || null;
116657
116648
  const prereleaseFlag = config.preview ? " --prerelease" : "";
116658
116649
  for (const { project, packages } of nugetPackages) {
116659
116650
  for (const pkg2 of packages) {
@@ -116784,7 +116775,7 @@ appsettings.*.Local.json
116784
116775
  projectType: "client",
116785
116776
  dbContext: "extensions",
116786
116777
  baseNamespace: projectName,
116787
- smartStackVersion: "1.0.0",
116778
+ smartStackVersion: config.smartStackVersion || "1.0.0",
116788
116779
  initialized: (/* @__PURE__ */ new Date()).toISOString()
116789
116780
  };
116790
116781
  const relPath3 = ".smartstack/config.json";
@@ -117738,6 +117729,14 @@ var initCommand = new Command("init").description("Initialize a new SmartStack p
117738
117729
  await import_fs_extra5.default.ensureDir((0, import_path6.join)(finalProjectDir, ".smartstack"));
117739
117730
  await saveInitState(finalProjectDir, state);
117740
117731
  }
117732
+ if (!config.smartStackVersion) {
117733
+ logger.info("Resolving SmartStack package version...");
117734
+ const resolvedVersion = await getLatestNuGetVersion("SmartStack", config.preview);
117735
+ if (resolvedVersion) {
117736
+ config.smartStackVersion = resolvedVersion;
117737
+ logger.info(`SmartStack version: ${source_default.cyan(resolvedVersion)}`);
117738
+ }
117739
+ }
117741
117740
  await executeStep(state, "config", finalProjectDir, dryRun, () => createConfigFiles(config, state, dryRun));
117742
117741
  await executeStep(state, "backend", finalProjectDir, dryRun, () => createBackendStructure(config, state, dryRun));
117743
117742
  await executeStep(state, "frontend", finalProjectDir, dryRun, () => createFrontendStructure(config, state, dryRun));
@@ -124543,11 +124542,19 @@ async function getLatestNuGetVersion2(packageName, prerelease) {
124543
124542
  if (!versions || versions.length === 0) {
124544
124543
  return null;
124545
124544
  }
124546
- const filteredVersions = prerelease ? versions.filter((v) => v.includes("-")) : versions.filter((v) => !v.includes("-"));
124547
- if (filteredVersions.length === 0) {
124548
- return null;
124545
+ if (prerelease) {
124546
+ const prereleaseVersions = versions.filter((v) => v.includes("-"));
124547
+ if (prereleaseVersions.length > 0) {
124548
+ return prereleaseVersions[prereleaseVersions.length - 1];
124549
+ }
124550
+ return versions[versions.length - 1];
124549
124551
  }
124550
- return filteredVersions[filteredVersions.length - 1];
124552
+ const stableVersions = versions.filter((v) => !v.includes("-"));
124553
+ if (stableVersions.length > 0) {
124554
+ return stableVersions[stableVersions.length - 1];
124555
+ }
124556
+ logger.warning(`No stable version found for ${packageName}, using latest prerelease`);
124557
+ return versions[versions.length - 1];
124551
124558
  } catch (error) {
124552
124559
  logger.warning(`Error fetching latest version for ${packageName}: ${error instanceof Error ? error.message : error}`);
124553
124560
  return null;
@@ -124561,15 +124568,31 @@ async function getLatestNpmVersion(packageName, prerelease) {
124561
124568
  return null;
124562
124569
  }
124563
124570
  const data = await response.json();
124571
+ const distTags = data["dist-tags"];
124572
+ if (distTags) {
124573
+ const tag = prerelease ? "next" : "latest";
124574
+ if (distTags[tag]) {
124575
+ return distTags[tag];
124576
+ }
124577
+ if (prerelease && distTags["latest"]) {
124578
+ return distTags["latest"];
124579
+ }
124580
+ }
124564
124581
  const versions = Object.keys(data.versions);
124565
124582
  if (!versions || versions.length === 0) {
124566
124583
  return null;
124567
124584
  }
124568
- const filteredVersions = prerelease ? versions.filter((v) => v.includes("-")) : versions.filter((v) => !v.includes("-"));
124569
- if (filteredVersions.length === 0) {
124570
- return null;
124585
+ if (prerelease) {
124586
+ const prereleaseVersions = versions.filter((v) => v.includes("-"));
124587
+ if (prereleaseVersions.length > 0) {
124588
+ return prereleaseVersions[prereleaseVersions.length - 1];
124589
+ }
124571
124590
  }
124572
- return filteredVersions[filteredVersions.length - 1];
124591
+ const stableVersions = versions.filter((v) => !v.includes("-"));
124592
+ if (stableVersions.length > 0) {
124593
+ return stableVersions[stableVersions.length - 1];
124594
+ }
124595
+ return versions[versions.length - 1];
124573
124596
  } catch (error) {
124574
124597
  logger.warning(`Error fetching latest npm version for ${packageName}: ${error instanceof Error ? error.message : error}`);
124575
124598
  return null;
@@ -124589,6 +124612,14 @@ async function detectSmartStackProject() {
124589
124612
  return { isProject: false, projectDir: cwd };
124590
124613
  }
124591
124614
  }
124615
+ function readPackageVersion(csprojContent, packageName) {
124616
+ const regex2 = new RegExp(
124617
+ `<PackageReference\\s+Include="${packageName}"\\s+Version="([^"]+)"`,
124618
+ "i"
124619
+ );
124620
+ const match2 = csprojContent.match(regex2);
124621
+ return match2 ? match2[1] : null;
124622
+ }
124592
124623
  async function findProjectsWithSmartStack(projectDir) {
124593
124624
  const srcDir = (0, import_path7.join)(projectDir, "src");
124594
124625
  if (!await import_fs_extra6.default.pathExists(srcDir)) {
@@ -124604,14 +124635,32 @@ async function findProjectsWithSmartStack(projectDir) {
124604
124635
  for (const csproj of csprojFiles) {
124605
124636
  const csprojPath = (0, import_path7.join)(folderPath, csproj);
124606
124637
  const content = await import_fs_extra6.default.readFile(csprojPath, "utf-8");
124607
- if (content.includes("SmartStack")) {
124608
- projects.push(csprojPath);
124638
+ const currentVersion = readPackageVersion(content, "SmartStack");
124639
+ if (currentVersion !== null) {
124640
+ projects.push({
124641
+ csprojPath,
124642
+ relPath: csprojPath.replace(projectDir, "").replace(/^[/\\]/, ""),
124643
+ currentVersion
124644
+ });
124609
124645
  }
124610
124646
  }
124611
124647
  }
124612
124648
  }
124613
124649
  return projects;
124614
124650
  }
124651
+ async function readFrontendVersion(frontendDir) {
124652
+ try {
124653
+ const packageJsonPath = (0, import_path7.join)(frontendDir, "package.json");
124654
+ const packageJson = await import_fs_extra6.default.readJson(packageJsonPath);
124655
+ const version2 = packageJson.dependencies?.["@atlashub/smartstack"];
124656
+ if (!version2 || version2 === "latest" || version2 === "next") {
124657
+ return null;
124658
+ }
124659
+ return version2.replace(/^[\^~]/, "");
124660
+ } catch {
124661
+ return null;
124662
+ }
124663
+ }
124615
124664
  async function findFrontendDirectory(projectDir) {
124616
124665
  const webDir = (0, import_path7.join)(projectDir, "web");
124617
124666
  if (!await import_fs_extra6.default.pathExists(webDir)) {
@@ -124734,6 +124783,13 @@ async function executeMigrations(projectDir, fromVersion, toVersion, dryRun) {
124734
124783
  var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack packages to the latest version").option("--preview", "Upgrade to latest preview/prerelease version").option("--dry-run", "Show what would be upgraded without actually upgrading").action(async (options) => {
124735
124784
  logger.header("SmartStack Package Upgrade");
124736
124785
  const dryRun = options.dryRun || false;
124786
+ const result = {
124787
+ nugetUpgraded: 0,
124788
+ nugetSkipped: 0,
124789
+ nugetFailed: 0,
124790
+ npmUpgraded: false,
124791
+ npmSkipped: false
124792
+ };
124737
124793
  if (dryRun) {
124738
124794
  logger.warning("DRY RUN MODE - No packages will be upgraded");
124739
124795
  console.log();
@@ -124747,8 +124803,8 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
124747
124803
  const { config, projectDir } = detection;
124748
124804
  logger.info(`Project: ${source_default.cyan(config.baseNamespace)}`);
124749
124805
  logger.info(`Type: ${source_default.cyan(config.projectType)}`);
124750
- const currentVersion = config.smartStackVersion || "2.0.0-preview.380";
124751
- logger.info(`Current version: ${source_default.yellow(currentVersion)}`);
124806
+ const configVersion = config.smartStackVersion || "unknown";
124807
+ logger.info(`Config version: ${source_default.yellow(configVersion)}`);
124752
124808
  console.log();
124753
124809
  const usePreview = options.preview || false;
124754
124810
  logger.info(`Target: ${usePreview ? source_default.yellow("Preview/Prerelease") : source_default.green("Stable")}`);
@@ -124768,21 +124824,40 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
124768
124824
  logger.info("Scanning for SmartStack projects...");
124769
124825
  const projects = await findProjectsWithSmartStack(projectDir);
124770
124826
  if (projects.length === 0) {
124771
- logger.warning("No .NET projects found with SmartStack package.");
124827
+ logger.warning("No .NET projects found with SmartStack PackageReference.");
124828
+ logger.info('Tip: Ensure your .csproj files contain <PackageReference Include="SmartStack" Version="..." />');
124772
124829
  } else {
124773
- logger.info(`Found ${source_default.cyan(projects.length)} project(s) to upgrade:`);
124774
- projects.forEach((p) => {
124775
- const relPath = p.replace(projectDir, "").replace(/^[/\\]/, "");
124776
- logger.info(` \u2022 ${relPath}`);
124777
- });
124830
+ logger.info(`Found ${source_default.cyan(projects.length)} project(s):`);
124831
+ for (const p of projects) {
124832
+ const versionInfo = p.currentVersion ? `${source_default.yellow(p.currentVersion)} \u2192 ${source_default.cyan(nugetVersion)}` : source_default.gray("version unknown");
124833
+ const upToDate = p.currentVersion === nugetVersion;
124834
+ const statusIcon = upToDate ? source_default.green("\u2713") : source_default.yellow("\u2191");
124835
+ logger.info(` ${statusIcon} ${p.relPath} (${upToDate ? source_default.green("up to date") : versionInfo})`);
124836
+ }
124778
124837
  console.log();
124779
- logger.info("Upgrading NuGet packages...");
124780
- for (const project of projects) {
124781
- const relPath = project.replace(projectDir, "").replace(/^[/\\]/, "");
124782
- logger.info(`Upgrading ${source_default.cyan(relPath)}...`);
124783
- execCommand2(`dotnet add "${project}" package SmartStack --version ${nugetVersion}`, void 0, dryRun);
124838
+ const projectsToUpgrade = projects.filter((p) => p.currentVersion !== nugetVersion);
124839
+ result.nugetSkipped = projects.length - projectsToUpgrade.length;
124840
+ if (projectsToUpgrade.length === 0) {
124841
+ logger.success(`All ${projects.length} project(s) already at ${source_default.cyan(nugetVersion)}`);
124842
+ } else {
124843
+ logger.info(`Upgrading ${projectsToUpgrade.length} project(s)...`);
124844
+ for (const project of projectsToUpgrade) {
124845
+ logger.info(`Upgrading ${source_default.cyan(project.relPath)}...`);
124846
+ try {
124847
+ execCommand2(`dotnet add "${project.csprojPath}" package SmartStack --version ${nugetVersion}`, void 0, dryRun);
124848
+ result.nugetUpgraded++;
124849
+ } catch (error) {
124850
+ result.nugetFailed++;
124851
+ logger.error(`Failed to upgrade ${project.relPath}: ${error instanceof Error ? error.message : error}`);
124852
+ }
124853
+ }
124854
+ if (result.nugetUpgraded > 0) {
124855
+ logger.success(`${result.nugetUpgraded} project(s) upgraded to ${source_default.cyan(nugetVersion)}`);
124856
+ }
124857
+ if (result.nugetFailed > 0) {
124858
+ logger.error(`${result.nugetFailed} project(s) failed to upgrade`);
124859
+ }
124784
124860
  }
124785
- logger.success(`NuGet packages upgraded to ${source_default.cyan(nugetVersion)}`);
124786
124861
  console.log();
124787
124862
  }
124788
124863
  const frontendDir = await findFrontendDirectory(projectDir);
@@ -124790,18 +124865,25 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
124790
124865
  logger.warning("No frontend directory found with @atlashub/smartstack package.");
124791
124866
  } else {
124792
124867
  const relFrontendPath = frontendDir.replace(projectDir, "").replace(/^[/\\]/, "");
124793
- logger.info(`Frontend: ${source_default.cyan(relFrontendPath)}`);
124794
- if (npmVersion) {
124868
+ const currentFrontendVersion = await readFrontendVersion(frontendDir);
124869
+ if (currentFrontendVersion && npmVersion && currentFrontendVersion === npmVersion) {
124870
+ logger.info(`Frontend: ${source_default.cyan(relFrontendPath)} ${source_default.green("\u2713")} already at ${source_default.cyan(npmVersion)}`);
124871
+ result.npmSkipped = true;
124872
+ } else if (npmVersion) {
124873
+ const versionInfo = currentFrontendVersion ? `${source_default.yellow(currentFrontendVersion)} \u2192 ${source_default.cyan(npmVersion)}` : `\u2192 ${source_default.cyan(npmVersion)}`;
124874
+ logger.info(`Frontend: ${source_default.cyan(relFrontendPath)} (${versionInfo})`);
124795
124875
  logger.info("Upgrading npm package...");
124796
124876
  const success = tryExecCommand(`npm install @atlashub/smartstack@${npmVersion}`, frontendDir, dryRun);
124797
124877
  if (success) {
124798
124878
  logger.success(`npm package upgraded to ${source_default.cyan(npmVersion)}`);
124879
+ result.npmUpgraded = true;
124799
124880
  } else {
124800
124881
  logger.warning(`Version ${npmVersion} not yet available, trying @next tag...`);
124801
124882
  const tag = usePreview ? "next" : "latest";
124802
124883
  const fallbackSuccess = tryExecCommand(`npm install @atlashub/smartstack@${tag}`, frontendDir, dryRun);
124803
124884
  if (fallbackSuccess) {
124804
124885
  logger.success(`npm package upgraded to @${tag}`);
124886
+ result.npmUpgraded = true;
124805
124887
  } else {
124806
124888
  logger.error("Failed to upgrade npm package. Please try again later or run: npm install @atlashub/smartstack@next");
124807
124889
  }
@@ -124814,7 +124896,7 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
124814
124896
  logger.info("Checking for code migrations...");
124815
124897
  const migrationSummary = await executeMigrations(
124816
124898
  projectDir,
124817
- currentVersion,
124899
+ configVersion,
124818
124900
  nugetVersion,
124819
124901
  dryRun
124820
124902
  );
@@ -124832,26 +124914,51 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
124832
124914
  config.smartStackVersion = nugetVersion;
124833
124915
  const configPath = (0, import_path7.join)(projectDir, ".smartstack", "config.json");
124834
124916
  await import_fs_extra6.default.writeJson(configPath, config, { spaces: 2 });
124835
- logger.success(`Updated project version to ${source_default.cyan(nugetVersion)}`);
124917
+ logger.success(`Updated config version to ${source_default.cyan(nugetVersion)}`);
124836
124918
  console.log();
124837
124919
  }
124838
- const summary = [
124839
- source_default.green.bold("Upgrade completed successfully!"),
124840
- "",
124841
- source_default.bold("Upgraded packages:"),
124842
- ` \u2022 NuGet SmartStack: ${source_default.cyan(nugetVersion)}`,
124843
- npmVersion ? ` \u2022 npm @atlashub/smartstack: ${source_default.cyan(npmVersion)}` : "",
124844
- "",
124845
- migrationSummary.totalApplied > 0 ? source_default.bold("Code migrations:") : "",
124846
- migrationSummary.totalApplied > 0 ? ` \u2022 ${source_default.green(migrationSummary.totalApplied)} migration(s) applied` : "",
124847
- migrationSummary.hasErrors ? ` \u2022 ${source_default.red("Some migrations failed - review errors above")}` : "",
124848
- migrationSummary.totalApplied > 0 ? "" : "",
124849
- source_default.yellow("Next steps:"),
124850
- ` 1. Review changes: ${source_default.cyan("git diff")}`,
124851
- ` 2. Test your application`,
124852
- ` 3. Commit changes: ${source_default.cyan('git add . && git commit -m "chore: upgrade SmartStack packages"')}`
124853
- ].filter(Boolean);
124854
- logger.box(summary, "success");
124920
+ const totalChanged = result.nugetUpgraded + (result.npmUpgraded ? 1 : 0) + migrationSummary.totalApplied;
124921
+ const allUpToDate = totalChanged === 0 && result.nugetFailed === 0;
124922
+ if (allUpToDate) {
124923
+ const summary = [
124924
+ source_default.green.bold("Already up to date!"),
124925
+ "",
124926
+ ` NuGet SmartStack: ${source_default.cyan(nugetVersion)}`,
124927
+ npmVersion ? ` npm @atlashub/smartstack: ${source_default.cyan(npmVersion)}` : "",
124928
+ "",
124929
+ "No changes needed."
124930
+ ].filter(Boolean);
124931
+ logger.box(summary, "success");
124932
+ } else {
124933
+ const lines = [
124934
+ source_default.green.bold("Upgrade completed!"),
124935
+ ""
124936
+ ];
124937
+ if (result.nugetUpgraded > 0) {
124938
+ lines.push(` ${source_default.green("\u2713")} NuGet: ${result.nugetUpgraded} project(s) \u2192 ${source_default.cyan(nugetVersion)}`);
124939
+ }
124940
+ if (result.nugetSkipped > 0) {
124941
+ lines.push(` ${source_default.gray("\u2013")} NuGet: ${result.nugetSkipped} project(s) already up to date`);
124942
+ }
124943
+ if (result.nugetFailed > 0) {
124944
+ lines.push(` ${source_default.red("\u2717")} NuGet: ${result.nugetFailed} project(s) failed`);
124945
+ }
124946
+ if (result.npmUpgraded) {
124947
+ lines.push(` ${source_default.green("\u2713")} npm: @atlashub/smartstack \u2192 ${source_default.cyan(npmVersion)}`);
124948
+ }
124949
+ if (result.npmSkipped) {
124950
+ lines.push(` ${source_default.gray("\u2013")} npm: already up to date`);
124951
+ }
124952
+ if (migrationSummary.totalApplied > 0) {
124953
+ lines.push(` ${source_default.green("\u2713")} Code migrations: ${migrationSummary.totalApplied} applied`);
124954
+ }
124955
+ lines.push("");
124956
+ lines.push(source_default.yellow("Next steps:"));
124957
+ lines.push(` 1. Review changes: ${source_default.cyan("git diff")}`);
124958
+ lines.push(` 2. Test your application`);
124959
+ lines.push(` 3. Commit changes: ${source_default.cyan('git add . && git commit -m "chore: upgrade SmartStack to ' + nugetVersion + '"')}`);
124960
+ logger.box(lines, "success");
124961
+ }
124855
124962
  });
124856
124963
 
124857
124964
  // src/lib/license.ts