fluidcad 0.0.13 → 0.0.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluidcad",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "Parametric CAD modeling library using javascript",
5
5
  "author": "Marwan Aouida <contact@marwan.dev>",
6
6
  "homepage": "https://fluidcad.io",
@@ -174,22 +174,30 @@ async function handleExtensionMessage(msg) {
174
174
  broadcastToUI({ type: 'processing-file' });
175
175
  currentFile = msg.fileName;
176
176
  }
177
- const data = await fluidCadServer.updateLiveCode(msg.fileName, msg.code);
178
- if (myVersion !== renderVersion) {
179
- return;
177
+ try {
178
+ const data = await fluidCadServer.updateLiveCode(msg.fileName, msg.code);
179
+ if (myVersion !== renderVersion) {
180
+ return;
181
+ }
182
+ if (data) {
183
+ sendToExtension({
184
+ type: 'scene-rendered',
185
+ absPath: data.absPath,
186
+ result: data.result,
187
+ rollbackStop: data.rollbackStop,
188
+ });
189
+ broadcastToUI({
190
+ type: 'scene-rendered',
191
+ result: data.result,
192
+ absPath: data.absPath,
193
+ });
194
+ }
180
195
  }
181
- if (data) {
182
- sendToExtension({
183
- type: 'scene-rendered',
184
- absPath: data.absPath,
185
- result: data.result,
186
- rollbackStop: data.rollbackStop,
187
- });
188
- broadcastToUI({
189
- type: 'scene-rendered',
190
- result: data.result,
191
- absPath: data.absPath,
192
- });
196
+ catch {
197
+ // Silently ignore errors during live-update (syntax errors, incomplete
198
+ // expressions, etc. while the user is typing). The last successful
199
+ // render remains visible. Model-building errors are delivered separately
200
+ // via scene-rendered object properties and are not affected.
193
201
  }
194
202
  break;
195
203
  }