esim-cli 2026.1202.207 → 2026.1202.209
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 +10 -5
- package/dist/index.js +10 -5
- package/package.json +1 -1
package/dist/esim.js
CHANGED
|
@@ -15307,6 +15307,7 @@ Each submission of the built-in gold code awards 50 gold. For other codes, a ret
|
|
|
15307
15307
|
{ operationId: "ListBattleWatches", name: "list-battle-watches", method: "GET", path: "/api/me/battle-watches", spec: "webhooks.yaml", write: false, retry: "unsafe", description: "ListBattleWatches", parameters: [], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", required: ["items"], properties: { items: { type: "array", items: { type: "object", required: ["battleId", "kind", "round", "roundEndsAt", "nextReminderAt", "watchedAt"], properties: { battleId: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["war", "resistance", "civil", "tournament", "practice"] }, regionId: { type: "integer" }, attacker: { type: "integer", description: "Attacking country ID for war, resistance and civil battles." }, defender: { type: "integer", description: "Defending country ID for war, resistance and civil battles." }, round: { type: "integer" }, roundEndsAt: { type: "string", format: "date-time" }, nextReminderAt: { description: "When battle.round_ending fires for the current round; null once that moment has passed.", type: ["string", "null"], format: "date-time" }, watchedAt: { type: "string", format: "date-time" } } } } } } } }, responseFields: ["items"] },
|
|
15308
15308
|
{ operationId: "WatchBattle", name: "watch-battle", method: "PUT", path: "/api/me/battle-watches/{battleId}", spec: "webhooks.yaml", write: true, retry: "natural", description: "WatchBattle", parameters: [{ name: "battleId", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", required: ["battleId", "kind", "round", "roundEndsAt", "nextReminderAt", "watchedAt"], properties: { battleId: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["war", "resistance", "civil", "tournament", "practice"] }, regionId: { type: "integer" }, attacker: { type: "integer", description: "Attacking country ID for war, resistance and civil battles." }, defender: { type: "integer", description: "Defending country ID for war, resistance and civil battles." }, round: { type: "integer" }, roundEndsAt: { type: "string", format: "date-time" }, nextReminderAt: { description: "When battle.round_ending fires for the current round; null once that moment has passed.", type: ["string", "null"], format: "date-time" }, watchedAt: { type: "string", format: "date-time" } } } } }, responseFields: ["battleId", "kind", "regionId", "attacker", "defender", "round", "roundEndsAt", "nextReminderAt", "watchedAt"] },
|
|
15309
15309
|
{ operationId: "UnwatchBattle", name: "unwatch-battle", method: "DELETE", path: "/api/me/battle-watches/{battleId}", spec: "webhooks.yaml", write: true, retry: "natural", description: "UnwatchBattle", parameters: [{ name: "battleId", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: true, responses: { "204": { kind: "empty" } }, responseFields: [] },
|
|
15310
|
+
{ operationId: "getTownBanners", name: "get-town-banners", method: "GET", path: "/api/town-banners", spec: "world.yaml", write: false, retry: "unsafe", description: "Public display settings for the town page.", parameters: [], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, properties: { server: { type: "object", additionalProperties: false, required: ["title", "url"], properties: { title: { type: "string", minLength: 1 }, url: { type: "string", format: "uri", pattern: "^https://" } } }, foodRegeneration: { type: "object", additionalProperties: false, required: ["nextAt"], properties: { nextAt: { type: "string", format: "date-time" } } } } } } }, responseFields: ["server", "foodRegeneration"] },
|
|
15310
15311
|
{ operationId: "listCitizens", name: "list-citizens", method: "GET", path: "/api/citizens", spec: "world.yaml", write: false, retry: "unsafe", description: "listCitizens", parameters: [{ name: "q", in: "query", required: true, schema: { type: "string", minLength: 1 } }, { name: "limit", in: "query", schema: { type: "integer", minimum: 1, maximum: 8, default: 8 } }, { name: "cursor", in: "query", description: "Continuation cursor from the preceding search page.", schema: { type: "string", pattern: "^[A-Za-z0-9_-]+$", maxLength: 342 } }, { name: "citizenshipId", in: "query", description: "Public geography country sourceId. Omit or pass 0 for all countries. Unknown source IDs are invalid. Source ID 1 maps to local nation 0.", schema: { type: "integer", minimum: 0 } }, { name: "searchBanned", in: "query", description: "Include banned citizens by default. False excludes citizens whose account ban is active at read time, before applying the limit.", schema: { type: "boolean", default: true } }, { name: "searchInactive", in: "query", description: "Include inactive citizens by default. False requires account creation or session activity during the last seven days.", schema: { type: "boolean", default: true } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", required: ["items", "total"], properties: { total: { type: "integer", format: "int64", minimum: 0 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["id", "name", "nation"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 } } } }, nextCursor: { type: "string" } } } } }, responseFields: ["total", "items", "nextCursor"] },
|
|
15311
15312
|
{ operationId: "listStaff", name: "list-staff", method: "GET", path: "/api/staff", spec: "world.yaml", write: false, retry: "unsafe", description: "Public list of citizens whose account holds the administrator role, ordered by citizen ID.", parameters: [], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", required: ["items"], properties: { items: { type: "array", items: { type: "object", additionalProperties: false, required: ["id", "name", "nation", "role"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 }, role: { type: "string", enum: ["admin"] } } } } } } } }, responseFields: ["items"] },
|
|
15312
15313
|
{ operationId: "getCitizen", name: "citizen", method: "GET", path: "/api/citizens/{pid}", spec: "world.yaml", write: false, retry: "unsafe", description: "getCitizen", parameters: [{ name: "pid", in: "path", required: true, schema: { type: "string", pattern: "^\\s*0*[1-9][0-9]*\\s*$" } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", required: ["id", "name", "nation", "land", "level", "xp", "merit", "strength", "globalRank", "nationalRank", "employer", "unit", "party"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 }, land: { type: "integer" }, level: { type: "integer" }, xp: { type: "integer" }, merit: { type: "integer" }, strength: { type: "integer" }, nonPlayer: { type: "boolean" }, economicSkillHundredths: { type: "integer", format: "int64" }, battlePoints: { type: "integer", format: "int64" }, militaryRank: { type: "string" }, combatStats: { type: "object", description: "Equipped, unarmed damage and chances for a standard battle without situational effects.", required: ["hitMin", "hitMax", "criticalMin", "criticalMax", "criticalChanceBps", "missChanceBps", "saveWeaponChanceBps", "avoidEnergyChanceBps", "freeFlightChanceBps"], properties: { hitMin: { type: "integer", format: "int64" }, hitMax: { type: "integer", format: "int64" }, criticalMin: { type: "integer", format: "int64" }, criticalMax: { type: "integer", format: "int64" }, criticalChanceBps: { type: "integer" }, missChanceBps: { type: "integer" }, saveWeaponChanceBps: { type: "integer" }, avoidEnergyChanceBps: { type: "integer" }, freeFlightChanceBps: { type: "integer" } } }, equipment: { type: "array", items: { type: "object", required: ["id", "slot", "name", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string" }, name: { type: "string" }, quality: { type: "integer" } } } }, bestHit: { type: "integer", format: "int64" }, bestRound: { type: "integer", format: "int64" }, bestBattle: { type: "integer", format: "int64" }, birthday: { type: "integer", format: "int64" }, globalBattleRank: { type: "integer", format: "int64" }, nationalBattleRank: { type: "integer", format: "int64" }, globalTotal: { type: "integer", format: "int64" }, nationalTotal: { type: "integer", format: "int64" }, globalRank: { type: "integer", format: "int64" }, nationalRank: { type: "integer", format: "int64" }, employer: { anyOf: [{ type: "object", required: ["id", "name"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, avatarVersion: { type: "string", description: "Version of the custom avatar; absent when the unit, party or company uses the blank avatar." }, level: { type: "integer", description: "Company level, only for an employer." }, country: { allOf: [{ type: "integer", minimum: 0 }], description: "Country of a military unit." } } }, { type: "null" }] }, unit: { anyOf: [{ type: "object", required: ["id", "name"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, avatarVersion: { type: "string", description: "Version of the custom avatar; absent when the unit, party or company uses the blank avatar." }, level: { type: "integer", description: "Company level, only for an employer." }, country: { allOf: [{ type: "integer", minimum: 0 }], description: "Country of a military unit." } } }, { type: "null" }] }, party: { anyOf: [{ type: "object", required: ["id", "name"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, avatarVersion: { type: "string", description: "Version of the custom avatar; absent when the unit, party or company uses the blank avatar." }, level: { type: "integer", description: "Company level, only for an employer." }, country: { allOf: [{ type: "integer", minimum: 0 }], description: "Country of a military unit." } } }, { type: "null" }] }, ownedCompanies: { type: "integer", format: "int64", description: "Number of companies the citizen owns personally." }, politicalOffice: { type: "string", enum: ["president", "congress", "defenceMinister", "financeMinister"], description: "Current government office in the citizen's country; absent without an office." }, partyLeader: { type: "boolean", description: "True while the citizen chairs their party." } } } } }, responseFields: ["id", "name", "nation", "land", "level", "xp", "merit", "strength", "nonPlayer", "economicSkillHundredths", "battlePoints", "militaryRank", "combatStats", "equipment", "bestHit", "bestRound", "bestBattle", "birthday", "globalBattleRank", "nationalBattleRank", "globalTotal", "nationalTotal", "globalRank", "nationalRank", "employer", "unit", "party", "ownedCompanies", "politicalOffice", "partyLeader"] },
|
|
@@ -19236,7 +19237,8 @@ var requestIdFlag = flag("request-id", string2().regex(/^[A-Za-z0-9_-]{1,128}$/)
|
|
|
19236
19237
|
var recipientArg = positional("recipients", true, string2().regex(/^[^,]+(?:,[^,]+)*$/));
|
|
19237
19238
|
var quantityArg = positional("quantity", true, numericId);
|
|
19238
19239
|
var productArg = { ...positional("product"), source: "Product code, any case, such as snack or pistol; potions take a grade, such as lucky:q2" };
|
|
19239
|
-
var
|
|
19240
|
+
var dailySupplyProducts = ["SNACK", "MEAL", "PISTOL", "RIFLE"];
|
|
19241
|
+
var dailySupplyChoices = dailySupplyProducts.join(", ").toLowerCase();
|
|
19240
19242
|
var ranks = ["", "Novice", "Regular", "Veteran", "Elite"];
|
|
19241
19243
|
var rank = (grade) => ranks[grade ?? 1];
|
|
19242
19244
|
async function membership(ctx) {
|
|
@@ -20327,8 +20329,8 @@ var unit = [
|
|
|
20327
20329
|
}),
|
|
20328
20330
|
unitCommand({
|
|
20329
20331
|
path: ["supply", "policy"],
|
|
20330
|
-
summary:
|
|
20331
|
-
args: [positional("allocation", true, string2().min(1)), ...Array.from({ length:
|
|
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))],
|
|
20332
20334
|
examples: ["esim unit supply policy snack=2 pistol=1"],
|
|
20333
20335
|
operations: ["me", "citizen", "get-my-unit-supplies", "set-unit-supply-policy"],
|
|
20334
20336
|
confirmWith: confirmSupply,
|
|
@@ -20341,7 +20343,10 @@ var unit = [
|
|
|
20341
20343
|
const product = match?.[1];
|
|
20342
20344
|
if (product === undefined || !quantity.success)
|
|
20343
20345
|
return usage2("Use product=quantity, for example snack=2.");
|
|
20344
|
-
|
|
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 };
|
|
20345
20350
|
});
|
|
20346
20351
|
if (new Set(items.map((item) => `${item.item}:${item.quality}`)).size !== items.length)
|
|
20347
20352
|
return usage2("Each product may be listed once.");
|
|
@@ -38075,7 +38080,7 @@ function saveCredentials(store, credentials) {
|
|
|
38075
38080
|
}
|
|
38076
38081
|
|
|
38077
38082
|
// version.ts
|
|
38078
|
-
var version2 = "2026.1202.
|
|
38083
|
+
var version2 = "2026.1202.209";
|
|
38079
38084
|
var installKind = version2 === "dev" ? "source" : typeof ESIM_CLI_EXECUTABLE === "boolean" && ESIM_CLI_EXECUTABLE ? "executable" : "npm";
|
|
38080
38085
|
var npmLatestUrl = "https://registry.npmjs.org/esim-cli/latest";
|
|
38081
38086
|
var releaseUrl = (release) => `https://github.com/CorrectRoadH/open-esim/releases/download/cli-v${release}`;
|
package/dist/index.js
CHANGED
|
@@ -15303,6 +15303,7 @@ Each submission of the built-in gold code awards 50 gold. For other codes, a ret
|
|
|
15303
15303
|
{ operationId: "ListBattleWatches", name: "list-battle-watches", method: "GET", path: "/api/me/battle-watches", spec: "webhooks.yaml", write: false, retry: "unsafe", description: "ListBattleWatches", parameters: [], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", required: ["items"], properties: { items: { type: "array", items: { type: "object", required: ["battleId", "kind", "round", "roundEndsAt", "nextReminderAt", "watchedAt"], properties: { battleId: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["war", "resistance", "civil", "tournament", "practice"] }, regionId: { type: "integer" }, attacker: { type: "integer", description: "Attacking country ID for war, resistance and civil battles." }, defender: { type: "integer", description: "Defending country ID for war, resistance and civil battles." }, round: { type: "integer" }, roundEndsAt: { type: "string", format: "date-time" }, nextReminderAt: { description: "When battle.round_ending fires for the current round; null once that moment has passed.", type: ["string", "null"], format: "date-time" }, watchedAt: { type: "string", format: "date-time" } } } } } } } }, responseFields: ["items"] },
|
|
15304
15304
|
{ operationId: "WatchBattle", name: "watch-battle", method: "PUT", path: "/api/me/battle-watches/{battleId}", spec: "webhooks.yaml", write: true, retry: "natural", description: "WatchBattle", parameters: [{ name: "battleId", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", required: ["battleId", "kind", "round", "roundEndsAt", "nextReminderAt", "watchedAt"], properties: { battleId: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["war", "resistance", "civil", "tournament", "practice"] }, regionId: { type: "integer" }, attacker: { type: "integer", description: "Attacking country ID for war, resistance and civil battles." }, defender: { type: "integer", description: "Defending country ID for war, resistance and civil battles." }, round: { type: "integer" }, roundEndsAt: { type: "string", format: "date-time" }, nextReminderAt: { description: "When battle.round_ending fires for the current round; null once that moment has passed.", type: ["string", "null"], format: "date-time" }, watchedAt: { type: "string", format: "date-time" } } } } }, responseFields: ["battleId", "kind", "regionId", "attacker", "defender", "round", "roundEndsAt", "nextReminderAt", "watchedAt"] },
|
|
15305
15305
|
{ operationId: "UnwatchBattle", name: "unwatch-battle", method: "DELETE", path: "/api/me/battle-watches/{battleId}", spec: "webhooks.yaml", write: true, retry: "natural", description: "UnwatchBattle", parameters: [{ name: "battleId", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: true, responses: { "204": { kind: "empty" } }, responseFields: [] },
|
|
15306
|
+
{ operationId: "getTownBanners", name: "get-town-banners", method: "GET", path: "/api/town-banners", spec: "world.yaml", write: false, retry: "unsafe", description: "Public display settings for the town page.", parameters: [], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, properties: { server: { type: "object", additionalProperties: false, required: ["title", "url"], properties: { title: { type: "string", minLength: 1 }, url: { type: "string", format: "uri", pattern: "^https://" } } }, foodRegeneration: { type: "object", additionalProperties: false, required: ["nextAt"], properties: { nextAt: { type: "string", format: "date-time" } } } } } } }, responseFields: ["server", "foodRegeneration"] },
|
|
15306
15307
|
{ operationId: "listCitizens", name: "list-citizens", method: "GET", path: "/api/citizens", spec: "world.yaml", write: false, retry: "unsafe", description: "listCitizens", parameters: [{ name: "q", in: "query", required: true, schema: { type: "string", minLength: 1 } }, { name: "limit", in: "query", schema: { type: "integer", minimum: 1, maximum: 8, default: 8 } }, { name: "cursor", in: "query", description: "Continuation cursor from the preceding search page.", schema: { type: "string", pattern: "^[A-Za-z0-9_-]+$", maxLength: 342 } }, { name: "citizenshipId", in: "query", description: "Public geography country sourceId. Omit or pass 0 for all countries. Unknown source IDs are invalid. Source ID 1 maps to local nation 0.", schema: { type: "integer", minimum: 0 } }, { name: "searchBanned", in: "query", description: "Include banned citizens by default. False excludes citizens whose account ban is active at read time, before applying the limit.", schema: { type: "boolean", default: true } }, { name: "searchInactive", in: "query", description: "Include inactive citizens by default. False requires account creation or session activity during the last seven days.", schema: { type: "boolean", default: true } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", required: ["items", "total"], properties: { total: { type: "integer", format: "int64", minimum: 0 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["id", "name", "nation"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 } } } }, nextCursor: { type: "string" } } } } }, responseFields: ["total", "items", "nextCursor"] },
|
|
15307
15308
|
{ operationId: "listStaff", name: "list-staff", method: "GET", path: "/api/staff", spec: "world.yaml", write: false, retry: "unsafe", description: "Public list of citizens whose account holds the administrator role, ordered by citizen ID.", parameters: [], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", required: ["items"], properties: { items: { type: "array", items: { type: "object", additionalProperties: false, required: ["id", "name", "nation", "role"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 }, role: { type: "string", enum: ["admin"] } } } } } } } }, responseFields: ["items"] },
|
|
15308
15309
|
{ operationId: "getCitizen", name: "citizen", method: "GET", path: "/api/citizens/{pid}", spec: "world.yaml", write: false, retry: "unsafe", description: "getCitizen", parameters: [{ name: "pid", in: "path", required: true, schema: { type: "string", pattern: "^\\s*0*[1-9][0-9]*\\s*$" } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", required: ["id", "name", "nation", "land", "level", "xp", "merit", "strength", "globalRank", "nationalRank", "employer", "unit", "party"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 }, land: { type: "integer" }, level: { type: "integer" }, xp: { type: "integer" }, merit: { type: "integer" }, strength: { type: "integer" }, nonPlayer: { type: "boolean" }, economicSkillHundredths: { type: "integer", format: "int64" }, battlePoints: { type: "integer", format: "int64" }, militaryRank: { type: "string" }, combatStats: { type: "object", description: "Equipped, unarmed damage and chances for a standard battle without situational effects.", required: ["hitMin", "hitMax", "criticalMin", "criticalMax", "criticalChanceBps", "missChanceBps", "saveWeaponChanceBps", "avoidEnergyChanceBps", "freeFlightChanceBps"], properties: { hitMin: { type: "integer", format: "int64" }, hitMax: { type: "integer", format: "int64" }, criticalMin: { type: "integer", format: "int64" }, criticalMax: { type: "integer", format: "int64" }, criticalChanceBps: { type: "integer" }, missChanceBps: { type: "integer" }, saveWeaponChanceBps: { type: "integer" }, avoidEnergyChanceBps: { type: "integer" }, freeFlightChanceBps: { type: "integer" } } }, equipment: { type: "array", items: { type: "object", required: ["id", "slot", "name", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string" }, name: { type: "string" }, quality: { type: "integer" } } } }, bestHit: { type: "integer", format: "int64" }, bestRound: { type: "integer", format: "int64" }, bestBattle: { type: "integer", format: "int64" }, birthday: { type: "integer", format: "int64" }, globalBattleRank: { type: "integer", format: "int64" }, nationalBattleRank: { type: "integer", format: "int64" }, globalTotal: { type: "integer", format: "int64" }, nationalTotal: { type: "integer", format: "int64" }, globalRank: { type: "integer", format: "int64" }, nationalRank: { type: "integer", format: "int64" }, employer: { anyOf: [{ type: "object", required: ["id", "name"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, avatarVersion: { type: "string", description: "Version of the custom avatar; absent when the unit, party or company uses the blank avatar." }, level: { type: "integer", description: "Company level, only for an employer." }, country: { allOf: [{ type: "integer", minimum: 0 }], description: "Country of a military unit." } } }, { type: "null" }] }, unit: { anyOf: [{ type: "object", required: ["id", "name"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, avatarVersion: { type: "string", description: "Version of the custom avatar; absent when the unit, party or company uses the blank avatar." }, level: { type: "integer", description: "Company level, only for an employer." }, country: { allOf: [{ type: "integer", minimum: 0 }], description: "Country of a military unit." } } }, { type: "null" }] }, party: { anyOf: [{ type: "object", required: ["id", "name"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, avatarVersion: { type: "string", description: "Version of the custom avatar; absent when the unit, party or company uses the blank avatar." }, level: { type: "integer", description: "Company level, only for an employer." }, country: { allOf: [{ type: "integer", minimum: 0 }], description: "Country of a military unit." } } }, { type: "null" }] }, ownedCompanies: { type: "integer", format: "int64", description: "Number of companies the citizen owns personally." }, politicalOffice: { type: "string", enum: ["president", "congress", "defenceMinister", "financeMinister"], description: "Current government office in the citizen's country; absent without an office." }, partyLeader: { type: "boolean", description: "True while the citizen chairs their party." } } } } }, responseFields: ["id", "name", "nation", "land", "level", "xp", "merit", "strength", "nonPlayer", "economicSkillHundredths", "battlePoints", "militaryRank", "combatStats", "equipment", "bestHit", "bestRound", "bestBattle", "birthday", "globalBattleRank", "nationalBattleRank", "globalTotal", "nationalTotal", "globalRank", "nationalRank", "employer", "unit", "party", "ownedCompanies", "politicalOffice", "partyLeader"] },
|
|
@@ -19232,7 +19233,8 @@ var requestIdFlag = flag("request-id", string2().regex(/^[A-Za-z0-9_-]{1,128}$/)
|
|
|
19232
19233
|
var recipientArg = positional("recipients", true, string2().regex(/^[^,]+(?:,[^,]+)*$/));
|
|
19233
19234
|
var quantityArg = positional("quantity", true, numericId);
|
|
19234
19235
|
var productArg = { ...positional("product"), source: "Product code, any case, such as snack or pistol; potions take a grade, such as lucky:q2" };
|
|
19235
|
-
var
|
|
19236
|
+
var dailySupplyProducts = ["SNACK", "MEAL", "PISTOL", "RIFLE"];
|
|
19237
|
+
var dailySupplyChoices = dailySupplyProducts.join(", ").toLowerCase();
|
|
19236
19238
|
var ranks = ["", "Novice", "Regular", "Veteran", "Elite"];
|
|
19237
19239
|
var rank = (grade) => ranks[grade ?? 1];
|
|
19238
19240
|
async function membership(ctx) {
|
|
@@ -20323,8 +20325,8 @@ var unit = [
|
|
|
20323
20325
|
}),
|
|
20324
20326
|
unitCommand({
|
|
20325
20327
|
path: ["supply", "policy"],
|
|
20326
|
-
summary:
|
|
20327
|
-
args: [positional("allocation", true, string2().min(1)), ...Array.from({ length:
|
|
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))],
|
|
20328
20330
|
examples: ["esim unit supply policy snack=2 pistol=1"],
|
|
20329
20331
|
operations: ["me", "citizen", "get-my-unit-supplies", "set-unit-supply-policy"],
|
|
20330
20332
|
confirmWith: confirmSupply,
|
|
@@ -20337,7 +20339,10 @@ var unit = [
|
|
|
20337
20339
|
const product = match?.[1];
|
|
20338
20340
|
if (product === undefined || !quantity.success)
|
|
20339
20341
|
return usage2("Use product=quantity, for example snack=2.");
|
|
20340
|
-
|
|
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 };
|
|
20341
20346
|
});
|
|
20342
20347
|
if (new Set(items.map((item) => `${item.item}:${item.quality}`)).size !== items.length)
|
|
20343
20348
|
return usage2("Each product may be listed once.");
|
|
@@ -38081,7 +38086,7 @@ function saveCredentials(store, credentials) {
|
|
|
38081
38086
|
}
|
|
38082
38087
|
|
|
38083
38088
|
// version.ts
|
|
38084
|
-
var version2 = "2026.1202.
|
|
38089
|
+
var version2 = "2026.1202.209";
|
|
38085
38090
|
var installKind = version2 === "dev" ? "source" : typeof ESIM_CLI_EXECUTABLE === "boolean" && ESIM_CLI_EXECUTABLE ? "executable" : "npm";
|
|
38086
38091
|
var npmLatestUrl = "https://registry.npmjs.org/esim-cli/latest";
|
|
38087
38092
|
var releaseVersion = /^\d+\.\d+\.\d+$/;
|