@soundworks/core 5.3.0 → 5.4.0

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": "@soundworks/core",
3
- "version": "5.3.0",
3
+ "version": "5.4.0",
4
4
  "description": "Open-source creative coding framework for distributed applications based on Web technologies",
5
5
  "collaborators": [
6
6
  "Benjamin Matuszewski",
@@ -230,6 +230,17 @@ class BaseStateManager {
230
230
  this.#status = 'inited';
231
231
  }
232
232
 
233
+ /**
234
+ * Validates the given class description.
235
+ *
236
+ * @throws Throws if the class description is invalid
237
+ * @param {*} classDescription
238
+ * @returns undefined
239
+ */
240
+ validateClassDescription(classDescription) {
241
+ return ParameterBag.validateDescription(classDescription);
242
+ }
243
+
233
244
  /**
234
245
  * Return a class description from a given class name
235
246
  *
@@ -214,11 +214,19 @@ class SharedState {
214
214
  this.#clearTransport();
215
215
 
216
216
  for (let callback of this.#onDetachCallbacks) {
217
- await callback();
217
+ try {
218
+ await callback();
219
+ } catch (err) {
220
+ console.log(err.message);
221
+ }
218
222
  }
219
223
 
220
224
  for (let callback of this.#onDeleteCallbacks) {
221
- await callback();
225
+ try {
226
+ await callback();
227
+ } catch (err) {
228
+ console.log(err.message);
229
+ }
222
230
  }
223
231
 
224
232
  this.#onDetachCallbacks.clear();
@@ -240,7 +248,11 @@ class SharedState {
240
248
  this.#clearTransport();
241
249
 
242
250
  for (let callback of this.#onDetachCallbacks) {
243
- await callback();
251
+ try {
252
+ await callback();
253
+ } catch (err) {
254
+ console.log(err.message);
255
+ }
244
256
  }
245
257
 
246
258
  this.#onDetachCallbacks.clear();
@@ -1,2 +1,2 @@
1
1
  // [WARNING] This file is generated, do not edit
2
- export default '5.3.0';
2
+ export default '5.4.0';
@@ -28,6 +28,14 @@ export type stateManagerDeleteObserveCallback = () => any;
28
28
  */
29
29
  /** @private */
30
30
  declare class BaseStateManager {
31
+ /**
32
+ * Validates the given class description.
33
+ *
34
+ * @throws Throws if the class description is invalid
35
+ * @param {*} classDescription
36
+ * @returns undefined
37
+ */
38
+ validateClassDescription(classDescription: any): void;
31
39
  /**
32
40
  * Return a class description from a given class name
33
41
  *
@@ -1,2 +1,2 @@
1
- declare const _default: "5.3.0";
1
+ declare const _default: "5.4.0";
2
2
  export default _default;