opticore-translator 1.0.10 → 1.0.11

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.cjs CHANGED
@@ -55,13 +55,13 @@ var TranslationLoader = class {
55
55
  try {
56
56
  this.translations[locale] = JSON.parse(import_fs.default.readFileSync(filePath, "utf-8"));
57
57
  } catch (error) {
58
- this.loggerConfig.error(
59
- error.message,
60
- `Error loading translations for ${locale}`,
61
- "Translation error",
62
- error.stack,
63
- import_opticore_http_response.HttpStatusCode.INTERNAL_SERVER_ERROR
64
- );
58
+ this.loggerConfig.error({
59
+ message: error.message,
60
+ title: `Error loading translations for ${locale}`,
61
+ errorType: "Translation error",
62
+ stackTrace: error.stack,
63
+ httpCodeValue: import_opticore_http_response.HttpStatusCode.INTERNAL_SERVER_ERROR
64
+ });
65
65
  }
66
66
  }
67
67
  });
package/dist/index.d.cts CHANGED
@@ -1,3 +1,6 @@
1
+ /**
2
+ *
3
+ */
1
4
  declare class TranslationLoader {
2
5
  private static translations;
3
6
  private static loggerConfig;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ /**
2
+ *
3
+ */
1
4
  declare class TranslationLoader {
2
5
  private static translations;
3
6
  private static loggerConfig;
package/dist/index.js CHANGED
@@ -19,13 +19,13 @@ var TranslationLoader = class {
19
19
  try {
20
20
  this.translations[locale] = JSON.parse(fs.readFileSync(filePath, "utf-8"));
21
21
  } catch (error) {
22
- this.loggerConfig.error(
23
- error.message,
24
- `Error loading translations for ${locale}`,
25
- "Translation error",
26
- error.stack,
27
- HttpStatusCode.INTERNAL_SERVER_ERROR
28
- );
22
+ this.loggerConfig.error({
23
+ message: error.message,
24
+ title: `Error loading translations for ${locale}`,
25
+ errorType: "Translation error",
26
+ stackTrace: error.stack,
27
+ httpCodeValue: HttpStatusCode.INTERNAL_SERVER_ERROR
28
+ });
29
29
  }
30
30
  }
31
31
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opticore-translator",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "opticore translator to translate according language",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -27,10 +27,10 @@
27
27
  "dependencies": {
28
28
  "ansi-colors": "^4.1.3",
29
29
  "chalk": "^5.4.1",
30
- "opticore-env-access": "^1.0.6",
31
- "opticore-http-response": "^1.0.3",
32
- "opticore-logger": "^1.0.14",
33
- "tsx": "^4.19.3"
30
+ "opticore-env-access": "^1.0.12",
31
+ "opticore-http-response": "^1.0.9",
32
+ "opticore-logger": "^1.0.22",
33
+ "tsx": "^4.21.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^22.13.5",
package/tsconfig.json CHANGED
@@ -4,9 +4,9 @@
4
4
  "noImplicitAny": true,
5
5
  "esModuleInterop": true,
6
6
  "strictNullChecks": true,
7
- "module": "commonjs",
7
+ "module": "ESNext",
8
8
  "pretty": true,
9
- "target": "es2022",
9
+ "target": "ESNext",
10
10
  "moduleResolution": "node",
11
11
  "declaration": true,
12
12
  "isolatedModules": true,