@carrierllc/mcp 0.13.16 → 0.13.17

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/cli.js CHANGED
@@ -39,7 +39,7 @@ import {
39
39
  verifyStorefront,
40
40
  walletScreen,
41
41
  which
42
- } from "./chunk-D6VGTHND.js";
42
+ } from "./chunk-SAZFMURF.js";
43
43
  import {
44
44
  copyTree,
45
45
  exists,
@@ -458,7 +458,8 @@ function completePlanInput(input, plans) {
458
458
  input.validityDays,
459
459
  input.regions,
460
460
  input.description,
461
- input.active
461
+ input.active,
462
+ input.sortOrder
462
463
  ].some((value) => value !== void 0);
463
464
  if (!touched) return input;
464
465
  const slug2 = input.slug?.trim();
@@ -487,6 +488,7 @@ function storefrontPlanBody(input) {
487
488
  const body2 = { product_id: productId };
488
489
  if (input.priceCents !== void 0) body2.price_cents = input.priceCents;
489
490
  if (input.active !== void 0) body2.active = input.active;
491
+ if (input.sortOrder !== void 0) body2.sort_order = input.sortOrder;
490
492
  return body2;
491
493
  }
492
494
  const touched = [
@@ -500,7 +502,8 @@ function storefrontPlanBody(input) {
500
502
  input.validityDays,
501
503
  input.regions,
502
504
  input.description,
503
- input.active
505
+ input.active,
506
+ input.sortOrder
504
507
  ].some((value) => value !== void 0);
505
508
  if (!touched) return null;
506
509
  if (!input.slug || !input.name || input.priceCents === void 0 || !input.currency || input.templateId === void 0) {
@@ -522,6 +525,7 @@ function storefrontPlanBody(input) {
522
525
  if (input.regions !== void 0) body.regions = input.regions;
523
526
  if (input.description !== void 0) body.description = input.description;
524
527
  if (input.active !== void 0) body.active = input.active;
528
+ if (input.sortOrder !== void 0) body.sort_order = input.sortOrder;
525
529
  return body;
526
530
  }
527
531
  function isStorefrontPlanError(value) {
@@ -1559,6 +1563,8 @@ function hostedPublishInputFromFlags(flags) {
1559
1563
  if (!countries.ok) return { ok: false, text: countries.text };
1560
1564
  const logo = readLogo(flags.logo);
1561
1565
  if (!logo.ok) return { ok: false, text: logo.text };
1566
+ const sortOrder = parseWholeNumber(flags.planSortOrder, "Plan sort order");
1567
+ if (!sortOrder.ok) return { ok: false, text: sortOrder.message };
1562
1568
  return {
1563
1569
  ok: true,
1564
1570
  input: {
@@ -1585,7 +1591,8 @@ function hostedPublishInputFromFlags(flags) {
1585
1591
  validityDays: validity.value,
1586
1592
  regions: countries.value,
1587
1593
  description: flags.planText,
1588
- planActive: flags.inactive ? false : void 0
1594
+ planActive: flags.inactive ? false : void 0,
1595
+ planSortOrder: sortOrder.value
1589
1596
  }
1590
1597
  };
1591
1598
  }
@@ -1644,7 +1651,8 @@ function planInput(input) {
1644
1651
  validityDays: input.validityDays,
1645
1652
  regions: input.regions,
1646
1653
  description: input.description,
1647
- active: input.planActive
1654
+ active: input.planActive,
1655
+ sortOrder: input.planSortOrder
1648
1656
  };
1649
1657
  }
1650
1658
  function findStore(body, slug2) {
@@ -6071,7 +6079,7 @@ site.command("deploy [dir]").description("Build + deploy a storefront to whichev
6071
6079
  p3.outro("");
6072
6080
  }
6073
6081
  );
6074
- site.command("publish").description("Publish a Carrier-hosted storefront. Does not deploy a self-hosted copy.").requiredOption("--slug <slug>", "Shop address, such as acme or Acme Mobile").requiredOption("--name <name>", "Brand name").option("--status <status>", "draft or published", "published").option("--accent <hex>", "Accent color, such as #112233").option("--accent-dark <hex>", "Darker accent").option("--bg <hex>", "Page background").option("--text <hex>", "Body text color").option("--logo <url-or-file>", "https logo address, or a PNG, JPEG, WebP, or GIF under 70 KB").option("--hero <text>", "Shop headline").option("--tagline <text>", "Line under the headline").option("--support-email <email>", "Support address").option("--legal-name <name>", "Legal name in the footer").option("--product <id>", "Connectivity plan id. Copies its template, price, and allowance.").option("--plan <slug>", "Plan slug, such as eu-1gb").option("--plan-name <name>", "Plan name on the shop").option("--price <amount>", "Retail price, such as 9.00").option("--price-cents <cents>", "Retail price in minor units").option("--currency <code>", "Three-letter currency code").option("--template-id <id>", "OCS package template id").option("--data-gb <gb>", "Data allowance, such as 1 or 1 GB, or the text Unlimited").option("--unlimited", "The only way to sell an unlimited plan. A 0 or missing --data-gb without this is refused.").option("--validity-days <days>", "Validity, such as 7 or 7 days").option("--countries <names>", "Country names or codes, such as France, DE").option("--plan-text <text>", "Buyer-facing sentence. Omit to leave the saved text unchanged.").option("--inactive", "Keep the plan off the shop").action(async (o) => {
6082
+ site.command("publish").description("Publish a Carrier-hosted storefront. Does not deploy a self-hosted copy.").requiredOption("--slug <slug>", "Shop address, such as acme or Acme Mobile").requiredOption("--name <name>", "Brand name").option("--status <status>", "draft or published", "published").option("--accent <hex>", "Accent color, such as #112233").option("--accent-dark <hex>", "Darker accent").option("--bg <hex>", "Page background").option("--text <hex>", "Body text color").option("--logo <url-or-file>", "https logo address, or a PNG, JPEG, WebP, or GIF under 70 KB").option("--hero <text>", "Shop headline").option("--tagline <text>", "Line under the headline").option("--support-email <email>", "Support address").option("--legal-name <name>", "Legal name in the footer").option("--product <id>", "Connectivity plan id. Copies its template, price, and allowance.").option("--plan <slug>", "Plan slug, such as eu-1gb").option("--plan-name <name>", "Plan name on the shop").option("--price <amount>", "Retail price, such as 9.00").option("--price-cents <cents>", "Retail price in minor units").option("--currency <code>", "Three-letter currency code").option("--template-id <id>", "OCS package template id").option("--data-gb <gb>", "Data allowance, such as 1 or 1 GB, or the text Unlimited").option("--unlimited", "The only way to sell an unlimited plan. A 0 or missing --data-gb without this is refused.").option("--validity-days <days>", "Validity, such as 7 or 7 days").option("--countries <names>", "Country names or codes, such as France, DE").option("--plan-text <text>", "Buyer-facing sentence. Omit to leave the saved text unchanged.").option("--inactive", "Keep the plan off the shop").option("--plan-sort-order <n>", "Plan display order on the shop (ascending, default 0)").action(async (o) => {
6075
6083
  header();
6076
6084
  const built = hostedPublishInputFromFlags(o);
6077
6085
  if (!built.ok) {