@t2000/cli 9.3.0 → 9.4.0
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/{chunk-DY7BZMEW.js → chunk-H7T7CQ27.js} +42 -4
- package/dist/{chunk-DY7BZMEW.js.map → chunk-H7T7CQ27.js.map} +1 -1
- package/dist/{dist-HPMGTXOX.js → dist-6T57AF5D.js} +45 -7
- package/dist/{dist-HPMGTXOX.js.map → dist-6T57AF5D.js.map} +1 -1
- package/dist/{dist-VLT4XOMX.js → dist-KRXW26WD.js} +2 -2
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- /package/dist/{dist-VLT4XOMX.js.map → dist-KRXW26WD.js.map} +0 -0
|
@@ -151,7 +151,7 @@ import {
|
|
|
151
151
|
verifyReceipt,
|
|
152
152
|
walletExists,
|
|
153
153
|
writeLimitsFile
|
|
154
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-H7T7CQ27.js";
|
|
155
155
|
import "./chunk-634W6JCI.js";
|
|
156
156
|
import "./chunk-BHQGGFE6.js";
|
|
157
157
|
import "./chunk-GCC33SG5.js";
|
|
@@ -317,4 +317,4 @@ export {
|
|
|
317
317
|
walletExists,
|
|
318
318
|
writeLimitsFile
|
|
319
319
|
};
|
|
320
|
-
//# sourceMappingURL=dist-
|
|
320
|
+
//# sourceMappingURL=dist-KRXW26WD.js.map
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
truncateAddress,
|
|
20
20
|
verifyReceipt,
|
|
21
21
|
walletExists
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-H7T7CQ27.js";
|
|
23
23
|
import "./chunk-634W6JCI.js";
|
|
24
24
|
import "./chunk-BHQGGFE6.js";
|
|
25
25
|
import "./chunk-GCC33SG5.js";
|
|
@@ -22224,9 +22224,17 @@ async function runEstimate(url, opts) {
|
|
|
22224
22224
|
printBlank();
|
|
22225
22225
|
printInfo(`\u2192 ${method} ${url} ${import_picocolors8.default.dim("(estimate \u2014 no payment)")}`);
|
|
22226
22226
|
}
|
|
22227
|
+
let headers = opts.header;
|
|
22228
|
+
if (canHaveBody && opts.data && !Object.keys(headers ?? {}).some((k) => k.toLowerCase() === "content-type")) {
|
|
22229
|
+
try {
|
|
22230
|
+
JSON.parse(opts.data);
|
|
22231
|
+
headers = { ...headers ?? {}, "content-type": "application/json" };
|
|
22232
|
+
} catch {
|
|
22233
|
+
}
|
|
22234
|
+
}
|
|
22227
22235
|
const response = await fetch(url, {
|
|
22228
22236
|
method,
|
|
22229
|
-
headers
|
|
22237
|
+
headers,
|
|
22230
22238
|
body: canHaveBody ? opts.data : void 0
|
|
22231
22239
|
});
|
|
22232
22240
|
if (response.status !== 402) {
|
|
@@ -22264,7 +22272,7 @@ async function runEstimate(url, opts) {
|
|
|
22264
22272
|
let req = accepts.find((a) => a.scheme === "exact" && a.network?.startsWith("sui:")) ?? accepts[0];
|
|
22265
22273
|
let dialect = "x402";
|
|
22266
22274
|
if (!req) {
|
|
22267
|
-
const { parseMppSuiChallenge } = await import("./dist-
|
|
22275
|
+
const { parseMppSuiChallenge } = await import("./dist-KRXW26WD.js");
|
|
22268
22276
|
const challenge = await parseMppSuiChallenge(response);
|
|
22269
22277
|
if (!challenge) {
|
|
22270
22278
|
throw new Error(
|
|
@@ -23356,7 +23364,7 @@ function registerMcpStart(parent) {
|
|
|
23356
23364
|
parent.command("start", { isDefault: true }).description("Start MCP server (stdio transport \u2014 for AI client integration)").option("--key <path>", "Custom wallet path (default ~/.t2000/wallet.key)").action(async (opts) => {
|
|
23357
23365
|
let mod;
|
|
23358
23366
|
try {
|
|
23359
|
-
mod = await import("./dist-
|
|
23367
|
+
mod = await import("./dist-6T57AF5D.js");
|
|
23360
23368
|
} catch {
|
|
23361
23369
|
console.error("MCP server not installed. Run:\n npm install -g @t2000/mcp");
|
|
23362
23370
|
process.exit(1);
|