@remix_labs/machine-starter 2.3205.0-dev → 2.3207.0-dev

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/common.js CHANGED
@@ -2,6 +2,8 @@ import { GROOVEBOX_BUILD } from "./groovebox_build.js";
2
2
  import { nanoid } from "nanoid";
3
3
  import { MixcoreTauri, filterFFINames } from "./mixcore.lib.mjs";
4
4
 
5
+ const DEBUG_QUEUES = 2048;
6
+
5
7
  let last_hub = null;
6
8
 
7
9
  let workers = {};
@@ -360,7 +362,8 @@ async function localFFIsMessageLoop(hub, config, localFFIs, terminate) {
360
362
  let call_id = msg.payload.call_id;
361
363
  let args = decode(msg.payload.args);
362
364
  let fun = localFFIs[name];
363
- // console.log("[machine-starter] local FFI call", vmID, call_id, name);
365
+ if (initialMask & DEBUG_QUEUES)
366
+ console.debug("[groovebox-starter] local FFI call", vmID, call_id, name);
364
367
  try {
365
368
  if (!fun) throw new Error("No such local FFI in groovebox starter: " + name);
366
369
  let connector =
@@ -373,13 +376,23 @@ async function localFFIsMessageLoop(hub, config, localFFIs, terminate) {
373
376
  let r = fun instanceof Function ? fun(connector, args) : fun.run(connector, args);
374
377
  if (r instanceof Promise) {
375
378
  // r.catch(_ => null); // prevent "unhandled rejection"
379
+ if (initialMask & DEBUG_QUEUES)
380
+ console.debug("[groovebox-starter] running FFI call asynchronously", vmID, call_id, name);
376
381
  await comm.later(call_id);
377
382
  let value = await r;
383
+ if (initialMask & DEBUG_QUEUES)
384
+ console.debug("[groovebox-starter] async FFI call returned", vmID, call_id, name);
378
385
  await comm.returnOrFail(fun, call_id, value);
379
386
  } else {
387
+ if (initialMask & DEBUG_QUEUES)
388
+ console.debug("[groovebox-starter] sync FFI call returned", vmID, call_id, name);
380
389
  await comm.returnOrFail(fun, call_id, r);
381
390
  }
382
391
  } catch (reason) {
392
+ if (initialMask & DEBUG_QUEUES) {
393
+ console.debug("[groovebox-starter] FFI call exception", vmID, call_id, name);
394
+ console.debug("[groovebox-starter] exception", reason);
395
+ };
383
396
  await comm.error(call_id, reason.message, reason.stack);
384
397
  }
385
398
  }
@@ -480,6 +493,7 @@ async function getMixcoreFFIs(config) {
480
493
  mixcore = await MixcoreTauri.create(config.workspace, config.app);
481
494
  break;
482
495
  default:
496
+ console.warn("[machine-starter] not going to configure mixcore - kind: ", config?.kind);
483
497
  return;
484
498
  }
485
499
 
@@ -1,2 +1,2 @@
1
- var GROOVEBOX_BUILD = "3205";
1
+ var GROOVEBOX_BUILD = "3207";
2
2
  export { GROOVEBOX_BUILD }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remix_labs/machine-starter",
3
- "version": "2.3205.0-dev",
3
+ "version": "2.3207.0-dev",
4
4
  "description": "start the groove",
5
5
  "main": "node.js",
6
6
  "browser": "index.js",
@@ -11,7 +11,7 @@
11
11
  "author": "Remixlabs staff",
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
- "@remix_labs/hub-client": "2.3205.0-dev",
14
+ "@remix_labs/hub-client": "2.3207.0-dev",
15
15
  "nanoid": "^5.0.2",
16
16
  "web-worker": "^1.2.0"
17
17
  },