wao 0.34.1 → 0.34.3
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/hb.js +17 -13
- package/cjs/workspace/package.json +2 -2
- package/esm/hb.js +4 -4
- package/esm/workspace/package.json +2 -2
- package/package.json +2 -2
package/cjs/hb.js
CHANGED
|
@@ -628,6 +628,8 @@ var HB = /*#__PURE__*/function () {
|
|
|
628
628
|
tags,
|
|
629
629
|
data,
|
|
630
630
|
_tags,
|
|
631
|
+
body,
|
|
632
|
+
signed,
|
|
631
633
|
res,
|
|
632
634
|
_args19 = arguments;
|
|
633
635
|
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
@@ -639,20 +641,21 @@ var HB = /*#__PURE__*/function () {
|
|
|
639
641
|
target: pid
|
|
640
642
|
});
|
|
641
643
|
if (data) _tags.data = data;
|
|
642
|
-
_context18.
|
|
643
|
-
_context18.t1 = "/".concat(pid, "/schedule");
|
|
644
|
-
_context18.next = 7;
|
|
644
|
+
_context18.next = 5;
|
|
645
645
|
return this.commit(_tags, {
|
|
646
646
|
path: false
|
|
647
647
|
});
|
|
648
|
-
case
|
|
649
|
-
|
|
650
|
-
_context18.
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
648
|
+
case 5:
|
|
649
|
+
body = _context18.sent;
|
|
650
|
+
_context18.next = 8;
|
|
651
|
+
return this.sign({
|
|
652
|
+
path: "/".concat(pid, "/schedule"),
|
|
653
|
+
body: body
|
|
654
|
+
});
|
|
655
|
+
case 8:
|
|
656
|
+
signed = _context18.sent;
|
|
654
657
|
_context18.next = 11;
|
|
655
|
-
return
|
|
658
|
+
return this.send(signed);
|
|
656
659
|
case 11:
|
|
657
660
|
res = _context18.sent;
|
|
658
661
|
return _context18.abrupt("return", {
|
|
@@ -1091,13 +1094,14 @@ var HB = /*#__PURE__*/function () {
|
|
|
1091
1094
|
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
|
|
1092
1095
|
while (1) switch (_context30.prev = _context30.next) {
|
|
1093
1096
|
case 0:
|
|
1094
|
-
|
|
1097
|
+
console.log("comitting................................");
|
|
1098
|
+
_context30.next = 3;
|
|
1095
1099
|
return (0, _hbsig.commit)(obj, _objectSpread(_objectSpread({}, opts), {}, {
|
|
1096
1100
|
signer: this.sign
|
|
1097
1101
|
}));
|
|
1098
|
-
case 2:
|
|
1099
|
-
return _context30.abrupt("return", _context30.sent);
|
|
1100
1102
|
case 3:
|
|
1103
|
+
return _context30.abrupt("return", _context30.sent);
|
|
1104
|
+
case 4:
|
|
1101
1105
|
case "end":
|
|
1102
1106
|
return _context30.stop();
|
|
1103
1107
|
}
|
package/esm/hb.js
CHANGED
|
@@ -138,10 +138,9 @@ class HB {
|
|
|
138
138
|
async schedule({ pid, tags = {}, data } = {}) {
|
|
139
139
|
let _tags = mergeLeft(tags, { type: "Message", target: pid })
|
|
140
140
|
if (data) _tags.data = data
|
|
141
|
-
let
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
})
|
|
141
|
+
let body = await this.commit(_tags, { path: false })
|
|
142
|
+
let signed = await this.sign({ path: `/${pid}/schedule`, body })
|
|
143
|
+
let res = await this.send(signed)
|
|
145
144
|
return { slot: res.out.slot, res, pid }
|
|
146
145
|
}
|
|
147
146
|
|
|
@@ -263,6 +262,7 @@ class HB {
|
|
|
263
262
|
}
|
|
264
263
|
|
|
265
264
|
async commit(obj, opts) {
|
|
265
|
+
console.log("comitting................................")
|
|
266
266
|
return await commit(obj, { ...opts, signer: this.sign })
|
|
267
267
|
}
|
|
268
268
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wao",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.3",
|
|
4
4
|
"bin": {
|
|
5
5
|
"wao": "./cjs/cli.js",
|
|
6
6
|
"wao-esm": "./esm/cli.js"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"express": "^5.1.0",
|
|
49
49
|
"fast-sha256": "^1.3.0",
|
|
50
50
|
"graphql": "^16.10.0",
|
|
51
|
-
"hbsig": "^0.1.
|
|
51
|
+
"hbsig": "^0.1.2",
|
|
52
52
|
"http-message-signatures": "^1.0.4",
|
|
53
53
|
"lmdb": "^3.2.2",
|
|
54
54
|
"localforage": "^1.10.0",
|