@tscircuit/cli 0.1.843 → 0.1.844

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.
Files changed (2) hide show
  1. package/dist/main.js +9 -6
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -74307,7 +74307,7 @@ var getGlobalDepsInstallCommand = (packageManager, deps) => {
74307
74307
  import { execSync as execSync2 } from "node:child_process";
74308
74308
  var import_semver2 = __toESM2(require_semver2(), 1);
74309
74309
  // package.json
74310
- var version = "0.1.842";
74310
+ var version = "0.1.843";
74311
74311
  var package_default = {
74312
74312
  name: "@tscircuit/cli",
74313
74313
  version,
@@ -79725,7 +79725,8 @@ function resolveKicadLibraryName({
79725
79725
  async function buildKicadPcm({
79726
79726
  entryFile,
79727
79727
  projectDir,
79728
- distDir
79728
+ distDir,
79729
+ baseUrl: baseUrlOption
79729
79730
  }) {
79730
79731
  const packageJsonPath = path16.join(projectDir, "package.json");
79731
79732
  if (!fs13.existsSync(packageJsonPath)) {
@@ -79750,7 +79751,7 @@ async function buildKicadPcm({
79750
79751
  });
79751
79752
  const pcmOutputDir = path16.join(distDir, "pcm");
79752
79753
  const envDeploymentUrl = process.env.TSCIRCUIT_DEPLOYMENT_URL?.replace(/\/+$/, "");
79753
- const baseUrl = envDeploymentUrl ?? `https://${author}--${packageName}.tscircuit.app`;
79754
+ const baseUrl = baseUrlOption ?? envDeploymentUrl ?? `https://${author}--${packageName}.tscircuit.app`;
79754
79755
  console.log("Generating PCM assets...");
79755
79756
  await generatePcmAssets({
79756
79757
  packageName,
@@ -80284,7 +80285,8 @@ var getSourceFilesChecksum = (projectDir) => {
80284
80285
  };
80285
80286
  var createKicadPcmProxy = ({
80286
80287
  projectDir,
80287
- entryFile
80288
+ entryFile,
80289
+ port
80288
80290
  }) => {
80289
80291
  const pcmState = {
80290
80292
  lastBuildTime: 0,
@@ -80318,7 +80320,8 @@ Rebuilding KiCad PCM assets...`));
80318
80320
  pcmState.buildPromise = buildKicadPcm({
80319
80321
  entryFile,
80320
80322
  projectDir,
80321
- distDir
80323
+ distDir,
80324
+ baseUrl: `http://localhost:${port}`
80322
80325
  }).then(() => {
80323
80326
  pcmState.lastFileChecksum = currentChecksum;
80324
80327
  pcmState.lastBuildTime = Date.now();
@@ -80374,7 +80377,7 @@ var createHttpServer = async ({
80374
80377
  entryFile
80375
80378
  }) => {
80376
80379
  const fileServerHandler = getNodeHandler(stdin_default, {});
80377
- const pcmProxy = kicadPcm && projectDir && entryFile ? createKicadPcmProxy({ projectDir, entryFile }) : null;
80380
+ const pcmProxy = kicadPcm && projectDir && entryFile ? createKicadPcmProxy({ projectDir, entryFile, port }) : null;
80378
80381
  const server = http.createServer(async (req, res) => {
80379
80382
  const url = new URL(req.url, `http://${req.headers.host}`);
80380
80383
  if (url.pathname === "/standalone.min.js") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.1.843",
3
+ "version": "0.1.844",
4
4
  "main": "dist/main.js",
5
5
  "devDependencies": {
6
6
  "@babel/standalone": "^7.26.9",