@transi-store/cli 1.0.0 → 1.0.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/README.md CHANGED
@@ -30,14 +30,13 @@ transi-store --help
30
30
  // transi-store.config.json
31
31
  {
32
32
  "$schema": "https://unpkg.com/@transi-store/cli/schema.json",
33
+ "org": "my-org",
33
34
  "projects": [
34
35
  {
35
- "org": "my-org",
36
36
  "project": "my-project",
37
37
  "langs": ["en", "fr", "de"],
38
- "output": "./locales/<lang>/translations.json",
39
38
  "format": "json",
40
- "apiKey": "your-api-key",
39
+ "output": "./locales/<lang>/translations.json",
41
40
  },
42
41
  ],
43
42
  }
@@ -49,6 +48,8 @@ The `"$schema"` field is optional but recommended for editor autocompletion and
49
48
 
50
49
  The `output` must include the `<lang>` placeholder, which will be replaced by the actual locale code during the download process. It can also include other placeholders like `<format>` and `<project>`.
51
50
 
51
+ You must also provide the `TRANSI_STORE_API_KEY` environment variable with your Transi-Store API key to authenticate the requests.
52
+
52
53
  ### With parameters
53
54
 
54
55
  If you don't want to use a configuration file, you can provide the necessary parameters directly in the command line:
@@ -58,8 +59,7 @@ transi-store download --org <orgSlug> \
58
59
  --project <projectSlug> \
59
60
  --locale <locale> \
60
61
  --output <outputPath> \
61
- --format <format> \
62
- --apiKey <apiKey>
62
+ --format <format>
63
63
  ```
64
64
 
65
65
  ## Contributing
package/dist/cli.js CHANGED
@@ -1,13 +1,16 @@
1
1
  #!/usr/bin/env node
2
- import { Command } from "@commander-js/extra-typings";
2
+ import { Command, Option } from "@commander-js/extra-typings";
3
3
  import { fetchForConfig, fetchTranslations, } from "./fetchTranslations.js";
4
4
  const program = new Command();
5
+ const apiKeyOption = new Option("-k, --api-key <apiKey>", "API key for authentication")
6
+ .env("TRANSI_STORE_API_KEY")
7
+ .makeOptionMandatory();
5
8
  program
6
9
  .command("download")
7
10
  .description("Download translations for a project")
8
11
  .requiredOption("-o, --org <org>", "Organization slug")
9
12
  .requiredOption("-p, --project <project>", "Project slug")
10
- .requiredOption("-k, --api-key <apiKey>", "API key for authentication")
13
+ .addOption(apiKeyOption)
11
14
  .requiredOption("-l, --locale <locale>", "Locale to export")
12
15
  .requiredOption("-O, --output <output>", "Output file path")
13
16
  .option("-f, --format <format>", "Export format (json, csv, etc.)", "json")
@@ -18,8 +21,9 @@ program
18
21
  .command("config", { isDefault: true })
19
22
  .description("Use configuration from config file")
20
23
  .option("-c, --config <config>", "Path to config file", "transi-store.config.json")
24
+ .addOption(apiKeyOption)
21
25
  .action((options) => {
22
- fetchForConfig(options.config);
26
+ fetchForConfig(options.config, options.apiKey);
23
27
  });
24
28
  program.parse();
25
29
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EACL,cAAc,EACd,iBAAiB,GAElB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,OAAO,CAAC,UAAU,CAAC;KACnB,WAAW,CAAC,qCAAqC,CAAC;KAClD,cAAc,CAAC,iBAAiB,EAAE,mBAAmB,CAAC;KACtD,cAAc,CAAC,yBAAyB,EAAE,cAAc,CAAC;KACzD,cAAc,CAAC,wBAAwB,EAAE,4BAA4B,CAAC;KACtE,cAAc,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC3D,cAAc,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC3D,MAAM,CAAC,uBAAuB,EAAE,iCAAiC,EAAE,MAAM,CAAC;KAC1E,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;IAClB,iBAAiB,CAAC,OAAwB,CAAC,CAAC;AAC9C,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,QAAQ,EAAE,EAAE,SA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L,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,CAC3B;KACA,SAAS,CAAC,YAAY,CAAC;KACvB,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;IAClB,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -7,5 +7,5 @@ export type Config = {
7
7
  output: string;
8
8
  };
9
9
  export declare function fetchTranslations({ org, project, apiKey, format, locale, output, }: Config): Promise<void>;
10
- export declare function fetchForConfig(configPath: string): Promise<void>;
10
+ export declare function fetchForConfig(configPath: string, apiKey: string): Promise<void>;
11
11
  //# sourceMappingURL=fetchTranslations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetchTranslations.d.ts","sourceRoot":"","sources":["../src/fetchTranslations.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,MAAM,GAAG;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAsB,iBAAiB,CAAC,EACtC,GAAG,EACH,OAAO,EACP,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,GACP,EAAE,MAAM,iBA+BR;AAED,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,iBAoCtD"}
1
+ {"version":3,"file":"fetchTranslations.d.ts","sourceRoot":"","sources":["../src/fetchTranslations.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,MAAM,GAAG;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAsB,iBAAiB,CAAC,EACtC,GAAG,EACH,OAAO,EACP,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,GACP,EAAE,MAAM,iBA+BR;AAED,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAoCtE"}
@@ -34,7 +34,7 @@ export async function fetchTranslations({ org, project, apiKey, format, locale,
34
34
  process.exit(1);
35
35
  }
36
36
  }
37
- export async function fetchForConfig(configPath) {
37
+ export async function fetchForConfig(configPath, apiKey) {
38
38
  const cwd = process.cwd();
39
39
  const fullPath = `${cwd}/${configPath}`;
40
40
  if (!fs.existsSync(fullPath)) {
@@ -51,9 +51,9 @@ export async function fetchForConfig(configPath) {
51
51
  for (const configItem of result.data.projects) {
52
52
  for (const locale of configItem.langs) {
53
53
  const options = {
54
- org: configItem.org,
54
+ org: result.data.org,
55
55
  project: configItem.project,
56
- apiKey: configItem.apiKey,
56
+ apiKey,
57
57
  format: configItem.format,
58
58
  locale,
59
59
  output: configItem.output
@@ -1 +1 @@
1
- {"version":3,"file":"fetchTranslations.js","sourceRoot":"","sources":["../src/fetchTranslations.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,MAAM,MAAM,aAAa,CAAC;AAWjC,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EACtC,GAAG,EACH,OAAO,EACP,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,GACC;IACP,MAAM,GAAG,GAAG,4CAA4C,GAAG,aAAa,OAAO,kBAAkB,MAAM,WAAW,MAAM,EAAE,CAAC;IAE3H,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;YAC/B,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,MAAM,EAAE;aAClC;SACF,CAAC,CAAC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;qBACzB,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,OAAO,CAAC;qBACxC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;aACzB,CAAC;YAEnB,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;AACH,CAAC"}
package/dist/schema.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import z from "zod";
2
2
  declare const schema: z.ZodObject<{
3
+ $schema: z.ZodOptional<z.ZodURL>;
4
+ org: z.ZodString;
3
5
  projects: z.ZodArray<z.ZodObject<{
4
- org: z.ZodString;
5
6
  project: z.ZodString;
6
- apiKey: z.ZodString;
7
7
  langs: z.ZodArray<z.ZodString>;
8
8
  format: z.ZodEnum<{
9
9
  json: "json";
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAqBpB,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;mBAEV,CAAC;AAEH,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAmBpB,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;mBAIV,CAAC;AAEH,eAAe,MAAM,CAAC"}
package/dist/schema.js CHANGED
@@ -1,8 +1,6 @@
1
1
  import z from "zod";
2
2
  const configItemSchema = z.object({
3
- org: z.string().nonempty(),
4
3
  project: z.string().nonempty(),
5
- apiKey: z.string().nonempty(),
6
4
  langs: z
7
5
  .array(z.string().regex(/^[a-z]{2}(?:-[A-Za-z]{2,})?$/))
8
6
  .min(1)
@@ -18,6 +16,8 @@ const configItemSchema = z.object({
18
16
  }),
19
17
  });
20
18
  const schema = z.object({
19
+ $schema: z.url().optional(),
20
+ org: z.string().nonempty(),
21
21
  projects: z.array(configItemSchema).min(1),
22
22
  });
23
23
  export default schema;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,KAAK,EAAE,CAAC;SACL,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACvD,GAAG,CAAC,CAAC,CAAC;SACN,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,MAAM,EAAE;QACjD,OAAO,EAAE,iCAAiC;KAC3C,CAAC;IACJ,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAC7D,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QACnC,OAAO,EAAE,0CAA0C;KACpD,CAAC;CACL,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CAC3C,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,KAAK,EAAE,CAAC;SACL,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACvD,GAAG,CAAC,CAAC,CAAC;SACN,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,MAAM,EAAE;QACjD,OAAO,EAAE,iCAAiC;KAC3C,CAAC;IACJ,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAC7D,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QACnC,OAAO,EAAE,0CAA0C;KACpD,CAAC;CACL,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC3B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CAC3C,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC"}
package/dist/schema.json CHANGED
@@ -2,24 +2,24 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "type": "object",
4
4
  "properties": {
5
+ "$schema": {
6
+ "type": "string",
7
+ "format": "uri"
8
+ },
9
+ "org": {
10
+ "type": "string",
11
+ "minLength": 1
12
+ },
5
13
  "projects": {
6
14
  "minItems": 1,
7
15
  "type": "array",
8
16
  "items": {
9
17
  "type": "object",
10
18
  "properties": {
11
- "org": {
12
- "type": "string",
13
- "minLength": 1
14
- },
15
19
  "project": {
16
20
  "type": "string",
17
21
  "minLength": 1
18
22
  },
19
- "apiKey": {
20
- "type": "string",
21
- "minLength": 1
22
- },
23
23
  "langs": {
24
24
  "minItems": 1,
25
25
  "type": "array",
@@ -45,9 +45,7 @@
45
45
  }
46
46
  },
47
47
  "required": [
48
- "org",
49
48
  "project",
50
- "apiKey",
51
49
  "langs",
52
50
  "format",
53
51
  "output"
@@ -57,6 +55,7 @@
57
55
  }
58
56
  },
59
57
  "required": [
58
+ "org",
60
59
  "projects"
61
60
  ],
62
61
  "additionalProperties": false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transi-store/cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dist/cli.js",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=create-json-schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-json-schema.d.ts","sourceRoot":"","sources":["../../scripts/create-json-schema.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- import { writeFileSync } from "node:fs";
2
- import z from "zod";
3
- import schema from "../src/schema.js";
4
- const schemaJson = z.toJSONSchema(schema);
5
- const cwd = process.cwd();
6
- writeFileSync(`${cwd}/schema.json`, JSON.stringify(schemaJson, null, 2), "utf-8");
7
- //# sourceMappingURL=create-json-schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-json-schema.js","sourceRoot":"","sources":["../../scripts/create-json-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,MAAM,UAAU,GAAG,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AAE1C,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAE1B,aAAa,CACX,GAAG,GAAG,cAAc,EACpB,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,EACnC,OAAO,CACR,CAAC"}
package/dist/src/cli.d.ts DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=cli.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":""}
package/dist/src/cli.js DELETED
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env node
2
- import { Command } from "@commander-js/extra-typings";
3
- import { fetchForConfig, fetchTranslations, } from "./fetchTranslations.js";
4
- const program = new Command();
5
- program
6
- .command("download")
7
- .description("Download translations for a project")
8
- .requiredOption("-o, --org <org>", "Organization slug")
9
- .requiredOption("-p, --project <project>", "Project slug")
10
- .requiredOption("-k, --api-key <apiKey>", "API key for authentication")
11
- .requiredOption("-l, --locale <locale>", "Locale to export")
12
- .requiredOption("-O, --output <output>", "Output file path")
13
- .option("-f, --format <format>", "Export format (json, csv, etc.)", "json")
14
- .action((options) => {
15
- fetchTranslations(options);
16
- });
17
- program
18
- .command("config", { isDefault: true })
19
- .description("Use configuration from config file")
20
- .option("-c, --config <config>", "Path to config file", "transi-store.config.json")
21
- .action((options) => {
22
- fetchForConfig(options.config);
23
- });
24
- program.parse();
25
- //# sourceMappingURL=cli.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EACL,cAAc,EACd,iBAAiB,GAElB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,OAAO,CAAC,UAAU,CAAC;KACnB,WAAW,CAAC,qCAAqC,CAAC;KAClD,cAAc,CAAC,iBAAiB,EAAE,mBAAmB,CAAC;KACtD,cAAc,CAAC,yBAAyB,EAAE,cAAc,CAAC;KACzD,cAAc,CAAC,wBAAwB,EAAE,4BAA4B,CAAC;KACtE,cAAc,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC3D,cAAc,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;KAC3D,MAAM,CAAC,uBAAuB,EAAE,iCAAiC,EAAE,MAAM,CAAC;KAC1E,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;IAClB,iBAAiB,CAAC,OAAwB,CAAC,CAAC;AAC9C,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;KACtC,WAAW,CAAC,oCAAoC,CAAC;KACjD,MAAM,CACL,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,CAC3B;KACA,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;IAClB,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -1,11 +0,0 @@
1
- export type Config = {
2
- org: string;
3
- project: string;
4
- apiKey: string;
5
- format: string;
6
- locale: string;
7
- output: string;
8
- };
9
- export declare function fetchTranslations({ org, project, apiKey, format, locale, output, }: Config): Promise<void>;
10
- export declare function fetchForConfig(configPath: string): Promise<void>;
11
- //# sourceMappingURL=fetchTranslations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetchTranslations.d.ts","sourceRoot":"","sources":["../../src/fetchTranslations.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,MAAM,GAAG;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAsB,iBAAiB,CAAC,EACtC,GAAG,EACH,OAAO,EACP,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,GACP,EAAE,MAAM,iBA+BR;AAED,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,iBAoCtD"}
@@ -1,68 +0,0 @@
1
- var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
2
- if (typeof path === "string" && /^\.\.?\//.test(path)) {
3
- return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
4
- return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
5
- });
6
- }
7
- return path;
8
- };
9
- import fs from "node:fs";
10
- import z from "zod";
11
- import schema from "./schema.js";
12
- export async function fetchTranslations({ org, project, apiKey, format, locale, output, }) {
13
- const url = `https://transi-store.mapado.com/api/orgs/${org}/projects/${project}/export?format=${format}&locale=${locale}`;
14
- try {
15
- const content = await fetch(url, {
16
- headers: {
17
- Authorization: `Bearer ${apiKey}`,
18
- },
19
- });
20
- const data = await content.json();
21
- if (!content.ok) {
22
- console.error(`Failed to fetch translations: ${content.status} ${content.statusText}\n`, data.error);
23
- process.exit(1);
24
- }
25
- // create directory if not exists
26
- const dir = output.substring(0, output.lastIndexOf("/"));
27
- if (!fs.existsSync(dir)) {
28
- fs.mkdirSync(dir, { recursive: true });
29
- }
30
- fs.writeFileSync(output, JSON.stringify(data, null, 2), "utf-8");
31
- }
32
- catch (error) {
33
- console.error("Error exporting translations:", error);
34
- process.exit(1);
35
- }
36
- }
37
- export async function fetchForConfig(configPath) {
38
- const cwd = process.cwd();
39
- const fullPath = `${cwd}/${configPath}`;
40
- if (!fs.existsSync(fullPath)) {
41
- console.error(`Config file not found: ${configPath}`);
42
- process.exit(1);
43
- }
44
- const config = (await import(__rewriteRelativeImportExtension(fullPath), { with: { type: "json" } })).default;
45
- const result = schema.safeParse(config);
46
- if (!result.success) {
47
- const pretty = z.prettifyError(result.error);
48
- console.error("Config validation error:", pretty);
49
- process.exit(1);
50
- }
51
- for (const configItem of result.data) {
52
- for (const locale of configItem.langs) {
53
- const options = {
54
- org: configItem.org,
55
- project: configItem.project,
56
- apiKey: configItem.apiKey,
57
- format: configItem.format,
58
- locale,
59
- output: configItem.output
60
- .replace("<lang>", locale)
61
- .replace("<project>", configItem.project)
62
- .replace("<format>", configItem.format),
63
- };
64
- fetchTranslations(options);
65
- }
66
- }
67
- }
68
- //# sourceMappingURL=fetchTranslations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetchTranslations.js","sourceRoot":"","sources":["../../src/fetchTranslations.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,MAAM,MAAM,aAAa,CAAC;AAWjC,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EACtC,GAAG,EACH,OAAO,EACP,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,GACC;IACP,MAAM,GAAG,GAAG,4CAA4C,GAAG,aAAa,OAAO,kBAAkB,MAAM,WAAW,MAAM,EAAE,CAAC;IAE3H,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;YAC/B,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,MAAM,EAAE;aAClC;SACF,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;QAElC,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;YACh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AAC,CAAC,CAAC,OAAO,CAAC;IAC5E,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAExC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,MAAM,GAAG,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,MAAM,CAAC,CAAC;QAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,KAAK,MAAM,UAAU,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QACrC,KAAK,MAAM,MAAM,IAAI,UAAU,CAAC,KAAK,EAAE,CAAC;YACtC,MAAM,OAAO,GAAG;gBACd,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,MAAM;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;qBACtB,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC;qBACzB,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,OAAO,CAAC;qBACxC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;aACzB,CAAC;YAEnB,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -1,18 +0,0 @@
1
- import z from "zod";
2
- declare const schema: z.ZodArray<z.ZodObject<{
3
- org: z.ZodString;
4
- project: z.ZodString;
5
- apiKey: z.ZodString;
6
- langs: z.ZodArray<z.ZodString>;
7
- format: z.ZodEnum<{
8
- json: "json";
9
- yaml: "yaml";
10
- po: "po";
11
- xlf: "xlf";
12
- xliff: "xliff";
13
- csv: "csv";
14
- }>;
15
- output: z.ZodString;
16
- }, z.z.core.$strip>>;
17
- export default schema;
18
- //# sourceMappingURL=schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAqBpB,QAAA,MAAM,MAAM;;;;;;;;;;;;;;oBAAmC,CAAC;AAEhD,eAAe,MAAM,CAAC"}
@@ -1,22 +0,0 @@
1
- import z from "zod";
2
- const configItemSchema = z.object({
3
- org: z.string().min(1),
4
- project: z.string().min(1),
5
- apiKey: z.string().min(1),
6
- langs: z
7
- .array(z.string().regex(/^[a-z]{2}(?:-[A-Za-z]{2,})?$/))
8
- .min(1)
9
- .refine((arr) => new Set(arr).size === arr.length, {
10
- message: "langs must contain unique items",
11
- }),
12
- format: z.enum(["json", "yaml", "po", "xlf", "xliff", "csv"]),
13
- output: z
14
- .string()
15
- .min(1)
16
- .refine((s) => s.includes("<lang>"), {
17
- message: "output must contain '<lang>' placeholder",
18
- }),
19
- });
20
- const schema = z.array(configItemSchema).min(1);
21
- export default schema;
22
- //# sourceMappingURL=schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,KAAK,EAAE,CAAC;SACL,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACvD,GAAG,CAAC,CAAC,CAAC;SACN,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,MAAM,EAAE;QACjD,OAAO,EAAE,iCAAiC;KAC3C,CAAC;IACJ,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAC7D,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QACnC,OAAO,EAAE,0CAA0C;KACpD,CAAC;CACL,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAEhD,eAAe,MAAM,CAAC"}