@tscircuit/cli 0.1.110 → 0.1.111

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 +11 -9
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -433495,7 +433495,7 @@ var getGlobalDepsInstallCommand = (packageManager, deps) => {
433495
433495
  import { execSync as execSync2 } from "node:child_process";
433496
433496
  var import_semver = __toESM2(require_semver2(), 1);
433497
433497
  // package.json
433498
- var version = "0.1.109";
433498
+ var version = "0.1.110";
433499
433499
  var package_default = {
433500
433500
  name: "@tscircuit/cli",
433501
433501
  version,
@@ -439308,20 +439308,22 @@ class DevServer {
439308
439308
  async handleFileUpdatedEventFromServer(ev) {
439309
439309
  if (ev.initiator === "filesystem_change")
439310
439310
  return;
439311
- if (ev.file_path === "manual-edits.json") {
439312
- console.log("Manual edits updated, updating on filesystem...");
439313
- const { file } = await this.fsKy.get("api/files/get", {
439314
- searchParams: { file_path: ev.file_path }
439315
- }).json();
439316
- fs18.writeFileSync(path18.join(this.projectDir, "manual-edits.json"), file.text_content);
439311
+ const { file } = await this.fsKy.get("api/files/get", {
439312
+ searchParams: { file_path: ev.file_path }
439313
+ }).json();
439314
+ const fullPath = path18.join(this.projectDir, ev.file_path);
439315
+ const dirPath = path18.dirname(fullPath);
439316
+ if (!fs18.existsSync(dirPath)) {
439317
+ fs18.mkdirSync(dirPath, { recursive: true });
439317
439318
  }
439319
+ fs18.writeFileSync(fullPath, file.text_content);
439318
439320
  }
439319
439321
  async handleFileChangedOnFilesystem(absoluteFilePath) {
439320
439322
  const relativeFilePath = path18.relative(this.projectDir, absoluteFilePath);
439321
439323
  if (relativeFilePath.includes("manual-edits.json"))
439322
439324
  return;
439323
439325
  await this.typesHandler?.handleFileTypeDependencies(absoluteFilePath);
439324
- console.log(`${relativeFilePath} saved. Applying changes...`);
439326
+ console.log(kleur_default.green(`Saving: ${relativeFilePath}`));
439325
439327
  await this.fsKy.post("api/files/upsert", {
439326
439328
  json: {
439327
439329
  file_path: relativeFilePath,
@@ -439356,7 +439358,7 @@ class DevServer {
439356
439358
  console.error(`Network error deleting ${relativeFilePath}: ${error instanceof Error ? error.message : String(error)}`);
439357
439359
  return { error: "Connection error" };
439358
439360
  });
439359
- if (response && response.error) {
439361
+ if (response?.error) {
439360
439362
  if (response.error.includes("File not found")) {
439361
439363
  debug2(`File not found: ${relativeFilePath}`);
439362
439364
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.1.110",
3
+ "version": "0.1.111",
4
4
  "main": "dist/main.js",
5
5
  "devDependencies": {
6
6
  "@babel/standalone": "^7.26.9",