@fluid-app/fluid-cli-localization 0.1.382 → 0.1.384
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/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +10 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -6,7 +6,7 @@ declare function registerCountriesCommands(parent: Command, ctx: CommandContext)
|
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/markets/commands.d.ts
|
|
8
8
|
/**
|
|
9
|
-
* Register `fluid markets list|add-country|remove-country` on `parent`.
|
|
9
|
+
* Register `fluid markets list|add-country|remove-country|rename` on `parent`.
|
|
10
10
|
*
|
|
11
11
|
* @param parent - the `markets` command group
|
|
12
12
|
* @param ctx - the CLI command context
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/countries/commands.ts","../src/markets/commands.ts","../src/translations/commands.ts","../src/index.ts"],"mappings":";;;;iBAiMgB,yBAAA,CACd,MAAA,EAAQ,OAAA,EACR,GAAA,EAAK,cAAA;;;;;AAFP;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/countries/commands.ts","../src/markets/commands.ts","../src/translations/commands.ts","../src/index.ts"],"mappings":";;;;iBAiMgB,yBAAA,CACd,MAAA,EAAQ,OAAA,EACR,GAAA,EAAK,cAAA;;;;;AAFP;;;;iBC/JgB,uBAAA,CACd,MAAA,EAAQ,OAAA,EACR,GAAA,EAAK,cAAA;;;iBCgES,4BAAA,CACd,MAAA,EAAQ,OAAA,EACR,GAAA,EAAK,cAAA;;;AF2FP;;;;;;AAAA,cGhLM,MAAA,EAAQ,WAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -4205,6 +4205,10 @@ function addMarketCountry(client, iso, currency) {
|
|
|
4205
4205
|
async function removeMarketCountry(client, iso) {
|
|
4206
4206
|
await guarded(() => client.delete(`${MARKETS_PATH}/countries/${iso}`));
|
|
4207
4207
|
}
|
|
4208
|
+
/** PATCH /api/company/v2026-10/markets/:id: renames one market. */
|
|
4209
|
+
function renameMarket(client, id, name) {
|
|
4210
|
+
return guarded(() => client.patch(`${MARKETS_PATH}/${encodeURIComponent(id)}`, { name }));
|
|
4211
|
+
}
|
|
4208
4212
|
//#endregion
|
|
4209
4213
|
//#region src/markets/commands.ts
|
|
4210
4214
|
async function client$1(ctx) {
|
|
@@ -4216,7 +4220,7 @@ function currencyCodeOf(raw) {
|
|
|
4216
4220
|
return code;
|
|
4217
4221
|
}
|
|
4218
4222
|
/**
|
|
4219
|
-
* Register `fluid markets list|add-country|remove-country` on `parent`.
|
|
4223
|
+
* Register `fluid markets list|add-country|remove-country|rename` on `parent`.
|
|
4220
4224
|
*
|
|
4221
4225
|
* @param parent - the `markets` command group
|
|
4222
4226
|
* @param ctx - the CLI command context
|
|
@@ -4239,6 +4243,11 @@ function registerMarketsCommands(parent, ctx) {
|
|
|
4239
4243
|
removed: true
|
|
4240
4244
|
});
|
|
4241
4245
|
}));
|
|
4246
|
+
parent.command("rename <market-id> <name...>").description("Rename a market. Its region and countries are unchanged").action((marketId, words) => run(async () => {
|
|
4247
|
+
const trimmed = words.join(" ").trim();
|
|
4248
|
+
if (!trimmed) throw new LocalizationError("A market name can't be blank.");
|
|
4249
|
+
ctx.output(await renameMarket(await client$1(ctx), marketId, trimmed));
|
|
4250
|
+
}));
|
|
4242
4251
|
}
|
|
4243
4252
|
//#endregion
|
|
4244
4253
|
//#region src/translations/commands.ts
|