@tscircuit/cli 0.1.186 → 0.1.187
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 +29 -10
- package/package.json +5 -4
package/dist/main.js
CHANGED
|
@@ -62951,7 +62951,7 @@ var getGlobalDepsInstallCommand = (packageManager, deps) => {
|
|
|
62951
62951
|
import { execSync as execSync2 } from "node:child_process";
|
|
62952
62952
|
var import_semver2 = __toESM2(require_semver2(), 1);
|
|
62953
62953
|
// package.json
|
|
62954
|
-
var version = "0.1.
|
|
62954
|
+
var version = "0.1.186";
|
|
62955
62955
|
var package_default = {
|
|
62956
62956
|
name: "@tscircuit/cli",
|
|
62957
62957
|
version,
|
|
@@ -62987,6 +62987,7 @@ var package_default = {
|
|
|
62987
62987
|
"dsn-converter": "^0.0.63",
|
|
62988
62988
|
"get-port": "^7.1.0",
|
|
62989
62989
|
globby: "^14.1.0",
|
|
62990
|
+
"jscad-fiber": "^0.0.82",
|
|
62990
62991
|
jsonwebtoken: "^9.0.2",
|
|
62991
62992
|
"jwt-decode": "^4.0.0",
|
|
62992
62993
|
kleur: "^4.1.5",
|
|
@@ -62997,7 +62998,7 @@ var package_default = {
|
|
|
62997
62998
|
redaxios: "^0.5.1",
|
|
62998
62999
|
semver: "^7.6.3",
|
|
62999
63000
|
tempy: "^3.1.0",
|
|
63000
|
-
tscircuit: "^0.0.
|
|
63001
|
+
tscircuit: "^0.0.559-libonly",
|
|
63001
63002
|
tsx: "^4.7.1",
|
|
63002
63003
|
"typed-ky": "^0.0.4",
|
|
63003
63004
|
zod: "3"
|
|
@@ -63010,7 +63011,7 @@ var package_default = {
|
|
|
63010
63011
|
},
|
|
63011
63012
|
peerDependenciesMeta: {
|
|
63012
63013
|
tscircuit: {
|
|
63013
|
-
optional:
|
|
63014
|
+
optional: false
|
|
63014
63015
|
}
|
|
63015
63016
|
},
|
|
63016
63017
|
bin: {
|
|
@@ -63026,7 +63027,7 @@ var package_default = {
|
|
|
63026
63027
|
setup: "bun run build && npm install -g .",
|
|
63027
63028
|
build: "bun run build:bun",
|
|
63028
63029
|
"build:bun": "bun run scripts/bun-build.ts",
|
|
63029
|
-
smoketest: "docker build -f Dockerfile.smoketest .",
|
|
63030
|
+
smoketest: "docker build --progress=plain -f Dockerfile.smoketest .",
|
|
63030
63031
|
format: "biome format --write .",
|
|
63031
63032
|
"format:check": "biome format .",
|
|
63032
63033
|
cli: "bun ./cli/main.ts",
|
|
@@ -69270,9 +69271,8 @@ var debug10 = Debug10("dsn-converter:parse-dsn-to-dsn-json");
|
|
|
69270
69271
|
|
|
69271
69272
|
// lib/shared/generate-circuit-json.tsx
|
|
69272
69273
|
var import_make_vfs2 = __toESM2(require_dist8(), 1);
|
|
69273
|
-
import { RootCircuit } from "tscircuit";
|
|
69274
69274
|
import path21 from "node:path/posix";
|
|
69275
|
-
import { relative as
|
|
69275
|
+
import { relative as relative7 } from "node:path";
|
|
69276
69276
|
import fs21 from "node:fs";
|
|
69277
69277
|
import Debug11 from "debug";
|
|
69278
69278
|
|
|
@@ -69290,6 +69290,23 @@ var abbreviateStringifyObject = (obj) => {
|
|
|
69290
69290
|
})));
|
|
69291
69291
|
};
|
|
69292
69292
|
|
|
69293
|
+
// lib/shared/importFromUserLand.ts
|
|
69294
|
+
import { resolve as resolve9 } from "node:path";
|
|
69295
|
+
async function importFromUserLand(moduleName) {
|
|
69296
|
+
try {
|
|
69297
|
+
const resolvedPath = import.meta.resolve(moduleName, resolve9(process.cwd(), "dummy.js"));
|
|
69298
|
+
return await import(resolvedPath);
|
|
69299
|
+
} catch (error) {
|
|
69300
|
+
try {
|
|
69301
|
+
const modulePath = await Bun.resolve(moduleName, process.cwd());
|
|
69302
|
+
return await import(modulePath);
|
|
69303
|
+
} catch (error2) {
|
|
69304
|
+
const module2 = await import(moduleName);
|
|
69305
|
+
return module2;
|
|
69306
|
+
}
|
|
69307
|
+
}
|
|
69308
|
+
}
|
|
69309
|
+
|
|
69293
69310
|
// lib/shared/generate-circuit-json.tsx
|
|
69294
69311
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
69295
69312
|
var debug11 = Debug11("tsci:generate-circuit-json");
|
|
@@ -69310,12 +69327,13 @@ async function generateCircuitJson({
|
|
|
69310
69327
|
platformConfig
|
|
69311
69328
|
}) {
|
|
69312
69329
|
debug11(`Generating circuit JSON for ${filePath}`);
|
|
69313
|
-
const
|
|
69330
|
+
const userLandTscircuit = await importFromUserLand("tscircuit");
|
|
69331
|
+
const runner = new userLandTscircuit.RootCircuit({
|
|
69314
69332
|
platform: platformConfig
|
|
69315
69333
|
});
|
|
69316
69334
|
const projectDir = path21.dirname(filePath);
|
|
69317
69335
|
const resolvedOutputDir = outputDir || projectDir;
|
|
69318
|
-
const relativeComponentPath =
|
|
69336
|
+
const relativeComponentPath = relative7(projectDir, filePath);
|
|
69319
69337
|
const baseFileName = outputFileName || path21.basename(filePath).replace(/\.[^.]+$/, "");
|
|
69320
69338
|
const outputPath = path21.join(resolvedOutputDir, `${baseFileName}.circuit.json`);
|
|
69321
69339
|
debug11(`Project directory: ${projectDir}`);
|
|
@@ -69683,6 +69701,7 @@ var buildFile = async (input, output, projectDir, options) => {
|
|
|
69683
69701
|
for (const err of errors) {
|
|
69684
69702
|
const msg = err.message || JSON.stringify(err);
|
|
69685
69703
|
console.error(kleur_default.red(msg));
|
|
69704
|
+
console.log(err.stack);
|
|
69686
69705
|
}
|
|
69687
69706
|
}
|
|
69688
69707
|
if (errors.length > 0 && !options?.ignoreErrors) {
|
|
@@ -69739,8 +69758,8 @@ var registerBuild = (program3) => {
|
|
|
69739
69758
|
fs25.mkdirSync(distDir, { recursive: true });
|
|
69740
69759
|
let hasErrors = false;
|
|
69741
69760
|
for (const filePath of circuitFiles) {
|
|
69742
|
-
const
|
|
69743
|
-
const outputDirName =
|
|
69761
|
+
const relative8 = path25.relative(projectDir, filePath);
|
|
69762
|
+
const outputDirName = relative8.replace(/(\.board|\.circuit)?\.tsx$/, "");
|
|
69744
69763
|
const outputPath = path25.join(distDir, outputDirName, "circuit.json");
|
|
69745
69764
|
const ok = await buildFile(filePath, outputPath, projectDir, options);
|
|
69746
69765
|
if (!ok)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.187",
|
|
4
4
|
"main": "dist/main.js",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@babel/standalone": "^7.26.9",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"dsn-converter": "^0.0.63",
|
|
34
34
|
"get-port": "^7.1.0",
|
|
35
35
|
"globby": "^14.1.0",
|
|
36
|
+
"jscad-fiber": "^0.0.82",
|
|
36
37
|
"jsonwebtoken": "^9.0.2",
|
|
37
38
|
"jwt-decode": "^4.0.0",
|
|
38
39
|
"kleur": "^4.1.5",
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
"redaxios": "^0.5.1",
|
|
44
45
|
"semver": "^7.6.3",
|
|
45
46
|
"tempy": "^3.1.0",
|
|
46
|
-
"tscircuit": "^0.0.
|
|
47
|
+
"tscircuit": "^0.0.559-libonly",
|
|
47
48
|
"tsx": "^4.7.1",
|
|
48
49
|
"typed-ky": "^0.0.4",
|
|
49
50
|
"zod": "3"
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
},
|
|
57
58
|
"peerDependenciesMeta": {
|
|
58
59
|
"tscircuit": {
|
|
59
|
-
"optional":
|
|
60
|
+
"optional": false
|
|
60
61
|
}
|
|
61
62
|
},
|
|
62
63
|
"bin": {
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
"setup": "bun run build && npm install -g .",
|
|
73
74
|
"build": "bun run build:bun",
|
|
74
75
|
"build:bun": "bun run scripts/bun-build.ts",
|
|
75
|
-
"smoketest": "docker build -f Dockerfile.smoketest .",
|
|
76
|
+
"smoketest": "docker build --progress=plain -f Dockerfile.smoketest .",
|
|
76
77
|
"format": "biome format --write .",
|
|
77
78
|
"format:check": "biome format .",
|
|
78
79
|
"cli": "bun ./cli/main.ts",
|