@atlashub/smartstack-cli 4.35.0 → 4.37.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/index.js +54 -100
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +54 -11
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/templates/agents/efcore/migration.md +43 -0
- package/templates/agents/efcore/rebase-snapshot.md +36 -0
- package/templates/agents/efcore/squash.md +36 -0
- package/templates/skills/apex/references/checks/seed-checks.sh +1 -1
- package/templates/skills/apex/references/core-seed-data.md +39 -21
- package/templates/skills/application/references/application-roles-template.md +14 -8
- package/templates/skills/application/references/provider-template.md +32 -20
- package/templates/skills/application/templates-frontend.md +294 -2
- package/templates/skills/application/templates-seed.md +23 -11
- package/templates/skills/audit-route/SKILL.md +107 -0
- package/templates/skills/audit-route/references/routing-pattern.md +129 -0
- package/templates/skills/audit-route/steps/step-00-init.md +128 -0
- package/templates/skills/audit-route/steps/step-01-inventory.md +157 -0
- package/templates/skills/audit-route/steps/step-02-conformity.md +193 -0
- package/templates/skills/audit-route/steps/step-03-report.md +201 -0
- package/templates/skills/dev-start/SKILL.md +12 -2
- package/templates/skills/efcore/SKILL.md +219 -67
- package/templates/agents/efcore/conflicts.md +0 -114
- package/templates/agents/efcore/db-deploy.md +0 -86
- package/templates/agents/efcore/db-reset.md +0 -98
- package/templates/agents/efcore/db-seed.md +0 -73
- package/templates/agents/efcore/db-status.md +0 -97
- package/templates/agents/efcore/scan.md +0 -124
- package/templates/skills/efcore/references/both-contexts.md +0 -32
- package/templates/skills/efcore/references/destructive-operations.md +0 -38
- package/templates/skills/efcore/steps/db/step-deploy.md +0 -217
- package/templates/skills/efcore/steps/db/step-reset.md +0 -186
- package/templates/skills/efcore/steps/db/step-seed.md +0 -166
- package/templates/skills/efcore/steps/db/step-status.md +0 -173
- package/templates/skills/efcore/steps/migration/step-00-init.md +0 -102
- package/templates/skills/efcore/steps/migration/step-01-check.md +0 -164
- package/templates/skills/efcore/steps/migration/step-02-create.md +0 -160
- package/templates/skills/efcore/steps/migration/step-03-validate.md +0 -168
- package/templates/skills/efcore/steps/rebase-snapshot/step-00-init.md +0 -173
- package/templates/skills/efcore/steps/rebase-snapshot/step-01-backup.md +0 -100
- package/templates/skills/efcore/steps/rebase-snapshot/step-02-fetch.md +0 -115
- package/templates/skills/efcore/steps/rebase-snapshot/step-03-create.md +0 -112
- package/templates/skills/efcore/steps/rebase-snapshot/step-04-validate.md +0 -157
- package/templates/skills/efcore/steps/shared/step-00-init.md +0 -131
- package/templates/skills/efcore/steps/squash/step-00-init.md +0 -141
- package/templates/skills/efcore/steps/squash/step-01-backup.md +0 -120
- package/templates/skills/efcore/steps/squash/step-02-fetch.md +0 -168
- package/templates/skills/efcore/steps/squash/step-03-create.md +0 -184
- package/templates/skills/efcore/steps/squash/step-04-validate.md +0 -174
package/dist/index.js
CHANGED
|
@@ -112809,48 +112809,6 @@ async function installCommands(options = {}) {
|
|
|
112809
112809
|
}
|
|
112810
112810
|
async function registerMcpServer() {
|
|
112811
112811
|
try {
|
|
112812
|
-
const claudeAvailable = (0, import_child_process2.spawnSync)("claude", ["--version"], {
|
|
112813
|
-
encoding: "utf-8",
|
|
112814
|
-
shell: true,
|
|
112815
|
-
timeout: 5e3
|
|
112816
|
-
});
|
|
112817
|
-
if (claudeAvailable.status !== 0) {
|
|
112818
|
-
logger.warning("Claude Code CLI not available - skipping CLI MCP registration");
|
|
112819
|
-
} else {
|
|
112820
|
-
const listResult = (0, import_child_process2.spawnSync)("claude", ["mcp", "list"], {
|
|
112821
|
-
encoding: "utf-8",
|
|
112822
|
-
shell: true,
|
|
112823
|
-
timeout: 1e4
|
|
112824
|
-
});
|
|
112825
|
-
const mcpList = listResult.stdout || "";
|
|
112826
|
-
const hasSmartstack = mcpList.toLowerCase().includes("smartstack");
|
|
112827
|
-
if (hasSmartstack && mcpList.includes("@atlashub/smartstack-mcp")) {
|
|
112828
|
-
logger.info("Migrating from standalone @atlashub/smartstack-mcp to bundled version...");
|
|
112829
|
-
(0, import_child_process2.spawnSync)("claude", ["mcp", "remove", "smartstack"], {
|
|
112830
|
-
encoding: "utf-8",
|
|
112831
|
-
shell: true,
|
|
112832
|
-
timeout: 1e4
|
|
112833
|
-
});
|
|
112834
|
-
}
|
|
112835
|
-
if (!hasSmartstack || mcpList.includes("@atlashub/smartstack-mcp")) {
|
|
112836
|
-
const addResult = (0, import_child_process2.spawnSync)(
|
|
112837
|
-
"claude",
|
|
112838
|
-
["mcp", "add", "--scope", "user", "smartstack", "--", "npx", "-y", "-p", "@atlashub/smartstack-cli", "smartstack-mcp"],
|
|
112839
|
-
{
|
|
112840
|
-
encoding: "utf-8",
|
|
112841
|
-
shell: true,
|
|
112842
|
-
timeout: 15e3
|
|
112843
|
-
}
|
|
112844
|
-
);
|
|
112845
|
-
if (addResult.status === 0) {
|
|
112846
|
-
logger.success("Registered SmartStack MCP server (bundled)");
|
|
112847
|
-
} else {
|
|
112848
|
-
logger.warning("Failed to register MCP server - register manually: claude mcp add --scope user smartstack -- npx -y -p @atlashub/smartstack-cli smartstack-mcp");
|
|
112849
|
-
}
|
|
112850
|
-
} else {
|
|
112851
|
-
logger.info("SmartStack MCP server already registered");
|
|
112852
|
-
}
|
|
112853
|
-
}
|
|
112854
112812
|
try {
|
|
112855
112813
|
const servers = REQUIRED_MCP_SERVERS.map((s) => ({
|
|
112856
112814
|
name: s.name,
|
|
@@ -117240,6 +117198,7 @@ async function createFrontendStructure(config, state, dryRun) {
|
|
|
117240
117198
|
await import_fs_extra6.default.ensureDir((0, import_path7.join)(webDir, "src", "hooks"));
|
|
117241
117199
|
await import_fs_extra6.default.ensureDir((0, import_path7.join)(webDir, "src", "types"));
|
|
117242
117200
|
await import_fs_extra6.default.ensureDir((0, import_path7.join)(webDir, "src", "i18n"));
|
|
117201
|
+
await import_fs_extra6.default.ensureDir((0, import_path7.join)(webDir, "src", "extensions"));
|
|
117243
117202
|
await import_fs_extra6.default.ensureDir((0, import_path7.join)(webDir, "public"));
|
|
117244
117203
|
const packageJson = {
|
|
117245
117204
|
name: `${projectName.toLowerCase()}-web`,
|
|
@@ -117260,38 +117219,38 @@ async function createFrontendStructure(config, state, dryRun) {
|
|
|
117260
117219
|
dependencies: {
|
|
117261
117220
|
"@atlashub/smartstack": `^${config.smartStackVersion || "3.0.0"}`,
|
|
117262
117221
|
"@microsoft/signalr": "^10.0.0",
|
|
117263
|
-
"@tailwindcss/vite": "^4.1.
|
|
117264
|
-
axios: "^1.13.
|
|
117222
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
117223
|
+
axios: "^1.13.2",
|
|
117265
117224
|
clsx: "^2.1.0",
|
|
117266
|
-
i18next: "^25.
|
|
117267
|
-
"i18next-browser-languagedetector": "^8.
|
|
117268
|
-
"lucide-react": "^0.
|
|
117225
|
+
i18next: "^25.7.3",
|
|
117226
|
+
"i18next-browser-languagedetector": "^8.2.0",
|
|
117227
|
+
"lucide-react": "^0.562.0",
|
|
117269
117228
|
react: "^19.0.0",
|
|
117270
117229
|
"react-dom": "^19.0.0",
|
|
117271
|
-
"react-error-boundary": "^6.0.
|
|
117272
|
-
"react-i18next": "^16.
|
|
117230
|
+
"react-error-boundary": "^6.0.2",
|
|
117231
|
+
"react-i18next": "^16.5.1",
|
|
117273
117232
|
"react-router-dom": "^7.0.0",
|
|
117274
|
-
tailwindcss: "^4.1.
|
|
117233
|
+
tailwindcss: "^4.1.18"
|
|
117275
117234
|
},
|
|
117276
117235
|
devDependencies: {
|
|
117277
|
-
"@eslint/js": "^9.
|
|
117278
|
-
"@testing-library/jest-dom": "^6.
|
|
117279
|
-
"@testing-library/react": "^16.
|
|
117280
|
-
"@testing-library/user-event": "^14.
|
|
117281
|
-
"@types/node": "^24.
|
|
117282
|
-
"@types/react": "^19.
|
|
117283
|
-
"@types/react-dom": "^19.
|
|
117284
|
-
"@vitejs/plugin-react": "^5.
|
|
117285
|
-
"@vitest/coverage-v8": "^
|
|
117286
|
-
eslint: "^9.
|
|
117287
|
-
"eslint-plugin-react-hooks": "^7.0.
|
|
117288
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
117289
|
-
globals: "^16.
|
|
117290
|
-
jsdom: "^
|
|
117291
|
-
typescript: "~5.9.
|
|
117292
|
-
"typescript-eslint": "^8.
|
|
117293
|
-
vite: "^7.
|
|
117294
|
-
vitest: "^
|
|
117236
|
+
"@eslint/js": "^9.39.1",
|
|
117237
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
117238
|
+
"@testing-library/react": "^16.3.2",
|
|
117239
|
+
"@testing-library/user-event": "^14.6.1",
|
|
117240
|
+
"@types/node": "^24.10.1",
|
|
117241
|
+
"@types/react": "^19.2.5",
|
|
117242
|
+
"@types/react-dom": "^19.2.3",
|
|
117243
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
117244
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
117245
|
+
eslint: "^9.39.1",
|
|
117246
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
117247
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
117248
|
+
globals: "^16.5.0",
|
|
117249
|
+
jsdom: "^28.0.0",
|
|
117250
|
+
typescript: "~5.9.3",
|
|
117251
|
+
"typescript-eslint": "^8.46.4",
|
|
117252
|
+
vite: "^7.2.4",
|
|
117253
|
+
vitest: "^4.0.18"
|
|
117295
117254
|
}
|
|
117296
117255
|
};
|
|
117297
117256
|
const pkg_relPath = `${webRelPrefix}/package.json`;
|
|
@@ -117464,6 +117423,7 @@ import { createRoot } from 'react-dom/client';
|
|
|
117464
117423
|
import { BrowserRouter } from 'react-router-dom';
|
|
117465
117424
|
import { SmartStackProvider } from '@atlashub/smartstack';
|
|
117466
117425
|
import '@atlashub/smartstack/styles.css';
|
|
117426
|
+
import './extensions/componentRegistry.generated';
|
|
117467
117427
|
import App from './App';
|
|
117468
117428
|
import './index.css';
|
|
117469
117429
|
import './i18n';
|
|
@@ -117487,43 +117447,22 @@ createRoot(document.getElementById('root')!).render(
|
|
|
117487
117447
|
const main_result = await safeWriteFile((0, import_path7.join)(webDir, "src", "main.tsx"), mainTsx, findKnownHash(state, "frontend", main_relPath));
|
|
117488
117448
|
logSafeWriteResult(main_relPath, main_result);
|
|
117489
117449
|
recordFile(state, "frontend", main_relPath, main_result.hash);
|
|
117490
|
-
const appTsx = `import {
|
|
117491
|
-
import { mergeRoutes } from '@atlashub/smartstack';
|
|
117492
|
-
import type { RouteConfig, ApplicationRouteExtensions } from '@atlashub/smartstack';
|
|
117493
|
-
|
|
117494
|
-
/**
|
|
117495
|
-
* Client-specific routes (outside SmartStack locked applications)
|
|
117496
|
-
* Add your custom routes here. Locked SmartStack paths cannot be overridden.
|
|
117497
|
-
*/
|
|
117498
|
-
const clientRoutes: RouteConfig[] = [
|
|
117499
|
-
// Redirect root to login page
|
|
117500
|
-
{ path: '/', element: <Navigate to="/login" replace /> },
|
|
117501
|
-
// Add your custom routes below:
|
|
117502
|
-
// { path: '/about', element: <AboutPage /> },
|
|
117503
|
-
];
|
|
117504
|
-
|
|
117505
|
-
/**
|
|
117506
|
-
* Application-scoped route extensions
|
|
117507
|
-
* Add your routes here.
|
|
117508
|
-
* Paths are RELATIVE to the application root.
|
|
117509
|
-
* Example: 'users/list' (NOT '/administration/users/list')
|
|
117510
|
-
*/
|
|
117511
|
-
const applicationRoutes: ApplicationRouteExtensions = {
|
|
117512
|
-
// sales: [],
|
|
117513
|
-
// administration: [],
|
|
117514
|
-
};
|
|
117515
|
-
|
|
117516
|
-
/**
|
|
117517
|
-
* Merged routes combining client, application extensions, and SmartStack core routes
|
|
117518
|
-
*/
|
|
117519
|
-
const routes = mergeRoutes(clientRoutes, applicationRoutes);
|
|
117450
|
+
const appTsx = `import { DynamicRouter } from '@atlashub/smartstack';
|
|
117520
117451
|
|
|
117521
117452
|
/**
|
|
117522
117453
|
* App - Main application component
|
|
117454
|
+
*
|
|
117455
|
+
* DynamicRouter generates routes from the /api/navigation/menu response.
|
|
117456
|
+
* Pages are resolved via PageRegistry \u2014 register them in componentRegistry.generated.ts.
|
|
117457
|
+
*
|
|
117458
|
+
* To add custom pages:
|
|
117459
|
+
* 1. Create your page component in src/pages/
|
|
117460
|
+
* 2. Register it with PageRegistry.register('your.page.key', lazy(() => import('./pages/YourPage')))
|
|
117461
|
+
* 3. Add navigation seed data with matching ComponentKey in the backend
|
|
117462
|
+
* 4. DynamicRouter resolves it automatically \u2014 no manual route wiring needed
|
|
117523
117463
|
*/
|
|
117524
117464
|
function App() {
|
|
117525
|
-
|
|
117526
|
-
return element;
|
|
117465
|
+
return <DynamicRouter />;
|
|
117527
117466
|
}
|
|
117528
117467
|
|
|
117529
117468
|
export default App;
|
|
@@ -117532,6 +117471,21 @@ export default App;
|
|
|
117532
117471
|
const app_result = await safeWriteFile((0, import_path7.join)(webDir, "src", "App.tsx"), appTsx, findKnownHash(state, "frontend", app_relPath));
|
|
117533
117472
|
logSafeWriteResult(app_relPath, app_result);
|
|
117534
117473
|
recordFile(state, "frontend", app_relPath, app_result.hash);
|
|
117474
|
+
const componentRegistryTs = `/**
|
|
117475
|
+
* Component Registry
|
|
117476
|
+
*
|
|
117477
|
+
* Auto-generated by SmartStack MCP - DO NOT EDIT MANUALLY
|
|
117478
|
+
* Run \`scaffold_routes\` to regenerate with your project's pages.
|
|
117479
|
+
*/
|
|
117480
|
+
import { PageRegistry } from '@atlashub/smartstack';
|
|
117481
|
+
|
|
117482
|
+
// Register your pages here (auto-generated by scaffold_routes):
|
|
117483
|
+
// PageRegistry.register('your.page.key', lazy(() => import('./pages/YourPage').then(m => ({ default: m.YourPage }))));
|
|
117484
|
+
`;
|
|
117485
|
+
const registry_relPath = `${webRelPrefix}/src/extensions/componentRegistry.generated.ts`;
|
|
117486
|
+
const registry_result = await safeWriteFile((0, import_path7.join)(webDir, "src", "extensions", "componentRegistry.generated.ts"), componentRegistryTs, findKnownHash(state, "frontend", registry_relPath));
|
|
117487
|
+
logSafeWriteResult(registry_relPath, registry_result);
|
|
117488
|
+
recordFile(state, "frontend", registry_relPath, registry_result.hash);
|
|
117535
117489
|
const indexCss = `@import "tailwindcss";
|
|
117536
117490
|
@source "../node_modules/@atlashub/smartstack/dist/**/*.js";
|
|
117537
117491
|
@custom-variant dark (&:where(.dark, .dark *));
|