@tscircuit/cli 0.1.231 → 0.1.232

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 +35 -17
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -63256,7 +63256,7 @@ var getGlobalDepsInstallCommand = (packageManager, deps) => {
63256
63256
  import { execSync as execSync2 } from "node:child_process";
63257
63257
  var import_semver2 = __toESM2(require_semver2(), 1);
63258
63258
  // package.json
63259
- var version = "0.1.230";
63259
+ var version = "0.1.231";
63260
63260
  var package_default = {
63261
63261
  name: "@tscircuit/cli",
63262
63262
  version,
@@ -173728,30 +173728,48 @@ async function getBuildEntrypoints({
173728
173728
  rootDir = process.cwd()
173729
173729
  }) {
173730
173730
  const resolvedRoot = path27.resolve(rootDir);
173731
+ const buildFromProjectDir = async (projectDir2) => {
173732
+ const files = globbySync(["**/*.board.tsx", "**/*.circuit.tsx"], {
173733
+ cwd: projectDir2,
173734
+ ignore: DEFAULT_IGNORED_PATTERNS
173735
+ });
173736
+ if (files.length > 0) {
173737
+ return {
173738
+ projectDir: projectDir2,
173739
+ circuitFiles: files.map((f) => path27.join(projectDir2, f))
173740
+ };
173741
+ }
173742
+ const mainEntrypoint = await getEntrypoint({
173743
+ projectDir: projectDir2,
173744
+ onSuccess: () => {
173745
+ return;
173746
+ },
173747
+ onError: () => {
173748
+ return;
173749
+ }
173750
+ });
173751
+ if (mainEntrypoint) {
173752
+ return {
173753
+ projectDir: projectDir2,
173754
+ mainEntrypoint,
173755
+ circuitFiles: [mainEntrypoint]
173756
+ };
173757
+ }
173758
+ return {
173759
+ projectDir: projectDir2,
173760
+ circuitFiles: []
173761
+ };
173762
+ };
173731
173763
  if (fileOrDir) {
173732
173764
  const resolved = path27.resolve(resolvedRoot, fileOrDir);
173733
173765
  if (fs28.existsSync(resolved) && fs28.statSync(resolved).isDirectory()) {
173734
173766
  const projectDir2 = resolved;
173735
- const files2 = globbySync(["**/*.board.tsx", "**/*.circuit.tsx"], {
173736
- cwd: projectDir2,
173737
- ignore: DEFAULT_IGNORED_PATTERNS
173738
- });
173739
- return {
173740
- projectDir: projectDir2,
173741
- circuitFiles: files2.map((f) => path27.join(projectDir2, f))
173742
- };
173767
+ return buildFromProjectDir(projectDir2);
173743
173768
  }
173744
173769
  return { projectDir: path27.dirname(resolved), circuitFiles: [resolved] };
173745
173770
  }
173746
173771
  const projectDir = resolvedRoot;
173747
- const files = globbySync(["**/*.board.tsx", "**/*.circuit.tsx"], {
173748
- cwd: projectDir,
173749
- ignore: DEFAULT_IGNORED_PATTERNS
173750
- });
173751
- return {
173752
- projectDir,
173753
- circuitFiles: files.map((f) => path27.join(projectDir, f))
173754
- };
173772
+ return buildFromProjectDir(projectDir);
173755
173773
  }
173756
173774
 
173757
173775
  // lib/site/getStaticIndexHtmlFile.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.1.231",
3
+ "version": "0.1.232",
4
4
  "main": "dist/main.js",
5
5
  "devDependencies": {
6
6
  "@babel/standalone": "^7.26.9",