@carrierllc/mcp 0.13.25 → 0.13.26
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/{chunk-KFIIIQ4J.js → chunk-HTIPSHMH.js} +41 -5
- package/dist/chunk-HTIPSHMH.js.map +1 -0
- package/dist/cli.js +549 -508
- package/dist/cli.js.map +1 -1
- package/dist/index.js +49 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/plugin/carrier/skills/storefront/SKILL.md +1 -1
- package/dist/chunk-KFIIIQ4J.js.map +0 -1
|
@@ -240,6 +240,17 @@ async function setCustomDomain(storefront, domain) {
|
|
|
240
240
|
await writeFile(path, patched);
|
|
241
241
|
return true;
|
|
242
242
|
}
|
|
243
|
+
async function setWorkerName(storefront, name) {
|
|
244
|
+
const path = join(storefront, "wrangler.jsonc");
|
|
245
|
+
if (!await exists(path)) return false;
|
|
246
|
+
const body = await readFileText(path);
|
|
247
|
+
const re = /^\s*"?name"?\s*:\s*"[^"]*"/m;
|
|
248
|
+
if (!re.test(body)) return false;
|
|
249
|
+
const patched = body.replace(re, (m) => m.replace(/"[^"]*"\s*$/, JSON.stringify(name)));
|
|
250
|
+
if (patched === body) return false;
|
|
251
|
+
await writeFile(path, patched);
|
|
252
|
+
return true;
|
|
253
|
+
}
|
|
243
254
|
async function readFileText(path) {
|
|
244
255
|
const { readFile: readFile2 } = await import("./fsx-BDDIQ3Y7.js");
|
|
245
256
|
return readFile2(path, "utf8");
|
|
@@ -678,6 +689,14 @@ async function loadStorefrontBrand(target, overrides) {
|
|
|
678
689
|
carrierApiUrl: CARRIER_BRAND.carrierApiUrl
|
|
679
690
|
};
|
|
680
691
|
}
|
|
692
|
+
var SCAFFOLD_DEFAULT_WORKER_NAME = "storefront";
|
|
693
|
+
function resolveDeployName(opts) {
|
|
694
|
+
if (opts.explicitName) return slug(opts.explicitName);
|
|
695
|
+
return opts.configuredName ?? slug(opts.brandName);
|
|
696
|
+
}
|
|
697
|
+
function needsForceForDefaultName(opts) {
|
|
698
|
+
return !opts.force && opts.projectName === SCAFFOLD_DEFAULT_WORKER_NAME;
|
|
699
|
+
}
|
|
681
700
|
async function deploySite(target, brand, opts = {}) {
|
|
682
701
|
const statuses = await probeAll(target);
|
|
683
702
|
let chosen;
|
|
@@ -686,7 +705,7 @@ async function deploySite(target, brand, opts = {}) {
|
|
|
686
705
|
if (!wanted?.ready) {
|
|
687
706
|
return {
|
|
688
707
|
ok: false,
|
|
689
|
-
projectName:
|
|
708
|
+
projectName: resolveDeployName({ explicitName: opts.explicitName, brandName: brand.name }),
|
|
690
709
|
statuses,
|
|
691
710
|
reason: wanted?.reason ?? `${opts.preferred} is not available on this machine.`
|
|
692
711
|
};
|
|
@@ -698,12 +717,28 @@ async function deploySite(target, brand, opts = {}) {
|
|
|
698
717
|
if (!chosen) {
|
|
699
718
|
return {
|
|
700
719
|
ok: false,
|
|
701
|
-
projectName:
|
|
720
|
+
projectName: resolveDeployName({ explicitName: opts.explicitName, brandName: brand.name }),
|
|
702
721
|
statuses,
|
|
703
722
|
reason: "No deploy target is ready. " + statuses.map((s) => `${s.label}: ${s.reason ?? "unavailable"}`).join(" | ")
|
|
704
723
|
};
|
|
705
724
|
}
|
|
706
|
-
const projectName =
|
|
725
|
+
const projectName = resolveDeployName({
|
|
726
|
+
explicitName: opts.explicitName,
|
|
727
|
+
configuredName: await configuredProjectName(chosen.id, target),
|
|
728
|
+
brandName: brand.name
|
|
729
|
+
});
|
|
730
|
+
if (needsForceForDefaultName({ projectName, force: opts.force })) {
|
|
731
|
+
return {
|
|
732
|
+
ok: false,
|
|
733
|
+
projectName,
|
|
734
|
+
statuses,
|
|
735
|
+
target: chosen.id,
|
|
736
|
+
reason: 'Refusing to deploy under the scaffold default worker name "storefront" - a different Worker may already use it on this account. Pass --name <worker> to pick a name, or --force to deploy as "storefront" anyway.'
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
if (opts.explicitName && chosen.id === "cloudflare") {
|
|
740
|
+
await setWorkerName(target, projectName);
|
|
741
|
+
}
|
|
707
742
|
if (opts.customDomain && chosen.id === "cloudflare" && brand.domain) {
|
|
708
743
|
await setCustomDomain(target, brand.domain);
|
|
709
744
|
}
|
|
@@ -1820,7 +1855,7 @@ function storefrontScreen(input) {
|
|
|
1820
1855
|
// package.json
|
|
1821
1856
|
var package_default = {
|
|
1822
1857
|
name: "@carrierllc/mcp",
|
|
1823
|
-
version: "0.13.
|
|
1858
|
+
version: "0.13.26",
|
|
1824
1859
|
description: "Carrier MCP \u2014 natural-language control of MVNO/eSIM fleets via eSIMVault OCS. Stdio mode for direct integration with Claude Desktop, Cursor, Windsurf, and MCP-compatible clients. Ships the `carrier` CLI (plugin install + white-label eSIM storefront scaffold).",
|
|
1825
1860
|
license: "MIT",
|
|
1826
1861
|
author: "Carrier (Lifecycle Innovations Limited)",
|
|
@@ -5413,6 +5448,7 @@ export {
|
|
|
5413
5448
|
which,
|
|
5414
5449
|
TARGET_IDS,
|
|
5415
5450
|
isTargetId,
|
|
5451
|
+
setWorkerName,
|
|
5416
5452
|
rollback,
|
|
5417
5453
|
probeAll,
|
|
5418
5454
|
rankTargets,
|
|
@@ -5446,4 +5482,4 @@ export {
|
|
|
5446
5482
|
storefrontScreen,
|
|
5447
5483
|
CARRIER_VERSION
|
|
5448
5484
|
};
|
|
5449
|
-
//# sourceMappingURL=chunk-
|
|
5485
|
+
//# sourceMappingURL=chunk-HTIPSHMH.js.map
|