@atlashub/smartstack-cli 4.9.0 → 4.10.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/dist/mcp-entry.mjs +19 -19
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/templates/skills/apex/references/frontend-route-wiring-app-tsx.md +1 -1
- package/templates/skills/apex/references/post-checks.md +1 -1
- package/templates/skills/apex/references/smartstack-layers.md +1 -1
- package/templates/skills/apex/steps/step-03-execute.md +2 -2
- package/templates/skills/application/references/frontend-i18n-and-output.md +1 -1
- package/templates/skills/application/references/frontend-verification.md +1 -1
- package/templates/skills/application/steps/step-05-frontend.md +2 -2
package/package.json
CHANGED
|
@@ -117,7 +117,7 @@ For each application, you MUST add:
|
|
|
117
117
|
|
|
118
118
|
The `to` prop is resolved relative to the **parent route** (`/{application}`), so always use the full path from the application root.
|
|
119
119
|
|
|
120
|
-
> Note: `scaffold_routes` with `outputFormat: "
|
|
120
|
+
> Note: `scaffold_routes` with `outputFormat: "applicationRoutes"` generates these redirects automatically.
|
|
121
121
|
|
|
122
122
|
---
|
|
123
123
|
|
|
@@ -1118,7 +1118,7 @@ if [ -n "$PAGE_FILES" ]; then
|
|
|
1118
1118
|
# Extract navigate targets (relative paths like '../leave-types', './create', etc.)
|
|
1119
1119
|
NAV_TARGETS=$(grep -oP "navigate\(['\"]([^'\"]+)['\"]" $PAGE_FILES 2>/dev/null | grep -oP "['\"][^'\"]+['\"]" | tr -d "'" | tr -d '"' | sort -u)
|
|
1120
1120
|
# Extract route paths from App.tsx or route config
|
|
1121
|
-
APP_FILES=$(find web/ -name "App.tsx" -o -name "routes.tsx" -o -name "clientRoutes*.tsx" 2>/dev/null)
|
|
1121
|
+
APP_FILES=$(find web/ -name "App.tsx" -o -name "routes.tsx" -o -name "applicationRoutes*.tsx" -o -name "clientRoutes*.tsx" 2>/dev/null)
|
|
1122
1122
|
if [ -n "$APP_FILES" ] && [ -n "$NAV_TARGETS" ]; then
|
|
1123
1123
|
ROUTE_PATHS=$(grep -oP "path:\s*['\"]([^'\"]+)['\"]" $APP_FILES 2>/dev/null | grep -oP "['\"][^'\"]+['\"]" | tr -d "'" | tr -d '"' | sort -u)
|
|
1124
1124
|
for TARGET in $NAV_TARGETS; do
|
|
@@ -278,7 +278,7 @@ var sectionRoute = $"{moduleRoute}/{ToKebabCase(sectionCode)}";
|
|
|
278
278
|
| Action | Tool |
|
|
279
279
|
|--------|------|
|
|
280
280
|
| API client | MCP `scaffold_api_client` |
|
|
281
|
-
| Routes | MCP `scaffold_routes` (outputFormat: `
|
|
281
|
+
| Routes | MCP `scaffold_routes` (outputFormat: `applicationRoutes`) |
|
|
282
282
|
| Complex pages | /ui-components skill + `smartstack-frontend.md` patterns |
|
|
283
283
|
| Validate routes | MCP `validate_frontend_routes` |
|
|
284
284
|
|
|
@@ -298,7 +298,7 @@ test({module}): backend unit and integration tests
|
|
|
298
298
|
|
|
299
299
|
For each module:
|
|
300
300
|
- **API client:** MCP scaffold_api_client
|
|
301
|
-
- **Routes:** MCP scaffold_routes (outputFormat: '
|
|
301
|
+
- **Routes:** MCP scaffold_routes (outputFormat: 'applicationRoutes') → generates lazy imports + Suspense
|
|
302
302
|
- **Wire Routes to App.tsx (BLOCKING):** After scaffold_routes, routes MUST be wired into App.tsx:
|
|
303
303
|
→ Read App.tsx and detect the routing pattern
|
|
304
304
|
→ **Pattern A** (`applicationRoutes: ApplicationRouteExtensions`): add routes to `applicationRoutes['{application_kebab}'][]` with RELATIVE paths
|
|
@@ -377,7 +377,7 @@ For each entity:
|
|
|
377
377
|
Task: "Execute Layer 3 frontend for entity {EntityName}:
|
|
378
378
|
**MANDATORY: Read references/smartstack-frontend.md FIRST**
|
|
379
379
|
- API client: MCP scaffold_api_client
|
|
380
|
-
- Routes: MCP scaffold_routes (outputFormat: '
|
|
380
|
+
- Routes: MCP scaffold_routes (outputFormat: 'applicationRoutes')
|
|
381
381
|
- Wire Routes to App.tsx (BLOCKING): After scaffold_routes, wire into App.tsx:
|
|
382
382
|
→ Read App.tsx, detect Pattern A (applicationRoutes) or Pattern B (JSX Route)
|
|
383
383
|
→ Pattern A: add to applicationRoutes['{application_kebab}'][] with RELATIVE paths
|
|
@@ -48,7 +48,7 @@ Display generated frontend code organized by category:
|
|
|
48
48
|
|
|
49
49
|
### Routes
|
|
50
50
|
- Updated `navRoutes.generated.ts`
|
|
51
|
-
- Generated `
|
|
51
|
+
- Generated `applicationRoutes.generated.tsx`
|
|
52
52
|
- Wired routes in `App.tsx` (standard + tenant blocks)
|
|
53
53
|
|
|
54
54
|
### i18n
|
|
@@ -87,7 +87,7 @@ Verify routes are actually wired into App.tsx (not just generated in standalone
|
|
|
87
87
|
3. Verify the route also appears inside the **tenant-prefixed** block (`/t/:slug/...`)
|
|
88
88
|
4. Verify the page component is imported (lazy-loaded) at the top of the file
|
|
89
89
|
|
|
90
|
-
**If routes are only in `
|
|
90
|
+
**If routes are only in `applicationRoutes.generated.tsx` or `routes/index.tsx` but NOT in App.tsx, the routes will NOT work at runtime — page will be BLANK.**
|
|
91
91
|
|
|
92
92
|
Run validation:
|
|
93
93
|
```
|
|
@@ -103,12 +103,12 @@ Args:
|
|
|
103
103
|
options:
|
|
104
104
|
includeGuards: true
|
|
105
105
|
generateRegistry: true
|
|
106
|
-
outputFormat: "
|
|
106
|
+
outputFormat: "applicationRoutes"
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
This generates:
|
|
110
110
|
- `navRoutes.generated.ts` - Route registry (NavRoute to API/web path mapping)
|
|
111
|
-
- `
|
|
111
|
+
- `applicationRoutes.generated.tsx` - Route fragments grouped by context with page imports
|
|
112
112
|
|
|
113
113
|
### 4. Wire Routes to App.tsx (BLOCKING)
|
|
114
114
|
|