@tscircuit/cli 0.1.500 → 0.1.501

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/main.js +15 -1
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -72387,7 +72387,7 @@ var getGlobalDepsInstallCommand = (packageManager, deps) => {
72387
72387
  import { execSync as execSync2 } from "node:child_process";
72388
72388
  var import_semver2 = __toESM2(require_semver2(), 1);
72389
72389
  // package.json
72390
- var version = "0.1.499";
72390
+ var version = "0.1.500";
72391
72391
  var package_default = {
72392
72392
  name: "@tscircuit/cli",
72393
72393
  version,
@@ -77713,6 +77713,19 @@ var findSelectableTsxFiles = (projectDir) => {
77713
77713
  });
77714
77714
  return files.map((file) => path21.resolve(projectDir, file)).filter((file) => fs21.existsSync(file)).sort();
77715
77715
  };
77716
+ var warnIfTsconfigMissingTscircuitType = (projectDir) => {
77717
+ const tsconfigPath = path21.join(projectDir, "tsconfig.json");
77718
+ if (!fs21.existsSync(tsconfigPath)) {
77719
+ return;
77720
+ }
77721
+ try {
77722
+ const tsconfig = JSON.parse(fs21.readFileSync(tsconfigPath, "utf-8"));
77723
+ const types = tsconfig?.compilerOptions?.types;
77724
+ if (!Array.isArray(types) || !types.includes("tscircuit")) {
77725
+ console.warn(kleur_default.yellow('Warning: "tscircuit" is missing from tsconfig.json compilerOptions.types. Add it (e.g. "types": ["tscircuit"]) to ensure CLI-provided types work correctly.'));
77726
+ }
77727
+ } catch {}
77728
+ };
77716
77729
  var registerDev = (program3) => {
77717
77730
  program3.command("dev").description("Start development server for a package").argument("[file]", "Path to the package file").option("-p, --port <number>", "Port to run server on", "3020").action(async (file, options) => {
77718
77731
  let port = parseInt(options.port);
@@ -77755,6 +77768,7 @@ var registerDev = (program3) => {
77755
77768
  console.log("Selected file:", path21.relative(process.cwd(), absolutePath));
77756
77769
  }
77757
77770
  }
77771
+ warnIfTsconfigMissingTscircuitType(process.cwd());
77758
77772
  try {
77759
77773
  process.stdout.write(kleur_default.gray("Installing types for imported packages..."));
77760
77774
  await installNodeModuleTypesForSnippet(absolutePath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.1.500",
3
+ "version": "0.1.501",
4
4
  "main": "dist/main.js",
5
5
  "devDependencies": {
6
6
  "@babel/standalone": "^7.26.9",