@tscircuit/cli 0.1.45 → 0.1.46
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 +6 -8
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -395497,7 +395497,7 @@ var package_default = {
|
|
|
395497
395497
|
name: "@tscircuit/cli",
|
|
395498
395498
|
main: "dist/main.js",
|
|
395499
395499
|
type: "module",
|
|
395500
|
-
version: "0.1.
|
|
395500
|
+
version: "0.1.45",
|
|
395501
395501
|
bin: {
|
|
395502
395502
|
tsci: "./dist/main.js"
|
|
395503
395503
|
},
|
|
@@ -398972,19 +398972,17 @@ circuit.add(<MyCircuit />)
|
|
|
398972
398972
|
}
|
|
398973
398973
|
}
|
|
398974
398974
|
async saveSnippet() {
|
|
398975
|
-
const postEvent = async (event) => this.fsKy.post("api/events/create", {
|
|
398976
|
-
json: { event_type: event },
|
|
398975
|
+
const postEvent = async (event, message) => this.fsKy.post("api/events/create", {
|
|
398976
|
+
json: { event_type: event, ...message ? { message } : {} },
|
|
398977
398977
|
throwHttpErrors: false
|
|
398978
398978
|
});
|
|
398979
398979
|
await pushSnippet({
|
|
398980
398980
|
filePath: this.componentFilePath,
|
|
398981
|
-
onExit: (
|
|
398982
|
-
console.error("Failed to save snippet", e);
|
|
398983
|
-
postEvent("FAILED_TO_SAVE_SNIPPET");
|
|
398981
|
+
onExit: () => {
|
|
398984
398982
|
},
|
|
398985
398983
|
onError: (e) => {
|
|
398986
|
-
console.error("Failed to save snippet", e);
|
|
398987
|
-
postEvent("FAILED_TO_SAVE_SNIPPET");
|
|
398984
|
+
console.error("Failed to save snippet:- ", e);
|
|
398985
|
+
postEvent("FAILED_TO_SAVE_SNIPPET", e);
|
|
398988
398986
|
},
|
|
398989
398987
|
onSuccess: () => {
|
|
398990
398988
|
postEvent("SNIPPET_SAVED");
|