@sanctuary-framework/mcp-server 1.2.1 → 1.2.2

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/cli.js CHANGED
@@ -10558,11 +10558,11 @@ function lintOnboarding(_name, content) {
10558
10558
  function resolveTemplatesDir() {
10559
10559
  const thisFile = fileURLToPath(import.meta.url);
10560
10560
  const thisDir = dirname(thisFile);
10561
- if (thisDir.includes("/dist/")) {
10562
- const srcFallback = thisDir.replace("/dist/templates", "/src/templates");
10563
- if (existsSync(join(thisDir, TEMPLATE_NAMES[0]))) {
10564
- return thisDir;
10565
- }
10561
+ if (thisDir.includes("/dist")) {
10562
+ const templatesSubdir = join(thisDir, "templates");
10563
+ const candidateDir = existsSync(join(thisDir, TEMPLATE_NAMES[0])) ? thisDir : existsSync(join(templatesSubdir, TEMPLATE_NAMES[0])) ? templatesSubdir : null;
10564
+ if (candidateDir) return candidateDir;
10565
+ const srcFallback = thisDir.endsWith("/templates") ? thisDir.replace("/dist/templates", "/src/templates") : join(thisDir.replace("/dist", "/src"), "templates");
10566
10566
  return srcFallback;
10567
10567
  }
10568
10568
  return thisDir;