@altertable/cli 1.13.1 → 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 +74 -41
  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.1";
9182
+ var VERSION = "1.13.3";
9183
9183
  var USER_AGENT = `altertable-cli/${VERSION}`;
9184
9184
 
9185
9185
  // src/lib/http.ts
@@ -9200,7 +9200,9 @@ function getSharedDispatcher() {
9200
9200
  sharedDispatcherInitialized = true;
9201
9201
  sharedDispatcher = createDispatcher({
9202
9202
  keepAliveTimeout: 30000,
9203
- keepAliveMaxTimeout: 60000
9203
+ keepAliveMaxTimeout: 60000,
9204
+ headersTimeout: 0,
9205
+ bodyTimeout: 0
9204
9206
  });
9205
9207
  return sharedDispatcher;
9206
9208
  }
@@ -9214,6 +9216,8 @@ function getInsecureDispatcher() {
9214
9216
  insecureDispatcher = createDispatcher({
9215
9217
  keepAliveTimeout: 30000,
9216
9218
  keepAliveMaxTimeout: 60000,
9219
+ headersTimeout: 0,
9220
+ bodyTimeout: 0,
9217
9221
  connect: { rejectUnauthorized: false }
9218
9222
  });
9219
9223
  return insecureDispatcher;
@@ -9239,6 +9243,7 @@ function buildFetchInit(options, headers, signal) {
9239
9243
  headers,
9240
9244
  body: options.body,
9241
9245
  signal,
9246
+ timeout: false,
9242
9247
  dispatcher: ignoreSslErrors ? getInsecureDispatcher() : getSharedDispatcher(),
9243
9248
  ...ignoreSslErrors ? { tls: { rejectUnauthorized: false } } : {}
9244
9249
  };
@@ -9275,18 +9280,29 @@ function unwrapErrorDetail(error) {
9275
9280
  }
9276
9281
  return messages.join(": ");
9277
9282
  }
9278
- function timeoutError(options, cause) {
9279
- 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
+ });
9280
9296
  }
9281
9297
  function connectionError(options, cause) {
9282
9298
  const detail = unwrapErrorDetail(cause);
9283
9299
  const suffix = detail ? ` (${detail})` : "";
9284
9300
  return new NetworkError(`Request failed (network error): ${options.method} ${options.url}${suffix}`, { cause });
9285
9301
  }
9286
- function transportError(options, signal, cause) {
9287
- 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);
9288
9304
  }
9289
- function wrapResponseStream(stream, clearTimeoutAfterRead, signal, options) {
9305
+ function wrapResponseStream(stream, clearTimeoutAfterRead, signal, budget, options) {
9290
9306
  const reader = stream.getReader();
9291
9307
  return new ReadableStream({
9292
9308
  async pull(controller) {
@@ -9302,7 +9318,7 @@ function wrapResponseStream(stream, clearTimeoutAfterRead, signal, options) {
9302
9318
  } catch (error) {
9303
9319
  clearTimeoutAfterRead();
9304
9320
  reader.releaseLock();
9305
- controller.error(transportError(options, signal, error));
9321
+ controller.error(transportError(options, signal, budget, error));
9306
9322
  }
9307
9323
  },
9308
9324
  async cancel(reason) {
@@ -9486,6 +9502,11 @@ async function executeLiveRequest(options) {
9486
9502
  const headers = buildRequestHeaders(options);
9487
9503
  const timeoutMs = resolveFetchTimeoutMs(options);
9488
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
+ });
9489
9510
  logHttpRequest(options);
9490
9511
  logDebug(`Request: ${options.method} ${options.url}`);
9491
9512
  logHttpDebug([
@@ -9496,13 +9517,13 @@ async function executeLiveRequest(options) {
9496
9517
  try {
9497
9518
  response = await fetch(options.url, buildFetchInit(options, headers, signal));
9498
9519
  } catch (error) {
9499
- throw transportError(options, signal, error);
9520
+ throw transportError(options, signal, budget, error);
9500
9521
  }
9501
9522
  let responseBody;
9502
9523
  try {
9503
9524
  responseBody = await response.text();
9504
9525
  } catch (error) {
9505
- throw transportError(options, signal, error);
9526
+ throw transportError(options, signal, budget, error);
9506
9527
  }
9507
9528
  logHttpDebug([
9508
9529
  `< HTTP/${response.status}`,
@@ -9526,11 +9547,23 @@ async function executeLiveStream(options) {
9526
9547
  clearTimeout(timeout);
9527
9548
  timeout = undefined;
9528
9549
  };
9529
- 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) => {
9530
9557
  clearActiveTimeout();
9531
- 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"
9532
9565
  };
9533
- startTimeout(connectTimeoutMs);
9566
+ startTimeout(activeBudget);
9534
9567
  logHttpRequest(options);
9535
9568
  logDebug(`Request: ${options.method} ${options.url}`);
9536
9569
  let response;
@@ -9539,25 +9572,25 @@ async function executeLiveStream(options) {
9539
9572
  clearActiveTimeout();
9540
9573
  } catch (error) {
9541
9574
  clearActiveTimeout();
9542
- throw transportError(options, abortController.signal, error);
9575
+ throw transportError(options, abortController.signal, budget, error);
9543
9576
  }
9544
9577
  if (response.status >= 200 && response.status < 300) {
9545
9578
  if (!response.body) {
9546
9579
  throw new NetworkError("Response body is missing.");
9547
9580
  }
9548
9581
  if (readTimeoutMs > 0) {
9549
- startTimeout(readTimeoutMs);
9582
+ startTimeout(readBudget);
9550
9583
  }
9551
- return wrapResponseStream(response.body, clearActiveTimeout, abortController.signal, options);
9584
+ return wrapResponseStream(response.body, clearActiveTimeout, abortController.signal, budget, options);
9552
9585
  }
9553
9586
  if (readTimeoutMs > 0) {
9554
- startTimeout(readTimeoutMs);
9587
+ startTimeout(readBudget);
9555
9588
  }
9556
9589
  let responseBody;
9557
9590
  try {
9558
9591
  responseBody = await response.text();
9559
9592
  } catch (error) {
9560
- throw transportError(options, abortController.signal, error);
9593
+ throw transportError(options, abortController.signal, budget, error);
9561
9594
  } finally {
9562
9595
  clearActiveTimeout();
9563
9596
  }
@@ -15181,9 +15214,9 @@ Commit app source, \`package.json\`, and \`bun.lock\`. On a fresh clone, run \`b
15181
15214
  "": {
15182
15215
  "name": "data-app-starter",
15183
15216
  "dependencies": {
15184
- "@altertable/data-app": "0.73.0",
15185
- "@altertable/data-app-bun": "0.73.0",
15186
- "@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",
15187
15220
  "react": "19.3.0",
15188
15221
  "react-dom": "19.3.0",
15189
15222
  },
@@ -15199,11 +15232,11 @@ Commit app source, \`package.json\`, and \`bun.lock\`. On a fresh clone, run \`b
15199
15232
  },
15200
15233
  },
15201
15234
  "packages": {
15202
- "@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=="],
15203
15236
 
15204
- "@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=="],
15205
15238
 
15206
- "@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=="],
15207
15240
 
15208
15241
  "@altertable/lakehouse": ["@altertable/lakehouse@0.4.1", "", {}, "sha512-m7d15cWt+WUGW7lVw2KYGD+Se8MzO25G7SWSuFd+OasBxWmOJNa2IrgvOHGVEbnZ+kexTUy9NjAGQ69sG4V91w=="],
15209
15242
 
@@ -15513,9 +15546,9 @@ exact = true
15513
15546
  "build": "bun build src/index.html --outdir=dist --production"
15514
15547
  },
15515
15548
  "dependencies": {
15516
- "@altertable/data-app": "0.73.0",
15517
- "@altertable/data-app-bun": "0.73.0",
15518
- "@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",
15519
15552
  "react": "19.3.0",
15520
15553
  "react-dom": "19.3.0"
15521
15554
  },
@@ -15676,23 +15709,23 @@ serveLocalApp({ page, operations, title: app.title });
15676
15709
  "": {
15677
15710
  "name": "data-app-file-preview",
15678
15711
  "dependencies": {
15679
- "@altertable/data-app": "0.73.0",
15680
- "@altertable/data-app-bun": "0.73.0",
15681
- "@altertable/data-app-manifest": "0.73.0",
15682
- "@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",
15683
15716
  "react": "19.3.0",
15684
15717
  "react-dom": "19.3.0",
15685
15718
  },
15686
15719
  },
15687
15720
  },
15688
15721
  "packages": {
15689
- "@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=="],
15690
15723
 
15691
- "@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=="],
15692
15725
 
15693
- "@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=="],
15694
15727
 
15695
- "@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=="],
15696
15729
 
15697
15730
  "@altertable/lakehouse": ["@altertable/lakehouse@0.4.1", "", {}, "sha512-m7d15cWt+WUGW7lVw2KYGD+Se8MzO25G7SWSuFd+OasBxWmOJNa2IrgvOHGVEbnZ+kexTUy9NjAGQ69sG4V91w=="],
15698
15731
 
@@ -15848,12 +15881,12 @@ console.log(JSON.stringify(extractDataAppManifest(source)));
15848
15881
  "dev": "data-app-preview"
15849
15882
  },
15850
15883
  "dependencies": {
15851
- "@altertable/data-app": "0.73.0",
15852
- "@altertable/data-app-bun": "0.73.0",
15853
- "@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",
15854
15887
  "react": "19.3.0",
15855
15888
  "react-dom": "19.3.0",
15856
- "@altertable/data-app-manifest": "0.73.0"
15889
+ "@altertable/data-app-manifest": "0.74.0"
15857
15890
  }
15858
15891
  }
15859
15892
  ` } };
@@ -25279,7 +25312,7 @@ var ROOT_ARGS = defineArguments({
25279
25312
  },
25280
25313
  "connect-timeout": {
25281
25314
  type: "string",
25282
- description: "HTTP connect timeout in seconds (default 5)",
25315
+ description: "HTTP connect timeout in seconds (default 30)",
25283
25316
  flagScope: "global"
25284
25317
  },
25285
25318
  "read-timeout": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altertable/cli",
3
- "version": "1.13.1",
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
  }