@tscircuit/cli 0.1.868 → 0.1.869

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.
@@ -2779,6 +2779,10 @@ var handleBuildFile = async (filePath, outputPath, projectDir, options) => {
2779
2779
  output_path: outputPath,
2780
2780
  circuit_json_path: outputPath,
2781
2781
  ok: false,
2782
+ isFatalError: {
2783
+ errorType: "circuit_generation_failed",
2784
+ message: errorMsg
2785
+ },
2782
2786
  errors,
2783
2787
  warnings
2784
2788
  };
package/dist/cli/main.js CHANGED
@@ -74384,7 +74384,7 @@ var getGlobalDepsInstallCommand = (packageManager, deps) => {
74384
74384
  import { execSync as execSync2 } from "node:child_process";
74385
74385
  var import_semver2 = __toESM2(require_semver2(), 1);
74386
74386
  // package.json
74387
- var version = "0.1.867";
74387
+ var version = "0.1.868";
74388
74388
  var package_default = {
74389
74389
  name: "@tscircuit/cli",
74390
74390
  main: "dist/cli/main.js",
@@ -173996,7 +173996,13 @@ var buildFile = async (input, output, projectDir, options) => {
173996
173996
  logTsxExtensionHint(err, input);
173997
173997
  logTypeReexportHint(err, input);
173998
173998
  }
173999
- return { ok: false };
173999
+ return {
174000
+ ok: false,
174001
+ isFatalError: {
174002
+ errorType: "circuit_generation_failed",
174003
+ message: err instanceof Error ? err.message : String(err)
174004
+ }
174005
+ };
174000
174006
  }
174001
174007
  };
174002
174008
  var logTsxExtensionHint = (error, entryFilePath) => {
@@ -175058,6 +175064,7 @@ class WorkerPool {
175058
175064
  filePath: completedMsg.file_path,
175059
175065
  outputPath: completedMsg.output_path,
175060
175066
  ok: completedMsg.ok,
175067
+ isFatalError: completedMsg.isFatalError,
175061
175068
  errors: completedMsg.errors,
175062
175069
  warnings: completedMsg.warnings
175063
175070
  });
@@ -175235,6 +175242,7 @@ var registerBuild = (program3) => {
175235
175242
  console.log(`Building ${circuitFiles.length} file(s)...`);
175236
175243
  }
175237
175244
  let hasErrors = false;
175245
+ let hasFatalErrors = false;
175238
175246
  const staticFileReferences = [];
175239
175247
  const builtFiles = [];
175240
175248
  const kicadProjects = [];
@@ -175254,6 +175262,10 @@ var registerBuild = (program3) => {
175254
175262
  });
175255
175263
  if (!buildOutcome.ok) {
175256
175264
  hasErrors = true;
175265
+ if (buildOutcome.isFatalError) {
175266
+ hasFatalErrors = true;
175267
+ console.error(kleur_default.red(`Fatal error [${buildOutcome.isFatalError.errorType}]: ${buildOutcome.isFatalError.message}`));
175268
+ }
175257
175269
  } else if (resolvedOptions?.site) {
175258
175270
  const normalizedSourcePath = relative10.split(path53.sep).join("/");
175259
175271
  const relativeOutputPath = path53.join(outputDirName, "circuit.json");
@@ -175322,7 +175334,8 @@ var registerBuild = (program3) => {
175322
175334
  }
175323
175335
  }
175324
175336
  await processBuildResult(result.filePath, result.outputPath, {
175325
- ok: result.ok
175337
+ ok: result.ok,
175338
+ isFatalError: result.isFatalError
175326
175339
  });
175327
175340
  }
175328
175341
  });
@@ -175332,7 +175345,7 @@ var registerBuild = (program3) => {
175332
175345
  } else {
175333
175346
  await buildSequentially();
175334
175347
  }
175335
- if (hasErrors && !resolvedOptions?.ignoreErrors) {
175348
+ if (hasFatalErrors || hasErrors && !resolvedOptions?.ignoreErrors) {
175336
175349
  process.exit(1);
175337
175350
  }
175338
175351
  const shouldGeneratePreviewImages = resolvedOptions?.previewImages || resolvedOptions?.allImages;
package/dist/lib/index.js CHANGED
@@ -60414,7 +60414,7 @@ var getNodeHandler = (winterSpec, { port, middleware = [] }) => {
60414
60414
  }));
60415
60415
  };
60416
60416
  // package.json
60417
- var version = "0.1.867";
60417
+ var version = "0.1.868";
60418
60418
  var package_default = {
60419
60419
  name: "@tscircuit/cli",
60420
60420
  main: "dist/cli/main.js",
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  ".": "./dist/cli/main.js",
6
6
  "./lib": "./dist/lib/index.js"
7
7
  },
8
- "version": "0.1.868",
8
+ "version": "0.1.869",
9
9
  "devDependencies": {
10
10
  "@babel/standalone": "^7.26.9",
11
11
  "@biomejs/biome": "^1.9.4",