@tscircuit/cli 0.1.2437 → 0.1.2438

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
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/cli/main.js
3
- size: 47717011 bytes
4
- sha256: ab1429ab26a8c96d1410fe5979ba0a016bc2f763ceb03bcb2bd1ffb8ea34e741
3
+ size: 47717514 bytes
4
+ sha256: a677a6cd82d8d46da60647f71f79a674c76c29639238fd97795e8d313b6cf85c
package/dist/lib/index.js CHANGED
@@ -70009,7 +70009,7 @@ __export3(exports_dist, {
70009
70009
  // lib/server/createHttpServer.ts
70010
70010
  import * as fs17 from "node:fs";
70011
70011
  import * as http from "node:http";
70012
- import { createRequire as createRequire3 } from "node:module";
70012
+ import { createRequire as createRequire4 } from "node:module";
70013
70013
  import * as path20 from "node:path";
70014
70014
 
70015
70015
  // node_modules/@tscircuit/runframe/dist/standalone.min.js
@@ -71620,6 +71620,17 @@ function getTscircuitDependencyVersion(packageName) {
71620
71620
  throw new Error(`Cannot find the installed version of ${packageName}`);
71621
71621
  }
71622
71622
 
71623
+ // lib/shared/read-tscircuit-browser-bundle.ts
71624
+ import { readFileSync } from "node:fs";
71625
+ import { createRequire as createRequire2 } from "node:module";
71626
+ var readTscircuitBrowserBundle = (parent) => {
71627
+ try {
71628
+ return readFileSync(createRequire2(parent).resolve("tscircuit/browser"), "utf8");
71629
+ } catch {
71630
+ return;
71631
+ }
71632
+ };
71633
+
71623
71634
  // node_modules/@tscircuit/file-server/dist/bundle.js
71624
71635
  var import_next_route_matcher3 = __toESM3(require_dist5(), 1);
71625
71636
  // node_modules/winterspec/dist/config/config.js
@@ -81926,7 +81937,7 @@ function deriveComponentNameFromPath(filePath) {
81926
81937
  }
81927
81938
 
81928
81939
  // lib/shared/importFromUserLand.ts
81929
- import { createRequire as createRequire2 } from "node:module";
81940
+ import { createRequire as createRequire3 } from "node:module";
81930
81941
  import path11 from "node:path";
81931
81942
  import { pathToFileURL as pathToFileURL2 } from "node:url";
81932
81943
  async function importFromUserLand(moduleName, projectDir = process.cwd()) {
@@ -81939,7 +81950,7 @@ async function importFromUserLand(moduleName, projectDir = process.cwd()) {
81939
81950
  resolved = resolve(moduleName, parent);
81940
81951
  } catch (error) {
81941
81952
  if (error?.code === "ERR_PACKAGE_PATH_NOT_EXPORTED") {
81942
- resolved = pathToFileURL2(createRequire2(parent).resolve(moduleName)).href;
81953
+ resolved = pathToFileURL2(createRequire3(parent).resolve(moduleName)).href;
81943
81954
  } else if (error?.code === "ERR_MODULE_NOT_FOUND") {
81944
81955
  continue;
81945
81956
  } else {
@@ -83364,7 +83375,7 @@ var resolveLocalTscircuitStandalonePath = (projectDir) => {
83364
83375
  if (!projectDir)
83365
83376
  return;
83366
83377
  try {
83367
- const projectRequire = createRequire3(path20.join(projectDir, "package.json"));
83378
+ const projectRequire = createRequire4(path20.join(projectDir, "package.json"));
83368
83379
  const browserBundlePath = projectRequire.resolve("tscircuit/browser");
83369
83380
  if (fs17.existsSync(browserBundlePath))
83370
83381
  return browserBundlePath;
@@ -83532,7 +83543,7 @@ var createHttpServer = async ({
83532
83543
  res.writeHead(200, {
83533
83544
  "Content-Type": "application/javascript; charset=utf-8"
83534
83545
  });
83535
- res.end(standalone_min_default);
83546
+ res.end(readTscircuitBrowserBundle(import.meta.url) ?? standalone_min_default);
83536
83547
  return;
83537
83548
  }
83538
83549
  const explicitStandalonePath = process.env.RUNFRAME_STANDALONE_FILE_PATH;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.1.2437",
3
+ "version": "0.1.2438",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/tscircuit/cli"