@altertable/cli 1.13.2 → 1.13.3

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.
Files changed (2) hide show
  1. package/dist/cli.js +68 -40
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -8537,7 +8537,7 @@ function getOutputSink() {
8537
8537
  }
8538
8538
 
8539
8539
  // src/lib/transport-defaults.ts
8540
- var DEFAULT_CONNECT_TIMEOUT_MS = 5000;
8540
+ var DEFAULT_CONNECT_TIMEOUT_MS = 30000;
8541
8541
  var DEFAULT_READ_TIMEOUT_MS = 60000;
8542
8542
  var STREAM_READ_TIMEOUT_MS = 0;
8543
8543
 
@@ -9179,7 +9179,7 @@ function redactResponseBodyForDebug(body) {
9179
9179
  }
9180
9180
 
9181
9181
  // src/version.ts
9182
- var VERSION = "1.13.2";
9182
+ var VERSION = "1.13.3";
9183
9183
  var USER_AGENT = `altertable-cli/${VERSION}`;
9184
9184
 
9185
9185
  // src/lib/http.ts
@@ -9280,18 +9280,29 @@ function unwrapErrorDetail(error) {
9280
9280
  }
9281
9281
  return messages.join(": ");
9282
9282
  }
9283
- function timeoutError(options, cause) {
9284
- return new TimeoutError(`Request timed out: ${options.method} ${options.url}`, { cause });
9283
+ function formatDuration(durationMs) {
9284
+ return durationMs % 1000 === 0 ? `${durationMs / 1000}s` : `${durationMs}ms`;
9285
+ }
9286
+ function timeoutError(options, budget, cause) {
9287
+ return new TimeoutError(`CLI timed out after ${formatDuration(budget.durationMs)} ${budget.waitingFor}: ${options.method} ${options.url}`, {
9288
+ cause,
9289
+ details: [
9290
+ `This limit is enforced by the CLI (${budget.flags}), not reported by the server; the request may still be running server-side.`,
9291
+ "A slow network or a long-running request can both trigger it.",
9292
+ `Raise it with ${budget.flags.replace(" + ", " or ")} <seconds>.`
9293
+ ].join(`
9294
+ `)
9295
+ });
9285
9296
  }
9286
9297
  function connectionError(options, cause) {
9287
9298
  const detail = unwrapErrorDetail(cause);
9288
9299
  const suffix = detail ? ` (${detail})` : "";
9289
9300
  return new NetworkError(`Request failed (network error): ${options.method} ${options.url}${suffix}`, { cause });
9290
9301
  }
9291
- function transportError(options, signal, cause) {
9292
- return signal.aborted ? timeoutError(options, cause) : connectionError(options, cause);
9302
+ function transportError(options, signal, budget, cause) {
9303
+ return signal.aborted ? timeoutError(options, budget(), cause) : connectionError(options, cause);
9293
9304
  }
9294
- function wrapResponseStream(stream, clearTimeoutAfterRead, signal, options) {
9305
+ function wrapResponseStream(stream, clearTimeoutAfterRead, signal, budget, options) {
9295
9306
  const reader = stream.getReader();
9296
9307
  return new ReadableStream({
9297
9308
  async pull(controller) {
@@ -9307,7 +9318,7 @@ function wrapResponseStream(stream, clearTimeoutAfterRead, signal, options) {
9307
9318
  } catch (error) {
9308
9319
  clearTimeoutAfterRead();
9309
9320
  reader.releaseLock();
9310
- controller.error(transportError(options, signal, error));
9321
+ controller.error(transportError(options, signal, budget, error));
9311
9322
  }
9312
9323
  },
9313
9324
  async cancel(reason) {
@@ -9491,6 +9502,11 @@ async function executeLiveRequest(options) {
9491
9502
  const headers = buildRequestHeaders(options);
9492
9503
  const timeoutMs = resolveFetchTimeoutMs(options);
9493
9504
  const signal = AbortSignal.timeout(timeoutMs);
9505
+ const budget = () => ({
9506
+ flags: resolveReadTimeoutMs(options) > 0 ? "--connect-timeout + --read-timeout" : "--connect-timeout",
9507
+ durationMs: timeoutMs,
9508
+ waitingFor: "waiting for the server"
9509
+ });
9494
9510
  logHttpRequest(options);
9495
9511
  logDebug(`Request: ${options.method} ${options.url}`);
9496
9512
  logHttpDebug([
@@ -9501,13 +9517,13 @@ async function executeLiveRequest(options) {
9501
9517
  try {
9502
9518
  response = await fetch(options.url, buildFetchInit(options, headers, signal));
9503
9519
  } catch (error) {
9504
- throw transportError(options, signal, error);
9520
+ throw transportError(options, signal, budget, error);
9505
9521
  }
9506
9522
  let responseBody;
9507
9523
  try {
9508
9524
  responseBody = await response.text();
9509
9525
  } catch (error) {
9510
- throw transportError(options, signal, error);
9526
+ throw transportError(options, signal, budget, error);
9511
9527
  }
9512
9528
  logHttpDebug([
9513
9529
  `< HTTP/${response.status}`,
@@ -9531,11 +9547,23 @@ async function executeLiveStream(options) {
9531
9547
  clearTimeout(timeout);
9532
9548
  timeout = undefined;
9533
9549
  };
9534
- const startTimeout = (durationMs) => {
9550
+ let activeBudget = {
9551
+ flags: "--connect-timeout",
9552
+ durationMs: connectTimeoutMs,
9553
+ waitingFor: "waiting for the server to respond"
9554
+ };
9555
+ const budget = () => activeBudget;
9556
+ const startTimeout = (next) => {
9535
9557
  clearActiveTimeout();
9536
- timeout = setTimeout(() => abortController.abort(), durationMs);
9558
+ activeBudget = next;
9559
+ timeout = setTimeout(() => abortController.abort(), next.durationMs);
9560
+ };
9561
+ const readBudget = {
9562
+ flags: "--read-timeout",
9563
+ durationMs: readTimeoutMs,
9564
+ waitingFor: "reading the response"
9537
9565
  };
9538
- startTimeout(connectTimeoutMs);
9566
+ startTimeout(activeBudget);
9539
9567
  logHttpRequest(options);
9540
9568
  logDebug(`Request: ${options.method} ${options.url}`);
9541
9569
  let response;
@@ -9544,25 +9572,25 @@ async function executeLiveStream(options) {
9544
9572
  clearActiveTimeout();
9545
9573
  } catch (error) {
9546
9574
  clearActiveTimeout();
9547
- throw transportError(options, abortController.signal, error);
9575
+ throw transportError(options, abortController.signal, budget, error);
9548
9576
  }
9549
9577
  if (response.status >= 200 && response.status < 300) {
9550
9578
  if (!response.body) {
9551
9579
  throw new NetworkError("Response body is missing.");
9552
9580
  }
9553
9581
  if (readTimeoutMs > 0) {
9554
- startTimeout(readTimeoutMs);
9582
+ startTimeout(readBudget);
9555
9583
  }
9556
- return wrapResponseStream(response.body, clearActiveTimeout, abortController.signal, options);
9584
+ return wrapResponseStream(response.body, clearActiveTimeout, abortController.signal, budget, options);
9557
9585
  }
9558
9586
  if (readTimeoutMs > 0) {
9559
- startTimeout(readTimeoutMs);
9587
+ startTimeout(readBudget);
9560
9588
  }
9561
9589
  let responseBody;
9562
9590
  try {
9563
9591
  responseBody = await response.text();
9564
9592
  } catch (error) {
9565
- throw transportError(options, abortController.signal, error);
9593
+ throw transportError(options, abortController.signal, budget, error);
9566
9594
  } finally {
9567
9595
  clearActiveTimeout();
9568
9596
  }
@@ -15186,9 +15214,9 @@ Commit app source, \`package.json\`, and \`bun.lock\`. On a fresh clone, run \`b
15186
15214
  "": {
15187
15215
  "name": "data-app-starter",
15188
15216
  "dependencies": {
15189
- "@altertable/data-app": "0.73.0",
15190
- "@altertable/data-app-bun": "0.73.0",
15191
- "@altertable/data-app-react": "0.73.0",
15217
+ "@altertable/data-app": "0.74.0",
15218
+ "@altertable/data-app-bun": "0.74.0",
15219
+ "@altertable/data-app-react": "0.74.0",
15192
15220
  "react": "19.3.0",
15193
15221
  "react-dom": "19.3.0",
15194
15222
  },
@@ -15204,11 +15232,11 @@ Commit app source, \`package.json\`, and \`bun.lock\`. On a fresh clone, run \`b
15204
15232
  },
15205
15233
  },
15206
15234
  "packages": {
15207
- "@altertable/data-app": ["@altertable/data-app@0.73.0", "", { "dependencies": { "@internationalized/date": "3.12.4" } }, "sha512-JiNaFWAq0xryikh0B6rHQAEEHnxU22Hve+bOTy/6uQNBYEhkuogrXE6VoI4YBuWJdzj9KqQKO+uho+vOU7ZCIQ=="],
15235
+ "@altertable/data-app": ["@altertable/data-app@0.74.0", "", { "dependencies": { "@internationalized/date": "3.12.4" } }, "sha512-19Y72gkpid1tKXtesofrwe4oyBUp5FknQ0smgOa1Ilx+8Y/2Xu9F4lHlhAuJU3r0zlEj2Rb/AYZcWXTfUXKZhQ=="],
15208
15236
 
15209
- "@altertable/data-app-bun": ["@altertable/data-app-bun@0.73.0", "", { "dependencies": { "@altertable/data-app": "0.73.0", "@altertable/lakehouse": "0.4.1", "get-tsconfig": "4.14.3" }, "bin": { "data-app-preview": "bin/preview.js" } }, "sha512-bhgXGb0AHjSpfOljD+lwiyJzr+dDqmoMhnBc6YDx2BL8hAW7iSm9dpCqpoYsQGjyLW7dISxshUIfPlZ6TRiAaw=="],
15237
+ "@altertable/data-app-bun": ["@altertable/data-app-bun@0.74.0", "", { "dependencies": { "@altertable/data-app": "0.74.0", "@altertable/lakehouse": "0.4.1", "get-tsconfig": "4.14.3" }, "bin": { "data-app-preview": "bin/preview.js" } }, "sha512-zxGaxeG4hzCNcPv20a0ZgrUpFONL5fllzThSlzbYnFM2Tkva3WFP0/N70KF02SddzaboskN5ouqrdUAErq/4Dw=="],
15210
15238
 
15211
- "@altertable/data-app-react": ["@altertable/data-app-react@0.73.0", "", { "dependencies": { "@altertable/data-app": "0.73.0", "@floating-ui/react": "0.27.20", "@internationalized/date": "3.12.4", "@tanstack/react-query": "5.104.3", "fflate": "0.8.3", "fuzzysort": "4.0.2", "html-to-image": "1.11.13", "lucide-react": "1.59.0", "react-aria-components": "1.22.1", "recharts": "3.10.1" }, "peerDependencies": { "react": ">=19.2.0", "react-dom": ">=19.2.0" } }, "sha512-EJiGeX5YSnR6+qZLR6d6WQBOCx/IIvQj1xck+s6b1A45kdLK2GozBcfexQveuBq1RGG568oIdEvY2Zzel3UXTA=="],
15239
+ "@altertable/data-app-react": ["@altertable/data-app-react@0.74.0", "", { "dependencies": { "@altertable/data-app": "0.74.0", "@floating-ui/react": "0.27.20", "@internationalized/date": "3.12.4", "@tanstack/react-query": "5.104.3", "fflate": "0.8.3", "fuzzysort": "4.0.2", "html-to-image": "1.11.13", "lucide-react": "1.59.0", "react-aria-components": "1.22.1", "recharts": "3.10.1" }, "peerDependencies": { "react": ">=19.2.0", "react-dom": ">=19.2.0" } }, "sha512-E85+w7D1NpiJaIqLaVkHUzMU/TQxdM32NuMEvBAiPO/mclmpjSnvroU5ml/ZkMwX00b1MiKowSgKyyu6q2ckSw=="],
15212
15240
 
15213
15241
  "@altertable/lakehouse": ["@altertable/lakehouse@0.4.1", "", {}, "sha512-m7d15cWt+WUGW7lVw2KYGD+Se8MzO25G7SWSuFd+OasBxWmOJNa2IrgvOHGVEbnZ+kexTUy9NjAGQ69sG4V91w=="],
15214
15242
 
@@ -15518,9 +15546,9 @@ exact = true
15518
15546
  "build": "bun build src/index.html --outdir=dist --production"
15519
15547
  },
15520
15548
  "dependencies": {
15521
- "@altertable/data-app": "0.73.0",
15522
- "@altertable/data-app-bun": "0.73.0",
15523
- "@altertable/data-app-react": "0.73.0",
15549
+ "@altertable/data-app": "0.74.0",
15550
+ "@altertable/data-app-bun": "0.74.0",
15551
+ "@altertable/data-app-react": "0.74.0",
15524
15552
  "react": "19.3.0",
15525
15553
  "react-dom": "19.3.0"
15526
15554
  },
@@ -15681,23 +15709,23 @@ serveLocalApp({ page, operations, title: app.title });
15681
15709
  "": {
15682
15710
  "name": "data-app-file-preview",
15683
15711
  "dependencies": {
15684
- "@altertable/data-app": "0.73.0",
15685
- "@altertable/data-app-bun": "0.73.0",
15686
- "@altertable/data-app-manifest": "0.73.0",
15687
- "@altertable/data-app-react": "0.73.0",
15712
+ "@altertable/data-app": "0.74.0",
15713
+ "@altertable/data-app-bun": "0.74.0",
15714
+ "@altertable/data-app-manifest": "0.74.0",
15715
+ "@altertable/data-app-react": "0.74.0",
15688
15716
  "react": "19.3.0",
15689
15717
  "react-dom": "19.3.0",
15690
15718
  },
15691
15719
  },
15692
15720
  },
15693
15721
  "packages": {
15694
- "@altertable/data-app": ["@altertable/data-app@0.73.0", "", { "dependencies": { "@internationalized/date": "3.12.4" } }, "sha512-JiNaFWAq0xryikh0B6rHQAEEHnxU22Hve+bOTy/6uQNBYEhkuogrXE6VoI4YBuWJdzj9KqQKO+uho+vOU7ZCIQ=="],
15722
+ "@altertable/data-app": ["@altertable/data-app@0.74.0", "", { "dependencies": { "@internationalized/date": "3.12.4" } }, "sha512-19Y72gkpid1tKXtesofrwe4oyBUp5FknQ0smgOa1Ilx+8Y/2Xu9F4lHlhAuJU3r0zlEj2Rb/AYZcWXTfUXKZhQ=="],
15695
15723
 
15696
- "@altertable/data-app-bun": ["@altertable/data-app-bun@0.73.0", "", { "dependencies": { "@altertable/data-app": "0.73.0", "@altertable/lakehouse": "0.4.1", "get-tsconfig": "4.14.3" }, "bin": { "data-app-preview": "bin/preview.js" } }, "sha512-bhgXGb0AHjSpfOljD+lwiyJzr+dDqmoMhnBc6YDx2BL8hAW7iSm9dpCqpoYsQGjyLW7dISxshUIfPlZ6TRiAaw=="],
15724
+ "@altertable/data-app-bun": ["@altertable/data-app-bun@0.74.0", "", { "dependencies": { "@altertable/data-app": "0.74.0", "@altertable/lakehouse": "0.4.1", "get-tsconfig": "4.14.3" }, "bin": { "data-app-preview": "bin/preview.js" } }, "sha512-zxGaxeG4hzCNcPv20a0ZgrUpFONL5fllzThSlzbYnFM2Tkva3WFP0/N70KF02SddzaboskN5ouqrdUAErq/4Dw=="],
15697
15725
 
15698
- "@altertable/data-app-manifest": ["@altertable/data-app-manifest@0.73.0", "", { "dependencies": { "typescript": "5.9.3" } }, "sha512-68NC4KuB2YoyCU9+MGdRHpnUJX43D/DJ8UnmBZ7dG5LezgClBf/w7wpRfX9jx/OTwGsa0+bFgGnCLOEA+5cnqA=="],
15726
+ "@altertable/data-app-manifest": ["@altertable/data-app-manifest@0.74.0", "", { "dependencies": { "typescript": "5.9.3" } }, "sha512-PQEsKR1VpRkbXVn6LlmwlDBmPode0wlCJ9ivYlk4KKc9vgZcdHpjPuy+G+gaTKiIrYPJpxsLS0hcYxMENNoP2g=="],
15699
15727
 
15700
- "@altertable/data-app-react": ["@altertable/data-app-react@0.73.0", "", { "dependencies": { "@altertable/data-app": "0.73.0", "@floating-ui/react": "0.27.20", "@internationalized/date": "3.12.4", "@tanstack/react-query": "5.104.3", "fflate": "0.8.3", "fuzzysort": "4.0.2", "html-to-image": "1.11.13", "lucide-react": "1.59.0", "react-aria-components": "1.22.1", "recharts": "3.10.1" }, "peerDependencies": { "react": ">=19.2.0", "react-dom": ">=19.2.0" } }, "sha512-EJiGeX5YSnR6+qZLR6d6WQBOCx/IIvQj1xck+s6b1A45kdLK2GozBcfexQveuBq1RGG568oIdEvY2Zzel3UXTA=="],
15728
+ "@altertable/data-app-react": ["@altertable/data-app-react@0.74.0", "", { "dependencies": { "@altertable/data-app": "0.74.0", "@floating-ui/react": "0.27.20", "@internationalized/date": "3.12.4", "@tanstack/react-query": "5.104.3", "fflate": "0.8.3", "fuzzysort": "4.0.2", "html-to-image": "1.11.13", "lucide-react": "1.59.0", "react-aria-components": "1.22.1", "recharts": "3.10.1" }, "peerDependencies": { "react": ">=19.2.0", "react-dom": ">=19.2.0" } }, "sha512-E85+w7D1NpiJaIqLaVkHUzMU/TQxdM32NuMEvBAiPO/mclmpjSnvroU5ml/ZkMwX00b1MiKowSgKyyu6q2ckSw=="],
15701
15729
 
15702
15730
  "@altertable/lakehouse": ["@altertable/lakehouse@0.4.1", "", {}, "sha512-m7d15cWt+WUGW7lVw2KYGD+Se8MzO25G7SWSuFd+OasBxWmOJNa2IrgvOHGVEbnZ+kexTUy9NjAGQ69sG4V91w=="],
15703
15731
 
@@ -15853,12 +15881,12 @@ console.log(JSON.stringify(extractDataAppManifest(source)));
15853
15881
  "dev": "data-app-preview"
15854
15882
  },
15855
15883
  "dependencies": {
15856
- "@altertable/data-app": "0.73.0",
15857
- "@altertable/data-app-bun": "0.73.0",
15858
- "@altertable/data-app-react": "0.73.0",
15884
+ "@altertable/data-app": "0.74.0",
15885
+ "@altertable/data-app-bun": "0.74.0",
15886
+ "@altertable/data-app-react": "0.74.0",
15859
15887
  "react": "19.3.0",
15860
15888
  "react-dom": "19.3.0",
15861
- "@altertable/data-app-manifest": "0.73.0"
15889
+ "@altertable/data-app-manifest": "0.74.0"
15862
15890
  }
15863
15891
  }
15864
15892
  ` } };
@@ -25284,7 +25312,7 @@ var ROOT_ARGS = defineArguments({
25284
25312
  },
25285
25313
  "connect-timeout": {
25286
25314
  type: "string",
25287
- description: "HTTP connect timeout in seconds (default 5)",
25315
+ description: "HTTP connect timeout in seconds (default 30)",
25288
25316
  flagScope: "global"
25289
25317
  },
25290
25318
  "read-timeout": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altertable/cli",
3
- "version": "1.13.2",
3
+ "version": "1.13.3",
4
4
  "description": "Altertable CLI — query and manage your data platform",
5
5
  "homepage": "https://github.com/altertable-ai/altertable-cli#readme",
6
6
  "bugs": {
@@ -67,5 +67,5 @@
67
67
  "engines": {
68
68
  "bun": ">=1.1.0"
69
69
  },
70
- "packageManager": "bun@1.4.3"
70
+ "packageManager": "bun@1.4.4"
71
71
  }