@tscircuit/cli 0.1.2340 → 0.1.2341
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 -3
- 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: 46848058 bytes
|
|
4
|
+
sha256: a9a34838db004d73d2a635c708cb1997626a339f15beae225ab1b9ac2dd204c2
|
package/dist/lib/index.js
CHANGED
|
@@ -71825,6 +71825,12 @@ var getPartsEngineBaseUrls = () => {
|
|
|
71825
71825
|
|
|
71826
71826
|
// lib/site/getIndex.ts
|
|
71827
71827
|
var getIndex = async (mainComponentPath, fileServerApiBaseUrl, jscdnBaseUrl) => {
|
|
71828
|
+
const standalone = process.env.TSCIRCUIT_STANDALONE === "1";
|
|
71829
|
+
const evalVersion = package_default.devDependencies["@tscircuit/eval"];
|
|
71830
|
+
const standaloneScript = standalone ? `
|
|
71831
|
+
window.TSCIRCUIT_LATEST_EVAL_VERSION = ${JSON.stringify(evalVersion)};
|
|
71832
|
+
window.TSCIRCUIT_ALLOW_SELECTING_EVAL_VERSION = false;
|
|
71833
|
+
window.TSCIRCUIT_TELEMETRY_DISABLED = true;` : "";
|
|
71828
71834
|
const sessionToken = getSessionToken();
|
|
71829
71835
|
const tokenScript = sessionToken ? `
|
|
71830
71836
|
window.TSCIRCUIT_REGISTRY_TOKEN = ${JSON.stringify(sessionToken)};` : "";
|
|
@@ -71838,14 +71844,14 @@ var getIndex = async (mainComponentPath, fileServerApiBaseUrl, jscdnBaseUrl) =>
|
|
|
71838
71844
|
return `<html>
|
|
71839
71845
|
<head>
|
|
71840
71846
|
<meta charset="UTF-8" />
|
|
71841
|
-
<link rel="icon" type="image/png" href="https://github.com/tscircuit.png">
|
|
71847
|
+
${standalone ? '<link rel="icon" href="data:,">' : '<link rel="icon" type="image/png" href="https://github.com/tscircuit.png">'}
|
|
71842
71848
|
</head>
|
|
71843
71849
|
<body>
|
|
71844
71850
|
<script>
|
|
71845
71851
|
${mainComponentPath ? `window.TSCIRCUIT_DEFAULT_MAIN_COMPONENT_PATH = "${mainComponentPath}";` : ""}
|
|
71846
|
-
window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI = true;${tokenScript}${fileServerApiScript}${jscdnScript}${partsEngineScript}
|
|
71852
|
+
window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI = true;${tokenScript}${fileServerApiScript}${jscdnScript}${partsEngineScript}${standaloneScript}
|
|
71847
71853
|
</script>
|
|
71848
|
-
<script src="https://cdn.tailwindcss.com"></script>
|
|
71854
|
+
${standalone ? "" : '<script src="https://cdn.tailwindcss.com"></script>'}
|
|
71849
71855
|
<div id="root">loading...</div>
|
|
71850
71856
|
<script>
|
|
71851
71857
|
globalThis.process = { env: { NODE_ENV: "production" } }
|
|
@@ -80842,6 +80848,13 @@ var createHttpServer = async ({
|
|
|
80842
80848
|
}
|
|
80843
80849
|
}
|
|
80844
80850
|
if (url.pathname === "/standalone.min.js") {
|
|
80851
|
+
if (process.env.TSCIRCUIT_STANDALONE === "1") {
|
|
80852
|
+
res.writeHead(200, {
|
|
80853
|
+
"Content-Type": "application/javascript; charset=utf-8"
|
|
80854
|
+
});
|
|
80855
|
+
res.end(standalone_min_default);
|
|
80856
|
+
return;
|
|
80857
|
+
}
|
|
80845
80858
|
const explicitStandalonePath = process.env.RUNFRAME_STANDALONE_FILE_PATH;
|
|
80846
80859
|
if (!explicitStandalonePath) {
|
|
80847
80860
|
const localStandalonePath = resolveLocalTscircuitStandalonePath(projectDir);
|