@tscircuit/cli 0.1.292 → 0.1.293
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/main.js +8 -5
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -87533,7 +87533,7 @@ var getGlobalDepsInstallCommand = (packageManager, deps) => {
|
|
|
87533
87533
|
import { execSync as execSync2 } from "node:child_process";
|
|
87534
87534
|
var import_semver2 = __toESM2(require_semver2(), 1);
|
|
87535
87535
|
// package.json
|
|
87536
|
-
var version = "0.1.
|
|
87536
|
+
var version = "0.1.292";
|
|
87537
87537
|
var package_default = {
|
|
87538
87538
|
name: "@tscircuit/cli",
|
|
87539
87539
|
version,
|
|
@@ -87614,7 +87614,7 @@ var package_default = {
|
|
|
87614
87614
|
],
|
|
87615
87615
|
scripts: {
|
|
87616
87616
|
start: "bun run dev",
|
|
87617
|
-
dev: "bun --hot ./cli/main.ts dev ./
|
|
87617
|
+
dev: "bun --hot ./cli/main.ts dev ./examples/basic/index.circuit.tsx",
|
|
87618
87618
|
setup: "bun run build && npm install -g .",
|
|
87619
87619
|
build: "bun run build:bun",
|
|
87620
87620
|
"build:bun": "bun run scripts/bun-build.ts",
|
|
@@ -89377,17 +89377,19 @@ var winterSpec = {
|
|
|
89377
89377
|
var stdin_default = winterSpec;
|
|
89378
89378
|
|
|
89379
89379
|
// lib/site/getIndex.ts
|
|
89380
|
-
var getIndex = async (mainComponentPath) => {
|
|
89380
|
+
var getIndex = async (mainComponentPath, fileServerApiBaseUrl) => {
|
|
89381
89381
|
const sessionToken = getSessionToken();
|
|
89382
89382
|
const tokenScript = sessionToken ? `
|
|
89383
89383
|
window.TSCIRCUIT_REGISTRY_TOKEN = ${JSON.stringify(sessionToken)};` : "";
|
|
89384
|
+
const fileServerApiScript = fileServerApiBaseUrl ? `
|
|
89385
|
+
window.TSCIRCUIT_FILESERVER_API_BASE_URL = ${JSON.stringify(fileServerApiBaseUrl)};` : "";
|
|
89384
89386
|
return `<html>
|
|
89385
89387
|
<head>
|
|
89386
89388
|
</head>
|
|
89387
89389
|
<body>
|
|
89388
89390
|
<script>
|
|
89389
89391
|
${mainComponentPath ? `window.TSCIRCUIT_DEFAULT_MAIN_COMPONENT_PATH = "${mainComponentPath}";` : ""}
|
|
89390
|
-
window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI = true;${tokenScript}
|
|
89392
|
+
window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI = true;${tokenScript}${fileServerApiScript}
|
|
89391
89393
|
</script>
|
|
89392
89394
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
89393
89395
|
<div id="root">loading...</div>
|
|
@@ -89433,7 +89435,8 @@ var createHttpServer = async ({
|
|
|
89433
89435
|
return;
|
|
89434
89436
|
}
|
|
89435
89437
|
if (url.pathname === "/") {
|
|
89436
|
-
const
|
|
89438
|
+
const fileServerApiBaseUrl = `http://${req.headers.host}/api`;
|
|
89439
|
+
const html = await getIndex(defaultMainComponentPath, fileServerApiBaseUrl);
|
|
89437
89440
|
res.writeHead(200, { "Content-Type": "text/html" });
|
|
89438
89441
|
res.end(html);
|
|
89439
89442
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.293",
|
|
4
4
|
"main": "dist/main.js",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@babel/standalone": "^7.26.9",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
],
|
|
79
79
|
"scripts": {
|
|
80
80
|
"start": "bun run dev",
|
|
81
|
-
"dev": "bun --hot ./cli/main.ts dev ./
|
|
81
|
+
"dev": "bun --hot ./cli/main.ts dev ./examples/basic/index.circuit.tsx",
|
|
82
82
|
"setup": "bun run build && npm install -g .",
|
|
83
83
|
"build": "bun run build:bun",
|
|
84
84
|
"build:bun": "bun run scripts/bun-build.ts",
|