@bytebase/dbhub 0.19.0 → 0.19.1
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 +9 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1182,6 +1182,7 @@ var SQLiteConnector = class _SQLiteConnector {
|
|
|
1182
1182
|
dbOptions.readonly = true;
|
|
1183
1183
|
}
|
|
1184
1184
|
this.db = new Database(this.dbPath, dbOptions);
|
|
1185
|
+
this.db.defaultSafeIntegers(true);
|
|
1185
1186
|
if (initScript) {
|
|
1186
1187
|
this.db.exec(initScript);
|
|
1187
1188
|
}
|
|
@@ -1491,8 +1492,10 @@ Expected: ${expectedFormat}`
|
|
|
1491
1492
|
// Remove leading '/' if exists
|
|
1492
1493
|
user: url.username,
|
|
1493
1494
|
password: url.password,
|
|
1494
|
-
multipleStatements: true
|
|
1495
|
+
multipleStatements: true,
|
|
1495
1496
|
// Enable native multi-statement support
|
|
1497
|
+
supportBigNumbers: true
|
|
1498
|
+
// Return BIGINT as string when value exceeds Number.MAX_SAFE_INTEGER
|
|
1496
1499
|
};
|
|
1497
1500
|
url.forEachSearchParam((value, key) => {
|
|
1498
1501
|
if (key === "sslmode") {
|
|
@@ -2378,8 +2381,13 @@ import { fileURLToPath } from "url";
|
|
|
2378
2381
|
import { z } from "zod";
|
|
2379
2382
|
|
|
2380
2383
|
// src/utils/response-formatter.ts
|
|
2384
|
+
var MIN_SAFE_BIGINT = BigInt(Number.MIN_SAFE_INTEGER);
|
|
2385
|
+
var MAX_SAFE_BIGINT = BigInt(Number.MAX_SAFE_INTEGER);
|
|
2381
2386
|
function bigIntReplacer(_key, value) {
|
|
2382
2387
|
if (typeof value === "bigint") {
|
|
2388
|
+
if (value >= MIN_SAFE_BIGINT && value <= MAX_SAFE_BIGINT) {
|
|
2389
|
+
return Number(value);
|
|
2390
|
+
}
|
|
2383
2391
|
return value.toString();
|
|
2384
2392
|
}
|
|
2385
2393
|
return value;
|
package/package.json
CHANGED