@localess/cli 3.2.2-dev.20260609145616 → 3.2.2

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.mjs CHANGED
@@ -8,7 +8,7 @@ import ee from "node:process";
8
8
  import { z as d } from "zod";
9
9
  import f from "chalk";
10
10
  //#region package.json
11
- var p = "3.2.2-dev.20260609145616", te = class {
11
+ var p = "3.2.2", te = class {
12
12
  set(e, t) {}
13
13
  get(e) {}
14
14
  has(e) {
@@ -337,11 +337,15 @@ var ae = new e("login").description("Login to Localess CLI").option("-o, --origi
337
337
  return e.ADD_MISSING = "add-missing", e.UPDATE_EXISTING = "update-existing", e.DELETE_MISSING = "delete-missing", e;
338
338
  }({}), j = /* @__PURE__ */ function(e) {
339
339
  return e.FLAT = "flat", e.NESTED = "nested", e;
340
- }({}), M = new e("pull").argument("<locale>", "Locale to pull").description("Pull locale translations from Localess").requiredOption("-p, --path <path>", "Path where the translations file will be saved").option("-f, --format <format>", `File format. Possible values are : ${Object.values(j)}`, j.FLAT).action(async (e, t) => {
340
+ }({}), M = new e("pull").argument("<locale>", "Locale to pull").description("Pull locale translations from Localess").requiredOption("-p, --path <path>", "Path where the translations file will be saved").option("-f, --format <format>", `File format. Possible values are : ${Object.values(j)}`, j.FLAT).option("--version <version>", "Translation version. Possible values: draft").action(async (e, t) => {
341
341
  if (console.log("Pulling translations with arguments:", e), console.log("Pulling translations with options:", t), !Object.values(j).includes(t.format)) {
342
342
  console.error("Invalid format provided. Possible values are :", Object.values(j));
343
343
  return;
344
344
  }
345
+ if (t.version !== void 0 && t.version !== "draft") {
346
+ console.error("Invalid version provided. Possible values are : draft");
347
+ return;
348
+ }
345
349
  let n = await E();
346
350
  if (!n.isLoggedIn) {
347
351
  console.error("Not logged in"), console.error("Please log in first using \"localess login\" command");
@@ -353,7 +357,7 @@ var ae = new e("login").description("Login to Localess CLI").option("-o, --origi
353
357
  token: n.token
354
358
  });
355
359
  console.log("Pulling translations from Localess for locale:", e);
356
- let i = await r.getTranslations(e);
360
+ let i = await r.getTranslations(e, { version: t.version });
357
361
  if (console.log("Saving translations in file:", t.path), t.format === j.FLAT) await S(t.path, JSON.stringify(h(i), null, 2));
358
362
  else if (t.format === j.NESTED) {
359
363
  let e = h(_(i));
@@ -3,5 +3,6 @@ import { TranslationFileFormat } from '../../../models';
3
3
  export type TranslationsPullOptions = {
4
4
  path: string;
5
5
  format: TranslationFileFormat;
6
+ version?: string;
6
7
  };
7
8
  export declare const translationsPullCommand: Command;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@localess/cli",
3
- "version": "3.2.2-dev.20260609145616",
3
+ "version": "3.2.2",
4
4
  "description": "Localess Command Line.",
5
5
  "publishConfig": {
6
6
  "access": "public"