@tscircuit/cli 0.1.1285 → 0.1.1286
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 +11 -2
- package/dist/lib/index.js +1 -1
- package/package.json +1 -1
package/dist/cli/main.js
CHANGED
|
@@ -99964,7 +99964,7 @@ var import_perfect_cli = __toESM2(require_dist2(), 1);
|
|
|
99964
99964
|
// lib/getVersion.ts
|
|
99965
99965
|
import { createRequire as createRequire2 } from "node:module";
|
|
99966
99966
|
// package.json
|
|
99967
|
-
var version = "0.1.
|
|
99967
|
+
var version = "0.1.1285";
|
|
99968
99968
|
var package_default = {
|
|
99969
99969
|
name: "@tscircuit/cli",
|
|
99970
99970
|
version,
|
|
@@ -252041,6 +252041,13 @@ var OUTPUT_EXTENSIONS = {
|
|
|
252041
252041
|
srj: ".simple-route.json",
|
|
252042
252042
|
step: ".step"
|
|
252043
252043
|
};
|
|
252044
|
+
var isRecord = (value) => typeof value === "object" && value !== null;
|
|
252045
|
+
var unwrapSimpleRouteJson = (value) => {
|
|
252046
|
+
if (isRecord(value) && isRecord(value.simpleRouteJson) && (("connections" in value.simpleRouteJson) || ("obstacles" in value.simpleRouteJson) || ("bounds" in value.simpleRouteJson))) {
|
|
252047
|
+
return value.simpleRouteJson;
|
|
252048
|
+
}
|
|
252049
|
+
return value;
|
|
252050
|
+
};
|
|
252044
252051
|
var exportSnippet = async ({
|
|
252045
252052
|
filePath,
|
|
252046
252053
|
format,
|
|
@@ -252131,7 +252138,9 @@ var exportSnippet = async ({
|
|
|
252131
252138
|
case "srj":
|
|
252132
252139
|
{
|
|
252133
252140
|
const userLandTscircuit = await importFromUserLand("tscircuit");
|
|
252134
|
-
const simpleRouteJson = userLandTscircuit.getSimpleRouteJsonFromCircuitJson({
|
|
252141
|
+
const simpleRouteJson = unwrapSimpleRouteJson(userLandTscircuit.getSimpleRouteJsonFromCircuitJson({
|
|
252142
|
+
circuitJson
|
|
252143
|
+
}));
|
|
252135
252144
|
outputContent = JSON.stringify(simpleRouteJson, null, 2);
|
|
252136
252145
|
}
|
|
252137
252146
|
break;
|
package/dist/lib/index.js
CHANGED
|
@@ -65661,7 +65661,7 @@ var getNodeHandler = (winterSpec, { port, middleware = [] }) => {
|
|
|
65661
65661
|
}));
|
|
65662
65662
|
};
|
|
65663
65663
|
// package.json
|
|
65664
|
-
var version = "0.1.
|
|
65664
|
+
var version = "0.1.1285";
|
|
65665
65665
|
var package_default = {
|
|
65666
65666
|
name: "@tscircuit/cli",
|
|
65667
65667
|
version,
|