@remix_labs/mixc-starter 2.7802.0-dev → 2.7805.0
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/mixc-worker.node.mjs +7 -31
- package/mixc-worker.worker.js +7 -31
- package/package.json +1 -1
- package/protoquery_build.js +2 -2
package/mixc-worker.node.mjs
CHANGED
|
@@ -22279,7 +22279,7 @@ var dist_default = /*#__PURE__*/__webpack_require__.n(wasi_js_dist);
|
|
|
22279
22279
|
var browser = __webpack_require__(7986);
|
|
22280
22280
|
var browser_default = /*#__PURE__*/__webpack_require__.n(browser);
|
|
22281
22281
|
;// CONCATENATED MODULE: ./protoquery_build.js
|
|
22282
|
-
var PROTOQUERY_WASM_BUILD = "
|
|
22282
|
+
var PROTOQUERY_WASM_BUILD = "7805";
|
|
22283
22283
|
var PROTOQUERY_STDLIB_ID = "stdlib-1@ee1f4eeddf87628e81f2ffdec0187263";
|
|
22284
22284
|
|
|
22285
22285
|
|
|
@@ -22349,12 +22349,6 @@ let nanoid = (size = 21) => {
|
|
|
22349
22349
|
|
|
22350
22350
|
|
|
22351
22351
|
|
|
22352
|
-
let debugMask = 0;
|
|
22353
|
-
const logMaskTopic = "/logMask";
|
|
22354
|
-
|
|
22355
|
-
// debug flags < 1024 are defined on the C side (memory.h)
|
|
22356
|
-
const DEBUG_COMPILER = 8192;
|
|
22357
|
-
|
|
22358
22352
|
function setup() {
|
|
22359
22353
|
worker_console.log("PROTOQUERY_WASM_BUILD (mixc-worker)", PROTOQUERY_WASM_BUILD);
|
|
22360
22354
|
if (!isLittleEndian()) {
|
|
@@ -22399,8 +22393,6 @@ async function configure(msg) {
|
|
|
22399
22393
|
};
|
|
22400
22394
|
globalThis.stringIdMap = new Map();
|
|
22401
22395
|
globalThis.compilerIdMap = new Map();
|
|
22402
|
-
let lmSub = await hub.subscribe(logMaskTopic);
|
|
22403
|
-
await logMaskSub(lmSub);
|
|
22404
22396
|
await start_compiler();
|
|
22405
22397
|
sub_sessionless(); // no await
|
|
22406
22398
|
let announcement = new JSONMessage("msg_mixc_announce", "mixc-worker", {success:true, stdlib: PROTOQUERY_STDLIB_ID, hello: "hi" });
|
|
@@ -22408,19 +22400,6 @@ async function configure(msg) {
|
|
|
22408
22400
|
await globalThis.hub.publish("/org/" + globalThis.config.org + "/ws/" + globalThis.config.workspace + "/mixc/announce", announcement, retained);
|
|
22409
22401
|
}
|
|
22410
22402
|
|
|
22411
|
-
async function logMaskSub(sub) {
|
|
22412
|
-
logMaskSubLoop(sub).catch(e => worker_console.log("mix compiler: Error", e))
|
|
22413
|
-
// but don't wait on it
|
|
22414
|
-
}
|
|
22415
|
-
|
|
22416
|
-
async function logMaskSubLoop(sub) {
|
|
22417
|
-
while (true) {
|
|
22418
|
-
let msg = await sub.next();
|
|
22419
|
-
worker_console.log("mix compiler: Setting debug mask to: ", m);
|
|
22420
|
-
debugMask = msg.payload.mask;
|
|
22421
|
-
}
|
|
22422
|
-
}
|
|
22423
|
-
|
|
22424
22403
|
async function sub_sessionless() {
|
|
22425
22404
|
let topicBase = "/org/" + globalThis.config.org + "/ws/" + globalThis.config.workspace + "/mixc";
|
|
22426
22405
|
let sub = await globalThis.hub.subscribe(topicBase + "/sessionless");
|
|
@@ -22433,8 +22412,8 @@ async function sub_sessionless_loop(sub) {
|
|
|
22433
22412
|
try {
|
|
22434
22413
|
await sub_sessionless_handle(undefined, msg);
|
|
22435
22414
|
} catch (e) {
|
|
22436
|
-
worker_console.log("
|
|
22437
|
-
worker_console.log("
|
|
22415
|
+
worker_console.log("Error", e);
|
|
22416
|
+
worker_console.log("Stack", e.stack);
|
|
22438
22417
|
}
|
|
22439
22418
|
}
|
|
22440
22419
|
}
|
|
@@ -22506,7 +22485,7 @@ async function sub_session_loop(compilerId, sessionBase, sub) {
|
|
|
22506
22485
|
try {
|
|
22507
22486
|
await sub_session_handle(compilerId, sessionBase, msg);
|
|
22508
22487
|
} catch (e) {
|
|
22509
|
-
worker_console.log("
|
|
22488
|
+
worker_console.log("Error", e);
|
|
22510
22489
|
}
|
|
22511
22490
|
}
|
|
22512
22491
|
}
|
|
@@ -22608,8 +22587,7 @@ async function handle_request(rtopic, req_name, msg, req_hasArg, req_binArg, wit
|
|
|
22608
22587
|
let sessionBase = topicBase + "/session/" + stringId;
|
|
22609
22588
|
let sub = await globalThis.hub.subscribe(sessionBase + "/request");
|
|
22610
22589
|
sub_session_loop(compilerId, sessionBase, sub); // no await
|
|
22611
|
-
|
|
22612
|
-
worker_console.log("mix compiler: new session: ", stringId);
|
|
22590
|
+
worker_console.log("mixc: new session: ", stringId);
|
|
22613
22591
|
};
|
|
22614
22592
|
globalThis.hub.publish(rtopic, response, false);
|
|
22615
22593
|
}
|
|
@@ -22850,8 +22828,7 @@ function mixc_doRequest(req_name, req_args, req_binArg) {
|
|
|
22850
22828
|
let mem8 = globalThis.instance.mem8;
|
|
22851
22829
|
mem8.subarray(binArg_buf, binArg_buf + req_binArg.length).set(req_binArg);
|
|
22852
22830
|
|
|
22853
|
-
|
|
22854
|
-
worker_console.log("mix compiler: request", req);
|
|
22831
|
+
worker_console.log("do_request:", req);
|
|
22855
22832
|
globalThis.instance.call(wasm.do_request, req_buf, 0);
|
|
22856
22833
|
wasm.free(req_buf);
|
|
22857
22834
|
|
|
@@ -22896,8 +22873,7 @@ async function demo_request() {
|
|
|
22896
22873
|
let resp_buf_len = globalThis.instance.call(wasm.get_json_output_length);
|
|
22897
22874
|
|
|
22898
22875
|
let resp_j = copyOutCString(resp_buf, resp_buf_len);
|
|
22899
|
-
|
|
22900
|
-
worker_console.log("mix compiler: about ", resp_j);
|
|
22876
|
+
worker_console.log("about: ", resp_j);
|
|
22901
22877
|
}
|
|
22902
22878
|
|
|
22903
22879
|
setup();
|
package/mixc-worker.worker.js
CHANGED
|
@@ -24235,7 +24235,7 @@ var dist_default = /*#__PURE__*/__webpack_require__.n(dist);
|
|
|
24235
24235
|
var browser = __webpack_require__(7986);
|
|
24236
24236
|
var browser_default = /*#__PURE__*/__webpack_require__.n(browser);
|
|
24237
24237
|
;// CONCATENATED MODULE: ./protoquery_build.js
|
|
24238
|
-
var PROTOQUERY_WASM_BUILD = "
|
|
24238
|
+
var PROTOQUERY_WASM_BUILD = "7805";
|
|
24239
24239
|
var PROTOQUERY_STDLIB_ID = "stdlib-1@ee1f4eeddf87628e81f2ffdec0187263";
|
|
24240
24240
|
|
|
24241
24241
|
|
|
@@ -24286,12 +24286,6 @@ let nanoid = (size = 21) =>
|
|
|
24286
24286
|
|
|
24287
24287
|
|
|
24288
24288
|
|
|
24289
|
-
let debugMask = 0;
|
|
24290
|
-
const logMaskTopic = "/logMask";
|
|
24291
|
-
|
|
24292
|
-
// debug flags < 1024 are defined on the C side (memory.h)
|
|
24293
|
-
const DEBUG_COMPILER = 8192;
|
|
24294
|
-
|
|
24295
24289
|
function setup() {
|
|
24296
24290
|
worker_console.log("PROTOQUERY_WASM_BUILD (mixc-worker)", PROTOQUERY_WASM_BUILD);
|
|
24297
24291
|
if (!isLittleEndian()) {
|
|
@@ -24336,8 +24330,6 @@ async function configure(msg) {
|
|
|
24336
24330
|
};
|
|
24337
24331
|
globalThis.stringIdMap = new Map();
|
|
24338
24332
|
globalThis.compilerIdMap = new Map();
|
|
24339
|
-
let lmSub = await hub.subscribe(logMaskTopic);
|
|
24340
|
-
await logMaskSub(lmSub);
|
|
24341
24333
|
await start_compiler();
|
|
24342
24334
|
sub_sessionless(); // no await
|
|
24343
24335
|
let announcement = new JSONMessage("msg_mixc_announce", "mixc-worker", {success:true, stdlib: PROTOQUERY_STDLIB_ID, hello: "hi" });
|
|
@@ -24345,19 +24337,6 @@ async function configure(msg) {
|
|
|
24345
24337
|
await globalThis.hub.publish("/org/" + globalThis.config.org + "/ws/" + globalThis.config.workspace + "/mixc/announce", announcement, retained);
|
|
24346
24338
|
}
|
|
24347
24339
|
|
|
24348
|
-
async function logMaskSub(sub) {
|
|
24349
|
-
logMaskSubLoop(sub).catch(e => worker_console.log("mix compiler: Error", e))
|
|
24350
|
-
// but don't wait on it
|
|
24351
|
-
}
|
|
24352
|
-
|
|
24353
|
-
async function logMaskSubLoop(sub) {
|
|
24354
|
-
while (true) {
|
|
24355
|
-
let msg = await sub.next();
|
|
24356
|
-
worker_console.log("mix compiler: Setting debug mask to: ", m);
|
|
24357
|
-
debugMask = msg.payload.mask;
|
|
24358
|
-
}
|
|
24359
|
-
}
|
|
24360
|
-
|
|
24361
24340
|
async function sub_sessionless() {
|
|
24362
24341
|
let topicBase = "/org/" + globalThis.config.org + "/ws/" + globalThis.config.workspace + "/mixc";
|
|
24363
24342
|
let sub = await globalThis.hub.subscribe(topicBase + "/sessionless");
|
|
@@ -24370,8 +24349,8 @@ async function sub_sessionless_loop(sub) {
|
|
|
24370
24349
|
try {
|
|
24371
24350
|
await sub_sessionless_handle(undefined, msg);
|
|
24372
24351
|
} catch (e) {
|
|
24373
|
-
worker_console.log("
|
|
24374
|
-
worker_console.log("
|
|
24352
|
+
worker_console.log("Error", e);
|
|
24353
|
+
worker_console.log("Stack", e.stack);
|
|
24375
24354
|
}
|
|
24376
24355
|
}
|
|
24377
24356
|
}
|
|
@@ -24443,7 +24422,7 @@ async function sub_session_loop(compilerId, sessionBase, sub) {
|
|
|
24443
24422
|
try {
|
|
24444
24423
|
await sub_session_handle(compilerId, sessionBase, msg);
|
|
24445
24424
|
} catch (e) {
|
|
24446
|
-
worker_console.log("
|
|
24425
|
+
worker_console.log("Error", e);
|
|
24447
24426
|
}
|
|
24448
24427
|
}
|
|
24449
24428
|
}
|
|
@@ -24545,8 +24524,7 @@ async function handle_request(rtopic, req_name, msg, req_hasArg, req_binArg, wit
|
|
|
24545
24524
|
let sessionBase = topicBase + "/session/" + stringId;
|
|
24546
24525
|
let sub = await globalThis.hub.subscribe(sessionBase + "/request");
|
|
24547
24526
|
sub_session_loop(compilerId, sessionBase, sub); // no await
|
|
24548
|
-
|
|
24549
|
-
worker_console.log("mix compiler: new session: ", stringId);
|
|
24527
|
+
worker_console.log("mixc: new session: ", stringId);
|
|
24550
24528
|
};
|
|
24551
24529
|
globalThis.hub.publish(rtopic, response, false);
|
|
24552
24530
|
}
|
|
@@ -24787,8 +24765,7 @@ function mixc_doRequest(req_name, req_args, req_binArg) {
|
|
|
24787
24765
|
let mem8 = globalThis.instance.mem8;
|
|
24788
24766
|
mem8.subarray(binArg_buf, binArg_buf + req_binArg.length).set(req_binArg);
|
|
24789
24767
|
|
|
24790
|
-
|
|
24791
|
-
worker_console.log("mix compiler: request", req);
|
|
24768
|
+
worker_console.log("do_request:", req);
|
|
24792
24769
|
globalThis.instance.call(wasm.do_request, req_buf, 0);
|
|
24793
24770
|
wasm.free(req_buf);
|
|
24794
24771
|
|
|
@@ -24833,8 +24810,7 @@ async function demo_request() {
|
|
|
24833
24810
|
let resp_buf_len = globalThis.instance.call(wasm.get_json_output_length);
|
|
24834
24811
|
|
|
24835
24812
|
let resp_j = copyOutCString(resp_buf, resp_buf_len);
|
|
24836
|
-
|
|
24837
|
-
worker_console.log("mix compiler: about ", resp_j);
|
|
24813
|
+
worker_console.log("about: ", resp_j);
|
|
24838
24814
|
}
|
|
24839
24815
|
|
|
24840
24816
|
setup();
|
package/package.json
CHANGED
package/protoquery_build.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var PROTOQUERY_BUILD = "
|
|
2
|
-
var PROTOQUERY_WASM_BUILD = "
|
|
1
|
+
var PROTOQUERY_BUILD = "37021";
|
|
2
|
+
var PROTOQUERY_WASM_BUILD = "7805";
|
|
3
3
|
export { PROTOQUERY_BUILD, PROTOQUERY_WASM_BUILD }
|