@tscircuit/cli 0.1.1111 → 0.1.1113
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/cli/main.js +11 -5
- package/dist/lib/index.js +1 -1
- package/package.json +1 -1
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.
|
|
97685
|
+
var version = "0.1.1112";
|
|
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
|
-
|
|
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,15 @@ class ThreadWorkerPool {
|
|
|
108223
108225
|
if (!timedOutJob) {
|
|
108224
108226
|
return;
|
|
108225
108227
|
}
|
|
108226
|
-
const
|
|
108228
|
+
const jobDescription = this.describeJob(timedOutJob.job);
|
|
108229
|
+
this.options.onLog?.([
|
|
108230
|
+
`[worker-pool] timeout: task=${jobDescription} timeout_ms=${timeoutMs}; replacing worker`
|
|
108231
|
+
]);
|
|
108232
|
+
const timeoutError = new Error(`Worker job timed out after ${timeoutMs}ms`);
|
|
108227
108233
|
timedOutJob.reject(timeoutError);
|
|
108228
108234
|
this.replaceWorker(threadWorker);
|
|
108229
108235
|
this.processQueue();
|
|
108230
|
-
},
|
|
108236
|
+
}, timeoutMs);
|
|
108231
108237
|
}
|
|
108232
108238
|
replaceWorker(threadWorker) {
|
|
108233
108239
|
this.clearWorkerTimeout(threadWorker);
|
|
@@ -108362,7 +108368,7 @@ var getWorkerEntrypointPath = () => {
|
|
|
108362
108368
|
};
|
|
108363
108369
|
async function buildFilesWithWorkerPool(options) {
|
|
108364
108370
|
const cancellationError = new Error("Build cancelled due fatal error");
|
|
108365
|
-
const workerJobTimeoutMs = Number.parseInt(process.env.TSCIRCUIT_BUILD_WORKER_TIMEOUT_MS || "
|
|
108371
|
+
const workerJobTimeoutMs = Number.parseInt(process.env.TSCIRCUIT_BUILD_WORKER_TIMEOUT_MS || "180000", 10);
|
|
108366
108372
|
const poolConcurrency = Math.max(1, Math.min(options.concurrency, options.files.length));
|
|
108367
108373
|
const pool = new ThreadWorkerPool({
|
|
108368
108374
|
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.
|
|
60448
|
+
var version = "0.1.1112";
|
|
60449
60449
|
var package_default = {
|
|
60450
60450
|
name: "@tscircuit/cli",
|
|
60451
60451
|
version,
|