@t2000/cli 0.21.0 → 0.22.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/index.js CHANGED
@@ -1459,9 +1459,10 @@ function registerPay(program2) {
1459
1459
  const pin = await resolvePin();
1460
1460
  const agent = await T200019.create({ pin, keyPath: opts.key });
1461
1461
  const startTime = Date.now();
1462
+ const method = opts.data && opts.method === "GET" ? "POST" : opts.method;
1462
1463
  if (!isJsonMode()) {
1463
1464
  printBlank();
1464
- printInfo(`\u2192 ${opts.method} ${url}`);
1465
+ printInfo(`\u2192 ${method} ${url}`);
1465
1466
  }
1466
1467
  const maxPrice = parseFloat(opts.maxPrice);
1467
1468
  if (isNaN(maxPrice) || maxPrice <= 0) {
@@ -1469,7 +1470,7 @@ function registerPay(program2) {
1469
1470
  }
1470
1471
  const result = await agent.pay({
1471
1472
  url,
1472
- method: opts.method,
1473
+ method,
1473
1474
  headers: opts.header,
1474
1475
  body: opts.data,
1475
1476
  maxPrice
@@ -2036,7 +2037,7 @@ function registerMcp(program2) {
2036
2037
  mcp.command("start", { isDefault: true }).description("Start MCP server (stdio transport)").option("--key <path>", "Key file path").action(async (opts) => {
2037
2038
  let mod;
2038
2039
  try {
2039
- mod = await import("./dist-7OOZ6NXP.js");
2040
+ mod = await import("./dist-BGQK2CN5.js");
2040
2041
  } catch {
2041
2042
  console.error(
2042
2043
  "MCP server not installed. Run:\n npm install -g @t2000/mcp"