@tscircuit/cli 0.1.1051 → 0.1.1053

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.
@@ -11489,7 +11489,7 @@ var require_semver2 = __commonJS((exports, module) => {
11489
11489
  };
11490
11490
  });
11491
11491
 
11492
- // cli/build/build-worker-entrypoint.ts
11492
+ // cli/build/build.worker.ts
11493
11493
  import { parentPort } from "node:worker_threads";
11494
11494
 
11495
11495
  // cli/build/worker-build-handlers.ts
@@ -13408,7 +13408,7 @@ var handleBuildFile = async (filePath, outputPath, glbOutputPath, previewOutputD
13408
13408
  let glbError;
13409
13409
  let previewOk;
13410
13410
  let previewError;
13411
- if (glbOutputPath && !hasErrors) {
13411
+ if (glbOutputPath) {
13412
13412
  try {
13413
13413
  workerLog(`Converting ${path13.relative(projectDir, outputPath)} to GLB in same worker...`);
13414
13414
  await writeGlbFromCircuitJson(circuitJson, glbOutputPath);
@@ -13419,7 +13419,7 @@ var handleBuildFile = async (filePath, outputPath, glbOutputPath, previewOutputD
13419
13419
  workerLog(`GLB conversion error: ${glbError}`);
13420
13420
  }
13421
13421
  }
13422
- if (options?.generatePreviewAssets && !hasErrors) {
13422
+ if (options?.generatePreviewAssets) {
13423
13423
  try {
13424
13424
  const resolvedPreviewOutputDir = previewOutputDir ?? path13.dirname(outputPath);
13425
13425
  workerLog(`Generating preview assets for ${path13.relative(projectDir, resolvedPreviewOutputDir)} in same worker...`);
@@ -13442,7 +13442,8 @@ var handleBuildFile = async (filePath, outputPath, glbOutputPath, previewOutputD
13442
13442
  glb_error: glbError,
13443
13443
  preview_ok: previewOk,
13444
13444
  preview_error: previewError,
13445
- ok: !hasErrors,
13445
+ ok: true,
13446
+ hasErrors,
13446
13447
  errors,
13447
13448
  warnings,
13448
13449
  durationMs: options?.profile ? performance.now() - startedAt : undefined
@@ -13459,6 +13460,7 @@ var handleBuildFile = async (filePath, outputPath, glbOutputPath, previewOutputD
13459
13460
  glb_output_path: glbOutputPath,
13460
13461
  preview_output_dir: previewOutputDir,
13461
13462
  ok: false,
13463
+ hasErrors: true,
13462
13464
  isFatalError: {
13463
13465
  errorType: "circuit_generation_failed",
13464
13466
  message: errorMsg
@@ -13470,7 +13472,7 @@ var handleBuildFile = async (filePath, outputPath, glbOutputPath, previewOutputD
13470
13472
  }
13471
13473
  };
13472
13474
 
13473
- // cli/build/build-worker-entrypoint.ts
13475
+ // cli/build/build.worker.ts
13474
13476
  if (!parentPort) {
13475
13477
  throw new Error("This file must be run as a worker thread");
13476
13478
  }