wao 0.10.1 → 0.10.2
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/aoconnect-base.js +196 -174
- package/cjs/armem-base.js +233 -100
- package/cjs/{ar-base.js → bar.js} +29 -30
- package/cjs/lfdb.js +4 -5
- package/cjs/server.js +66 -46
- package/cjs/tar.js +2 -2
- package/cjs/tgql.js +81 -78
- package/cjs/war.js +2 -2
- package/esm/aoconnect-base.js +24 -23
- package/esm/armem-base.js +40 -3
- package/esm/{ar-base.js → bar.js} +9 -15
- package/esm/lfdb.js +0 -1
- package/esm/server.js +5 -5
- package/esm/tar.js +1 -1
- package/esm/tgql.js +2 -2
- package/esm/war.js +1 -1
- package/package.json +1 -1
package/cjs/aoconnect-base.js
CHANGED
|
@@ -11,7 +11,8 @@ var _base64url = _interopRequireDefault(require("base64url"));
|
|
|
11
11
|
var _utils = require("./utils.js");
|
|
12
12
|
var _weavedrive = _interopRequireDefault(require("./weavedrive.js"));
|
|
13
13
|
var _ramda = require("ramda");
|
|
14
|
-
var _WarpArBundles$defaul
|
|
14
|
+
var _WarpArBundles$defaul,
|
|
15
|
+
_this = void 0;
|
|
15
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
@@ -142,7 +143,7 @@ var _default = exports["default"] = function _default() {
|
|
|
142
143
|
}();
|
|
143
144
|
var genEnv = /*#__PURE__*/function () {
|
|
144
145
|
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref6) {
|
|
145
|
-
var _yield$mem$
|
|
146
|
+
var _yield$mem$getTx$tags, _yield$mem$getTx, _yield$mem$getTx$tags2, _yield$mem$getTx2;
|
|
146
147
|
var pid, _ref6$owner, owner, _ref6$module, module;
|
|
147
148
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
148
149
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -150,15 +151,15 @@ var _default = exports["default"] = function _default() {
|
|
|
150
151
|
pid = _ref6.pid, _ref6$owner = _ref6.owner, owner = _ref6$owner === void 0 ? "" : _ref6$owner, _ref6$module = _ref6.module, module = _ref6$module === void 0 ? "" : _ref6$module;
|
|
151
152
|
_context2.t0 = pid;
|
|
152
153
|
_context2.next = 4;
|
|
153
|
-
return mem.
|
|
154
|
+
return mem.getTx(pid);
|
|
154
155
|
case 4:
|
|
155
|
-
_context2.t3 = _yield$mem$
|
|
156
|
+
_context2.t3 = _yield$mem$getTx = _context2.sent;
|
|
156
157
|
_context2.t2 = _context2.t3 === null;
|
|
157
158
|
if (_context2.t2) {
|
|
158
159
|
_context2.next = 8;
|
|
159
160
|
break;
|
|
160
161
|
}
|
|
161
|
-
_context2.t2 = _yield$mem$
|
|
162
|
+
_context2.t2 = _yield$mem$getTx === void 0;
|
|
162
163
|
case 8:
|
|
163
164
|
if (!_context2.t2) {
|
|
164
165
|
_context2.next = 12;
|
|
@@ -168,21 +169,21 @@ var _default = exports["default"] = function _default() {
|
|
|
168
169
|
_context2.next = 13;
|
|
169
170
|
break;
|
|
170
171
|
case 12:
|
|
171
|
-
_context2.t4 = _yield$mem$
|
|
172
|
+
_context2.t4 = _yield$mem$getTx.tags;
|
|
172
173
|
case 13:
|
|
173
|
-
_context2.t5 = _yield$mem$
|
|
174
|
+
_context2.t5 = _yield$mem$getTx$tags = _context2.t4;
|
|
174
175
|
_context2.t1 = _context2.t5 !== null;
|
|
175
176
|
if (!_context2.t1) {
|
|
176
177
|
_context2.next = 17;
|
|
177
178
|
break;
|
|
178
179
|
}
|
|
179
|
-
_context2.t1 = _yield$mem$
|
|
180
|
+
_context2.t1 = _yield$mem$getTx$tags !== void 0;
|
|
180
181
|
case 17:
|
|
181
182
|
if (!_context2.t1) {
|
|
182
183
|
_context2.next = 21;
|
|
183
184
|
break;
|
|
184
185
|
}
|
|
185
|
-
_context2.t6 = _yield$mem$
|
|
186
|
+
_context2.t6 = _yield$mem$getTx$tags;
|
|
186
187
|
_context2.next = 22;
|
|
187
188
|
break;
|
|
188
189
|
case 21:
|
|
@@ -197,15 +198,15 @@ var _default = exports["default"] = function _default() {
|
|
|
197
198
|
};
|
|
198
199
|
_context2.t10 = module;
|
|
199
200
|
_context2.next = 28;
|
|
200
|
-
return mem.
|
|
201
|
+
return mem.getTx(module);
|
|
201
202
|
case 28:
|
|
202
|
-
_context2.t13 = _yield$mem$
|
|
203
|
+
_context2.t13 = _yield$mem$getTx2 = _context2.sent;
|
|
203
204
|
_context2.t12 = _context2.t13 === null;
|
|
204
205
|
if (_context2.t12) {
|
|
205
206
|
_context2.next = 32;
|
|
206
207
|
break;
|
|
207
208
|
}
|
|
208
|
-
_context2.t12 = _yield$mem$
|
|
209
|
+
_context2.t12 = _yield$mem$getTx2 === void 0;
|
|
209
210
|
case 32:
|
|
210
211
|
if (!_context2.t12) {
|
|
211
212
|
_context2.next = 36;
|
|
@@ -215,21 +216,21 @@ var _default = exports["default"] = function _default() {
|
|
|
215
216
|
_context2.next = 37;
|
|
216
217
|
break;
|
|
217
218
|
case 36:
|
|
218
|
-
_context2.t14 = _yield$mem$
|
|
219
|
+
_context2.t14 = _yield$mem$getTx2.tags;
|
|
219
220
|
case 37:
|
|
220
|
-
_context2.t15 = _yield$mem$
|
|
221
|
+
_context2.t15 = _yield$mem$getTx$tags2 = _context2.t14;
|
|
221
222
|
_context2.t11 = _context2.t15 !== null;
|
|
222
223
|
if (!_context2.t11) {
|
|
223
224
|
_context2.next = 41;
|
|
224
225
|
break;
|
|
225
226
|
}
|
|
226
|
-
_context2.t11 = _yield$mem$
|
|
227
|
+
_context2.t11 = _yield$mem$getTx$tags2 !== void 0;
|
|
227
228
|
case 41:
|
|
228
229
|
if (!_context2.t11) {
|
|
229
230
|
_context2.next = 45;
|
|
230
231
|
break;
|
|
231
232
|
}
|
|
232
|
-
_context2.t16 = _yield$mem$
|
|
233
|
+
_context2.t16 = _yield$mem$getTx$tags2;
|
|
233
234
|
_context2.next = 46;
|
|
234
235
|
break;
|
|
235
236
|
case 45:
|
|
@@ -283,10 +284,11 @@ var _default = exports["default"] = function _default() {
|
|
|
283
284
|
p,
|
|
284
285
|
_opt$data,
|
|
285
286
|
_yield$mem$get$data,
|
|
286
|
-
_yield$mem$
|
|
287
|
+
_yield$mem$get,
|
|
287
288
|
data,
|
|
288
289
|
msg,
|
|
289
290
|
_env,
|
|
291
|
+
_msg,
|
|
290
292
|
_tags$CronInterval$s,
|
|
291
293
|
_tags$CronInterval$s2,
|
|
292
294
|
num,
|
|
@@ -378,7 +380,7 @@ var _default = exports["default"] = function _default() {
|
|
|
378
380
|
_context3.t3 = wdrive;
|
|
379
381
|
_context3.t4 = item;
|
|
380
382
|
_context3.next = 41;
|
|
381
|
-
return mem.
|
|
383
|
+
return mem.getTx(mod);
|
|
382
384
|
case 41:
|
|
383
385
|
_context3.t5 = _context3.sent;
|
|
384
386
|
_context3.t6 = {
|
|
@@ -414,7 +416,6 @@ var _default = exports["default"] = function _default() {
|
|
|
414
416
|
memory = (_opt$memory = opt.memory) !== null && _opt$memory !== void 0 ? _opt$memory : null;
|
|
415
417
|
p = {
|
|
416
418
|
extension: ext,
|
|
417
|
-
item: item === null || item === void 0 ? void 0 : item.binary,
|
|
418
419
|
format: format,
|
|
419
420
|
id: id,
|
|
420
421
|
epochs: [],
|
|
@@ -424,20 +425,18 @@ var _default = exports["default"] = function _default() {
|
|
|
424
425
|
memory: memory,
|
|
425
426
|
owner: owner,
|
|
426
427
|
height: 0,
|
|
427
|
-
res:
|
|
428
|
-
results: [id]
|
|
429
|
-
txs: [],
|
|
430
|
-
opt: opt
|
|
428
|
+
//res: { [id]: res },
|
|
429
|
+
results: [id]
|
|
431
430
|
};
|
|
432
431
|
if (!memory) {
|
|
433
432
|
_context3.next = 62;
|
|
434
433
|
break;
|
|
435
434
|
}
|
|
436
|
-
_context3.next =
|
|
435
|
+
_context3.next = 103;
|
|
437
436
|
break;
|
|
438
437
|
case 62:
|
|
439
438
|
if (!(_tags["On-Boot"] || true)) {
|
|
440
|
-
_context3.next =
|
|
439
|
+
_context3.next = 102;
|
|
441
440
|
break;
|
|
442
441
|
}
|
|
443
442
|
data = "";
|
|
@@ -452,13 +451,13 @@ var _default = exports["default"] = function _default() {
|
|
|
452
451
|
_context3.next = 70;
|
|
453
452
|
return mem.get("msgs", _tags["On-Boot"]);
|
|
454
453
|
case 70:
|
|
455
|
-
_context3.t10 = _yield$mem$
|
|
454
|
+
_context3.t10 = _yield$mem$get = _context3.sent;
|
|
456
455
|
_context3.t9 = _context3.t10 === null;
|
|
457
456
|
if (_context3.t9) {
|
|
458
457
|
_context3.next = 74;
|
|
459
458
|
break;
|
|
460
459
|
}
|
|
461
|
-
_context3.t9 = _yield$mem$
|
|
460
|
+
_context3.t9 = _yield$mem$get === void 0;
|
|
462
461
|
case 74:
|
|
463
462
|
if (!_context3.t9) {
|
|
464
463
|
_context3.next = 78;
|
|
@@ -468,7 +467,7 @@ var _default = exports["default"] = function _default() {
|
|
|
468
467
|
_context3.next = 79;
|
|
469
468
|
break;
|
|
470
469
|
case 78:
|
|
471
|
-
_context3.t11 = _yield$mem$
|
|
470
|
+
_context3.t11 = _yield$mem$get.data;
|
|
472
471
|
case 79:
|
|
473
472
|
_context3.t12 = _yield$mem$get$data = _context3.t11;
|
|
474
473
|
_context3.t8 = _context3.t12 !== null;
|
|
@@ -508,14 +507,17 @@ var _default = exports["default"] = function _default() {
|
|
|
508
507
|
res = _context3.sent;
|
|
509
508
|
p.memory = res.Memory;
|
|
510
509
|
delete res.Memory;
|
|
511
|
-
p.res[id] = res
|
|
512
|
-
_context3.next =
|
|
510
|
+
//p.res[id] = res
|
|
511
|
+
_context3.next = 103;
|
|
513
512
|
break;
|
|
514
|
-
case
|
|
513
|
+
case 102:
|
|
515
514
|
p.height += 1;
|
|
516
|
-
case
|
|
515
|
+
case 103:
|
|
516
|
+
_msg = _objectSpread(_objectSpread({}, (0, _ramda.o)((0, _ramda.dissoc)("signer"), (0, _ramda.dissoc)("memory"))(opt)), {}, {
|
|
517
|
+
res: res
|
|
518
|
+
});
|
|
517
519
|
_context3.next = 106;
|
|
518
|
-
return mem.set(
|
|
520
|
+
return mem.set(_msg, "msgs", id);
|
|
519
521
|
case 106:
|
|
520
522
|
if (!_tags["Cron-Interval"]) {
|
|
521
523
|
_context3.next = 130;
|
|
@@ -586,7 +588,7 @@ var _default = exports["default"] = function _default() {
|
|
|
586
588
|
var _assign = /*#__PURE__*/function () {
|
|
587
589
|
var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(opt) {
|
|
588
590
|
var _opt$tags2;
|
|
589
|
-
var p, _opt, hash, _yield$ar$dataitem2, id, owner, item, _opt$data2, _ref10, _opt$from, _res$Messages, _res$Spawns, _res$Assignments, data, _tags, from, raw_owner, hashBuffer, msg, _env, _yield$mem$getWasm2, format, mod, wasm, wdrive, res, _iterator2, _step2, v, _iterator3, _step3, _v, __tags, _iterator4, _step4, _v2, _iterator5, _step5, v2;
|
|
591
|
+
var p, _opt, hash, _yield$ar$dataitem2, id, owner, item, _opt$data2, _ref10, _opt$from, _res$Messages, _res$Spawns, _res$Assignments, data, _tags, from, raw_owner, hashBuffer, msg, _env, _yield$mem$getWasm2, format, mod, wasm, wdrive, res, _msg, _iterator2, _step2, v, _iterator3, _step3, _v, __tags, _iterator4, _step4, _v2, _iterator5, _step5, v2;
|
|
590
592
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
591
593
|
while (1) switch (_context4.prev = _context4.next) {
|
|
592
594
|
case 0:
|
|
@@ -703,7 +705,7 @@ var _default = exports["default"] = function _default() {
|
|
|
703
705
|
case 64:
|
|
704
706
|
_env = _context4.sent;
|
|
705
707
|
if (p.handle) {
|
|
706
|
-
_context4.next =
|
|
708
|
+
_context4.next = 88;
|
|
707
709
|
break;
|
|
708
710
|
}
|
|
709
711
|
_context4.next = 68;
|
|
@@ -718,10 +720,13 @@ var _default = exports["default"] = function _default() {
|
|
|
718
720
|
_context4.t15 = wasm;
|
|
719
721
|
_context4.t16 = format;
|
|
720
722
|
_context4.t17 = wdrive;
|
|
721
|
-
_context4.
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
723
|
+
_context4.next = 79;
|
|
724
|
+
return mem.getTx(p.id);
|
|
725
|
+
case 79:
|
|
726
|
+
_context4.t18 = _context4.sent.item;
|
|
727
|
+
_context4.next = 82;
|
|
728
|
+
return mem.getTx(mod);
|
|
729
|
+
case 82:
|
|
725
730
|
_context4.t19 = _context4.sent;
|
|
726
731
|
_context4.t20 = {
|
|
727
732
|
format: _context4.t16,
|
|
@@ -729,46 +734,46 @@ var _default = exports["default"] = function _default() {
|
|
|
729
734
|
spawn: _context4.t18,
|
|
730
735
|
module: _context4.t19
|
|
731
736
|
};
|
|
732
|
-
_context4.next =
|
|
737
|
+
_context4.next = 86;
|
|
733
738
|
return (0, _context4.t14)(_context4.t15, _context4.t20);
|
|
734
|
-
case
|
|
739
|
+
case 86:
|
|
735
740
|
p.handle = _context4.sent;
|
|
736
741
|
mem.env[opt.process].handle = p.handle;
|
|
737
|
-
case 86:
|
|
738
|
-
_context4.next = 88;
|
|
739
|
-
return p.handle(p.memory, msg, _env);
|
|
740
742
|
case 88:
|
|
743
|
+
_context4.next = 90;
|
|
744
|
+
return p.handle(p.memory, msg, _env);
|
|
745
|
+
case 90:
|
|
741
746
|
res = _context4.sent;
|
|
742
747
|
p.memory = res.Memory;
|
|
743
748
|
delete res.Memory;
|
|
744
|
-
p.res[opt.message] = res
|
|
749
|
+
//p.res[opt.message] = res
|
|
745
750
|
p.results.push(opt.message);
|
|
746
|
-
p.txs.unshift(_objectSpread({
|
|
747
|
-
id: id
|
|
748
|
-
}, opt));
|
|
749
751
|
_context4.next = 96;
|
|
750
752
|
return mem.set(p, "env", opt.process);
|
|
751
753
|
case 96:
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
754
|
+
_msg = _objectSpread(_objectSpread({}, (0, _ramda.dissoc)("signer", _opt)), {}, {
|
|
755
|
+
res: res
|
|
756
|
+
});
|
|
757
|
+
_context4.next = 99;
|
|
758
|
+
return mem.set(_msg, "msgs", opt.message);
|
|
759
|
+
case 99:
|
|
755
760
|
_iterator2 = _createForOfIteratorHelper((_res$Messages = res.Messages) !== null && _res$Messages !== void 0 ? _res$Messages : []);
|
|
756
|
-
_context4.prev =
|
|
761
|
+
_context4.prev = 100;
|
|
757
762
|
_iterator2.s();
|
|
758
|
-
case
|
|
763
|
+
case 102:
|
|
759
764
|
if ((_step2 = _iterator2.n()).done) {
|
|
760
|
-
_context4.next =
|
|
765
|
+
_context4.next = 111;
|
|
761
766
|
break;
|
|
762
767
|
}
|
|
763
768
|
v = _step2.value;
|
|
764
|
-
_context4.next =
|
|
769
|
+
_context4.next = 106;
|
|
765
770
|
return mem.get("env", v.Target);
|
|
766
|
-
case
|
|
771
|
+
case 106:
|
|
767
772
|
if (!_context4.sent) {
|
|
768
|
-
_context4.next =
|
|
773
|
+
_context4.next = 109;
|
|
769
774
|
break;
|
|
770
775
|
}
|
|
771
|
-
_context4.next =
|
|
776
|
+
_context4.next = 109;
|
|
772
777
|
return message({
|
|
773
778
|
"for": opt.message,
|
|
774
779
|
process: v.Target,
|
|
@@ -777,32 +782,32 @@ var _default = exports["default"] = function _default() {
|
|
|
777
782
|
signer: mu.signer,
|
|
778
783
|
from: opt.process
|
|
779
784
|
});
|
|
780
|
-
case
|
|
781
|
-
_context4.next =
|
|
785
|
+
case 109:
|
|
786
|
+
_context4.next = 102;
|
|
782
787
|
break;
|
|
783
|
-
case
|
|
784
|
-
_context4.next =
|
|
788
|
+
case 111:
|
|
789
|
+
_context4.next = 116;
|
|
785
790
|
break;
|
|
786
|
-
case
|
|
787
|
-
_context4.prev =
|
|
788
|
-
_context4.t21 = _context4["catch"](
|
|
791
|
+
case 113:
|
|
792
|
+
_context4.prev = 113;
|
|
793
|
+
_context4.t21 = _context4["catch"](100);
|
|
789
794
|
_iterator2.e(_context4.t21);
|
|
790
|
-
case
|
|
791
|
-
_context4.prev =
|
|
795
|
+
case 116:
|
|
796
|
+
_context4.prev = 116;
|
|
792
797
|
_iterator2.f();
|
|
793
|
-
return _context4.finish(
|
|
794
|
-
case
|
|
798
|
+
return _context4.finish(116);
|
|
799
|
+
case 119:
|
|
795
800
|
_iterator3 = _createForOfIteratorHelper((_res$Spawns = res.Spawns) !== null && _res$Spawns !== void 0 ? _res$Spawns : []);
|
|
796
|
-
_context4.prev =
|
|
801
|
+
_context4.prev = 120;
|
|
797
802
|
_iterator3.s();
|
|
798
|
-
case
|
|
803
|
+
case 122:
|
|
799
804
|
if ((_step3 = _iterator3.n()).done) {
|
|
800
|
-
_context4.next =
|
|
805
|
+
_context4.next = 129;
|
|
801
806
|
break;
|
|
802
807
|
}
|
|
803
808
|
_v = _step3.value;
|
|
804
809
|
__tags = (0, _utils.tags)(_v.Tags);
|
|
805
|
-
_context4.next =
|
|
810
|
+
_context4.next = 127;
|
|
806
811
|
return spawn({
|
|
807
812
|
"for": opt.message,
|
|
808
813
|
module: __tags.Module,
|
|
@@ -812,87 +817,87 @@ var _default = exports["default"] = function _default() {
|
|
|
812
817
|
from: __tags["From-Process"],
|
|
813
818
|
signer: mu.signer
|
|
814
819
|
});
|
|
815
|
-
case
|
|
816
|
-
_context4.next =
|
|
820
|
+
case 127:
|
|
821
|
+
_context4.next = 122;
|
|
817
822
|
break;
|
|
818
|
-
case
|
|
819
|
-
_context4.next =
|
|
823
|
+
case 129:
|
|
824
|
+
_context4.next = 134;
|
|
820
825
|
break;
|
|
821
|
-
case
|
|
822
|
-
_context4.prev =
|
|
823
|
-
_context4.t22 = _context4["catch"](
|
|
826
|
+
case 131:
|
|
827
|
+
_context4.prev = 131;
|
|
828
|
+
_context4.t22 = _context4["catch"](120);
|
|
824
829
|
_iterator3.e(_context4.t22);
|
|
825
|
-
case
|
|
826
|
-
_context4.prev =
|
|
830
|
+
case 134:
|
|
831
|
+
_context4.prev = 134;
|
|
827
832
|
_iterator3.f();
|
|
828
|
-
return _context4.finish(
|
|
829
|
-
case
|
|
833
|
+
return _context4.finish(134);
|
|
834
|
+
case 137:
|
|
830
835
|
_iterator4 = _createForOfIteratorHelper((_res$Assignments = res.Assignments) !== null && _res$Assignments !== void 0 ? _res$Assignments : []);
|
|
831
|
-
_context4.prev =
|
|
836
|
+
_context4.prev = 138;
|
|
832
837
|
_iterator4.s();
|
|
833
|
-
case
|
|
838
|
+
case 140:
|
|
834
839
|
if ((_step4 = _iterator4.n()).done) {
|
|
835
|
-
_context4.next =
|
|
840
|
+
_context4.next = 161;
|
|
836
841
|
break;
|
|
837
842
|
}
|
|
838
843
|
_v2 = _step4.value;
|
|
839
844
|
_iterator5 = _createForOfIteratorHelper(_v2.Processes);
|
|
840
|
-
_context4.prev =
|
|
845
|
+
_context4.prev = 143;
|
|
841
846
|
_iterator5.s();
|
|
842
|
-
case
|
|
847
|
+
case 145:
|
|
843
848
|
if ((_step5 = _iterator5.n()).done) {
|
|
844
|
-
_context4.next =
|
|
849
|
+
_context4.next = 151;
|
|
845
850
|
break;
|
|
846
851
|
}
|
|
847
852
|
v2 = _step5.value;
|
|
848
|
-
_context4.next =
|
|
853
|
+
_context4.next = 149;
|
|
849
854
|
return _assign({
|
|
850
855
|
message: _v2.Message,
|
|
851
856
|
process: v2,
|
|
852
857
|
from: opt.process,
|
|
853
858
|
signer: mu.signer
|
|
854
859
|
});
|
|
855
|
-
case
|
|
856
|
-
_context4.next =
|
|
860
|
+
case 149:
|
|
861
|
+
_context4.next = 145;
|
|
857
862
|
break;
|
|
858
|
-
case
|
|
859
|
-
_context4.next =
|
|
863
|
+
case 151:
|
|
864
|
+
_context4.next = 156;
|
|
860
865
|
break;
|
|
861
|
-
case
|
|
862
|
-
_context4.prev =
|
|
863
|
-
_context4.t23 = _context4["catch"](
|
|
866
|
+
case 153:
|
|
867
|
+
_context4.prev = 153;
|
|
868
|
+
_context4.t23 = _context4["catch"](143);
|
|
864
869
|
_iterator5.e(_context4.t23);
|
|
865
|
-
case
|
|
866
|
-
_context4.prev =
|
|
870
|
+
case 156:
|
|
871
|
+
_context4.prev = 156;
|
|
867
872
|
_iterator5.f();
|
|
868
|
-
return _context4.finish(
|
|
869
|
-
case
|
|
870
|
-
_context4.next =
|
|
873
|
+
return _context4.finish(156);
|
|
874
|
+
case 159:
|
|
875
|
+
_context4.next = 140;
|
|
871
876
|
break;
|
|
872
|
-
case
|
|
873
|
-
_context4.next =
|
|
877
|
+
case 161:
|
|
878
|
+
_context4.next = 166;
|
|
874
879
|
break;
|
|
875
|
-
case
|
|
876
|
-
_context4.prev =
|
|
877
|
-
_context4.t24 = _context4["catch"](
|
|
880
|
+
case 163:
|
|
881
|
+
_context4.prev = 163;
|
|
882
|
+
_context4.t24 = _context4["catch"](138);
|
|
878
883
|
_iterator4.e(_context4.t24);
|
|
879
|
-
case
|
|
880
|
-
_context4.prev =
|
|
884
|
+
case 166:
|
|
885
|
+
_context4.prev = 166;
|
|
881
886
|
_iterator4.f();
|
|
882
|
-
return _context4.finish(
|
|
883
|
-
case
|
|
887
|
+
return _context4.finish(166);
|
|
888
|
+
case 169:
|
|
884
889
|
return _context4.abrupt("return", id);
|
|
885
|
-
case
|
|
886
|
-
_context4.prev =
|
|
890
|
+
case 172:
|
|
891
|
+
_context4.prev = 172;
|
|
887
892
|
_context4.t25 = _context4["catch"](38);
|
|
888
893
|
console.log(_context4.t25);
|
|
889
|
-
case 174:
|
|
890
|
-
return _context4.abrupt("return", null);
|
|
891
894
|
case 175:
|
|
895
|
+
return _context4.abrupt("return", null);
|
|
896
|
+
case 176:
|
|
892
897
|
case "end":
|
|
893
898
|
return _context4.stop();
|
|
894
899
|
}
|
|
895
|
-
}, _callee4, null, [[38,
|
|
900
|
+
}, _callee4, null, [[38, 172], [43, 56], [100, 113, 116, 119], [120, 131, 134, 137], [138, 163, 166, 169], [143, 153, 156, 159]]);
|
|
896
901
|
}));
|
|
897
902
|
return function assign(_x8) {
|
|
898
903
|
return _ref9.apply(this, arguments);
|
|
@@ -901,7 +906,7 @@ var _default = exports["default"] = function _default() {
|
|
|
901
906
|
var message = /*#__PURE__*/function () {
|
|
902
907
|
var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(opt) {
|
|
903
908
|
var _opt$item$id, _opt$item, _opt$owner;
|
|
904
|
-
var p, ex, id, owner, item, _opt$tags3, _iterator6, _step6, v, _yield$mem$
|
|
909
|
+
var p, ex, id, owner, item, _opt$tags3, _iterator6, _step6, v, _yield$mem$getTx$tags3, _yield$mem$getTx3, pr, module, _yield$ar$dataitem3, _msg;
|
|
905
910
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
906
911
|
while (1) switch (_context5.prev = _context5.next) {
|
|
907
912
|
case 0:
|
|
@@ -953,15 +958,15 @@ var _default = exports["default"] = function _default() {
|
|
|
953
958
|
value: opt.from
|
|
954
959
|
});
|
|
955
960
|
_context5.next = 18;
|
|
956
|
-
return mem.
|
|
961
|
+
return mem.getTx(opt.from);
|
|
957
962
|
case 18:
|
|
958
|
-
_context5.t2 = _yield$mem$
|
|
963
|
+
_context5.t2 = _yield$mem$getTx3 = _context5.sent;
|
|
959
964
|
_context5.t1 = _context5.t2 === null;
|
|
960
965
|
if (_context5.t1) {
|
|
961
966
|
_context5.next = 22;
|
|
962
967
|
break;
|
|
963
968
|
}
|
|
964
|
-
_context5.t1 = _yield$mem$
|
|
969
|
+
_context5.t1 = _yield$mem$getTx3 === void 0;
|
|
965
970
|
case 22:
|
|
966
971
|
if (!_context5.t1) {
|
|
967
972
|
_context5.next = 26;
|
|
@@ -971,21 +976,21 @@ var _default = exports["default"] = function _default() {
|
|
|
971
976
|
_context5.next = 27;
|
|
972
977
|
break;
|
|
973
978
|
case 26:
|
|
974
|
-
_context5.t3 = _yield$mem$
|
|
979
|
+
_context5.t3 = _yield$mem$getTx3.tags;
|
|
975
980
|
case 27:
|
|
976
|
-
_context5.t4 = _yield$mem$
|
|
981
|
+
_context5.t4 = _yield$mem$getTx$tags3 = _context5.t3;
|
|
977
982
|
_context5.t0 = _context5.t4 !== null;
|
|
978
983
|
if (!_context5.t0) {
|
|
979
984
|
_context5.next = 31;
|
|
980
985
|
break;
|
|
981
986
|
}
|
|
982
|
-
_context5.t0 = _yield$mem$
|
|
987
|
+
_context5.t0 = _yield$mem$getTx$tags3 !== void 0;
|
|
983
988
|
case 31:
|
|
984
989
|
if (!_context5.t0) {
|
|
985
990
|
_context5.next = 35;
|
|
986
991
|
break;
|
|
987
992
|
}
|
|
988
|
-
_context5.t5 = _yield$mem$
|
|
993
|
+
_context5.t5 = _yield$mem$getTx$tags3;
|
|
989
994
|
_context5.next = 36;
|
|
990
995
|
break;
|
|
991
996
|
case 35:
|
|
@@ -1012,10 +1017,11 @@ var _default = exports["default"] = function _default() {
|
|
|
1012
1017
|
id = _yield$ar$dataitem3.id;
|
|
1013
1018
|
owner = _yield$ar$dataitem3.owner;
|
|
1014
1019
|
case 46:
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1020
|
+
_msg = (0, _ramda.dissoc)("signer", opt);
|
|
1021
|
+
_context5.next = 49;
|
|
1022
|
+
return mem.set(_msg, "msgs", id);
|
|
1023
|
+
case 49:
|
|
1024
|
+
_context5.next = 51;
|
|
1019
1025
|
return _assign({
|
|
1020
1026
|
message_item: item,
|
|
1021
1027
|
message: id,
|
|
@@ -1023,9 +1029,9 @@ var _default = exports["default"] = function _default() {
|
|
|
1023
1029
|
from: owner,
|
|
1024
1030
|
signer: mu.signer
|
|
1025
1031
|
});
|
|
1026
|
-
case 50:
|
|
1027
|
-
return _context5.abrupt("return", id);
|
|
1028
1032
|
case 51:
|
|
1033
|
+
return _context5.abrupt("return", id);
|
|
1034
|
+
case 52:
|
|
1029
1035
|
case "end":
|
|
1030
1036
|
return _context5.stop();
|
|
1031
1037
|
}
|
|
@@ -1107,20 +1113,20 @@ var _default = exports["default"] = function _default() {
|
|
|
1107
1113
|
ar: ar,
|
|
1108
1114
|
result: function () {
|
|
1109
1115
|
var _result = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(opt) {
|
|
1110
|
-
var _yield$mem$
|
|
1116
|
+
var _yield$mem$get2;
|
|
1111
1117
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
1112
1118
|
while (1) switch (_context9.prev = _context9.next) {
|
|
1113
1119
|
case 0:
|
|
1114
1120
|
_context9.next = 2;
|
|
1115
|
-
return mem.get("
|
|
1121
|
+
return mem.get("msgs", opt.message);
|
|
1116
1122
|
case 2:
|
|
1117
|
-
_context9.t1 = _yield$mem$
|
|
1123
|
+
_context9.t1 = _yield$mem$get2 = _context9.sent;
|
|
1118
1124
|
_context9.t0 = _context9.t1 === null;
|
|
1119
1125
|
if (_context9.t0) {
|
|
1120
1126
|
_context9.next = 6;
|
|
1121
1127
|
break;
|
|
1122
1128
|
}
|
|
1123
|
-
_context9.t0 = _yield$mem$
|
|
1129
|
+
_context9.t0 = _yield$mem$get2 === void 0;
|
|
1124
1130
|
case 6:
|
|
1125
1131
|
if (!_context9.t0) {
|
|
1126
1132
|
_context9.next = 10;
|
|
@@ -1130,7 +1136,7 @@ var _default = exports["default"] = function _default() {
|
|
|
1130
1136
|
_context9.next = 11;
|
|
1131
1137
|
break;
|
|
1132
1138
|
case 10:
|
|
1133
|
-
_context9.t2 = _yield$mem$
|
|
1139
|
+
_context9.t2 = _yield$mem$get2.res;
|
|
1134
1140
|
case 11:
|
|
1135
1141
|
return _context9.abrupt("return", _context9.t2);
|
|
1136
1142
|
case 12:
|
|
@@ -1158,55 +1164,68 @@ var _default = exports["default"] = function _default() {
|
|
|
1158
1164
|
results = [];
|
|
1159
1165
|
limit = (_opt$limit = opt.limit) !== null && _opt$limit !== void 0 ? _opt$limit : 25;
|
|
1160
1166
|
if (!(opt.sort === "DESC")) {
|
|
1161
|
-
_context10.next =
|
|
1167
|
+
_context10.next = 22;
|
|
1162
1168
|
break;
|
|
1163
1169
|
}
|
|
1164
1170
|
i = p.results.length - 1;
|
|
1165
1171
|
case 7:
|
|
1166
1172
|
if (!(0 < i)) {
|
|
1167
|
-
_context10.next =
|
|
1173
|
+
_context10.next = 20;
|
|
1168
1174
|
break;
|
|
1169
1175
|
}
|
|
1170
|
-
results
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1176
|
+
_context10.t0 = results;
|
|
1177
|
+
_context10.t1 = p.results[i];
|
|
1178
|
+
_context10.next = 12;
|
|
1179
|
+
return _this.result(p.results[i]);
|
|
1180
|
+
case 12:
|
|
1181
|
+
_context10.t2 = _context10.sent;
|
|
1182
|
+
_context10.t3 = {
|
|
1183
|
+
cursor: _context10.t1,
|
|
1184
|
+
node: _context10.t2
|
|
1185
|
+
};
|
|
1186
|
+
_context10.t0.push.call(_context10.t0, _context10.t3);
|
|
1174
1187
|
if (!(results.length >= limit)) {
|
|
1175
|
-
_context10.next =
|
|
1188
|
+
_context10.next = 17;
|
|
1176
1189
|
break;
|
|
1177
1190
|
}
|
|
1178
|
-
return _context10.abrupt("break",
|
|
1179
|
-
case
|
|
1191
|
+
return _context10.abrupt("break", 20);
|
|
1192
|
+
case 17:
|
|
1180
1193
|
i--;
|
|
1181
1194
|
_context10.next = 7;
|
|
1182
1195
|
break;
|
|
1183
|
-
case
|
|
1184
|
-
_context10.next =
|
|
1196
|
+
case 20:
|
|
1197
|
+
_context10.next = 35;
|
|
1185
1198
|
break;
|
|
1186
|
-
case
|
|
1199
|
+
case 22:
|
|
1187
1200
|
_i = 0;
|
|
1188
|
-
case
|
|
1201
|
+
case 23:
|
|
1189
1202
|
if (!(_i < p.results.length)) {
|
|
1190
|
-
_context10.next =
|
|
1203
|
+
_context10.next = 35;
|
|
1191
1204
|
break;
|
|
1192
1205
|
}
|
|
1193
|
-
results
|
|
1194
|
-
|
|
1195
|
-
|
|
1206
|
+
_context10.t4 = results;
|
|
1207
|
+
_context10.next = 27;
|
|
1208
|
+
return _this.result(p.results[_i]);
|
|
1209
|
+
case 27:
|
|
1210
|
+
_context10.t5 = _context10.sent;
|
|
1211
|
+
_context10.t6 = {
|
|
1212
|
+
node: _context10.t5
|
|
1213
|
+
};
|
|
1214
|
+
_context10.t4.push.call(_context10.t4, _context10.t6);
|
|
1196
1215
|
if (!(results.length >= limit)) {
|
|
1197
|
-
_context10.next =
|
|
1216
|
+
_context10.next = 32;
|
|
1198
1217
|
break;
|
|
1199
1218
|
}
|
|
1200
|
-
return _context10.abrupt("break",
|
|
1201
|
-
case
|
|
1219
|
+
return _context10.abrupt("break", 35);
|
|
1220
|
+
case 32:
|
|
1202
1221
|
_i++;
|
|
1203
|
-
_context10.next =
|
|
1222
|
+
_context10.next = 23;
|
|
1204
1223
|
break;
|
|
1205
|
-
case
|
|
1224
|
+
case 35:
|
|
1206
1225
|
return _context10.abrupt("return", {
|
|
1207
1226
|
edges: results
|
|
1208
1227
|
});
|
|
1209
|
-
case
|
|
1228
|
+
case 36:
|
|
1210
1229
|
case "end":
|
|
1211
1230
|
return _context10.stop();
|
|
1212
1231
|
}
|
|
@@ -1272,7 +1291,7 @@ var _default = exports["default"] = function _default() {
|
|
|
1272
1291
|
case 21:
|
|
1273
1292
|
_env = _context11.sent;
|
|
1274
1293
|
if (p.handle) {
|
|
1275
|
-
_context11.next =
|
|
1294
|
+
_context11.next = 45;
|
|
1276
1295
|
break;
|
|
1277
1296
|
}
|
|
1278
1297
|
_context11.next = 25;
|
|
@@ -1287,10 +1306,13 @@ var _default = exports["default"] = function _default() {
|
|
|
1287
1306
|
_context11.t1 = wasm;
|
|
1288
1307
|
_context11.t2 = format;
|
|
1289
1308
|
_context11.t3 = wdrive;
|
|
1290
|
-
_context11.
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1309
|
+
_context11.next = 36;
|
|
1310
|
+
return mem.getTx(p.id);
|
|
1311
|
+
case 36:
|
|
1312
|
+
_context11.t4 = _context11.sent.item;
|
|
1313
|
+
_context11.next = 39;
|
|
1314
|
+
return mem.getTx(mod);
|
|
1315
|
+
case 39:
|
|
1294
1316
|
_context11.t5 = _context11.sent;
|
|
1295
1317
|
_context11.t6 = {
|
|
1296
1318
|
format: _context11.t2,
|
|
@@ -1298,28 +1320,28 @@ var _default = exports["default"] = function _default() {
|
|
|
1298
1320
|
spawn: _context11.t4,
|
|
1299
1321
|
module: _context11.t5
|
|
1300
1322
|
};
|
|
1301
|
-
_context11.next =
|
|
1323
|
+
_context11.next = 43;
|
|
1302
1324
|
return (0, _context11.t0)(_context11.t1, _context11.t6);
|
|
1303
|
-
case
|
|
1325
|
+
case 43:
|
|
1304
1326
|
p.handle = _context11.sent;
|
|
1305
1327
|
mem.env[opt.process].handle = p.handle;
|
|
1306
|
-
case 43:
|
|
1307
|
-
_context11.next = 45;
|
|
1308
|
-
return p.handle(p.memory, msg, _env);
|
|
1309
1328
|
case 45:
|
|
1329
|
+
_context11.next = 47;
|
|
1330
|
+
return p.handle(p.memory, msg, _env);
|
|
1331
|
+
case 47:
|
|
1310
1332
|
res = _context11.sent;
|
|
1311
1333
|
return _context11.abrupt("return", res);
|
|
1312
|
-
case
|
|
1313
|
-
_context11.prev =
|
|
1334
|
+
case 51:
|
|
1335
|
+
_context11.prev = 51;
|
|
1314
1336
|
_context11.t7 = _context11["catch"](14);
|
|
1315
1337
|
console.log(_context11.t7);
|
|
1316
|
-
case
|
|
1338
|
+
case 54:
|
|
1317
1339
|
return _context11.abrupt("return", null);
|
|
1318
|
-
case
|
|
1340
|
+
case 55:
|
|
1319
1341
|
case "end":
|
|
1320
1342
|
return _context11.stop();
|
|
1321
1343
|
}
|
|
1322
|
-
}, _callee11, null, [[14,
|
|
1344
|
+
}, _callee11, null, [[14, 51]]);
|
|
1323
1345
|
}));
|
|
1324
1346
|
function dryrun(_x14) {
|
|
1325
1347
|
return _dryrun.apply(this, arguments);
|