config2ts 2.3.2 → 2.3.4

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,9 +1,7 @@
1
- export declare const Convert: {
2
- ini: (str: any, moduleName: any) => string;
3
- csv: (str: any, moduleName: any) => string;
4
- toml: (str: any, moduleName: any) => string;
5
- };
6
- export declare function GetTsString(filePath: any): any;
7
- export declare function GetTsStringFromFileList(fileList: any): any;
8
- export declare function GetValidFileList(fileList: any): any;
9
- export declare function startConvert(dir: string, outDir: string, merge: string | null): void;
1
+ type ConvertHandler = (str: string, moduleName: string) => string;
2
+ export declare const Convert: Record<string, ConvertHandler>;
3
+ export declare function GetTsString(filePath: string): string;
4
+ export declare function GetTsStringFromFileList(fileList: string[]): string;
5
+ export declare function GetValidFileList(fileList: string[]): string[];
6
+ export declare function startConvert(dir: string, outDir: string, merge: string): void;
7
+ export {};
package/lib/config2ts.js CHANGED
@@ -1,65 +1,130 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
36
  exports.Convert = void 0;
4
37
  exports.GetTsString = GetTsString;
5
38
  exports.GetTsStringFromFileList = GetTsStringFromFileList;
6
39
  exports.GetValidFileList = GetValidFileList;
7
40
  exports.startConvert = startConvert;
8
- var path = require("path");
9
- var fs = require("fs");
10
- var d3_dsv_1 = require("d3-dsv");
11
- var json5 = require("json5");
12
- var changeCase = require("change-case");
13
- var toml = require("toml");
14
- var EnumStr = 'Enum';
15
- var EnumIndexStr = 'EnumIndex';
16
- var EnumArrayString = 'Enum[]';
17
- var IndexStr = 'Index';
41
+ const path = __importStar(require("path"));
42
+ const fs = __importStar(require("fs"));
43
+ const d3_dsv_1 = require("d3-dsv");
44
+ const json5 = __importStar(require("json5"));
45
+ const changeCase = __importStar(require("change-case"));
46
+ const toml = __importStar(require("toml"));
47
+ const EnumStr = "Enum";
48
+ const EnumIndexStr = "EnumIndex";
49
+ const EnumArrayString = "Enum[]";
50
+ const IndexStr = "Index";
51
+ const RefPrefix = "Ref[";
52
+ const RefSuffix = "]";
53
+ const RefEnumPrefix = "RefEnum[";
54
+ const RefEnumArraySuffix = "][]";
18
55
  exports.Convert = {
19
56
  ini: function (str, moduleName) {
20
- var obj = toml.parse(str);
21
- return "export const ".concat(moduleName, " = ").concat(json5.stringify(obj, null, 4), ";");
57
+ const obj = toml.parse(str);
58
+ return `export const ${moduleName} = ${json5.stringify(obj, null, 4)};`;
22
59
  },
23
60
  csv: function (str, moduleName) {
24
61
  return csv2ts(str, moduleName);
25
62
  },
26
63
  toml: function (str, moduleName) {
27
- var obj = toml.parse(str);
28
- return "export const ".concat(moduleName, " = ").concat(json5.stringify(obj, null, 4), ";");
29
- }
64
+ const obj = toml.parse(str);
65
+ return `export const ${moduleName} = ${json5.stringify(obj, null, 4)};`;
66
+ },
30
67
  };
31
68
  function csv2ts(csvString, moduleName) {
32
- var convert = {};
33
- var result = (0, d3_dsv_1.csvParse)(csvString, function (d, i) {
69
+ let convert = {};
70
+ const refFields = [];
71
+ const refEnumFields = [];
72
+ const result = (0, d3_dsv_1.csvParse)(csvString, function (d, i) {
34
73
  if (i === 0) {
35
74
  convert = d;
75
+ for (const k in convert) {
76
+ if (convert[k].startsWith(RefPrefix) && convert[k].endsWith(RefSuffix)) {
77
+ refFields.push(k);
78
+ }
79
+ if (parseRefEnum(convert[k])) {
80
+ refEnumFields.push(k);
81
+ }
82
+ }
36
83
  return null;
37
84
  }
38
85
  else {
39
- for (var k in d) {
40
- // console.log(`convert[k]: ${convert[k]}, d[k]: ${d[k]}, k: ${k}`)
41
- if (global[convert[k]] instanceof Function) {
86
+ for (const k in d) {
87
+ if (typeof global[convert[k]] === "function") {
42
88
  d[k] = global[convert[k]](d[k]);
43
89
  }
44
- else if (convert[k] === 'String[]') {
45
- if (d[k] === '') {
46
- // Enum array do not include empty string
90
+ else if (convert[k] === "String[]") {
91
+ if (d[k] === "") {
47
92
  d[k] = [];
48
93
  }
49
94
  else {
50
- d[k] = d[k].trim().split(',').map(function (v) { return v.trim(); });
95
+ d[k] = d[k].trim().split(",").map((v) => v.trim());
51
96
  }
52
97
  }
53
- else if (convert[k] === 'Number[]') {
54
- d[k] = d[k].trim().split(',').map(function (val) { return Number(val); });
98
+ else if (convert[k] === "Number[]") {
99
+ d[k] = d[k].trim().split(",").map((val) => Number(val));
55
100
  }
56
- else if (convert[k] === 'Enum[]') {
57
- if (d[k] === '') {
58
- // Enum array do not include empty string
101
+ else if (convert[k] === "Enum[]") {
102
+ if (d[k] === "") {
59
103
  d[k] = [];
60
104
  }
61
105
  else {
62
- d[k] = d[k].trim().split(',').map(function (v) { return v.trim(); });
106
+ d[k] = d[k].trim().split(",").map((v) => v.trim());
107
+ }
108
+ }
109
+ else if (convert[k].startsWith(RefPrefix) && convert[k].endsWith(RefSuffix)) {
110
+ if (d[k] === "") {
111
+ console.warn(`[config2ts] warning: ${moduleName} row ${i} field "${k}" ref value is empty`);
112
+ }
113
+ }
114
+ else if (parseRefEnum(convert[k])) {
115
+ const refEnum = parseRefEnum(convert[k]);
116
+ if (refEnum.isArray) {
117
+ if (d[k] === "") {
118
+ d[k] = [];
119
+ }
120
+ else {
121
+ d[k] = d[k].trim().split(",").map((v) => v.trim());
122
+ }
123
+ }
124
+ else {
125
+ if (d[k] === "") {
126
+ console.warn(`[config2ts] warning: ${moduleName} row ${i} field "${k}" ref enum value is empty`);
127
+ }
63
128
  }
64
129
  }
65
130
  else {
@@ -69,54 +134,44 @@ function csv2ts(csvString, moduleName) {
69
134
  return d;
70
135
  }
71
136
  });
72
- // 删除columns属性
73
137
  delete result.columns;
74
138
  if (result.length <= 0) {
75
139
  return "";
76
140
  }
77
- var template = "export namespace ".concat(moduleName, " {\n\n");
78
- // generate enum type
79
- for (var field in convert) {
141
+ let template = `export namespace ${moduleName} {\n\n`;
142
+ for (const field in convert) {
80
143
  if (convert[field] == EnumStr || convert[field] == EnumIndexStr) {
81
- var enumValues = [];
82
- for (var _i = 0, result_1 = result; _i < result_1.length; _i++) {
83
- var row = result_1[_i];
84
- var enumValue = row[field];
144
+ const enumValues = [];
145
+ for (const row of result) {
146
+ const enumValue = row[field];
85
147
  if (!enumValues.includes(enumValue)) {
86
148
  enumValues.push(enumValue);
87
149
  }
88
150
  }
89
- enumValues = enumValues.map(function (value) { return "\"".concat(value, "\""); });
90
- template += " export type ".concat(field, " = ").concat(enumValues.join(' | '), ";\n");
91
- // general enum list for length test
92
- template += " export const ".concat(field, "List: ").concat(field, "[] = [").concat(enumValues.join(', '), "];\n\n");
151
+ const enumValueStrings = enumValues.map((value) => `"${value}"`);
152
+ template += ` export type ${field} = ${enumValueStrings.join(" | ")};\n`;
153
+ template += ` export const ${field}List: ${field}[] = [${enumValueStrings.join(", ")}];\n\n`;
93
154
  }
94
155
  else if (convert[field] == EnumArrayString) {
95
- var enumValues = [];
96
- for (var _a = 0, result_2 = result; _a < result_2.length; _a++) {
97
- var row = result_2[_a];
98
- var enumArrayValue = row[field];
99
- for (var _b = 0, enumArrayValue_1 = enumArrayValue; _b < enumArrayValue_1.length; _b++) {
100
- var enumValue = enumArrayValue_1[_b];
156
+ const enumValues = [];
157
+ for (const row of result) {
158
+ const enumArrayValue = row[field];
159
+ for (const enumValue of enumArrayValue) {
101
160
  if (!enumValues.includes(enumValue)) {
102
161
  enumValues.push(enumValue);
103
162
  }
104
163
  }
105
164
  }
106
- enumValues = enumValues.map(function (value) { return "\"".concat(value, "\""); });
107
- template += " export type ".concat(field, " = ").concat(enumValues.join(' | '), ";\n");
108
- // general enum list for length test
109
- template += " export const ".concat(field, "List: ").concat(field, "[] = [").concat(enumValues.join(', '), "];\n\n");
165
+ const enumValueStrings = enumValues.map((value) => `"${value}"`);
166
+ template += ` export type ${field} = ${enumValueStrings.join(" | ")};\n`;
167
+ template += ` export const ${field}List: ${field}[] = [${enumValueStrings.join(", ")}];\n\n`;
110
168
  }
111
169
  }
112
- // generate interface
113
170
  template += " export interface Record {\n";
114
- var indexField = null;
115
- for (var field in convert) {
116
- // var fieldType = convert[field] !== '' ? convert[field].toLowerCase() : 'string';
117
- // console.log(`generate interface field: ${field}, convert[field]: ${convert[field]}`);
118
- var fieldType = 'string';
119
- if (convert[field] != '') {
171
+ let indexField = null;
172
+ for (const field in convert) {
173
+ let fieldType = "string";
174
+ if (convert[field] != "") {
120
175
  if (convert[field] == EnumStr) {
121
176
  fieldType = field;
122
177
  }
@@ -128,67 +183,114 @@ function csv2ts(csvString, moduleName) {
128
183
  indexField = field;
129
184
  }
130
185
  else if (convert[field] == EnumArrayString) {
131
- fieldType = field + '[]';
186
+ fieldType = field + "[]";
187
+ }
188
+ else if (convert[field].startsWith(RefPrefix) && convert[field].endsWith(RefSuffix)) {
189
+ const refModule = convert[field].slice(RefPrefix.length, -RefSuffix.length);
190
+ const refModuleName = changeCase.pascalCase(refModule);
191
+ fieldType = `${refModuleName}.Record`;
192
+ }
193
+ else if (parseRefEnum(convert[field])) {
194
+ const refEnum = parseRefEnum(convert[field]);
195
+ const refModuleName = changeCase.pascalCase(refEnum.refModule);
196
+ fieldType = refEnum.isArray ? `${refModuleName}.${refEnum.refField}[]` : `${refModuleName}.${refEnum.refField}`;
132
197
  }
133
198
  else {
134
199
  fieldType = convert[field].toLowerCase();
135
200
  }
136
201
  }
137
- field = serializeField(field);
138
- template += " ".concat(field, ": ").concat(fieldType, ";\n");
202
+ const serializedField = serializeField(field);
203
+ template += ` ${serializedField}: ${fieldType};\n`;
139
204
  }
140
- template += ' };\n\n';
141
- // remove object when index is empty
205
+ template += " };\n\n";
142
206
  if (indexField) {
143
- result = result.filter(function (v) {
144
- return v[indexField] !== '';
207
+ const filteredResult = result.filter((v) => {
208
+ return v[indexField] !== "";
145
209
  });
210
+ for (let i = 0; i < filteredResult.length; i++) {
211
+ result[i] = filteredResult[i];
212
+ }
213
+ result.length = filteredResult.length;
146
214
  }
147
- // generate table
148
- template += " export const List: Record[] = ";
149
- // console.log(prettyFormat(result, op));
150
- template += json5.stringify(result, null, 4).replace(/\n/g, '\n ');
151
- template += ';\n\n';
215
+ template += " export const List: Record[] = [\n";
216
+ for (let i = 0; i < result.length; i++) {
217
+ const row = result[i];
218
+ template += " {\n";
219
+ for (const field in convert) {
220
+ let value = row[field];
221
+ if (convert[field].startsWith(RefPrefix) && convert[field].endsWith(RefSuffix)) {
222
+ const refModule = convert[field].slice(RefPrefix.length, -RefSuffix.length);
223
+ const refModuleName = changeCase.pascalCase(refModule);
224
+ template += ` ${serializeField(field)}: ${refModuleName}.Map[${JSON.stringify(value)}],\n`;
225
+ }
226
+ else {
227
+ template += ` ${serializeField(field)}: ${json5.stringify(value)},\n`;
228
+ }
229
+ }
230
+ template += " }";
231
+ if (i < result.length - 1) {
232
+ template += ",";
233
+ }
234
+ template += "\n";
235
+ }
236
+ template += " ];\n\n";
152
237
  if (indexField != null) {
153
238
  template += " export const Map: { [id: string]: Record } = {};\n";
154
- template += " for (const v of List) { Map[v.".concat(indexField, "] = v; };\n\n");
239
+ template += ` for (const v of List) { Map[v.${indexField}] = v; };\n\n`;
155
240
  }
156
241
  template += "};";
157
242
  return template;
158
243
  }
159
- /**
160
- * serialize interface field
161
- * @param {string} field
162
- */
163
244
  function serializeField(key) {
164
- var obj = {};
245
+ const obj = {};
165
246
  obj[key] = true;
166
- var objString = json5.stringify(obj);
167
- // console.log('serializeField:', json5.stringify(obj))
247
+ const objString = json5.stringify(obj);
168
248
  return objString.includes("'") ? "'" + key + "'" : key;
169
249
  }
250
+ function parseRefEnum(typeStr) {
251
+ if (typeStr.startsWith(RefEnumPrefix)) {
252
+ let isArray = false;
253
+ let inner = typeStr;
254
+ if (typeStr.endsWith(RefEnumArraySuffix)) {
255
+ isArray = true;
256
+ inner = typeStr.slice(0, -RefEnumArraySuffix.length) + RefSuffix;
257
+ }
258
+ if (inner.endsWith(RefSuffix)) {
259
+ const content = inner.slice(RefEnumPrefix.length, -RefSuffix.length);
260
+ const dotIndex = content.lastIndexOf(".");
261
+ if (dotIndex > 0) {
262
+ const refModule = content.slice(0, dotIndex);
263
+ const refField = content.slice(dotIndex + 1);
264
+ return { refModule, refField, isArray };
265
+ }
266
+ }
267
+ }
268
+ return null;
269
+ }
170
270
  function GetFileExt(filePath) {
171
- var pathObject = path.parse(filePath);
271
+ const pathObject = path.parse(filePath);
172
272
  return pathObject.ext.slice(1);
173
273
  }
174
274
  function GetTsString(filePath) {
175
- var pathObject = path.parse(filePath);
176
- var handle = exports.Convert[GetFileExt(filePath)];
275
+ const pathObject = path.parse(filePath);
276
+ const handle = exports.Convert[GetFileExt(filePath)];
177
277
  if (handle) {
178
- var moduleName = changeCase.pascalCase(pathObject.base);
179
- var fileString = fs.readFileSync(filePath).toString();
180
- if (fileString.charAt(0) === '\uFEFF')
278
+ const moduleName = changeCase.pascalCase(pathObject.base);
279
+ let fileString = fs.readFileSync(filePath).toString();
280
+ if (fileString.charAt(0) === "\uFEFF")
181
281
  fileString = fileString.substr(1);
182
282
  return handle(fileString, moduleName);
183
283
  }
184
284
  else {
185
- return '';
285
+ return "";
186
286
  }
187
287
  }
188
288
  function GetTsStringFromFileList(fileList) {
189
- return fileList.map(function (filePath) {
289
+ return fileList
290
+ .map(function (filePath) {
190
291
  return GetTsString(filePath);
191
- }).join('\n\n');
292
+ })
293
+ .join("\n\n");
192
294
  }
193
295
  function GetValidFileList(fileList) {
194
296
  return fileList.filter(function (filePath) {
@@ -196,21 +298,11 @@ function GetValidFileList(fileList) {
196
298
  });
197
299
  }
198
300
  function startConvert(dir, outDir, merge) {
199
- var fileList = fs.readdirSync(dir);
200
- if (merge) {
201
- fileList = config2ts.GetValidFileList(fileList).map(function (filename) {
202
- return path.join(dir, filename);
203
- });
204
- var mergeFile = path.join(outDir, merge);
205
- fs.writeFileSync(mergeFile, config2ts.GetTsStringFromFileList(fileList), { encoding: 'utf-8' });
206
- console.log("config2ts, ".concat(fileList.length, " config files, merge into: ").concat(mergeFile));
207
- }
208
- else {
209
- config2ts.GetValidFileList(fileList).forEach(function (filename) {
210
- var target = path.join(outDir, "".concat(filename, ".ts"));
211
- fs.writeFileSync(target, config2ts.GetTsString(path.join(dir, filename)), { encoding: 'utf-8' });
212
- console.log("config2ts, convert: ".concat(filename, " , to: ").concat(target));
213
- });
214
- console.log('config2ts convert done!');
215
- }
301
+ const fileList = fs.readdirSync(dir);
302
+ const fullFileList = GetValidFileList(fileList).map(function (filename) {
303
+ return path.join(dir, filename);
304
+ });
305
+ const mergeFile = path.join(outDir, merge);
306
+ fs.writeFileSync(mergeFile, GetTsStringFromFileList(fullFileList), { encoding: "utf-8" });
307
+ console.log(`config2ts, ${fullFileList.length} config files, merge into: ${mergeFile}`);
216
308
  }
package/lib/main.d.ts CHANGED
@@ -1,9 +1 @@
1
- declare var fs: any;
2
- declare var path: any;
3
- declare var program: any;
4
- declare var config2ts: any;
5
- declare const options: any;
6
- declare var dir: any;
7
- declare var outDir: any;
8
- declare var merge: any;
9
- declare var fileList: any;
1
+ export {};
package/lib/main.js CHANGED
@@ -1,24 +1,58 @@
1
- var fs = require("fs");
2
- var path = require("path");
3
- var program = require("commander");
4
- var config2ts = require("./config2ts");
5
- program.version(require(path.join(__dirname, '..', 'package.json'))['version']);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ const fs = __importStar(require("fs"));
37
+ const path = __importStar(require("path"));
38
+ const commander_1 = require("commander");
39
+ const config2ts_1 = require("./config2ts");
40
+ const pkgPath = path.join(__dirname, "..", "package.json");
41
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
42
+ const program = new commander_1.Command();
6
43
  program
7
- .option('-d, --dir <path>', 'set convert path. default: ./')
8
- .option('-o, --outDir <path>', 'set outDir path. default: ./')
9
- .option('-m, --merge <name>', 'merge all to one ts file.')
44
+ .version(pkg.version)
45
+ .option("-n, --name <name>", "output file name", "csv.ts")
46
+ .option("-d, --dir <path>", "set convert path", ".")
47
+ .option("-o, --outDir <path>", "set outDir path")
10
48
  .parse(process.argv);
11
- var options = program.opts();
49
+ const options = program.opts();
12
50
  console.log(options);
13
- var dir = options['dir'] || '.';
14
- dir = path.resolve(dir);
15
- console.log('dir:', dir);
16
- var outDir = options['outDir'] || dir;
17
- outDir = path.resolve(outDir);
18
- console.log('outDir:', outDir);
51
+ const dir = path.resolve(options.dir);
52
+ console.log("dir:", dir);
53
+ let outDir = options.outDir ? path.resolve(options.outDir) : dir;
54
+ console.log("outDir:", outDir);
19
55
  if (!fs.existsSync(outDir)) {
20
56
  fs.mkdirSync(outDir, { recursive: true });
21
57
  }
22
- var merge = options['merge'];
23
- var fileList = fs.readdirSync(dir);
24
- config2ts.startConvert(dir, outDir, merge);
58
+ (0, config2ts_1.startConvert)(dir, outDir, options.name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "config2ts",
3
- "version": "2.3.2",
3
+ "version": "2.3.4",
4
4
  "description": "convert config to ts file.",
5
5
  "main": "lib/config2ts.js",
6
6
  "types": "lib/config2ts.d.ts",
@@ -13,7 +13,7 @@
13
13
  ],
14
14
  "scripts": {
15
15
  "build": "tsc",
16
- "convert": "node ./bin/config2ts -d ./config -o ./config",
16
+ "convert": "node ./bin/config2ts -n total.ts -d ./config -o ./config",
17
17
  "test": "jest",
18
18
  "watch-test": "node_modules/.bin/jest --watch"
19
19
  },
@@ -39,6 +39,7 @@
39
39
  "@types/jest": "^30.0.0",
40
40
  "@types/node": "^24.5.2",
41
41
  "jest": "^29.5.0",
42
- "ts-jest": "^29.4.4"
42
+ "ts-jest": "^29.4.4",
43
+ "typescript": "^5.9.2"
43
44
  }
44
45
  }