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