@atlashub/smartstack-cli 4.10.0 → 4.12.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 +18 -9
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/templates/skills/apex/references/frontend-route-wiring-app-tsx.md +10 -0
- package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +10 -0
- package/templates/skills/application/templates-frontend.md +1 -1
package/dist/mcp-entry.mjs
CHANGED
|
@@ -57865,7 +57865,7 @@ async function scaffoldRoutes(input, config2) {
|
|
|
57865
57865
|
result.instructions.push("");
|
|
57866
57866
|
result.instructions.push("const applicationRoutes = {");
|
|
57867
57867
|
for (const [app, modules] of Object.entries(routeTree)) {
|
|
57868
|
-
result.instructions.push(` '${app}': [`);
|
|
57868
|
+
result.instructions.push(` '${toKebabCase(app)}': [`);
|
|
57869
57869
|
for (const [, moduleRoutes] of Object.entries(modules)) {
|
|
57870
57870
|
for (const route of moduleRoutes) {
|
|
57871
57871
|
const modulePath = route.navRoute.split(".").slice(1).map(toKebabCase).join("/");
|
|
@@ -57896,7 +57896,7 @@ async function scaffoldRoutes(input, config2) {
|
|
|
57896
57896
|
result.instructions.push("");
|
|
57897
57897
|
for (const [app, modules] of Object.entries(routeTree)) {
|
|
57898
57898
|
const layoutName = getLayoutName(app);
|
|
57899
|
-
result.instructions.push(`#### ${capitalize(app)} application (inside \`<Route path="/${app}" element={<${layoutName} />}>\`):`);
|
|
57899
|
+
result.instructions.push(`#### ${capitalize(app)} application (inside \`<Route path="/${toKebabCase(app)}" element={<${layoutName} />}>\`):`);
|
|
57900
57900
|
result.instructions.push("");
|
|
57901
57901
|
result.instructions.push("```tsx");
|
|
57902
57902
|
for (const [, moduleRoutes] of Object.entries(modules)) {
|
|
@@ -58438,13 +58438,15 @@ function generateApplicationRoutesConfig(routes, pageFiles, includeGuards) {
|
|
|
58438
58438
|
}
|
|
58439
58439
|
lines.push("");
|
|
58440
58440
|
for (const [app, modules] of Object.entries(routeTree)) {
|
|
58441
|
-
const
|
|
58441
|
+
const appCamel = toCamelCase2(app);
|
|
58442
|
+
const appKebab = toKebabCase(app);
|
|
58443
|
+
const appUpper = capitalize(appCamel);
|
|
58442
58444
|
const layoutName = getLayoutName(app);
|
|
58443
58445
|
lines.push("/**");
|
|
58444
58446
|
lines.push(` * Routes for ${appUpper} application`);
|
|
58445
|
-
lines.push(` * Flat routes for mergeRoutes() \u2014 children of <Route path="/${
|
|
58447
|
+
lines.push(` * Flat routes for mergeRoutes() \u2014 children of <Route path="/${appKebab}" element={<${layoutName} />}>`);
|
|
58446
58448
|
lines.push(" */");
|
|
58447
|
-
lines.push(`export const ${
|
|
58449
|
+
lines.push(`export const ${appCamel}Routes: RouteObject[] = [`);
|
|
58448
58450
|
for (const [, moduleRoutes] of Object.entries(modules)) {
|
|
58449
58451
|
for (const route of moduleRoutes) {
|
|
58450
58452
|
const modulePath = route.navRoute.split(".").slice(1).map(toKebabCase).join("/");
|
|
@@ -58512,9 +58514,11 @@ function generateApplicationRoutesConfig(routes, pageFiles, includeGuards) {
|
|
|
58512
58514
|
}
|
|
58513
58515
|
const appKeys = Object.keys(routeTree);
|
|
58514
58516
|
lines.push("/** All generated routes grouped by application */");
|
|
58515
|
-
lines.push("export const generatedRoutes = {");
|
|
58517
|
+
lines.push("export const generatedRoutes: Record<string, RouteObject[]> = {");
|
|
58516
58518
|
for (const app of appKeys) {
|
|
58517
|
-
|
|
58519
|
+
const appCamel = toCamelCase2(app);
|
|
58520
|
+
const appKebab = toKebabCase(app);
|
|
58521
|
+
lines.push(` '${appKebab}': ${appCamel}Routes,`);
|
|
58518
58522
|
}
|
|
58519
58523
|
lines.push("};");
|
|
58520
58524
|
lines.push("");
|
|
@@ -58532,7 +58536,9 @@ function generateApplicationRoutesConfig(routes, pageFiles, includeGuards) {
|
|
|
58532
58536
|
lines.push(" */");
|
|
58533
58537
|
lines.push("export const applicationRouteExtensions: Record<string, RouteObject[]> = {");
|
|
58534
58538
|
for (const app of appKeys) {
|
|
58535
|
-
|
|
58539
|
+
const appCamel = toCamelCase2(app);
|
|
58540
|
+
const appKebab = toKebabCase(app);
|
|
58541
|
+
lines.push(` '${appKebab}': ${appCamel}Routes,`);
|
|
58536
58542
|
}
|
|
58537
58543
|
lines.push("};");
|
|
58538
58544
|
lines.push("");
|
|
@@ -58544,6 +58550,9 @@ function getLayoutName(_application) {
|
|
|
58544
58550
|
function toKebabCase(segment) {
|
|
58545
58551
|
return segment.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
58546
58552
|
}
|
|
58553
|
+
function toCamelCase2(segment) {
|
|
58554
|
+
return segment.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
58555
|
+
}
|
|
58547
58556
|
function navRouteToUrlPath(navRoute) {
|
|
58548
58557
|
return navRoute.split(".").map(toKebabCase).join("/");
|
|
58549
58558
|
}
|
|
@@ -58647,7 +58656,7 @@ and generates corresponding frontend routing infrastructure.`,
|
|
|
58647
58656
|
includeLayouts: { type: "boolean", default: true },
|
|
58648
58657
|
includeGuards: { type: "boolean", default: true },
|
|
58649
58658
|
generateRegistry: { type: "boolean", default: true },
|
|
58650
|
-
outputFormat: { type: "string", enum: ["standalone", "applicationRoutes", "clientRoutes"], default: "
|
|
58659
|
+
outputFormat: { type: "string", enum: ["standalone", "applicationRoutes", "clientRoutes"], default: "applicationRoutes", description: "standalone: createBrowserRouter(), applicationRoutes: RouteObject[] arrays for App.tsx (clientRoutes is a deprecated alias)" },
|
|
58651
58660
|
dryRun: { type: "boolean", default: false }
|
|
58652
58661
|
}
|
|
58653
58662
|
}
|