esim-cli 2026.1202.208 → 2026.1202.210

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/esim.js CHANGED
@@ -19237,7 +19237,8 @@ var requestIdFlag = flag("request-id", string2().regex(/^[A-Za-z0-9_-]{1,128}$/)
19237
19237
  var recipientArg = positional("recipients", true, string2().regex(/^[^,]+(?:,[^,]+)*$/));
19238
19238
  var quantityArg = positional("quantity", true, numericId);
19239
19239
  var productArg = { ...positional("product"), source: "Product code, any case, such as snack or pistol; potions take a grade, such as lucky:q2" };
19240
- var maxSupplyItems = 12;
19240
+ var dailySupplyProducts = ["SNACK", "MEAL", "PISTOL", "RIFLE"];
19241
+ var dailySupplyChoices = dailySupplyProducts.join(", ").toLowerCase();
19241
19242
  var ranks = ["", "Novice", "Regular", "Veteran", "Elite"];
19242
19243
  var rank = (grade) => ranks[grade ?? 1];
19243
19244
  async function membership(ctx) {
@@ -20328,8 +20329,8 @@ var unit = [
20328
20329
  }),
20329
20330
  unitCommand({
20330
20331
  path: ["supply", "policy"],
20331
- summary: "Set the daily unit supply allocation as leader.",
20332
- args: [positional("allocation", true, string2().min(1)), ...Array.from({ length: maxSupplyItems - 1 }, (_, index) => positional(`allocation-${index + 2}`, false))],
20332
+ summary: `Set daily supplies as leader. Allowed products: ${dailySupplyChoices}.`,
20333
+ args: [positional("allocation", true, string2().min(1)), ...Array.from({ length: dailySupplyProducts.length - 1 }, (_, index) => positional(`allocation-${index + 2}`, false))],
20333
20334
  examples: ["esim unit supply policy snack=2 pistol=1"],
20334
20335
  operations: ["me", "citizen", "get-my-unit-supplies", "set-unit-supply-policy"],
20335
20336
  confirmWith: confirmSupply,
@@ -20342,7 +20343,10 @@ var unit = [
20342
20343
  const product = match?.[1];
20343
20344
  if (product === undefined || !quantity.success)
20344
20345
  return usage2("Use product=quantity, for example snack=2.");
20345
- return supplyItem(product, quantity.data);
20346
+ const item = dailySupplyProducts.find((code) => code === product.trim().toUpperCase());
20347
+ if (!item)
20348
+ return usage2(`${product} cannot be included in daily supplies. Choose from ${dailySupplyChoices}.`, "For a one-time distribution from unit stock, see esim unit supply give --help.");
20349
+ return { item, quality: 0, quantity: quantity.data };
20346
20350
  });
20347
20351
  if (new Set(items.map((item) => `${item.item}:${item.quality}`)).size !== items.length)
20348
20352
  return usage2("Each product may be listed once.");
@@ -38076,7 +38080,7 @@ function saveCredentials(store, credentials) {
38076
38080
  }
38077
38081
 
38078
38082
  // version.ts
38079
- var version2 = "2026.1202.208";
38083
+ var version2 = "2026.1202.210";
38080
38084
  var installKind = version2 === "dev" ? "source" : typeof ESIM_CLI_EXECUTABLE === "boolean" && ESIM_CLI_EXECUTABLE ? "executable" : "npm";
38081
38085
  var npmLatestUrl = "https://registry.npmjs.org/esim-cli/latest";
38082
38086
  var releaseUrl = (release) => `https://github.com/CorrectRoadH/open-esim/releases/download/cli-v${release}`;
package/dist/index.js CHANGED
@@ -19233,7 +19233,8 @@ var requestIdFlag = flag("request-id", string2().regex(/^[A-Za-z0-9_-]{1,128}$/)
19233
19233
  var recipientArg = positional("recipients", true, string2().regex(/^[^,]+(?:,[^,]+)*$/));
19234
19234
  var quantityArg = positional("quantity", true, numericId);
19235
19235
  var productArg = { ...positional("product"), source: "Product code, any case, such as snack or pistol; potions take a grade, such as lucky:q2" };
19236
- var maxSupplyItems = 12;
19236
+ var dailySupplyProducts = ["SNACK", "MEAL", "PISTOL", "RIFLE"];
19237
+ var dailySupplyChoices = dailySupplyProducts.join(", ").toLowerCase();
19237
19238
  var ranks = ["", "Novice", "Regular", "Veteran", "Elite"];
19238
19239
  var rank = (grade) => ranks[grade ?? 1];
19239
19240
  async function membership(ctx) {
@@ -20324,8 +20325,8 @@ var unit = [
20324
20325
  }),
20325
20326
  unitCommand({
20326
20327
  path: ["supply", "policy"],
20327
- summary: "Set the daily unit supply allocation as leader.",
20328
- args: [positional("allocation", true, string2().min(1)), ...Array.from({ length: maxSupplyItems - 1 }, (_, index) => positional(`allocation-${index + 2}`, false))],
20328
+ summary: `Set daily supplies as leader. Allowed products: ${dailySupplyChoices}.`,
20329
+ args: [positional("allocation", true, string2().min(1)), ...Array.from({ length: dailySupplyProducts.length - 1 }, (_, index) => positional(`allocation-${index + 2}`, false))],
20329
20330
  examples: ["esim unit supply policy snack=2 pistol=1"],
20330
20331
  operations: ["me", "citizen", "get-my-unit-supplies", "set-unit-supply-policy"],
20331
20332
  confirmWith: confirmSupply,
@@ -20338,7 +20339,10 @@ var unit = [
20338
20339
  const product = match?.[1];
20339
20340
  if (product === undefined || !quantity.success)
20340
20341
  return usage2("Use product=quantity, for example snack=2.");
20341
- return supplyItem(product, quantity.data);
20342
+ const item = dailySupplyProducts.find((code) => code === product.trim().toUpperCase());
20343
+ if (!item)
20344
+ return usage2(`${product} cannot be included in daily supplies. Choose from ${dailySupplyChoices}.`, "For a one-time distribution from unit stock, see esim unit supply give --help.");
20345
+ return { item, quality: 0, quantity: quantity.data };
20342
20346
  });
20343
20347
  if (new Set(items.map((item) => `${item.item}:${item.quality}`)).size !== items.length)
20344
20348
  return usage2("Each product may be listed once.");
@@ -38082,7 +38086,7 @@ function saveCredentials(store, credentials) {
38082
38086
  }
38083
38087
 
38084
38088
  // version.ts
38085
- var version2 = "2026.1202.208";
38089
+ var version2 = "2026.1202.210";
38086
38090
  var installKind = version2 === "dev" ? "source" : typeof ESIM_CLI_EXECUTABLE === "boolean" && ESIM_CLI_EXECUTABLE ? "executable" : "npm";
38087
38091
  var npmLatestUrl = "https://registry.npmjs.org/esim-cli/latest";
38088
38092
  var releaseVersion = /^\d+\.\d+\.\d+$/;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esim-cli",
3
- "version": "2026.1202.208",
3
+ "version": "2026.1202.210",
4
4
  "description": "Command-line client and agent project for Open E-Sim",
5
5
  "type": "module",
6
6
  "license": "MIT",