dlw-machine-setup 0.4.8 → 0.4.10
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/bin/installer.js +16 -5
- package/package.json +1 -1
package/bin/installer.js
CHANGED
|
@@ -3761,13 +3761,15 @@ async function setupMCPConfiguration(projectPath, mcpConfig, agent) {
|
|
|
3761
3761
|
}
|
|
3762
3762
|
const addedServers = [];
|
|
3763
3763
|
const skippedServers = [];
|
|
3764
|
-
const
|
|
3764
|
+
const existingServers = existingFile[target.rootKey] ?? {};
|
|
3765
|
+
const newServers = {};
|
|
3765
3766
|
for (const [serverName, serverConfig] of Object.entries(mcpConfig)) {
|
|
3766
3767
|
const { description, useWhen, active, ...mcpFields } = serverConfig;
|
|
3767
|
-
|
|
3768
|
+
newServers[serverName] = mcpFields;
|
|
3768
3769
|
addedServers.push(serverName);
|
|
3769
3770
|
}
|
|
3770
|
-
const
|
|
3771
|
+
const mergedServers = { ...existingServers, ...newServers };
|
|
3772
|
+
const outputFile = { ...existingFile, [target.rootKey]: mergedServers };
|
|
3771
3773
|
(0, import_fs3.writeFileSync)(mcpJsonPath, JSON.stringify(outputFile, null, 2), "utf-8");
|
|
3772
3774
|
return { addedServers, skippedServers };
|
|
3773
3775
|
}
|
|
@@ -3990,8 +3992,17 @@ applyTo: "**"
|
|
|
3990
3992
|
case "cursor": {
|
|
3991
3993
|
const cursorDir = (0, import_path4.join)(projectPath, ".cursor", "rules");
|
|
3992
3994
|
if (!(0, import_fs4.existsSync)(cursorDir)) (0, import_fs4.mkdirSync)(cursorDir, { recursive: true });
|
|
3995
|
+
const filePath = (0, import_path4.join)(cursorDir, "instructions.mdc");
|
|
3996
|
+
if (!(0, import_fs4.existsSync)(filePath)) {
|
|
3997
|
+
(0, import_fs4.writeFileSync)(filePath, `---
|
|
3998
|
+
description: AI development instructions from One-Shot Installer
|
|
3999
|
+
alwaysApply: true
|
|
4000
|
+
---
|
|
4001
|
+
|
|
4002
|
+
`, "utf-8");
|
|
4003
|
+
}
|
|
3993
4004
|
const body = buildCombinedInstructions(domains, mcpConfig, agent, projectPath);
|
|
3994
|
-
upsertBlock(
|
|
4005
|
+
upsertBlock(filePath, body);
|
|
3995
4006
|
break;
|
|
3996
4007
|
}
|
|
3997
4008
|
default:
|
|
@@ -4019,7 +4030,7 @@ async function loadWizardOptions(token, repo) {
|
|
|
4019
4030
|
}
|
|
4020
4031
|
|
|
4021
4032
|
// src/index.ts
|
|
4022
|
-
var INSTALLER_VERSION = "0.4.
|
|
4033
|
+
var INSTALLER_VERSION = "0.4.10";
|
|
4023
4034
|
function getInstructionFilePath(agent) {
|
|
4024
4035
|
switch (agent) {
|
|
4025
4036
|
case "claude-code":
|