@atlashub/smartstack-cli 4.33.0 → 4.35.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 CHANGED
@@ -116614,6 +116614,7 @@ async function loadTemplate(templateName, projectName) {
116614
116614
  }
116615
116615
  let content = await import_fs_extra6.default.readFile(templatePath, "utf-8");
116616
116616
  content = content.replace(/\{\{ProjectName\}\}/g, projectName);
116617
+ content = content.replace(/\{\{ProjectNameLower\}\}/g, projectName.toLowerCase());
116617
116618
  return content;
116618
116619
  }
116619
116620
  async function createDualDbContextStructure(projectDir, projectName, state, dryRun) {
@@ -116914,6 +116915,26 @@ EndGlobal
116914
116915
  }
116915
116916
  logger.info("Creating Dual-DbContext structure...");
116916
116917
  await createDualDbContextStructure(projectDir, projectName, state, dryRun);
116918
+ const backendClaudeMdLayers = [
116919
+ { template: "claude-md/api.CLAUDE.md.template", layer: "Api" },
116920
+ { template: "claude-md/application.CLAUDE.md.template", layer: "Application" },
116921
+ { template: "claude-md/domain.CLAUDE.md.template", layer: "Domain" },
116922
+ { template: "claude-md/infrastructure.CLAUDE.md.template", layer: "Infrastructure" }
116923
+ ];
116924
+ for (const { template, layer } of backendClaudeMdLayers) {
116925
+ const tplPath = (0, import_path7.join)(TEMPLATES_DIR2, template);
116926
+ if (await import_fs_extra6.default.pathExists(tplPath)) {
116927
+ const content = await loadTemplate(template, projectName);
116928
+ const relPath = `src/${projectName}.${layer}/CLAUDE.md`;
116929
+ const result = await safeWriteFile(
116930
+ (0, import_path7.join)(projectDir, relPath),
116931
+ content,
116932
+ findKnownHash(state, "backend", relPath)
116933
+ );
116934
+ logSafeWriteResult(relPath, result);
116935
+ recordFile(state, "backend", relPath, result.hash);
116936
+ }
116937
+ }
116917
116938
  }
116918
116939
  async function createConfigFiles(config, state, dryRun) {
116919
116940
  const { name } = config;
@@ -117187,6 +117208,18 @@ Generated with [SmartStack CLI](https://atlashub.io/products/smartstack-cli)
117187
117208
  logSafeWriteResult(relPath8, result8);
117188
117209
  recordFile(state, "config", relPath8, result8.hash);
117189
117210
  }
117211
+ const claudeMdTemplatePath = (0, import_path7.join)(TEMPLATES_DIR2, "claude-md", "root.CLAUDE.md.template");
117212
+ if (await import_fs_extra6.default.pathExists(claudeMdTemplatePath)) {
117213
+ const claudeMdContent = await loadTemplate("claude-md/root.CLAUDE.md.template", projectName);
117214
+ const claudeMd_relPath = "CLAUDE.md";
117215
+ const claudeMd_result = await safeWriteFile(
117216
+ (0, import_path7.join)(projectDir, claudeMd_relPath),
117217
+ claudeMdContent,
117218
+ findKnownHash(state, "config", claudeMd_relPath)
117219
+ );
117220
+ logSafeWriteResult(claudeMd_relPath, claudeMd_result);
117221
+ recordFile(state, "config", claudeMd_relPath, claudeMd_result.hash);
117222
+ }
117190
117223
  }
117191
117224
  async function createFrontendStructure(config, state, dryRun) {
117192
117225
  const { name } = config;
@@ -117588,6 +117621,18 @@ Thumbs.db
117588
117621
  const gi_result = await safeWriteFile((0, import_path7.join)(webDir, ".gitignore"), webGitignore, findKnownHash(state, "frontend", gi_relPath));
117589
117622
  logSafeWriteResult(gi_relPath, gi_result);
117590
117623
  recordFile(state, "frontend", gi_relPath, gi_result.hash);
117624
+ const webClaudeMdTplPath = (0, import_path7.join)(TEMPLATES_DIR2, "claude-md", "web.CLAUDE.md.template");
117625
+ if (await import_fs_extra6.default.pathExists(webClaudeMdTplPath)) {
117626
+ const webClaudeMdContent = await loadTemplate("claude-md/web.CLAUDE.md.template", projectName);
117627
+ const webClaudeMd_relPath = `${webRelPrefix}/CLAUDE.md`;
117628
+ const webClaudeMd_result = await safeWriteFile(
117629
+ (0, import_path7.join)(webDir, "CLAUDE.md"),
117630
+ webClaudeMdContent,
117631
+ findKnownHash(state, "frontend", webClaudeMd_relPath)
117632
+ );
117633
+ logSafeWriteResult(webClaudeMd_relPath, webClaudeMd_result);
117634
+ recordFile(state, "frontend", webClaudeMd_relPath, webClaudeMd_result.hash);
117635
+ }
117591
117636
  logger.success("React frontend created at: " + webDir);
117592
117637
  }
117593
117638
  function checkGitIdentity(cwd) {