@remix_labs/machine-starter 2.3315.0 → 2.3324.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, filterFFINames } from "./mixcore.lib.mjs";
3
+ import { getMixcoreFFIs } from "./mixcore-groovebox-starter.lib.mjs";
4
4
 
5
5
  const DEBUG_STATE = 4;
6
6
 
@@ -485,34 +485,6 @@ class FFIComm {
485
485
  }
486
486
  }
487
487
 
488
- async function getMixcoreFFIs(config) {
489
- let mixcore;
490
- switch (config?.kind) {
491
- case 'mixcore':
492
- mixcore = config.mixcore;
493
- break;
494
- case 'tauri':
495
- mixcore = await MixcoreTauri.create(config.workspace, config.app);
496
- break;
497
- default:
498
- console.warn("[machine-starter] not going to configure mixcore - kind: ", config?.kind);
499
- return;
500
- }
501
-
502
- let names = await mixcore.ffiNames();
503
- names = filterFFINames(names, config.enableFFIs, config.disableFFIs);
504
-
505
- let starterFFIs = {};
506
- for (let name of names) {
507
- starterFFIs[name] = {
508
- isRaw: true,
509
- run: (conn, argsBuf) => mixcore.ffiDispatch(conn.call_id, name, argsBuf),
510
- };
511
- }
512
-
513
- return starterFFIs;
514
- }
515
-
516
488
  // use terminateVM to shut a worker down!
517
489
  export { StartWASM, StartWASM2, terminateAll, terminateVM,
518
490
  Token, Case, Opaque
@@ -1,2 +1,2 @@
1
- var GROOVEBOX_BUILD = "3315";
1
+ var GROOVEBOX_BUILD = "3324";
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.3315.0",
3
+ "version": "2.3324.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.3315.0",
14
+ "@remix_labs/hub-client": "2.3324.0-dev",
15
15
  "nanoid": "^5.0.2",
16
16
  "web-worker": "^1.2.0"
17
17
  },
package/start.js CHANGED
@@ -32,12 +32,18 @@ let noOutputViaMQTT = Process.env["MIX_MQTT_NO_OUTPUT"] !== undefined;
32
32
  console.log("Machine params: variant=" + variant + " baseURL=" + baseURL, " mqttURL=" + mqttURL, " mqttUser=" + mqttUser, " mqttToken=" + mqttToken, " id=" + id, " noOutputViaMQTT=" + noOutputViaMQTT);
33
33
  let w = new Hub.Worker();
34
34
  globalThis.GROOVEBOX_ALLOW_INSECURE_HTTP = true;
35
- let mixcoreWasmUrl = "data:application/wasm;base64," + mixcoreWasmBase64;
36
- let mixcoreJsUrl = "data:text/javascript;charset=utf-8;base64," + mixcoreJsBase64;
35
+ let mixcoreJsBytes = Buffer.from(mixcoreJsBase64, 'base64').toString('utf8')
36
+ let mixcoreJsUrl = URL.createObjectURL(
37
+ new Blob([mixcoreJsBytes], { type: 'text/javascript' })
38
+ );
39
+ let mixcoreWasmBytes = Buffer.from(mixcoreWasmBase64, 'base64')
40
+ let mixcoreWasmUrl = URL.createObjectURL(
41
+ new Blob([mixcoreWasmBytes], { type: 'application/wasm' })
42
+ );
37
43
  let mixcore = {
38
44
  kind: "wasm-opfs",
39
- mixcoreWasmUrl,
40
45
  mixcoreJsUrl,
46
+ mixcoreWasmUrl,
41
47
  dbDir: "/databases",
42
48
  dbUser: "test@user",
43
49
  dbName: "compiler-testing",