@tscircuit/cli 0.1.338 → 0.1.339
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 +9 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -72193,7 +72193,7 @@ var getGlobalDepsInstallCommand = (packageManager, deps) => {
|
|
|
72193
72193
|
import { execSync as execSync2 } from "node:child_process";
|
|
72194
72194
|
var import_semver2 = __toESM2(require_semver2(), 1);
|
|
72195
72195
|
// package.json
|
|
72196
|
-
var version = "0.1.
|
|
72196
|
+
var version = "0.1.338";
|
|
72197
72197
|
var package_default = {
|
|
72198
72198
|
name: "@tscircuit/cli",
|
|
72199
72199
|
version,
|
|
@@ -76911,6 +76911,7 @@ class DevServer {
|
|
|
76911
76911
|
this.eventsWatcher = new EventsWatcher(`http://localhost:${this.port}`);
|
|
76912
76912
|
this.eventsWatcher.start();
|
|
76913
76913
|
this.eventsWatcher.on("FILE_UPDATED", this.handleFileUpdatedEventFromServer.bind(this));
|
|
76914
|
+
this.eventsWatcher.on("FILE_DELETED", this.handleFileDeletedEventFromServer.bind(this));
|
|
76914
76915
|
this.eventsWatcher.on("REQUEST_TO_SAVE_SNIPPET", this.saveSnippet.bind(this));
|
|
76915
76916
|
this.eventsWatcher.on("INSTALL_PACKAGE", (event) => this.handleInstallPackage(event.full_package_name));
|
|
76916
76917
|
this.filesystemWatcher = watch(this.projectDir, {
|
|
@@ -76944,6 +76945,13 @@ class DevServer {
|
|
|
76944
76945
|
fs18.writeFileSync(fullPath, file.text_content ?? "", "utf-8");
|
|
76945
76946
|
}
|
|
76946
76947
|
}
|
|
76948
|
+
async handleFileDeletedEventFromServer(ev) {
|
|
76949
|
+
const fullPath = path18.join(this.projectDir, ev.file_path);
|
|
76950
|
+
if (fs18.existsSync(fullPath)) {
|
|
76951
|
+
debug2(`Deleting file ${ev.file_path} from filesystem`);
|
|
76952
|
+
fs18.unlinkSync(fullPath);
|
|
76953
|
+
}
|
|
76954
|
+
}
|
|
76947
76955
|
async handleFileChangedOnFilesystem(absoluteFilePath) {
|
|
76948
76956
|
const relativeFilePath = path18.relative(this.projectDir, absoluteFilePath);
|
|
76949
76957
|
if (relativeFilePath.includes("manual-edits.json"))
|