@tscircuit/cli 0.1.1110 → 0.1.1112

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 CHANGED
@@ -65,7 +65,7 @@ Commands:
65
65
  convert [options] <file> Convert a .kicad_mod footprint to a tscircuit
66
66
  component
67
67
  simulate Run a simulation
68
- version Print CLI version
68
+ version [options] Print CLI version
69
69
  help [command] display help for command
70
70
  ```
71
71
  <!-- END_HELP_OUTPUT -->
package/dist/cli/main.js CHANGED
@@ -97682,7 +97682,7 @@ var import_perfect_cli = __toESM2(require_dist2(), 1);
97682
97682
  // lib/getVersion.ts
97683
97683
  import { createRequire as createRequire2 } from "node:module";
97684
97684
  // package.json
97685
- var version = "0.1.1108";
97685
+ var version = "0.1.1111";
97686
97686
  var package_default = {
97687
97687
  name: "@tscircuit/cli",
97688
97688
  version,
@@ -108113,6 +108113,7 @@ import path38 from "node:path";
108113
108113
 
108114
108114
  // lib/shared/thread-worker-pool.ts
108115
108115
  import { Worker } from "node:worker_threads";
108116
+ var DEFAULT_WORKER_JOB_TIMEOUT_MS = 3 * 60 * 1000;
108116
108117
 
108117
108118
  class ThreadWorkerPool {
108118
108119
  workers = [];
@@ -108211,7 +108212,8 @@ class ThreadWorkerPool {
108211
108212
  }
108212
108213
  startJobTimeout(threadWorker) {
108213
108214
  this.clearWorkerTimeout(threadWorker);
108214
- if (!this.options.jobTimeoutMs || this.options.jobTimeoutMs <= 0) {
108215
+ const timeoutMs = this.options.jobTimeoutMs === undefined ? DEFAULT_WORKER_JOB_TIMEOUT_MS : this.options.jobTimeoutMs;
108216
+ if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
108215
108217
  return;
108216
108218
  }
108217
108219
  const job = threadWorker.currentJob;
@@ -108223,11 +108225,11 @@ class ThreadWorkerPool {
108223
108225
  if (!timedOutJob) {
108224
108226
  return;
108225
108227
  }
108226
- const timeoutError = new Error(`Worker job timed out after ${this.options.jobTimeoutMs}ms`);
108228
+ const timeoutError = new Error(`Worker job timed out after ${timeoutMs}ms`);
108227
108229
  timedOutJob.reject(timeoutError);
108228
108230
  this.replaceWorker(threadWorker);
108229
108231
  this.processQueue();
108230
- }, this.options.jobTimeoutMs);
108232
+ }, timeoutMs);
108231
108233
  }
108232
108234
  replaceWorker(threadWorker) {
108233
108235
  this.clearWorkerTimeout(threadWorker);
@@ -108362,7 +108364,7 @@ var getWorkerEntrypointPath = () => {
108362
108364
  };
108363
108365
  async function buildFilesWithWorkerPool(options) {
108364
108366
  const cancellationError = new Error("Build cancelled due fatal error");
108365
- const workerJobTimeoutMs = Number.parseInt(process.env.TSCIRCUIT_BUILD_WORKER_TIMEOUT_MS || "600000", 10);
108367
+ const workerJobTimeoutMs = Number.parseInt(process.env.TSCIRCUIT_BUILD_WORKER_TIMEOUT_MS || "180000", 10);
108366
108368
  const poolConcurrency = Math.max(1, Math.min(options.concurrency, options.files.length));
108367
108369
  const pool = new ThreadWorkerPool({
108368
108370
  concurrency: poolConcurrency,
package/dist/lib/index.js CHANGED
@@ -60445,7 +60445,7 @@ var getNodeHandler = (winterSpec, { port, middleware = [] }) => {
60445
60445
  }));
60446
60446
  };
60447
60447
  // package.json
60448
- var version = "0.1.1108";
60448
+ var version = "0.1.1111";
60449
60449
  var package_default = {
60450
60450
  name: "@tscircuit/cli",
60451
60451
  version,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.1.1110",
3
+ "version": "0.1.1112",
4
4
  "main": "dist/cli/main.js",
5
5
  "exports": {
6
6
  ".": "./dist/cli/main.js",