@remix_labs/mixc-starter 2.7804.0-dev → 2.7808.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 -32
- package/mixc-worker.worker.js +7 -32
- 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 = "7808";
|
|
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,20 +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
|
-
let m = msg.payload.mask;
|
|
22420
|
-
worker_console.log("mix compiler: Setting debug mask to: ", m);
|
|
22421
|
-
debugMask = m;
|
|
22422
|
-
}
|
|
22423
|
-
}
|
|
22424
|
-
|
|
22425
22403
|
async function sub_sessionless() {
|
|
22426
22404
|
let topicBase = "/org/" + globalThis.config.org + "/ws/" + globalThis.config.workspace + "/mixc";
|
|
22427
22405
|
let sub = await globalThis.hub.subscribe(topicBase + "/sessionless");
|
|
@@ -22434,8 +22412,8 @@ async function sub_sessionless_loop(sub) {
|
|
|
22434
22412
|
try {
|
|
22435
22413
|
await sub_sessionless_handle(undefined, msg);
|
|
22436
22414
|
} catch (e) {
|
|
22437
|
-
worker_console.log("
|
|
22438
|
-
worker_console.log("
|
|
22415
|
+
worker_console.log("Error", e);
|
|
22416
|
+
worker_console.log("Stack", e.stack);
|
|
22439
22417
|
}
|
|
22440
22418
|
}
|
|
22441
22419
|
}
|
|
@@ -22507,7 +22485,7 @@ async function sub_session_loop(compilerId, sessionBase, sub) {
|
|
|
22507
22485
|
try {
|
|
22508
22486
|
await sub_session_handle(compilerId, sessionBase, msg);
|
|
22509
22487
|
} catch (e) {
|
|
22510
|
-
worker_console.log("
|
|
22488
|
+
worker_console.log("Error", e);
|
|
22511
22489
|
}
|
|
22512
22490
|
}
|
|
22513
22491
|
}
|
|
@@ -22609,8 +22587,7 @@ async function handle_request(rtopic, req_name, msg, req_hasArg, req_binArg, wit
|
|
|
22609
22587
|
let sessionBase = topicBase + "/session/" + stringId;
|
|
22610
22588
|
let sub = await globalThis.hub.subscribe(sessionBase + "/request");
|
|
22611
22589
|
sub_session_loop(compilerId, sessionBase, sub); // no await
|
|
22612
|
-
|
|
22613
|
-
worker_console.log("mix compiler: new session: ", stringId);
|
|
22590
|
+
worker_console.log("mixc: new session: ", stringId);
|
|
22614
22591
|
};
|
|
22615
22592
|
globalThis.hub.publish(rtopic, response, false);
|
|
22616
22593
|
}
|
|
@@ -22851,8 +22828,7 @@ function mixc_doRequest(req_name, req_args, req_binArg) {
|
|
|
22851
22828
|
let mem8 = globalThis.instance.mem8;
|
|
22852
22829
|
mem8.subarray(binArg_buf, binArg_buf + req_binArg.length).set(req_binArg);
|
|
22853
22830
|
|
|
22854
|
-
|
|
22855
|
-
worker_console.log("mix compiler: request", req);
|
|
22831
|
+
worker_console.log("do_request:", req);
|
|
22856
22832
|
globalThis.instance.call(wasm.do_request, req_buf, 0);
|
|
22857
22833
|
wasm.free(req_buf);
|
|
22858
22834
|
|
|
@@ -22897,8 +22873,7 @@ async function demo_request() {
|
|
|
22897
22873
|
let resp_buf_len = globalThis.instance.call(wasm.get_json_output_length);
|
|
22898
22874
|
|
|
22899
22875
|
let resp_j = copyOutCString(resp_buf, resp_buf_len);
|
|
22900
|
-
|
|
22901
|
-
worker_console.log("mix compiler: about ", resp_j);
|
|
22876
|
+
worker_console.log("about: ", resp_j);
|
|
22902
22877
|
}
|
|
22903
22878
|
|
|
22904
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 = "7808";
|
|
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,20 +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
|
-
let m = msg.payload.mask;
|
|
24357
|
-
worker_console.log("mix compiler: Setting debug mask to: ", m);
|
|
24358
|
-
debugMask = m;
|
|
24359
|
-
}
|
|
24360
|
-
}
|
|
24361
|
-
|
|
24362
24340
|
async function sub_sessionless() {
|
|
24363
24341
|
let topicBase = "/org/" + globalThis.config.org + "/ws/" + globalThis.config.workspace + "/mixc";
|
|
24364
24342
|
let sub = await globalThis.hub.subscribe(topicBase + "/sessionless");
|
|
@@ -24371,8 +24349,8 @@ async function sub_sessionless_loop(sub) {
|
|
|
24371
24349
|
try {
|
|
24372
24350
|
await sub_sessionless_handle(undefined, msg);
|
|
24373
24351
|
} catch (e) {
|
|
24374
|
-
worker_console.log("
|
|
24375
|
-
worker_console.log("
|
|
24352
|
+
worker_console.log("Error", e);
|
|
24353
|
+
worker_console.log("Stack", e.stack);
|
|
24376
24354
|
}
|
|
24377
24355
|
}
|
|
24378
24356
|
}
|
|
@@ -24444,7 +24422,7 @@ async function sub_session_loop(compilerId, sessionBase, sub) {
|
|
|
24444
24422
|
try {
|
|
24445
24423
|
await sub_session_handle(compilerId, sessionBase, msg);
|
|
24446
24424
|
} catch (e) {
|
|
24447
|
-
worker_console.log("
|
|
24425
|
+
worker_console.log("Error", e);
|
|
24448
24426
|
}
|
|
24449
24427
|
}
|
|
24450
24428
|
}
|
|
@@ -24546,8 +24524,7 @@ async function handle_request(rtopic, req_name, msg, req_hasArg, req_binArg, wit
|
|
|
24546
24524
|
let sessionBase = topicBase + "/session/" + stringId;
|
|
24547
24525
|
let sub = await globalThis.hub.subscribe(sessionBase + "/request");
|
|
24548
24526
|
sub_session_loop(compilerId, sessionBase, sub); // no await
|
|
24549
|
-
|
|
24550
|
-
worker_console.log("mix compiler: new session: ", stringId);
|
|
24527
|
+
worker_console.log("mixc: new session: ", stringId);
|
|
24551
24528
|
};
|
|
24552
24529
|
globalThis.hub.publish(rtopic, response, false);
|
|
24553
24530
|
}
|
|
@@ -24788,8 +24765,7 @@ function mixc_doRequest(req_name, req_args, req_binArg) {
|
|
|
24788
24765
|
let mem8 = globalThis.instance.mem8;
|
|
24789
24766
|
mem8.subarray(binArg_buf, binArg_buf + req_binArg.length).set(req_binArg);
|
|
24790
24767
|
|
|
24791
|
-
|
|
24792
|
-
worker_console.log("mix compiler: request", req);
|
|
24768
|
+
worker_console.log("do_request:", req);
|
|
24793
24769
|
globalThis.instance.call(wasm.do_request, req_buf, 0);
|
|
24794
24770
|
wasm.free(req_buf);
|
|
24795
24771
|
|
|
@@ -24834,8 +24810,7 @@ async function demo_request() {
|
|
|
24834
24810
|
let resp_buf_len = globalThis.instance.call(wasm.get_json_output_length);
|
|
24835
24811
|
|
|
24836
24812
|
let resp_j = copyOutCString(resp_buf, resp_buf_len);
|
|
24837
|
-
|
|
24838
|
-
worker_console.log("mix compiler: about ", resp_j);
|
|
24813
|
+
worker_console.log("about: ", resp_j);
|
|
24839
24814
|
}
|
|
24840
24815
|
|
|
24841
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 = "37038";
|
|
2
|
+
var PROTOQUERY_WASM_BUILD = "7808";
|
|
3
3
|
export { PROTOQUERY_BUILD, PROTOQUERY_WASM_BUILD }
|