@remix_labs/machine-starter 2.2819.0-dev → 2.2822.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,20 @@ 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;
355
354
  case 'tauri':
356
- return await MixcoreTauri.create(config.workspace, config.app);
355
+ mixcore = await MixcoreTauri.create(config.workspace, config.app);
357
356
  default:
358
357
  return;
359
358
  }
360
- }
361
359
 
362
- async function mixcoreLocalFFIs(mixcore, enableFFIs, disableFFIs) {
363
360
  let names = await mixcore.ffiNames();
364
361
  names = filterFFINames(names, enableFFIs, disableFFIs);
362
+
365
363
  let localFFIs = {};
366
364
  for (let name of names) {
367
365
  localFFIs[name] = {
@@ -369,6 +367,7 @@ async function mixcoreLocalFFIs(mixcore, enableFFIs, disableFFIs) {
369
367
  run: (conn, argsBuf) => mixcore.ffiDispatch(conn.call_id, name, argsBuf),
370
368
  };
371
369
  }
370
+
372
371
  return localFFIs;
373
372
  }
374
373
 
@@ -1,2 +1,2 @@
1
- var GROOVEBOX_BUILD = "3095";
1
+ var GROOVEBOX_BUILD = "3101";
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.2822.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.2822.0-dev",
15
15
  "nanoid": "^5.0.2",
16
16
  "web-worker": "^1.2.0"
17
17
  },