@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.cjs CHANGED
@@ -10565,11 +10565,11 @@ function lintOnboarding(_name, content) {
10565
10565
  function resolveTemplatesDir() {
10566
10566
  const thisFile = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.cjs', document.baseURI).href)));
10567
10567
  const thisDir = path.dirname(thisFile);
10568
- if (thisDir.includes("/dist/")) {
10569
- const srcFallback = thisDir.replace("/dist/templates", "/src/templates");
10570
- if (fs.existsSync(path.join(thisDir, TEMPLATE_NAMES[0]))) {
10571
- return thisDir;
10572
- }
10568
+ if (thisDir.includes("/dist")) {
10569
+ const templatesSubdir = path.join(thisDir, "templates");
10570
+ const candidateDir = fs.existsSync(path.join(thisDir, TEMPLATE_NAMES[0])) ? thisDir : fs.existsSync(path.join(templatesSubdir, TEMPLATE_NAMES[0])) ? templatesSubdir : null;
10571
+ if (candidateDir) return candidateDir;
10572
+ const srcFallback = thisDir.endsWith("/templates") ? thisDir.replace("/dist/templates", "/src/templates") : path.join(thisDir.replace("/dist", "/src"), "templates");
10573
10573
  return srcFallback;
10574
10574
  }
10575
10575
  return thisDir;