@localess/cli 0.0.1-dev.20260220080241 → 0.0.1-dev.20260220221945

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.js CHANGED
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  ));
25
25
 
26
26
  // src/program.ts
27
- var import_commander6 = require("commander");
27
+ var import_commander7 = require("commander");
28
28
 
29
29
  // src/commands/login/index.ts
30
30
  var import_commander = require("commander");
@@ -501,12 +501,15 @@ var logoutCommand = new import_commander2.Command("logout").description("Logout
501
501
  });
502
502
 
503
503
  // src/commands/types/index.ts
504
+ var import_commander4 = require("commander");
505
+
506
+ // src/commands/types/generate/index.ts
504
507
  var import_commander3 = require("commander");
505
508
  var import_openapi_typescript = __toESM(require("openapi-typescript"));
506
509
  var import_node_path3 = require("path");
507
510
  var import_node_process = __toESM(require("process"));
508
511
  var TYPES_PATH = (0, import_node_path3.join)(import_node_process.default.cwd(), DEFAULT_CONFIG_DIR, "localess.d.ts");
509
- var typesCommand = new import_commander3.Command("types").description("Generate types for your schemas").action(async (options) => {
512
+ var typesGenerateCommand = new import_commander3.Command("generate").description("Generate types for your schemas").option("-f, --file <path>", "Path to the file where to save the generated types. Default is .localess/localess.d.ts", TYPES_PATH).action(async (options) => {
510
513
  console.log("Types in with options:", options);
511
514
  const session = await getSession();
512
515
  if (!session.isLoggedIn) {
@@ -530,18 +533,21 @@ var typesCommand = new import_commander3.Command("types").description("Generate
530
533
  };
531
534
  const ast = await (0, import_openapi_typescript.default)(minimalSpec, { exportType: true, rootTypes: true, rootTypesNoSchemaPrefix: true });
532
535
  const contents = (0, import_openapi_typescript.astToString)(ast);
533
- await writeFile(TYPES_PATH, contents);
534
- console.log(`Types generated successfully at ${TYPES_PATH}`);
536
+ await writeFile(options.file, contents);
537
+ console.log(`Types generated successfully at ${options.file}`);
535
538
  } catch (e) {
536
539
  console.error(e);
537
540
  }
538
541
  });
539
542
 
543
+ // src/commands/types/index.ts
544
+ var typesCommand = new import_commander4.Command("types").description("Generate types for your schemas").addCommand(typesGenerateCommand);
545
+
540
546
  // src/commands/translations/index.ts
541
- var import_commander5 = require("commander");
547
+ var import_commander6 = require("commander");
542
548
 
543
549
  // src/commands/translations/push/index.ts
544
- var import_commander4 = require("commander");
550
+ var import_commander5 = require("commander");
545
551
 
546
552
  // src/models/translations.ts
547
553
  var TranslationUpdateType = /* @__PURE__ */ ((TranslationUpdateType2) => {
@@ -560,7 +566,7 @@ var zTranslationUpdateSchema = import_zod.z.object({
560
566
  });
561
567
 
562
568
  // src/commands/translations/push/index.ts
563
- var translationsPushCommand = new import_commander4.Command("push").argument("<locale>", "Locale to push").description("Push locale translations to Localess").requiredOption("-f, --file <path>", "Path to the translations file to push").option("-t, --type <type>", `Push type. Possible values are : ${Object.values(TranslationUpdateType)}`, "add-missing" /* ADD_MISSING */).action(async (locale, options) => {
569
+ var translationsPushCommand = new import_commander5.Command("push").argument("<locale>", "Locale to push").description("Push locale translations to Localess").requiredOption("-f, --file <path>", "Path to the translations file to push").option("-t, --type <type>", `Push type. Possible values are : ${Object.values(TranslationUpdateType)}`, "add-missing" /* ADD_MISSING */).action(async (locale, options) => {
564
570
  console.log("Pushing translations with arguments:", locale);
565
571
  console.log("Pushing translations with options:", options);
566
572
  if (!zTranslationUpdateTypeSchema.safeParse(options.type).success) {
@@ -600,10 +606,10 @@ var translationsPushCommand = new import_commander4.Command("push").argument("<l
600
606
  });
601
607
 
602
608
  // src/commands/translations/index.ts
603
- var translationsCommand = new import_commander5.Command("translations").description("Manage translations").addCommand(translationsPushCommand);
609
+ var translationsCommand = new import_commander6.Command("translations").description("Manage translations").addCommand(translationsPushCommand);
604
610
 
605
611
  // src/program.ts
606
- var program = new import_commander6.Command();
612
+ var program = new import_commander7.Command();
607
613
  program.name("Localess CLI").description("CLI tool for Localess platform management").version("0.0.1");
608
614
  program.addCommand(loginCommand);
609
615
  program.addCommand(logoutCommand);
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/program.ts
4
- import { Command as Command6 } from "commander";
4
+ import { Command as Command7 } from "commander";
5
5
 
6
6
  // src/commands/login/index.ts
7
7
  import { Command } from "commander";
@@ -478,12 +478,15 @@ var logoutCommand = new Command2("logout").description("Logout from Localess CLI
478
478
  });
479
479
 
480
480
  // src/commands/types/index.ts
481
+ import { Command as Command4 } from "commander";
482
+
483
+ // src/commands/types/generate/index.ts
481
484
  import { Command as Command3 } from "commander";
482
485
  import openapiTS, { astToString } from "openapi-typescript";
483
486
  import { join as join2 } from "path";
484
487
  import process3 from "process";
485
488
  var TYPES_PATH = join2(process3.cwd(), DEFAULT_CONFIG_DIR, "localess.d.ts");
486
- var typesCommand = new Command3("types").description("Generate types for your schemas").action(async (options) => {
489
+ var typesGenerateCommand = new Command3("generate").description("Generate types for your schemas").option("-f, --file <path>", "Path to the file where to save the generated types. Default is .localess/localess.d.ts", TYPES_PATH).action(async (options) => {
487
490
  console.log("Types in with options:", options);
488
491
  const session = await getSession();
489
492
  if (!session.isLoggedIn) {
@@ -507,18 +510,21 @@ var typesCommand = new Command3("types").description("Generate types for your sc
507
510
  };
508
511
  const ast = await openapiTS(minimalSpec, { exportType: true, rootTypes: true, rootTypesNoSchemaPrefix: true });
509
512
  const contents = astToString(ast);
510
- await writeFile(TYPES_PATH, contents);
511
- console.log(`Types generated successfully at ${TYPES_PATH}`);
513
+ await writeFile(options.file, contents);
514
+ console.log(`Types generated successfully at ${options.file}`);
512
515
  } catch (e) {
513
516
  console.error(e);
514
517
  }
515
518
  });
516
519
 
520
+ // src/commands/types/index.ts
521
+ var typesCommand = new Command4("types").description("Generate types for your schemas").addCommand(typesGenerateCommand);
522
+
517
523
  // src/commands/translations/index.ts
518
- import { Command as Command5 } from "commander";
524
+ import { Command as Command6 } from "commander";
519
525
 
520
526
  // src/commands/translations/push/index.ts
521
- import { Command as Command4 } from "commander";
527
+ import { Command as Command5 } from "commander";
522
528
 
523
529
  // src/models/translations.ts
524
530
  var TranslationUpdateType = /* @__PURE__ */ ((TranslationUpdateType2) => {
@@ -537,7 +543,7 @@ var zTranslationUpdateSchema = z.object({
537
543
  });
538
544
 
539
545
  // src/commands/translations/push/index.ts
540
- var translationsPushCommand = new Command4("push").argument("<locale>", "Locale to push").description("Push locale translations to Localess").requiredOption("-f, --file <path>", "Path to the translations file to push").option("-t, --type <type>", `Push type. Possible values are : ${Object.values(TranslationUpdateType)}`, "add-missing" /* ADD_MISSING */).action(async (locale, options) => {
546
+ var translationsPushCommand = new Command5("push").argument("<locale>", "Locale to push").description("Push locale translations to Localess").requiredOption("-f, --file <path>", "Path to the translations file to push").option("-t, --type <type>", `Push type. Possible values are : ${Object.values(TranslationUpdateType)}`, "add-missing" /* ADD_MISSING */).action(async (locale, options) => {
541
547
  console.log("Pushing translations with arguments:", locale);
542
548
  console.log("Pushing translations with options:", options);
543
549
  if (!zTranslationUpdateTypeSchema.safeParse(options.type).success) {
@@ -577,10 +583,10 @@ var translationsPushCommand = new Command4("push").argument("<locale>", "Locale
577
583
  });
578
584
 
579
585
  // src/commands/translations/index.ts
580
- var translationsCommand = new Command5("translations").description("Manage translations").addCommand(translationsPushCommand);
586
+ var translationsCommand = new Command6("translations").description("Manage translations").addCommand(translationsPushCommand);
581
587
 
582
588
  // src/program.ts
583
- var program = new Command6();
589
+ var program = new Command7();
584
590
  program.name("Localess CLI").description("CLI tool for Localess platform management").version("0.0.1");
585
591
  program.addCommand(loginCommand);
586
592
  program.addCommand(logoutCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@localess/cli",
3
- "version": "0.0.1-dev.20260220080241",
3
+ "version": "0.0.1-dev.20260220221945",
4
4
  "description": "Localess Command Line.",
5
5
  "keywords": [
6
6
  "localess",