nextjs-hackathon-stack 0.1.33 → 0.1.35
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 +23 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -87,8 +87,15 @@ function copyDir(src, dest, vars, skip = /* @__PURE__ */ new Set(), templateRoot
|
|
|
87
87
|
if (stat.isSymbolicLink()) {
|
|
88
88
|
const target = readlinkSync(srcPath);
|
|
89
89
|
const resolvedTarget = resolve(dirname(srcPath), target);
|
|
90
|
-
if (existsSync(resolvedTarget)
|
|
91
|
-
|
|
90
|
+
if (existsSync(resolvedTarget)) {
|
|
91
|
+
const resolvedStat = lstatSync(resolvedTarget);
|
|
92
|
+
if (resolvedStat.isFile()) {
|
|
93
|
+
cpSync(resolvedTarget, destPath);
|
|
94
|
+
} else if (resolvedStat.isDirectory()) {
|
|
95
|
+
cpSync(resolvedTarget, destPath, { recursive: true });
|
|
96
|
+
} else {
|
|
97
|
+
symlinkSync(target, destPath);
|
|
98
|
+
}
|
|
92
99
|
} else {
|
|
93
100
|
symlinkSync(target, destPath);
|
|
94
101
|
}
|
|
@@ -300,6 +307,20 @@ async function scaffold(projectName, skipInstall, skipMcp = false, template = "e
|
|
|
300
307
|
spinner2.stop("mcp-memory-service installation failed");
|
|
301
308
|
p3.log.warn("Install manually: pip install mcp-memory-service");
|
|
302
309
|
}
|
|
310
|
+
const mcpFiles = [
|
|
311
|
+
join(targetDir, ".cursor", "mcp.json"),
|
|
312
|
+
join(targetDir, ".mcp.json")
|
|
313
|
+
];
|
|
314
|
+
try {
|
|
315
|
+
const memoryBinPath = execSync("which memory", { stdio: "pipe" }).toString().trim();
|
|
316
|
+
for (const mcpFile of mcpFiles) {
|
|
317
|
+
if (existsSync(mcpFile)) {
|
|
318
|
+
const content = readFileSync(mcpFile, "utf-8");
|
|
319
|
+
writeFileSync(mcpFile, content.replace('"command": "memory"', `"command": "${memoryBinPath}"`));
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
} catch {
|
|
323
|
+
}
|
|
303
324
|
}
|
|
304
325
|
success(pc2.bold(`\xA1Proyecto "${projectName}" creado!`));
|
|
305
326
|
console.log(`
|