@tscircuit/cli 0.1.928 → 0.1.929

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 CHANGED
@@ -74387,7 +74387,7 @@ var getGlobalDepsInstallCommand = (packageManager, deps) => {
74387
74387
  import { execSync as execSync2 } from "node:child_process";
74388
74388
  var import_semver2 = __toESM2(require_semver2(), 1);
74389
74389
  // package.json
74390
- var version = "0.1.927";
74390
+ var version = "0.1.928";
74391
74391
  var package_default = {
74392
74392
  name: "@tscircuit/cli",
74393
74393
  main: "dist/cli/main.js",
@@ -174824,14 +174824,16 @@ async function getBuildEntrypoints({
174824
174824
  var getStaticIndexHtmlFile = ({
174825
174825
  files,
174826
174826
  standaloneScriptSrc = "./standalone.min.js",
174827
- defaultMainComponentPath
174827
+ defaultMainComponentPath,
174828
+ packageName
174828
174829
  }) => {
174829
174830
  const scriptLines = [
174830
174831
  "window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI = false;",
174831
174832
  `window.TSCIRCUIT_RUNFRAME_STATIC_FILE_LIST = ${JSON.stringify(files)};`,
174832
174833
  ...defaultMainComponentPath ? [
174833
174834
  `window.TSCIRCUIT_DEFAULT_MAIN_COMPONENT_PATH = ${JSON.stringify(defaultMainComponentPath)};`
174834
- ] : []
174835
+ ] : [],
174836
+ ...packageName ? [`window.TSCIRCUIT_PACKAGE_NAME = ${JSON.stringify(packageName)};`] : []
174835
174837
  ];
174836
174838
  const scriptBlock = ` <script>
174837
174839
  ${scriptLines.join(`
@@ -175927,10 +175929,13 @@ var registerBuild = (program3) => {
175927
175929
  } else {
175928
175930
  fs54.writeFileSync(path55.join(distDir, "standalone.min.js"), standalone_min_default);
175929
175931
  }
175932
+ const pkgJsonPath = path55.join(projectDir, "package.json");
175933
+ const packageName = fs54.existsSync(pkgJsonPath) ? JSON.parse(fs54.readFileSync(pkgJsonPath, "utf-8")).name : undefined;
175930
175934
  const indexHtml = getStaticIndexHtmlFile({
175931
175935
  files: staticFileReferences,
175932
175936
  standaloneScriptSrc,
175933
- defaultMainComponentPath: siteDefaultComponentPath ? normalizeRelativePath(projectDir, siteDefaultComponentPath) : undefined
175937
+ defaultMainComponentPath: siteDefaultComponentPath ? normalizeRelativePath(projectDir, siteDefaultComponentPath) : undefined,
175938
+ packageName: packageName || path55.basename(projectDir)
175934
175939
  });
175935
175940
  fs54.writeFileSync(path55.join(distDir, "index.html"), indexHtml);
175936
175941
  }
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.927";
60417
+ var version = "0.1.928";
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.928",
8
+ "version": "0.1.929",
9
9
  "devDependencies": {
10
10
  "@babel/standalone": "^7.26.9",
11
11
  "@biomejs/biome": "^1.9.4",