@tscircuit/cli 0.1.2437 → 0.1.2439
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 +2 -2
- package/dist/lib/index.js +16 -5
- package/package.json +1 -1
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:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 47717514 bytes
|
|
4
|
+
sha256: 609650002ba6aff86deac01f5217a5bc6dbc83e3b4874ecb12731bc0f83314b4
|
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
|
|
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
|
|
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(
|
|
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 =
|
|
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;
|