@atlashub/smartstack-cli 4.36.0 → 4.38.0

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.
@@ -28585,6 +28585,7 @@ async function handleCheckMigrations(args, config2) {
28585
28585
  );
28586
28586
  }
28587
28587
  await checkModelSnapshot(result, structure);
28588
+ await checkSqlObjectsInjection(result, structure);
28588
28589
  result.hasConflicts = result.conflicts.length > 0;
28589
28590
  generateSuggestions(result);
28590
28591
  return formatResult2(result, currentBranch, input.compareBranch);
@@ -28754,6 +28755,15 @@ async function checkModelSnapshot(result, structure) {
28754
28755
  }
28755
28756
  }
28756
28757
  }
28758
+ async function checkSqlObjectsInjection(result, structure) {
28759
+ if (!structure.migrations || !structure.infrastructure) return;
28760
+ const sqlObjectsPath = path9.join(structure.infrastructure, "Persistence", "SqlObjects");
28761
+ const sqlFiles = await findFiles("**/*.sql", { cwd: sqlObjectsPath }).catch(() => []);
28762
+ if (sqlFiles.length === 0) return;
28763
+ result.suggestions.push(
28764
+ `${sqlFiles.length} SQL object(s) found in SqlObjects/ \u2014 these are applied automatically at application startup (no migration injection needed).`
28765
+ );
28766
+ }
28757
28767
  function generateSuggestions(result) {
28758
28768
  if (result.conflicts.some((c) => c.type === "snapshot")) {
28759
28769
  result.suggestions.push(
@@ -28803,7 +28813,7 @@ function formatResult2(result, currentBranch, compareBranch) {
28803
28813
  lines.push("## Conflicts");
28804
28814
  lines.push("");
28805
28815
  for (const conflict of result.conflicts) {
28806
- const icon = conflict.type === "snapshot" ? "\u{1F504}" : conflict.type === "order" ? "\u{1F4C5}" : conflict.type === "naming" ? "\u{1F4DD}" : "\u26A0\uFE0F";
28816
+ const icon = conflict.type === "snapshot" ? "\u{1F504}" : conflict.type === "order" ? "\u{1F4C5}" : conflict.type === "naming" ? "\u{1F4DD}" : conflict.type === "sql_objects" ? "\u{1F6A8}" : "\u26A0\uFE0F";
28807
28817
  lines.push(`### ${icon} ${conflict.type.toUpperCase()}: ${conflict.description}`);
28808
28818
  if (conflict.files.length > 0) {
28809
28819
  lines.push(`- **Files**: ${conflict.files.map((f) => `\`${f}\``).join(", ")}`);