@mcp-use/cli 3.1.0-canary.3 → 3.1.0-canary.4
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.cjs +24 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAgJA,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,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAueD,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAgJA,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,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAueD,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAguBzE"}
|
package/dist/index.cjs
CHANGED
|
@@ -3595,12 +3595,16 @@ async function deployCommand(options) {
|
|
|
3595
3595
|
}
|
|
3596
3596
|
let api = await McpUseAPI.create();
|
|
3597
3597
|
let resolvedOrgId;
|
|
3598
|
+
let resolvedOrgName;
|
|
3599
|
+
let resolvedOrgSlug;
|
|
3598
3600
|
if (options.org) {
|
|
3599
3601
|
const authInfo = await api.testAuth();
|
|
3600
3602
|
const match = resolveOrgFromOption(authInfo.orgs ?? [], options.org);
|
|
3601
3603
|
if (match) {
|
|
3602
3604
|
api.setOrgId(match.id);
|
|
3603
3605
|
resolvedOrgId = match.id;
|
|
3606
|
+
resolvedOrgName = match.name;
|
|
3607
|
+
resolvedOrgSlug = match.slug ?? void 0;
|
|
3604
3608
|
const slug = match.slug ? source_default.gray(` (${match.slug})`) : "";
|
|
3605
3609
|
console.log(
|
|
3606
3610
|
source_default.gray("Organization: ") + source_default.cyan(match.name) + slug
|
|
@@ -3640,6 +3644,8 @@ async function deployCommand(options) {
|
|
|
3640
3644
|
}
|
|
3641
3645
|
api.setOrgId(selectedOrg.id);
|
|
3642
3646
|
resolvedOrgId = selectedOrg.id;
|
|
3647
|
+
resolvedOrgName = selectedOrg.name;
|
|
3648
|
+
resolvedOrgSlug = selectedOrg.slug ?? void 0;
|
|
3643
3649
|
await writeConfig({
|
|
3644
3650
|
...config,
|
|
3645
3651
|
orgId: selectedOrg.id,
|
|
@@ -3651,6 +3657,8 @@ async function deployCommand(options) {
|
|
|
3651
3657
|
);
|
|
3652
3658
|
} else {
|
|
3653
3659
|
resolvedOrgId = config.orgId;
|
|
3660
|
+
resolvedOrgName = config.orgName;
|
|
3661
|
+
resolvedOrgSlug = config.orgSlug;
|
|
3654
3662
|
api.setOrgId(config.orgId);
|
|
3655
3663
|
if (config.orgName) {
|
|
3656
3664
|
const slug = config.orgSlug ? source_default.gray(` (${config.orgSlug})`) : "";
|
|
@@ -4047,6 +4055,22 @@ async function deployCommand(options) {
|
|
|
4047
4055
|
}
|
|
4048
4056
|
const existingLink = !options.new ? await getProjectLink(cwd) : null;
|
|
4049
4057
|
let serverId = existingLink?.serverId;
|
|
4058
|
+
if (serverId && resolvedOrgId) {
|
|
4059
|
+
try {
|
|
4060
|
+
const linkedServer = await api.getServer(serverId);
|
|
4061
|
+
if (linkedServer.organizationId !== resolvedOrgId) {
|
|
4062
|
+
const target = resolvedOrgName ? `${resolvedOrgName}${resolvedOrgSlug ? ` (${resolvedOrgSlug})` : ""}` : resolvedOrgId;
|
|
4063
|
+
console.log(
|
|
4064
|
+
source_default.yellow(
|
|
4065
|
+
`\u26A0\uFE0F Linked server belongs to a different organization. Creating a new server in ${target}...
|
|
4066
|
+
`
|
|
4067
|
+
)
|
|
4068
|
+
);
|
|
4069
|
+
serverId = void 0;
|
|
4070
|
+
}
|
|
4071
|
+
} catch {
|
|
4072
|
+
}
|
|
4073
|
+
}
|
|
4050
4074
|
if (existingLink && serverId) {
|
|
4051
4075
|
try {
|
|
4052
4076
|
const existingDep = await api.getDeployment(existingLink.deploymentId);
|