@hasna/domains 0.0.24 → 0.0.25
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 +73 -24
- package/dist/cli/commands/dns.d.ts.map +1 -1
- package/dist/cli/commands/domain.d.ts.map +1 -1
- package/dist/cli/index.js +41333 -39201
- package/dist/index.js +19694 -17794
- package/dist/lib/brandsight.d.ts.map +1 -1
- package/dist/lib/dns-plan.d.ts +29 -0
- package/dist/lib/dns-plan.d.ts.map +1 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +20177 -18206
- package/dist/mcp/tool-filter.d.ts +4 -0
- package/dist/mcp/tool-filter.d.ts.map +1 -0
- package/dist/storage.js +78 -96
- package/package.json +11 -9
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
export declare function isReadOnlyMcpTool(name: string): boolean;
|
|
3
|
+
export declare function applySafeModeToolFilter(server: McpServer, env?: Record<string, string | undefined>): void;
|
|
4
|
+
//# sourceMappingURL=tool-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-filter.d.ts","sourceRoot":"","sources":["../../src/mcp/tool-filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA0CzE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAqD,GAAG,IAAI,CAgB5J"}
|
package/dist/storage.js
CHANGED
|
@@ -1010,8 +1010,7 @@ var require_defaults = __commonJS((exports, module) => {
|
|
|
1010
1010
|
// node_modules/pg/lib/utils.js
|
|
1011
1011
|
var require_utils = __commonJS((exports, module) => {
|
|
1012
1012
|
var defaults = require_defaults();
|
|
1013
|
-
var
|
|
1014
|
-
var { isDate } = util.types || util;
|
|
1013
|
+
var { isDate } = __require("util/types");
|
|
1015
1014
|
function escapeElement(elementRepresentation) {
|
|
1016
1015
|
const escaped = elementRepresentation.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
|
|
1017
1016
|
return '"' + escaped + '"';
|
|
@@ -1020,28 +1019,23 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
1020
1019
|
let result = "{";
|
|
1021
1020
|
for (let i = 0;i < val.length; i++) {
|
|
1022
1021
|
if (i > 0) {
|
|
1023
|
-
result
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1022
|
+
result += ",";
|
|
1023
|
+
}
|
|
1024
|
+
let item = val[i];
|
|
1025
|
+
if (item == null) {
|
|
1026
|
+
result += "NULL";
|
|
1027
|
+
} else if (Array.isArray(item)) {
|
|
1028
|
+
result += arrayString(item);
|
|
1029
|
+
} else if (ArrayBuffer.isView(item)) {
|
|
1031
1030
|
if (!(item instanceof Buffer)) {
|
|
1032
|
-
|
|
1033
|
-
if (buf.length === item.byteLength) {
|
|
1034
|
-
item = buf;
|
|
1035
|
-
} else {
|
|
1036
|
-
item = buf.slice(item.byteOffset, item.byteOffset + item.byteLength);
|
|
1037
|
-
}
|
|
1031
|
+
item = Buffer.from(item.buffer, item.byteOffset, item.byteLength);
|
|
1038
1032
|
}
|
|
1039
1033
|
result += "\\\\x" + item.toString("hex");
|
|
1040
1034
|
} else {
|
|
1041
|
-
result += escapeElement(prepareValue(
|
|
1035
|
+
result += escapeElement(prepareValue(item));
|
|
1042
1036
|
}
|
|
1043
1037
|
}
|
|
1044
|
-
result
|
|
1038
|
+
result += "}";
|
|
1045
1039
|
return result;
|
|
1046
1040
|
}
|
|
1047
1041
|
var prepareValue = function(val, seen) {
|
|
@@ -1053,11 +1047,7 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
1053
1047
|
return val;
|
|
1054
1048
|
}
|
|
1055
1049
|
if (ArrayBuffer.isView(val)) {
|
|
1056
|
-
|
|
1057
|
-
if (buf.length === val.byteLength) {
|
|
1058
|
-
return buf;
|
|
1059
|
-
}
|
|
1060
|
-
return buf.slice(val.byteOffset, val.byteOffset + val.byteLength);
|
|
1050
|
+
return Buffer.from(val.buffer, val.byteOffset, val.byteLength);
|
|
1061
1051
|
}
|
|
1062
1052
|
if (isDate(val)) {
|
|
1063
1053
|
if (defaults.parseInputDatesAsUTC) {
|
|
@@ -1166,43 +1156,8 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
1166
1156
|
};
|
|
1167
1157
|
});
|
|
1168
1158
|
|
|
1169
|
-
// node_modules/pg/lib/crypto/utils
|
|
1170
|
-
var
|
|
1171
|
-
var nodeCrypto = __require("crypto");
|
|
1172
|
-
function md5(string) {
|
|
1173
|
-
return nodeCrypto.createHash("md5").update(string, "utf-8").digest("hex");
|
|
1174
|
-
}
|
|
1175
|
-
function postgresMd5PasswordHash(user, password, salt) {
|
|
1176
|
-
const inner = md5(password + user);
|
|
1177
|
-
const outer = md5(Buffer.concat([Buffer.from(inner), salt]));
|
|
1178
|
-
return "md5" + outer;
|
|
1179
|
-
}
|
|
1180
|
-
function sha256(text) {
|
|
1181
|
-
return nodeCrypto.createHash("sha256").update(text).digest();
|
|
1182
|
-
}
|
|
1183
|
-
function hashByName(hashName, text) {
|
|
1184
|
-
hashName = hashName.replace(/(\D)-/, "$1");
|
|
1185
|
-
return nodeCrypto.createHash(hashName).update(text).digest();
|
|
1186
|
-
}
|
|
1187
|
-
function hmacSha256(key, msg) {
|
|
1188
|
-
return nodeCrypto.createHmac("sha256", key).update(msg).digest();
|
|
1189
|
-
}
|
|
1190
|
-
async function deriveKey(password, salt, iterations) {
|
|
1191
|
-
return nodeCrypto.pbkdf2Sync(password, salt, iterations, 32, "sha256");
|
|
1192
|
-
}
|
|
1193
|
-
module.exports = {
|
|
1194
|
-
postgresMd5PasswordHash,
|
|
1195
|
-
randomBytes: nodeCrypto.randomBytes,
|
|
1196
|
-
deriveKey,
|
|
1197
|
-
sha256,
|
|
1198
|
-
hashByName,
|
|
1199
|
-
hmacSha256,
|
|
1200
|
-
md5
|
|
1201
|
-
};
|
|
1202
|
-
});
|
|
1203
|
-
|
|
1204
|
-
// node_modules/pg/lib/crypto/utils-webcrypto.js
|
|
1205
|
-
var require_utils_webcrypto = __commonJS((exports, module) => {
|
|
1159
|
+
// node_modules/pg/lib/crypto/utils.js
|
|
1160
|
+
var require_utils2 = __commonJS((exports, module) => {
|
|
1206
1161
|
var nodeCrypto = __require("crypto");
|
|
1207
1162
|
module.exports = {
|
|
1208
1163
|
postgresMd5PasswordHash,
|
|
@@ -1250,16 +1205,6 @@ var require_utils_webcrypto = __commonJS((exports, module) => {
|
|
|
1250
1205
|
}
|
|
1251
1206
|
});
|
|
1252
1207
|
|
|
1253
|
-
// node_modules/pg/lib/crypto/utils.js
|
|
1254
|
-
var require_utils2 = __commonJS((exports, module) => {
|
|
1255
|
-
var useLegacyCrypto = parseInt(process.versions && process.versions.node && process.versions.node.split(".")[0]) < 15;
|
|
1256
|
-
if (useLegacyCrypto) {
|
|
1257
|
-
module.exports = require_utils_legacy();
|
|
1258
|
-
} else {
|
|
1259
|
-
module.exports = require_utils_webcrypto();
|
|
1260
|
-
}
|
|
1261
|
-
});
|
|
1262
|
-
|
|
1263
1208
|
// node_modules/pg/lib/crypto/cert-signatures.js
|
|
1264
1209
|
var require_cert_signatures = __commonJS((exports, module) => {
|
|
1265
1210
|
function x509Error(msg, cert) {
|
|
@@ -1376,7 +1321,13 @@ var require_cert_signatures = __commonJS((exports, module) => {
|
|
|
1376
1321
|
var require_sasl = __commonJS((exports, module) => {
|
|
1377
1322
|
var crypto = require_utils2();
|
|
1378
1323
|
var { signatureAlgorithmHashFromCertificate } = require_cert_signatures();
|
|
1379
|
-
function
|
|
1324
|
+
function saslprep(password) {
|
|
1325
|
+
const nonAsciiSpace = /[\u00A0\u1680\u2000-\u200B\u202F\u205F\u3000]/g;
|
|
1326
|
+
const mappedToNothing = /[\u00AD\u034F\u1806\u180B\u180C\u180D\u200C\u200D\u2060\uFE00-\uFE0F\uFEFF]/g;
|
|
1327
|
+
return password.replace(nonAsciiSpace, " ").replace(mappedToNothing, "").normalize("NFKC");
|
|
1328
|
+
}
|
|
1329
|
+
var DEFAULT_MAX_SCRAM_ITERATIONS = 1e5;
|
|
1330
|
+
function startSession(mechanisms, stream, scramMaxIterations = DEFAULT_MAX_SCRAM_ITERATIONS) {
|
|
1380
1331
|
const candidates = ["SCRAM-SHA-256"];
|
|
1381
1332
|
if (stream)
|
|
1382
1333
|
candidates.unshift("SCRAM-SHA-256-PLUS");
|
|
@@ -1393,7 +1344,8 @@ var require_sasl = __commonJS((exports, module) => {
|
|
|
1393
1344
|
mechanism,
|
|
1394
1345
|
clientNonce,
|
|
1395
1346
|
response: gs2Header + ",,n=*,r=" + clientNonce,
|
|
1396
|
-
message: "SASLInitialResponse"
|
|
1347
|
+
message: "SASLInitialResponse",
|
|
1348
|
+
scramMaxIterations
|
|
1397
1349
|
};
|
|
1398
1350
|
}
|
|
1399
1351
|
async function continueSession(session, password, serverData, stream) {
|
|
@@ -1415,6 +1367,10 @@ var require_sasl = __commonJS((exports, module) => {
|
|
|
1415
1367
|
} else if (sv.nonce.length === session.clientNonce.length) {
|
|
1416
1368
|
throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce is too short");
|
|
1417
1369
|
}
|
|
1370
|
+
const scramMaxIterations = typeof session.scramMaxIterations === "number" ? session.scramMaxIterations : DEFAULT_MAX_SCRAM_ITERATIONS;
|
|
1371
|
+
if (scramMaxIterations !== 0 && sv.iteration > scramMaxIterations) {
|
|
1372
|
+
throw new Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: iteration count " + sv.iteration + " exceeds scramMaxIterations of " + scramMaxIterations);
|
|
1373
|
+
}
|
|
1418
1374
|
const clientFirstMessageBare = "n=*,r=" + session.clientNonce;
|
|
1419
1375
|
const serverFirstMessage = "r=" + sv.nonce + ",s=" + sv.salt + ",i=" + sv.iteration;
|
|
1420
1376
|
let channelBinding = stream ? "eSws" : "biws";
|
|
@@ -1430,7 +1386,7 @@ var require_sasl = __commonJS((exports, module) => {
|
|
|
1430
1386
|
const clientFinalMessageWithoutProof = "c=" + channelBinding + ",r=" + sv.nonce;
|
|
1431
1387
|
const authMessage = clientFirstMessageBare + "," + serverFirstMessage + "," + clientFinalMessageWithoutProof;
|
|
1432
1388
|
const saltBytes = Buffer.from(sv.salt, "base64");
|
|
1433
|
-
const saltedPassword = await crypto.deriveKey(password, saltBytes, sv.iteration);
|
|
1389
|
+
const saltedPassword = await crypto.deriveKey(saslprep(password), saltBytes, sv.iteration);
|
|
1434
1390
|
const clientKey = await crypto.hmacSha256(saltedPassword, "Client Key");
|
|
1435
1391
|
const storedKey = await crypto.sha256(clientKey);
|
|
1436
1392
|
const clientSignature = await crypto.hmacSha256(storedKey, authMessage);
|
|
@@ -1504,7 +1460,11 @@ var require_sasl = __commonJS((exports, module) => {
|
|
|
1504
1460
|
}
|
|
1505
1461
|
function parseServerFinalMessage(serverData) {
|
|
1506
1462
|
const attrPairs = parseAttributePairs(serverData);
|
|
1463
|
+
const error = attrPairs.get("e");
|
|
1507
1464
|
const serverSignature = attrPairs.get("v");
|
|
1465
|
+
if (error) {
|
|
1466
|
+
throw new Error(`SASL: SCRAM-SERVER-FINAL-MESSAGE: server returned error: "${error}"`);
|
|
1467
|
+
}
|
|
1508
1468
|
if (!serverSignature) {
|
|
1509
1469
|
throw new Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature is missing");
|
|
1510
1470
|
} else if (!isBase64(serverSignature)) {
|
|
@@ -1532,7 +1492,8 @@ var require_sasl = __commonJS((exports, module) => {
|
|
|
1532
1492
|
module.exports = {
|
|
1533
1493
|
startSession,
|
|
1534
1494
|
continueSession,
|
|
1535
|
-
finalizeSession
|
|
1495
|
+
finalizeSession,
|
|
1496
|
+
DEFAULT_MAX_SCRAM_ITERATIONS
|
|
1536
1497
|
};
|
|
1537
1498
|
});
|
|
1538
1499
|
|
|
@@ -1575,7 +1536,7 @@ var require_pg_connection_string = __commonJS((exports, module) => {
|
|
|
1575
1536
|
const config2 = str.split(" ");
|
|
1576
1537
|
return { host: config2[0], database: config2[1] };
|
|
1577
1538
|
}
|
|
1578
|
-
const config =
|
|
1539
|
+
const config = Object.create(null);
|
|
1579
1540
|
let result;
|
|
1580
1541
|
let dummyHost = false;
|
|
1581
1542
|
if (/ |%[^a-f0-9]|%[a-f0-9][^a-f0-9]/i.test(str)) {
|
|
@@ -1694,7 +1655,7 @@ var require_pg_connection_string = __commonJS((exports, module) => {
|
|
|
1694
1655
|
c[key] = value;
|
|
1695
1656
|
}
|
|
1696
1657
|
return c;
|
|
1697
|
-
},
|
|
1658
|
+
}, Object.create(null));
|
|
1698
1659
|
return connectionOptions;
|
|
1699
1660
|
}
|
|
1700
1661
|
function toClientConfig(config) {
|
|
@@ -1721,7 +1682,7 @@ var require_pg_connection_string = __commonJS((exports, module) => {
|
|
|
1721
1682
|
}
|
|
1722
1683
|
}
|
|
1723
1684
|
return c;
|
|
1724
|
-
},
|
|
1685
|
+
}, Object.create(null));
|
|
1725
1686
|
return poolConfig;
|
|
1726
1687
|
}
|
|
1727
1688
|
function parseIntoClientConfig(str) {
|
|
@@ -1957,7 +1918,7 @@ var require_result = __commonJS((exports, module) => {
|
|
|
1957
1918
|
if (this.fields.length) {
|
|
1958
1919
|
this._parsers = new Array(fieldDescriptions.length);
|
|
1959
1920
|
}
|
|
1960
|
-
const row =
|
|
1921
|
+
const row = Object.create(null);
|
|
1961
1922
|
for (let i = 0;i < fieldDescriptions.length; i++) {
|
|
1962
1923
|
const desc = fieldDescriptions[i];
|
|
1963
1924
|
row[desc.name] = null;
|
|
@@ -2159,7 +2120,7 @@ var require_query = __commonJS((exports, module) => {
|
|
|
2159
2120
|
module.exports = Query;
|
|
2160
2121
|
});
|
|
2161
2122
|
|
|
2162
|
-
// node_modules/pg-protocol/dist/messages.js
|
|
2123
|
+
// node_modules/pg/node_modules/pg-protocol/dist/messages.js
|
|
2163
2124
|
var require_messages = __commonJS((exports) => {
|
|
2164
2125
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2165
2126
|
exports.NoticeMessage = exports.DataRowMessage = exports.CommandCompleteMessage = exports.ReadyForQueryMessage = exports.NotificationResponseMessage = exports.BackendKeyDataMessage = exports.AuthenticationMD5Password = exports.ParameterStatusMessage = exports.ParameterDescriptionMessage = exports.RowDescriptionMessage = exports.Field = exports.CopyResponse = exports.CopyDataMessage = exports.DatabaseError = exports.copyDone = exports.emptyQuery = exports.replicationStart = exports.portalSuspended = exports.noData = exports.closeComplete = exports.bindComplete = exports.parseComplete = undefined;
|
|
@@ -2335,7 +2296,7 @@ var require_messages = __commonJS((exports) => {
|
|
|
2335
2296
|
exports.NoticeMessage = NoticeMessage;
|
|
2336
2297
|
});
|
|
2337
2298
|
|
|
2338
|
-
// node_modules/pg-protocol/dist/buffer-writer.js
|
|
2299
|
+
// node_modules/pg/node_modules/pg-protocol/dist/buffer-writer.js
|
|
2339
2300
|
var require_buffer_writer = __commonJS((exports) => {
|
|
2340
2301
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2341
2302
|
exports.Writer = undefined;
|
|
@@ -2414,7 +2375,7 @@ var require_buffer_writer = __commonJS((exports) => {
|
|
|
2414
2375
|
exports.Writer = Writer;
|
|
2415
2376
|
});
|
|
2416
2377
|
|
|
2417
|
-
// node_modules/pg-protocol/dist/serializer.js
|
|
2378
|
+
// node_modules/pg/node_modules/pg-protocol/dist/serializer.js
|
|
2418
2379
|
var require_serializer = __commonJS((exports) => {
|
|
2419
2380
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2420
2381
|
exports.serialize = undefined;
|
|
@@ -2577,7 +2538,7 @@ var require_serializer = __commonJS((exports) => {
|
|
|
2577
2538
|
exports.serialize = serialize;
|
|
2578
2539
|
});
|
|
2579
2540
|
|
|
2580
|
-
// node_modules/pg-protocol/dist/buffer-reader.js
|
|
2541
|
+
// node_modules/pg/node_modules/pg-protocol/dist/buffer-reader.js
|
|
2581
2542
|
var require_buffer_reader = __commonJS((exports) => {
|
|
2582
2543
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2583
2544
|
exports.BufferReader = undefined;
|
|
@@ -2633,7 +2594,7 @@ var require_buffer_reader = __commonJS((exports) => {
|
|
|
2633
2594
|
exports.BufferReader = BufferReader;
|
|
2634
2595
|
});
|
|
2635
2596
|
|
|
2636
|
-
// node_modules/pg-protocol/dist/parser.js
|
|
2597
|
+
// node_modules/pg/node_modules/pg-protocol/dist/parser.js
|
|
2637
2598
|
var require_parser = __commonJS((exports) => {
|
|
2638
2599
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2639
2600
|
exports.Parser = undefined;
|
|
@@ -2938,7 +2899,7 @@ var require_parser = __commonJS((exports) => {
|
|
|
2938
2899
|
};
|
|
2939
2900
|
});
|
|
2940
2901
|
|
|
2941
|
-
// node_modules/pg-protocol/dist/index.js
|
|
2902
|
+
// node_modules/pg/node_modules/pg-protocol/dist/index.js
|
|
2942
2903
|
var require_dist = __commonJS((exports) => {
|
|
2943
2904
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2944
2905
|
exports.DatabaseError = exports.serialize = exports.parse = undefined;
|
|
@@ -3496,6 +3457,16 @@ var require_client = __commonJS((exports, module) => {
|
|
|
3496
3457
|
var pgPassDeprecationNotice = nodeUtils.deprecate(() => {}, "pgpass support is deprecated and will be removed in pg@9.0. " + "You can provide an async function as the password property to the Client/Pool constructor that returns a password instead. Within this function you can call the pgpass module in your own code.");
|
|
3497
3458
|
var byoPromiseDeprecationNotice = nodeUtils.deprecate(() => {}, "Passing a custom Promise implementation to the Client/Pool constructor is deprecated and will be removed in pg@9.0.");
|
|
3498
3459
|
var queryQueueLengthDeprecationNotice = nodeUtils.deprecate(() => {}, "Calling client.query() when the client is already executing a query is deprecated and will be removed in pg@9.0. Use async/await or an external async flow control mechanism instead.");
|
|
3460
|
+
function coerceNumberOrDefault(value, defaultValue) {
|
|
3461
|
+
if (typeof value === "number") {
|
|
3462
|
+
return Number.isFinite(value) ? value : defaultValue;
|
|
3463
|
+
}
|
|
3464
|
+
if (typeof value === "string" && value.trim() !== "") {
|
|
3465
|
+
const n = Number(value);
|
|
3466
|
+
return Number.isFinite(n) ? n : defaultValue;
|
|
3467
|
+
}
|
|
3468
|
+
return defaultValue;
|
|
3469
|
+
}
|
|
3499
3470
|
|
|
3500
3471
|
class Client extends EventEmitter {
|
|
3501
3472
|
constructor(config) {
|
|
@@ -3525,7 +3496,9 @@ var require_client = __commonJS((exports, module) => {
|
|
|
3525
3496
|
this._connectionError = false;
|
|
3526
3497
|
this._queryable = true;
|
|
3527
3498
|
this._activeQuery = null;
|
|
3499
|
+
this._txStatus = null;
|
|
3528
3500
|
this.enableChannelBinding = Boolean(c.enableChannelBinding);
|
|
3501
|
+
this.scramMaxIterations = coerceNumberOrDefault(c.scramMaxIterations, sasl.DEFAULT_MAX_SCRAM_ITERATIONS);
|
|
3529
3502
|
this.connection = c.connection || new Connection({
|
|
3530
3503
|
stream: c.stream,
|
|
3531
3504
|
ssl: this.connectionParameters.ssl,
|
|
@@ -3716,7 +3689,7 @@ var require_client = __commonJS((exports, module) => {
|
|
|
3716
3689
|
_handleAuthSASL(msg) {
|
|
3717
3690
|
this._getPassword(() => {
|
|
3718
3691
|
try {
|
|
3719
|
-
this.saslSession = sasl.startSession(msg.mechanisms, this.enableChannelBinding && this.connection.stream);
|
|
3692
|
+
this.saslSession = sasl.startSession(msg.mechanisms, this.enableChannelBinding && this.connection.stream, this.scramMaxIterations);
|
|
3720
3693
|
this.connection.sendSASLInitialResponseMessage(this.saslSession.mechanism, this.saslSession.response);
|
|
3721
3694
|
} catch (err) {
|
|
3722
3695
|
this.connection.emit("error", err);
|
|
@@ -3756,6 +3729,7 @@ var require_client = __commonJS((exports, module) => {
|
|
|
3756
3729
|
}
|
|
3757
3730
|
const activeQuery = this._getActiveQuery();
|
|
3758
3731
|
this._activeQuery = null;
|
|
3732
|
+
this._txStatus = msg?.status ?? null;
|
|
3759
3733
|
this.readyForQuery = true;
|
|
3760
3734
|
if (activeQuery) {
|
|
3761
3735
|
activeQuery.handleReadyForQuery(this.connection);
|
|
@@ -3951,13 +3925,10 @@ var require_client = __commonJS((exports, module) => {
|
|
|
3951
3925
|
query(config, values, callback) {
|
|
3952
3926
|
let query;
|
|
3953
3927
|
let result;
|
|
3954
|
-
|
|
3955
|
-
let readTimeoutTimer;
|
|
3956
|
-
let queryCallback;
|
|
3957
|
-
if (config === null || config === undefined) {
|
|
3928
|
+
if (config == null) {
|
|
3958
3929
|
throw new TypeError("Client was passed a null or undefined query");
|
|
3959
|
-
}
|
|
3960
|
-
|
|
3930
|
+
}
|
|
3931
|
+
if (typeof config.submit === "function") {
|
|
3961
3932
|
result = query = config;
|
|
3962
3933
|
if (!query.callback) {
|
|
3963
3934
|
if (typeof values === "function") {
|
|
@@ -3967,7 +3938,6 @@ var require_client = __commonJS((exports, module) => {
|
|
|
3967
3938
|
}
|
|
3968
3939
|
}
|
|
3969
3940
|
} else {
|
|
3970
|
-
readTimeout = config.query_timeout || this.connectionParameters.query_timeout;
|
|
3971
3941
|
query = new Query(config, values, callback);
|
|
3972
3942
|
if (!query.callback) {
|
|
3973
3943
|
result = new this._Promise((resolve, reject) => {
|
|
@@ -3976,11 +3946,14 @@ var require_client = __commonJS((exports, module) => {
|
|
|
3976
3946
|
Error.captureStackTrace(err);
|
|
3977
3947
|
throw err;
|
|
3978
3948
|
});
|
|
3949
|
+
} else if (typeof query.callback !== "function") {
|
|
3950
|
+
throw new TypeError("callback is not a function");
|
|
3979
3951
|
}
|
|
3980
3952
|
}
|
|
3953
|
+
const readTimeout = config.query_timeout || this.connectionParameters.query_timeout;
|
|
3981
3954
|
if (readTimeout) {
|
|
3982
|
-
queryCallback = query.callback || (() => {});
|
|
3983
|
-
readTimeoutTimer = setTimeout(() => {
|
|
3955
|
+
const queryCallback = query.callback || (() => {});
|
|
3956
|
+
const readTimeoutTimer = setTimeout(() => {
|
|
3984
3957
|
const error = new Error("Query read timeout");
|
|
3985
3958
|
process.nextTick(() => {
|
|
3986
3959
|
query.handleError(error, this.connection);
|
|
@@ -4029,11 +4002,15 @@ var require_client = __commonJS((exports, module) => {
|
|
|
4029
4002
|
unref() {
|
|
4030
4003
|
this.connection.unref();
|
|
4031
4004
|
}
|
|
4005
|
+
getTransactionStatus() {
|
|
4006
|
+
return this._txStatus;
|
|
4007
|
+
}
|
|
4032
4008
|
end(cb) {
|
|
4033
4009
|
this._ending = true;
|
|
4034
4010
|
if (!this.connection._connecting || this._ended) {
|
|
4035
4011
|
if (cb) {
|
|
4036
4012
|
cb();
|
|
4013
|
+
return;
|
|
4037
4014
|
} else {
|
|
4038
4015
|
return this._Promise.resolve();
|
|
4039
4016
|
}
|
|
@@ -4790,8 +4767,10 @@ var require_client2 = __commonJS((exports, module) => {
|
|
|
4790
4767
|
Client.prototype.end = function(cb) {
|
|
4791
4768
|
const self = this;
|
|
4792
4769
|
this._ending = true;
|
|
4793
|
-
if (!this._connected) {
|
|
4794
|
-
this.once("connect",
|
|
4770
|
+
if (this._connecting && !this._connected) {
|
|
4771
|
+
this.once("connect", () => {
|
|
4772
|
+
this.end(() => {});
|
|
4773
|
+
});
|
|
4795
4774
|
}
|
|
4796
4775
|
let result;
|
|
4797
4776
|
if (!cb) {
|
|
@@ -4852,6 +4831,9 @@ var require_client2 = __commonJS((exports, module) => {
|
|
|
4852
4831
|
Client.prototype.isConnected = function() {
|
|
4853
4832
|
return this._connected;
|
|
4854
4833
|
};
|
|
4834
|
+
Client.prototype.getTransactionStatus = function() {
|
|
4835
|
+
return this.native.getTransactionStatus();
|
|
4836
|
+
};
|
|
4855
4837
|
});
|
|
4856
4838
|
|
|
4857
4839
|
// node_modules/pg/lib/index.js
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/domains",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Domain portfolio and DNS management for AI agents — CLI + MCP server with SQLite",
|
|
3
|
+
"version": "0.0.25",
|
|
4
|
+
"description": "Domain portfolio, registrar, marketplace, and DNS management for AI agents — CLI + MCP server with SQLite",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -64,21 +64,23 @@
|
|
|
64
64
|
"author": "Andrei Hasna <andrei@hasna.com>",
|
|
65
65
|
"license": "Apache-2.0",
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@aws-sdk/client-route-53": "^3.
|
|
68
|
-
"@aws-sdk/client-route-53-domains": "^3.
|
|
69
|
-
"@
|
|
70
|
-
"@hasna/events": "^0.1.3",
|
|
71
|
-
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
67
|
+
"@aws-sdk/client-route-53": "^3.1067.0",
|
|
68
|
+
"@aws-sdk/client-route-53-domains": "^3.1067.0",
|
|
69
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
72
70
|
"chalk": "^5.4.1",
|
|
73
71
|
"commander": "^13.1.0",
|
|
74
72
|
"ink": "^5.2.0",
|
|
75
73
|
"ink-text-input": "^6.0.0",
|
|
76
|
-
"pg": "^8.
|
|
74
|
+
"pg": "^8.21.0",
|
|
77
75
|
"react": "^18.3.1",
|
|
78
76
|
"zod": "^3.24.2"
|
|
79
77
|
},
|
|
78
|
+
"optionalDependencies": {
|
|
79
|
+
"@hasna/contacts": "^0.6.19",
|
|
80
|
+
"@hasna/events": "^0.1.3"
|
|
81
|
+
},
|
|
80
82
|
"devDependencies": {
|
|
81
|
-
"@types/bun": "^1.
|
|
83
|
+
"@types/bun": "^1.3.14",
|
|
82
84
|
"@types/pg": "^8.20.0",
|
|
83
85
|
"@types/react": "^18.3.18",
|
|
84
86
|
"ink-testing-library": "^4.0.0",
|