@remix_labs/machine-starter 2.2819.0-dev → 2.2824.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
@@ -1,6 +1,6 @@
1
1
  import { GROOVEBOX_BUILD } from "./groovebox_build.js";
2
2
  import { nanoid } from "nanoid";
3
- import { MixcoreTauri } from "./mixcore.lib.mjs";
3
+ import { MixcoreTauri, filterFFINames } from "./mixcore.lib.mjs";
4
4
 
5
5
  let workers = {};
6
6
  let children = {};
@@ -64,10 +64,9 @@ async function StartWASM2(hub, config) {
64
64
  let worker = globalThis.GetMachineWASMWorker();
65
65
  workers[config.vmID] = worker;
66
66
  let localFFIs = config.localFFIs || {};
67
- let mixcore = await getMixcore(config.mixcore);
68
- if (mixcore) {
69
- let ffis = await mixcoreLocalFFIs(mixcore, config.mixcore.enableFFIs, config.mixcore.disableFFIs);
70
- Object.assign(localFFIs, ffis);
67
+ let mixcoreFFIs = await getMixcoreFFIs(config.mixcore);
68
+ if (mixcoreFFIs) {
69
+ Object.assign(localFFIs, mixcoreFFIs);
71
70
  delete config.mixcore;
72
71
  }
73
72
  let localFFIkind = {};
@@ -347,21 +346,22 @@ class FFIComm {
347
346
  }
348
347
  }
349
348
 
350
- async function getMixcore(config) {
349
+ async function getMixcoreFFIs(config) {
351
350
  let mixcore;
352
351
  switch (config?.kind) {
353
352
  case 'mixcore':
354
- return config.mixcore;
353
+ mixcore = config.mixcore;
354
+ break;
355
355
  case 'tauri':
356
- return await MixcoreTauri.create(config.workspace, config.app);
356
+ mixcore = await MixcoreTauri.create(config.workspace, config.app);
357
+ break;
357
358
  default:
358
359
  return;
359
360
  }
360
- }
361
361
 
362
- async function mixcoreLocalFFIs(mixcore, enableFFIs, disableFFIs) {
363
362
  let names = await mixcore.ffiNames();
364
363
  names = filterFFINames(names, enableFFIs, disableFFIs);
364
+
365
365
  let localFFIs = {};
366
366
  for (let name of names) {
367
367
  localFFIs[name] = {
@@ -369,6 +369,7 @@ async function mixcoreLocalFFIs(mixcore, enableFFIs, disableFFIs) {
369
369
  run: (conn, argsBuf) => mixcore.ffiDispatch(conn.call_id, name, argsBuf),
370
370
  };
371
371
  }
372
+
372
373
  return localFFIs;
373
374
  }
374
375
 
@@ -1,2 +1,2 @@
1
- var GROOVEBOX_BUILD = "3095";
1
+ var GROOVEBOX_BUILD = "3103";
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.2819.0-dev",
3
+ "version": "2.2824.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.2819.0-dev",
14
+ "@remix_labs/hub-client": "2.2824.0-dev",
15
15
  "nanoid": "^5.0.2",
16
16
  "web-worker": "^1.2.0"
17
17
  },