@remix_labs/machine-starter 2.3359.0-dev → 2.3364.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 { createMixcoreStarterFFIs } from "./mixcore-groovebox-starter.lib.mjs";
3
+ import { createStarterMixcore } from "./mixcore-groovebox-starter.lib.mjs";
4
4
 
5
5
  const DEBUG_STATE = 4;
6
6
 
@@ -126,10 +126,10 @@ async function StartWASM2(hub, config) {
126
126
  let starterFFIs = config.localFFIs || {};
127
127
  // from now on, the "local" FFIs are called "starter" FFIs, because this
128
128
  // distinguishes these from other locally defined FFIs
129
- let mixcoreFFIs = await createMixcoreStarterFFIs(config.mixcore);
130
- if (mixcoreFFIs) {
129
+ let mixcore = await createStarterMixcore(config.mixcore);
130
+ if (mixcore) {
131
131
  // merge the ffis and store them back into the config so sub vms also get them
132
- config.localFFIs = Object.assign(starterFFIs, mixcoreFFIs);
132
+ config.localFFIs = Object.assign(starterFFIs, await mixcoreStarterFFIs(mixcore));
133
133
  // delete the mixcore config to avoid being handled further by the worker
134
134
  delete config.mixcore;
135
135
  }
@@ -191,6 +191,11 @@ async function StartWASM2(hub, config) {
191
191
  return worker;
192
192
  }
193
193
 
194
+ async function mixcoreStarterFFIs(mixcore) {
195
+ let names = await mixcore.ffiNames();
196
+ return Object.fromEntries(names.map(name => [name, {isRaw: true, run}]));
197
+ }
198
+
194
199
  async function ffi_vm_start(conn, args) {
195
200
  let vm_id = "embedded." + nanoid();
196
201
  console.log("[machine-starter] starting VM: ", vm_id);
@@ -1,2 +1,2 @@
1
- var GROOVEBOX_BUILD = "3359";
1
+ var GROOVEBOX_BUILD = "3364";
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.3359.0-dev",
3
+ "version": "2.3364.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.3359.0-dev",
14
+ "@remix_labs/hub-client": "2.3364.0-dev",
15
15
  "nanoid": "^5.0.2",
16
16
  "web-worker": "^1.2.0"
17
17
  },
package/start.js CHANGED
@@ -33,7 +33,7 @@ console.log("Machine params: variant=" + variant + " baseURL=" + baseURL, " mqtt
33
33
  let w = new Hub.Worker();
34
34
  globalThis.GROOVEBOX_ALLOW_INSECURE_HTTP = true;
35
35
 
36
- // Node does not support blob (for dynamic import?), results in error:
36
+ // Node does not support blob URLs (for dynamic import?), resulting in error:
37
37
  // [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and
38
38
  // node are supported by the default ESM loader. Received protocol 'blob:'
39
39
  let mixcoreJsUrl = "data:text/javascript;base64," + mixcoreJsBase64;