@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/index.cjs CHANGED
@@ -10221,11 +10221,11 @@ function lintOnboarding(_name, content) {
10221
10221
  function resolveTemplatesDir() {
10222
10222
  const thisFile = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
10223
10223
  const thisDir = path.dirname(thisFile);
10224
- if (thisDir.includes("/dist/")) {
10225
- const srcFallback = thisDir.replace("/dist/templates", "/src/templates");
10226
- if (fs.existsSync(path.join(thisDir, TEMPLATE_NAMES[0]))) {
10227
- return thisDir;
10228
- }
10224
+ if (thisDir.includes("/dist")) {
10225
+ const templatesSubdir = path.join(thisDir, "templates");
10226
+ const candidateDir = fs.existsSync(path.join(thisDir, TEMPLATE_NAMES[0])) ? thisDir : fs.existsSync(path.join(templatesSubdir, TEMPLATE_NAMES[0])) ? templatesSubdir : null;
10227
+ if (candidateDir) return candidateDir;
10228
+ const srcFallback = thisDir.endsWith("/templates") ? thisDir.replace("/dist/templates", "/src/templates") : path.join(thisDir.replace("/dist", "/src"), "templates");
10229
10229
  return srcFallback;
10230
10230
  }
10231
10231
  return thisDir;