wao 0.40.2 → 0.41.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/cjs/accounts-web.js +25 -0
- package/cjs/accounts.js +38 -0
- package/cjs/adaptor-base.js +504 -287
- package/cjs/adaptor-cf.js +42 -0
- package/cjs/ao-loader.js +1 -1
- package/cjs/ao.js +18 -6
- package/cjs/aoconnect-base.js +1010 -546
- package/cjs/aoconnect-cf.js +24 -0
- package/cjs/ar-remote.js +277 -0
- package/cjs/armem-base.js +822 -211
- package/cjs/armem-cf.js +128 -0
- package/cjs/armem.js +11 -5
- package/cjs/bar.js +511 -173
- package/cjs/car.js +37 -0
- package/cjs/cf-env.js +54 -0
- package/cjs/cf.js +76 -0
- package/cjs/cli.js +12 -6
- package/cjs/create.js +1 -1
- package/cjs/devs.js +53 -0
- package/cjs/dodb.js +116 -0
- package/cjs/hb.js +136 -53
- package/cjs/hyperbeam.js +85 -44
- package/cjs/keygen.js +94 -0
- package/cjs/run.js +4 -1
- package/cjs/server.js +40 -9
- package/cjs/storage-multi.js +525 -0
- package/cjs/tgql-d1.js +664 -0
- package/cjs/tgql.js +293 -172
- package/cjs/workspace/.claude/agents/tester.md +2 -2
- package/cjs/workspace/.claude/skills/build/SKILL.md +2 -2
- package/cjs/workspace/.claude/skills/test/SKILL.md +3 -2
- package/cjs/workspace/CLAUDE.md +2 -2
- package/cjs/workspace/README.md +1 -1
- package/cjs/workspace/docs/debug.md +9 -4
- package/cjs/workspace/docs/hyperbeam-devices.md +50 -1
- package/cjs/workspace/package.json +3 -3
- package/esm/accounts-web.js +14 -0
- package/esm/accounts.js +27 -0
- package/esm/adaptor-base.js +129 -31
- package/esm/adaptor-cf.js +11 -0
- package/esm/ao-loader.js +1 -1
- package/esm/ao.js +21 -2
- package/esm/aoconnect-base.js +248 -7
- package/esm/aoconnect-cf.js +9 -0
- package/esm/ar-remote.js +87 -0
- package/esm/armem-base.js +304 -53
- package/esm/armem-cf.js +67 -0
- package/esm/armem.js +7 -2
- package/esm/bar.js +126 -16
- package/esm/car.js +10 -0
- package/esm/cf-env.js +29 -0
- package/esm/cf.js +11 -0
- package/esm/cli.js +6 -2
- package/esm/create.js +1 -1
- package/esm/devs.js +15 -0
- package/esm/dodb.js +26 -0
- package/esm/hb.js +93 -16
- package/esm/hyperbeam.js +68 -30
- package/esm/keygen.js +47 -0
- package/esm/run.js +4 -1
- package/esm/server.js +29 -9
- package/esm/storage-multi.js +183 -0
- package/esm/tgql-d1.js +407 -0
- package/esm/tgql.js +29 -10
- package/esm/workspace/.claude/agents/tester.md +2 -2
- package/esm/workspace/.claude/skills/build/SKILL.md +2 -2
- package/esm/workspace/.claude/skills/test/SKILL.md +3 -2
- package/esm/workspace/CLAUDE.md +2 -2
- package/esm/workspace/README.md +1 -1
- package/esm/workspace/docs/debug.md +9 -4
- package/esm/workspace/docs/hyperbeam-devices.md +50 -1
- package/esm/workspace/package.json +3 -3
- package/package.json +10 -3
- package/postinstall.cjs +84 -0
package/cjs/ao.js
CHANGED
|
@@ -119,7 +119,9 @@ var AO = /*#__PURE__*/function () {
|
|
|
119
119
|
var _hbOpt = {
|
|
120
120
|
format: this.format
|
|
121
121
|
};
|
|
122
|
-
|
|
122
|
+
// `hb` can be "ans104" / "httpsig" (format selector with default URL),
|
|
123
|
+
// or an actual URL string. Only treat it as a URL when it looks like one.
|
|
124
|
+
if (typeof _hb === "string" && _hb !== "ans104" && _hb !== "httpsig" && /^(https?:\/\/|\/\/|[a-zA-Z0-9_.-]+:\d+)/.test(_hb)) _hbOpt.url = _hb;
|
|
123
125
|
this.hb = new _hb2["default"](_hbOpt);
|
|
124
126
|
this.mode = mode !== null && mode !== void 0 ? mode : "legacy";
|
|
125
127
|
}
|
|
@@ -1220,7 +1222,7 @@ var AO = /*#__PURE__*/function () {
|
|
|
1220
1222
|
key: "msg",
|
|
1221
1223
|
value: function () {
|
|
1222
1224
|
var _msg = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10(_ref13) {
|
|
1223
|
-
var pid, jwk, data, _ref13$act, act, _ref13$tags, tags, _ref13$check, check, get, _ref13$timeout, timeout, _ref13$mode, mode, _ref13$limit, limit, err, _yield$this$ar$checkW2, mid, res, schedArgs, _yield$this$hb$pushAO2, pushSlot, pushOutbox, _res5, callerAddr, hasCallerReply, raw, parsed, out, _tags3, _mid, _t24, _t25, _t26, _t27, _t28, _t29, _t30, _t31;
|
|
1225
|
+
var pid, jwk, data, _ref13$act, act, _ref13$tags, tags, _ref13$check, check, get, _ref13$timeout, timeout, _ref13$mode, mode, _ref13$limit, limit, err, _yield$this$ar$checkW2, mid, res, schedArgs, _yield$this$hb$pushAO2, pushSlot, pushOutbox, _res5, _pushTimeoutMs, callerAddr, hasCallerReply, raw, parsed, out, _tags3, _mid, _t24, _t25, _t26, _t27, _t28, _t29, _t30, _t31;
|
|
1224
1226
|
return _regenerator().w(function (_context10) {
|
|
1225
1227
|
while (1) switch (_context10.p = _context10.n) {
|
|
1226
1228
|
case 0:
|
|
@@ -1342,12 +1344,22 @@ var AO = /*#__PURE__*/function () {
|
|
|
1342
1344
|
});
|
|
1343
1345
|
case 26:
|
|
1344
1346
|
res = _context10.v;
|
|
1347
|
+
// v0.9-FINAL's push device can enter long-running recursive loops
|
|
1348
|
+
// for cross-process Send().receive() coroutines. Race the push
|
|
1349
|
+
// call against a 20s timeout so msg() can return rather than
|
|
1350
|
+
// wait forever; the now/results probe below still has a chance
|
|
1351
|
+
// to pick up a partial reply.
|
|
1352
|
+
_pushTimeoutMs = 20000;
|
|
1345
1353
|
_context10.p = 27;
|
|
1346
1354
|
_context10.n = 28;
|
|
1347
|
-
return this.hb.get({
|
|
1355
|
+
return Promise.race([this.hb.get({
|
|
1348
1356
|
path: "/".concat(pid, "/push"),
|
|
1349
1357
|
slot: mid
|
|
1350
|
-
})
|
|
1358
|
+
}), new Promise(function (_r, rej) {
|
|
1359
|
+
return setTimeout(function () {
|
|
1360
|
+
return rej(new Error("push timeout"));
|
|
1361
|
+
}, _pushTimeoutMs);
|
|
1362
|
+
})]);
|
|
1351
1363
|
case 28:
|
|
1352
1364
|
_context10.n = 30;
|
|
1353
1365
|
break;
|
|
@@ -2566,7 +2578,7 @@ var Process = /*#__PURE__*/function () {
|
|
|
2566
2578
|
}, {
|
|
2567
2579
|
key: "r",
|
|
2568
2580
|
value: function () {
|
|
2569
|
-
var
|
|
2581
|
+
var _r2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee31() {
|
|
2570
2582
|
var _len3,
|
|
2571
2583
|
opt,
|
|
2572
2584
|
_key3,
|
|
@@ -2582,7 +2594,7 @@ var Process = /*#__PURE__*/function () {
|
|
|
2582
2594
|
}, _callee31, this);
|
|
2583
2595
|
}));
|
|
2584
2596
|
function r() {
|
|
2585
|
-
return
|
|
2597
|
+
return _r2.apply(this, arguments);
|
|
2586
2598
|
}
|
|
2587
2599
|
return r;
|
|
2588
2600
|
}()
|