create-mcp-use-app 2.0.0-beta.15 → 2.0.0-beta.16
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 +33 -14
- package/dist/skills-config.d.ts +4 -3
- package/dist/skills-config.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1336,11 +1336,19 @@ function updateIndexTs(projectPath, projectName) {
|
|
|
1336
1336
|
|
|
1337
1337
|
// src/skills-config.ts
|
|
1338
1338
|
var SKILLS_REPO = "https://github.com/mcp-use/mcp-use.git";
|
|
1339
|
-
var SKILLS_BRANCH = "beta";
|
|
1340
1339
|
var SKILLS_SPARSE_PATH = "skills/mcp-apps-builder";
|
|
1341
1340
|
var SKILLS_AGENT_DIRS = [".cursor", ".claude", ".agents"];
|
|
1342
|
-
|
|
1343
|
-
|
|
1341
|
+
function getDefaultDistTag(packageVersion) {
|
|
1342
|
+
return packageVersion.includes("-beta.") ? "beta" : "latest";
|
|
1343
|
+
}
|
|
1344
|
+
function getSkillsBranch(packageVersion) {
|
|
1345
|
+
return getDefaultDistTag(packageVersion) === "beta" ? "beta" : "main";
|
|
1346
|
+
}
|
|
1347
|
+
function getSkillsManualInstallCommand(packageVersion) {
|
|
1348
|
+
const branch = getSkillsBranch(packageVersion);
|
|
1349
|
+
return `npx --yes skills add mcp-use/mcp-use#${branch} --yes --skill mcp-apps-builder -a cursor -a claude-code -a codex`;
|
|
1350
|
+
}
|
|
1351
|
+
function getSkillsCloneArgs(repoDir, packageVersion) {
|
|
1344
1352
|
return [
|
|
1345
1353
|
"clone",
|
|
1346
1354
|
"--depth",
|
|
@@ -1349,7 +1357,7 @@ function getSkillsCloneArgs(repoDir) {
|
|
|
1349
1357
|
"--sparse",
|
|
1350
1358
|
"--single-branch",
|
|
1351
1359
|
"--branch",
|
|
1352
|
-
|
|
1360
|
+
getSkillsBranch(packageVersion),
|
|
1353
1361
|
SKILLS_REPO,
|
|
1354
1362
|
repoDir
|
|
1355
1363
|
];
|
|
@@ -1486,16 +1494,24 @@ function isGitAvailable() {
|
|
|
1486
1494
|
function warnSkillsInstallFailed(missingGit) {
|
|
1487
1495
|
const reason = missingGit ? "Failed to install skills: git is not installed or not in PATH." : "Failed to install skills.";
|
|
1488
1496
|
console.log(yellow(`\u26A0\uFE0F ${reason}`));
|
|
1489
|
-
console.log(
|
|
1497
|
+
console.log(
|
|
1498
|
+
yellow(
|
|
1499
|
+
` Run manually: ${getSkillsManualInstallCommand(packageJson.version)}`
|
|
1500
|
+
)
|
|
1501
|
+
);
|
|
1490
1502
|
}
|
|
1491
1503
|
async function installSkills(projectPath) {
|
|
1492
1504
|
const tempDir = mkdtempSync(join3(tmpdir(), "mcp-use-skills-"));
|
|
1493
1505
|
const repoDir = join3(tempDir, "repo");
|
|
1494
1506
|
try {
|
|
1495
|
-
const clone = spawnSync(
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1507
|
+
const clone = spawnSync(
|
|
1508
|
+
"git",
|
|
1509
|
+
getSkillsCloneArgs(repoDir, packageJson.version),
|
|
1510
|
+
{
|
|
1511
|
+
stdio: "ignore",
|
|
1512
|
+
shell: false
|
|
1513
|
+
}
|
|
1514
|
+
);
|
|
1499
1515
|
if (clone.status !== 0 || clone.error) {
|
|
1500
1516
|
throw new Error("git clone failed");
|
|
1501
1517
|
}
|
|
@@ -2029,21 +2045,24 @@ async function main() {
|
|
|
2029
2045
|
} else if (options.sdkVersion) {
|
|
2030
2046
|
mcpUseVersion = options.sdkVersion;
|
|
2031
2047
|
} else {
|
|
2048
|
+
const defaultDistTag = getDefaultDistTag(packageJson.version);
|
|
2032
2049
|
const response = await fetch("https://registry.npmjs.org/mcp-use", {
|
|
2033
2050
|
headers: { Accept: "application/vnd.npm.install-v1+json" },
|
|
2034
2051
|
signal: AbortSignal.timeout(1e4)
|
|
2035
2052
|
});
|
|
2036
2053
|
if (!response.ok) {
|
|
2037
2054
|
throw new Error(
|
|
2038
|
-
`Failed to resolve the mcp-use
|
|
2055
|
+
`Failed to resolve the mcp-use ${defaultDistTag} dist-tag from npm (${response.status})`
|
|
2039
2056
|
);
|
|
2040
2057
|
}
|
|
2041
2058
|
const metadata = await response.json();
|
|
2042
|
-
const
|
|
2043
|
-
if (!
|
|
2044
|
-
throw new Error(
|
|
2059
|
+
const defaultVersion = metadata["dist-tags"]?.[defaultDistTag];
|
|
2060
|
+
if (!defaultVersion) {
|
|
2061
|
+
throw new Error(
|
|
2062
|
+
`npm did not return a ${defaultDistTag} version for mcp-use`
|
|
2063
|
+
);
|
|
2045
2064
|
}
|
|
2046
|
-
mcpUseVersion =
|
|
2065
|
+
mcpUseVersion = defaultVersion;
|
|
2047
2066
|
}
|
|
2048
2067
|
const versions = { "mcp-use": mcpUseVersion };
|
|
2049
2068
|
if (!useCurrentDir) {
|
package/dist/skills-config.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export declare const SKILLS_REPO = "https://github.com/mcp-use/mcp-use.git";
|
|
2
|
-
export declare const SKILLS_BRANCH = "beta";
|
|
3
2
|
export declare const SKILLS_SPARSE_PATH = "skills/mcp-apps-builder";
|
|
4
3
|
export declare const SKILLS_AGENT_DIRS: readonly [".cursor", ".claude", ".agents"];
|
|
5
|
-
export declare
|
|
6
|
-
export declare function
|
|
4
|
+
export declare function getDefaultDistTag(packageVersion: string): "beta" | "latest";
|
|
5
|
+
export declare function getSkillsBranch(packageVersion: string): "beta" | "main";
|
|
6
|
+
export declare function getSkillsManualInstallCommand(packageVersion: string): string;
|
|
7
|
+
export declare function getSkillsCloneArgs(repoDir: string, packageVersion: string): string[];
|
|
7
8
|
//# sourceMappingURL=skills-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills-config.d.ts","sourceRoot":"","sources":["../src/skills-config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,2CAA2C,CAAC;AACpE,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"skills-config.d.ts","sourceRoot":"","sources":["../src/skills-config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,2CAA2C,CAAC;AACpE,eAAO,MAAM,kBAAkB,4BAA4B,CAAC;AAC5D,eAAO,MAAM,iBAAiB,4CAA6C,CAAC;AAE5E,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,CAE3E;AAED,wBAAgB,eAAe,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAEvE;AAED,wBAAgB,6BAA6B,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAG5E;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,GACrB,MAAM,EAAE,CAaV"}
|