@localess/cli 3.2.2 → 3.2.3-dev.20260611125551

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,13 +8,14 @@ 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", te = class {
11
+ var p = "3.2.3-dev.20260611125551", te = class {
12
12
  set(e, t) {}
13
13
  get(e) {}
14
14
  has(e) {
15
15
  return !1;
16
16
  }
17
17
  }, m = class {
18
+ ttlMs;
18
19
  cache = /* @__PURE__ */ new Map();
19
20
  constructor(e = 3e5) {
20
21
  this.ttlMs = e;
@@ -337,15 +338,11 @@ var ae = new e("login").description("Login to Localess CLI").option("-o, --origi
337
338
  return e.ADD_MISSING = "add-missing", e.UPDATE_EXISTING = "update-existing", e.DELETE_MISSING = "delete-missing", e;
338
339
  }({}), j = /* @__PURE__ */ function(e) {
339
340
  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).option("--version <version>", "Translation version. Possible values: draft").action(async (e, t) => {
341
+ }({}), 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("--draft", "Pull the draft version of translations").action(async (e, t) => {
341
342
  if (console.log("Pulling translations with arguments:", e), console.log("Pulling translations with options:", t), !Object.values(j).includes(t.format)) {
342
343
  console.error("Invalid format provided. Possible values are :", Object.values(j));
343
344
  return;
344
345
  }
345
- if (t.version !== void 0 && t.version !== "draft") {
346
- console.error("Invalid version provided. Possible values are : draft");
347
- return;
348
- }
349
346
  let n = await E();
350
347
  if (!n.isLoggedIn) {
351
348
  console.error("Not logged in"), console.error("Please log in first using \"localess login\" command");
@@ -357,7 +354,7 @@ var ae = new e("login").description("Login to Localess CLI").option("-o, --origi
357
354
  token: n.token
358
355
  });
359
356
  console.log("Pulling translations from Localess for locale:", e);
360
- let i = await r.getTranslations(e, { version: t.version });
357
+ let i = await r.getTranslations(e, { version: t.draft ? "draft" : void 0 });
361
358
  if (console.log("Saving translations in file:", t.path), t.format === j.FLAT) await S(t.path, JSON.stringify(h(i), null, 2));
362
359
  else if (t.format === j.NESTED) {
363
360
  let e = h(_(i));
@@ -3,6 +3,6 @@ import { TranslationFileFormat } from '../../../models';
3
3
  export type TranslationsPullOptions = {
4
4
  path: string;
5
5
  format: TranslationFileFormat;
6
- version?: string;
6
+ draft?: boolean;
7
7
  };
8
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",
3
+ "version": "3.2.3-dev.20260611125551",
4
4
  "description": "Localess Command Line.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -45,19 +45,19 @@
45
45
  },
46
46
  "license": "MIT",
47
47
  "dependencies": {
48
- "@inquirer/prompts": "^8.4.2",
48
+ "@inquirer/prompts": "^8.5.2",
49
49
  "chalk": "^5.6.2",
50
- "commander": "^14.0.3",
51
- "zod": "^4.3.6"
50
+ "commander": "^15.0.0",
51
+ "zod": "^4.4.3"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/node": "^20",
55
- "openapi3-ts": "^4.5.0",
55
+ "openapi3-ts": "^4.6.0",
56
56
  "typescript": "^5.0.0",
57
- "vite": "^8.0.10",
58
- "vite-plugin-dts": "^5.0.0"
57
+ "vite": "^8.0.16",
58
+ "vite-plugin-dts": "^5.0.2"
59
59
  },
60
60
  "engines": {
61
- "node": ">= 20.0.0"
61
+ "node": ">= 24.0.0"
62
62
  }
63
63
  }