@mcp-use/cli 2.2.4-canary.0 → 2.2.4-canary.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/commands/deploy.d.ts.map +1 -1
- package/dist/index.js +27 -7
- package/dist/index.mjs +27 -7
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAcA,UAAU,aAAa;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAcA,UAAU,aAAa;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA+ZD;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CA2PzE"}
|
package/dist/index.js
CHANGED
|
@@ -758,16 +758,26 @@ async function detectRuntime(cwd = process.cwd()) {
|
|
|
758
758
|
}
|
|
759
759
|
return "node";
|
|
760
760
|
}
|
|
761
|
-
async function prompt(question) {
|
|
761
|
+
async function prompt(question, defaultValue = "n") {
|
|
762
762
|
const readline = await import("readline");
|
|
763
763
|
const rl = readline.createInterface({
|
|
764
764
|
input: process.stdin,
|
|
765
765
|
output: process.stdout
|
|
766
766
|
});
|
|
767
|
+
const defaultIndicator = defaultValue === "y" ? "Y/n" : "y/N";
|
|
768
|
+
const questionWithDefault = question.replace(
|
|
769
|
+
/(\(y\/n\):)/,
|
|
770
|
+
`(${defaultIndicator}):`
|
|
771
|
+
);
|
|
767
772
|
return new Promise((resolve) => {
|
|
768
|
-
rl.question(
|
|
773
|
+
rl.question(questionWithDefault, (answer) => {
|
|
769
774
|
rl.close();
|
|
770
|
-
|
|
775
|
+
const trimmedAnswer = answer.trim().toLowerCase();
|
|
776
|
+
if (trimmedAnswer === "") {
|
|
777
|
+
resolve(defaultValue === "y");
|
|
778
|
+
} else {
|
|
779
|
+
resolve(trimmedAnswer === "y" || trimmedAnswer === "yes");
|
|
780
|
+
}
|
|
771
781
|
});
|
|
772
782
|
});
|
|
773
783
|
}
|
|
@@ -784,12 +794,16 @@ async function createTarball(cwd) {
|
|
|
784
794
|
"__pycache__",
|
|
785
795
|
"*.pyc",
|
|
786
796
|
".DS_Store",
|
|
797
|
+
"._*",
|
|
798
|
+
// macOS resource fork files
|
|
799
|
+
".mcp-use",
|
|
800
|
+
// Build artifacts directory
|
|
787
801
|
".env",
|
|
788
802
|
".env.local",
|
|
789
803
|
"*.log"
|
|
790
804
|
];
|
|
791
|
-
const excludeFlags = excludePatterns.map((pattern) => `--exclude
|
|
792
|
-
const command = `tar ${excludeFlags} -czf "${tarballPath}" -C "${cwd}"
|
|
805
|
+
const excludeFlags = excludePatterns.map((pattern) => `--exclude=${pattern}`).join(" ");
|
|
806
|
+
const command = `tar ${excludeFlags} -czf "${tarballPath}" -C "${cwd}" . 2>&1 || true`;
|
|
793
807
|
try {
|
|
794
808
|
await execAsync2(command);
|
|
795
809
|
return tarballPath;
|
|
@@ -1090,7 +1104,8 @@ async function deployCommand(options) {
|
|
|
1090
1104
|
}
|
|
1091
1105
|
console.log();
|
|
1092
1106
|
const shouldDeploy = await prompt(
|
|
1093
|
-
import_chalk2.default.white("Deploy from local source? (y/n): ")
|
|
1107
|
+
import_chalk2.default.white("Deploy from local source? (y/n): "),
|
|
1108
|
+
"y"
|
|
1094
1109
|
);
|
|
1095
1110
|
if (!shouldDeploy) {
|
|
1096
1111
|
console.log(import_chalk2.default.gray("Deployment cancelled."));
|
|
@@ -1311,7 +1326,12 @@ async function buildWidgets(projectPath) {
|
|
|
1311
1326
|
let entries = [];
|
|
1312
1327
|
try {
|
|
1313
1328
|
const files = await fs3.readdir(resourcesDir);
|
|
1314
|
-
entries = files.filter((f) =>
|
|
1329
|
+
entries = files.filter((f) => {
|
|
1330
|
+
if (f.startsWith("._") || f.startsWith(".DS_Store")) {
|
|
1331
|
+
return false;
|
|
1332
|
+
}
|
|
1333
|
+
return f.endsWith(".tsx") || f.endsWith(".ts");
|
|
1334
|
+
}).map((f) => import_node_path3.default.join(resourcesDir, f));
|
|
1315
1335
|
} catch (error) {
|
|
1316
1336
|
console.log(import_chalk3.default.gray("No widgets found in resources/ directory"));
|
|
1317
1337
|
return [];
|
package/dist/index.mjs
CHANGED
|
@@ -737,16 +737,26 @@ async function detectRuntime(cwd = process.cwd()) {
|
|
|
737
737
|
}
|
|
738
738
|
return "node";
|
|
739
739
|
}
|
|
740
|
-
async function prompt(question) {
|
|
740
|
+
async function prompt(question, defaultValue = "n") {
|
|
741
741
|
const readline = await import("readline");
|
|
742
742
|
const rl = readline.createInterface({
|
|
743
743
|
input: process.stdin,
|
|
744
744
|
output: process.stdout
|
|
745
745
|
});
|
|
746
|
+
const defaultIndicator = defaultValue === "y" ? "Y/n" : "y/N";
|
|
747
|
+
const questionWithDefault = question.replace(
|
|
748
|
+
/(\(y\/n\):)/,
|
|
749
|
+
`(${defaultIndicator}):`
|
|
750
|
+
);
|
|
746
751
|
return new Promise((resolve) => {
|
|
747
|
-
rl.question(
|
|
752
|
+
rl.question(questionWithDefault, (answer) => {
|
|
748
753
|
rl.close();
|
|
749
|
-
|
|
754
|
+
const trimmedAnswer = answer.trim().toLowerCase();
|
|
755
|
+
if (trimmedAnswer === "") {
|
|
756
|
+
resolve(defaultValue === "y");
|
|
757
|
+
} else {
|
|
758
|
+
resolve(trimmedAnswer === "y" || trimmedAnswer === "yes");
|
|
759
|
+
}
|
|
750
760
|
});
|
|
751
761
|
});
|
|
752
762
|
}
|
|
@@ -763,12 +773,16 @@ async function createTarball(cwd) {
|
|
|
763
773
|
"__pycache__",
|
|
764
774
|
"*.pyc",
|
|
765
775
|
".DS_Store",
|
|
776
|
+
"._*",
|
|
777
|
+
// macOS resource fork files
|
|
778
|
+
".mcp-use",
|
|
779
|
+
// Build artifacts directory
|
|
766
780
|
".env",
|
|
767
781
|
".env.local",
|
|
768
782
|
"*.log"
|
|
769
783
|
];
|
|
770
|
-
const excludeFlags = excludePatterns.map((pattern) => `--exclude
|
|
771
|
-
const command = `tar ${excludeFlags} -czf "${tarballPath}" -C "${cwd}"
|
|
784
|
+
const excludeFlags = excludePatterns.map((pattern) => `--exclude=${pattern}`).join(" ");
|
|
785
|
+
const command = `tar ${excludeFlags} -czf "${tarballPath}" -C "${cwd}" . 2>&1 || true`;
|
|
772
786
|
try {
|
|
773
787
|
await execAsync2(command);
|
|
774
788
|
return tarballPath;
|
|
@@ -1069,7 +1083,8 @@ async function deployCommand(options) {
|
|
|
1069
1083
|
}
|
|
1070
1084
|
console.log();
|
|
1071
1085
|
const shouldDeploy = await prompt(
|
|
1072
|
-
chalk2.white("Deploy from local source? (y/n): ")
|
|
1086
|
+
chalk2.white("Deploy from local source? (y/n): "),
|
|
1087
|
+
"y"
|
|
1073
1088
|
);
|
|
1074
1089
|
if (!shouldDeploy) {
|
|
1075
1090
|
console.log(chalk2.gray("Deployment cancelled."));
|
|
@@ -1290,7 +1305,12 @@ async function buildWidgets(projectPath) {
|
|
|
1290
1305
|
let entries = [];
|
|
1291
1306
|
try {
|
|
1292
1307
|
const files = await fs3.readdir(resourcesDir);
|
|
1293
|
-
entries = files.filter((f) =>
|
|
1308
|
+
entries = files.filter((f) => {
|
|
1309
|
+
if (f.startsWith("._") || f.startsWith(".DS_Store")) {
|
|
1310
|
+
return false;
|
|
1311
|
+
}
|
|
1312
|
+
return f.endsWith(".tsx") || f.endsWith(".ts");
|
|
1313
|
+
}).map((f) => path3.join(resourcesDir, f));
|
|
1294
1314
|
} catch (error) {
|
|
1295
1315
|
console.log(chalk3.gray("No widgets found in resources/ directory"));
|
|
1296
1316
|
return [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-use/cli",
|
|
3
|
-
"version": "2.2.4-canary.
|
|
3
|
+
"version": "2.2.4-canary.2",
|
|
4
4
|
"description": "Build tool for MCP UI widgets - bundles React components into standalone HTML pages for Model Context Protocol servers",
|
|
5
5
|
"author": "mcp-use, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"tsx": "^4.0.0",
|
|
45
45
|
"vite": "^6.0.0",
|
|
46
46
|
"ws": "^8.18.0",
|
|
47
|
-
"@mcp-use/inspector": "0.6.0-canary.
|
|
48
|
-
"mcp-use": "1.3.4-canary.
|
|
47
|
+
"@mcp-use/inspector": "0.6.0-canary.2",
|
|
48
|
+
"mcp-use": "1.3.4-canary.2"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^20.0.0",
|