@atlashub/smartstack-cli 4.2.0 → 4.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlashub/smartstack-cli",
3
- "version": "4.2.0",
3
+ "version": "4.3.0",
4
4
  "description": "SmartStack Claude Code automation toolkit - GitFlow, EF Core migrations, prompts and more",
5
5
  "author": {
6
6
  "name": "SmartStack",
@@ -97,12 +97,60 @@ EXISTING_PR=$(gh pr list --head "$CURRENT" --json number --jq '.[0].number' 2>/d
97
97
  }
98
98
  ```
99
99
 
100
- ### 4. Run Pre-PR Checks
100
+ ### 4. Run Pre-PR Checks (BLOCKING)
101
101
 
102
- See [references/pr-build-checks.md](../references/pr-build-checks.md) for:
103
- - Multi-runtime detection (.NET, npm, Python)
104
- - Build validation per runtime
105
- - Migration squash enforcement (feature branches: max 1 migration)
102
+ **4.1 Build validation:**
103
+ ```bash
104
+ # Build check (multi-runtime detection)
105
+ echo "Running build check..."
106
+ if [ -f "*.sln" ] || ls *.csproj 2>/dev/null | head -1 > /dev/null; then
107
+ dotnet build --no-restore 2>&1 || {
108
+ echo "❌ .NET build failed. Fix before creating PR."
109
+ STOP
110
+ }
111
+ elif [ -f "package.json" ]; then
112
+ npm run build 2>&1 || {
113
+ echo "❌ npm build failed. Fix before creating PR."
114
+ STOP
115
+ }
116
+ fi
117
+ ```
118
+
119
+ **4.2 EF Core Migration Squash Enforcement (BLOCKING):**
120
+
121
+ > **CRITICAL:** Feature branches MUST have at most 1 migration before creating a PR. This check is MANDATORY when `config.efcore.enabled` is true.
122
+
123
+ ```bash
124
+ # Skip if EF Core is disabled in config
125
+ if [ "$GF_EFCORE_ENABLED" = "true" ]; then
126
+ if [ "$BRANCH_TYPE" = "feature" ]; then
127
+ MIGRATION_DIR=$(find . -path "*/Persistence/Migrations" -type d 2>/dev/null | head -1)
128
+ if [ -n "$MIGRATION_DIR" ]; then
129
+ NEW_MIGRATIONS=$(git diff --name-only "origin/$TARGET_BRANCH...HEAD" -- "$MIGRATION_DIR" \
130
+ | grep -E '\.cs$' \
131
+ | grep -v 'Designer\|ModelSnapshot' \
132
+ | wc -l)
133
+
134
+ if [ "$NEW_MIGRATIONS" -gt 1 ]; then
135
+ echo ""
136
+ echo "❌ MULTIPLE MIGRATIONS DETECTED ($NEW_MIGRATIONS migrations)"
137
+ echo "→ Feature branches must have exactly 1 migration (squashed) before PR"
138
+ echo "→ Run: /efcore squash"
139
+ echo ""
140
+ echo "Migrations found:"
141
+ git diff --name-only "origin/$TARGET_BRANCH...HEAD" -- "$MIGRATION_DIR" \
142
+ | grep -E '\.cs$' \
143
+ | grep -v 'Designer\|ModelSnapshot'
144
+ STOP
145
+ elif [ "$NEW_MIGRATIONS" -eq 1 ]; then
146
+ echo "✓ Single migration detected (squashed)"
147
+ else
148
+ echo "✓ No migrations in this feature"
149
+ fi
150
+ fi
151
+ fi
152
+ fi
153
+ ```
106
154
 
107
155
  ### 5. Generate PR Content
108
156