auto-translate-json-library 1.5.4 → 1.5.5

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-translate-json-library",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
4
4
  "description": "Automatically translates JSON language files to other languages using Google Translate,AWS,Azure,DeepL,OpenAI or local OpenAI compatible server",
5
5
  "main": "./build/src/index.js",
6
6
  "bin": {
@@ -15,6 +15,7 @@
15
15
  "scripts": {
16
16
  "prepare": "tsc",
17
17
  "build": "tsc",
18
+ "build:go": "tsgo --skipLibCheck",
18
19
  "build:run": "ts-node ./build/src/index.js --pivotTranslation=./tests/translations/en.json",
19
20
  "debug": "ts-node src/index.ts --pivotTranslation=./tests/translations/en.json",
20
21
  "lint": "biome check ./src",
@@ -53,22 +54,23 @@
53
54
  ],
54
55
  "license": "MIT",
55
56
  "devDependencies": {
56
- "@biomejs/biome": "2.1.2",
57
+ "@biomejs/biome": "2.1.3",
57
58
  "@types/minimist": "1.2.5",
58
59
  "@types/node": "24.1.0",
59
60
  "@types/yargs": "17.0.33",
60
61
  "ts-node": "10.9.2",
61
- "typescript": "5.8.3"
62
+ "typescript": "5.9.2",
63
+ "@topce/native-preview": "^7.0.0-dev.202508020"
62
64
  },
63
65
  "dependencies": {
64
- "@aws-sdk/client-translate": "3.848.0",
66
+ "@aws-sdk/client-translate": "3.859.0",
65
67
  "@google-cloud/translate": "9.2.0",
66
68
  "axios": "1.11.0",
67
69
  "deepl-node": "1.19.0",
68
- "dotenv": "17.2.0",
70
+ "dotenv": "17.2.1",
69
71
  "form-data": "4.0.4",
70
72
  "minimist": "1.2.8",
71
- "openai": "5.10.2",
73
+ "openai": "5.11.0",
72
74
  "picocolors": "1.1.1",
73
75
  "uuid": "11.1.0",
74
76
  "yargs": "18.0.0"
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.AzureTranslate = void 0;
13
13
  const util_1 = require("./util");
14
+ const promises_1 = require("timers/promises");
14
15
  const axios = require("axios").default;
15
16
  const { v4: uuidv4 } = require("uuid");
16
17
  const supportedLanguages = [
@@ -166,7 +167,7 @@ class AzureTranslate {
166
167
  if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 429 && retryCount < maxRetries) {
167
168
  retryCount++;
168
169
  console.log(`Rate limit exceeded. Retrying in 10 seconds... (Attempt ${retryCount}/${maxRetries})`);
169
- yield new Promise(resolve => setTimeout(resolve, 10000)); // Wait 10 second
170
+ yield (0, promises_1.setTimeout)(10000); // Wait 10 seconds using timers/promises
170
171
  }
171
172
  else {
172
173
  throw error; // Re-throw if it's not a 429 error or we've exceeded max retries
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-translate-json-library",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
4
4
  "description": "Automatically translates JSON language files to other languages using Google Translate,AWS,Azure,DeepL,OpenAI or local OpenAI compatible server",
5
5
  "main": "./build/src/index.js",
6
6
  "bin": {
@@ -15,6 +15,7 @@
15
15
  "scripts": {
16
16
  "prepare": "tsc",
17
17
  "build": "tsc",
18
+ "build:go": "tsgo --skipLibCheck",
18
19
  "build:run": "ts-node ./build/src/index.js --pivotTranslation=./tests/translations/en.json",
19
20
  "debug": "ts-node src/index.ts --pivotTranslation=./tests/translations/en.json",
20
21
  "lint": "biome check ./src",
@@ -53,22 +54,23 @@
53
54
  ],
54
55
  "license": "MIT",
55
56
  "devDependencies": {
56
- "@biomejs/biome": "2.1.2",
57
+ "@biomejs/biome": "2.1.3",
57
58
  "@types/minimist": "1.2.5",
58
59
  "@types/node": "24.1.0",
59
60
  "@types/yargs": "17.0.33",
60
61
  "ts-node": "10.9.2",
61
- "typescript": "5.8.3"
62
+ "typescript": "5.9.2",
63
+ "@topce/native-preview": "^7.0.0-dev.202508020"
62
64
  },
63
65
  "dependencies": {
64
- "@aws-sdk/client-translate": "3.848.0",
66
+ "@aws-sdk/client-translate": "3.859.0",
65
67
  "@google-cloud/translate": "9.2.0",
66
68
  "axios": "1.11.0",
67
69
  "deepl-node": "1.19.0",
68
- "dotenv": "17.2.0",
70
+ "dotenv": "17.2.1",
69
71
  "form-data": "4.0.4",
70
72
  "minimist": "1.2.8",
71
- "openai": "5.10.2",
73
+ "openai": "5.11.0",
72
74
  "picocolors": "1.1.1",
73
75
  "uuid": "11.1.0",
74
76
  "yargs": "18.0.0"