wao 0.14.6 → 0.15.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/ao.js +541 -407
- package/cjs/hb.js +3 -2
- package/esm/ao.js +84 -44
- package/esm/hb.js +1 -1
- package/package.json +1 -1
package/cjs/ao.js
CHANGED
|
@@ -14,6 +14,10 @@ var _WarpArBundles$defaul;
|
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
15
|
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); }
|
|
16
16
|
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; }
|
|
17
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
18
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
20
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
17
21
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
22
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
23
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -618,38 +622,20 @@ var AO = /*#__PURE__*/function () {
|
|
|
618
622
|
return spwn;
|
|
619
623
|
}()
|
|
620
624
|
}, {
|
|
621
|
-
key: "
|
|
625
|
+
key: "res",
|
|
622
626
|
value: function () {
|
|
623
|
-
var
|
|
627
|
+
var _res2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(_ref12) {
|
|
624
628
|
var _this3 = this;
|
|
625
|
-
var
|
|
629
|
+
var jwk, pid, mid, _ref12$check, check, get, _ref12$timeout, timeout, _ref12$mode, mode, _ref12$limit, limit, err, hash, getNewTxs, checkOut, res, out, results, start, _txs, _txmap, checked, _iterator5, _step5, v, _res;
|
|
626
630
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
627
631
|
while (1) switch (_context11.prev = _context11.next) {
|
|
628
632
|
case 0:
|
|
629
|
-
|
|
633
|
+
jwk = _ref12.jwk, pid = _ref12.pid, mid = _ref12.mid, _ref12$check = _ref12.check, check = _ref12$check === void 0 ? [] : _ref12$check, get = _ref12.get, _ref12$timeout = _ref12.timeout, timeout = _ref12$timeout === void 0 ? 0 : _ref12$timeout, _ref12$mode = _ref12.mode, mode = _ref12$mode === void 0 ? "aoconnect" : _ref12$mode, _ref12$limit = _ref12.limit, limit = _ref12$limit === void 0 ? 25 : _ref12$limit;
|
|
630
634
|
err = null;
|
|
631
|
-
_context11.next = 4;
|
|
632
|
-
return this.ar.checkWallet({
|
|
633
|
-
jwk: jwk
|
|
634
|
-
});
|
|
635
|
-
case 4:
|
|
636
|
-
_yield$this$ar$checkW2 = _context11.sent;
|
|
637
|
-
jwk = _yield$this$ar$checkW2.jwk;
|
|
638
|
-
err = _yield$this$ar$checkW2.err;
|
|
639
|
-
if (!err) {
|
|
640
|
-
_context11.next = 9;
|
|
641
|
-
break;
|
|
642
|
-
}
|
|
643
|
-
return _context11.abrupt("return", {
|
|
644
|
-
err: err
|
|
645
|
-
});
|
|
646
|
-
case 9:
|
|
647
|
-
anchors = {};
|
|
648
635
|
hash = null;
|
|
649
|
-
mid = null;
|
|
650
636
|
getNewTxs = /*#__PURE__*/function () {
|
|
651
637
|
var _ref13 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(pid, _txs, _txmap) {
|
|
652
|
-
var exists, txs, _iterator2, _step2, v, t, _t$fromProcess, _v$owner, _iterator3, _step3, _v, hash2;
|
|
638
|
+
var exists, txs, _iterator2, _step2, v, t, _t$fromProcess, _v$owner, _yield$_this3$ress, _out2, _iterator3, _step3, _v, hash2;
|
|
653
639
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
654
640
|
while (1) switch (_context9.prev = _context9.next) {
|
|
655
641
|
case 0:
|
|
@@ -691,20 +677,18 @@ var AO = /*#__PURE__*/function () {
|
|
|
691
677
|
} finally {
|
|
692
678
|
_iterator2.f();
|
|
693
679
|
}
|
|
694
|
-
_context9.next =
|
|
680
|
+
_context9.next = 15;
|
|
695
681
|
break;
|
|
696
682
|
case 9:
|
|
697
|
-
_context9.
|
|
698
|
-
|
|
699
|
-
_context9.next = 13;
|
|
700
|
-
return _this3.res({
|
|
683
|
+
_context9.next = 11;
|
|
684
|
+
return _this3.ress({
|
|
701
685
|
pid: pid,
|
|
702
686
|
limit: limit
|
|
703
687
|
});
|
|
704
|
-
case
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
_iterator3 = (0,
|
|
688
|
+
case 11:
|
|
689
|
+
_yield$_this3$ress = _context9.sent;
|
|
690
|
+
_out2 = _yield$_this3$ress.out;
|
|
691
|
+
_iterator3 = _createForOfIteratorHelper((0, _ramda.reverse)(_out2));
|
|
708
692
|
try {
|
|
709
693
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
710
694
|
_v = _step3.value;
|
|
@@ -728,7 +712,7 @@ var AO = /*#__PURE__*/function () {
|
|
|
728
712
|
} finally {
|
|
729
713
|
_iterator3.f();
|
|
730
714
|
}
|
|
731
|
-
case
|
|
715
|
+
case 15:
|
|
732
716
|
case "end":
|
|
733
717
|
return _context9.stop();
|
|
734
718
|
}
|
|
@@ -740,7 +724,7 @@ var AO = /*#__PURE__*/function () {
|
|
|
740
724
|
}();
|
|
741
725
|
checkOut = /*#__PURE__*/function () {
|
|
742
726
|
var _ref14 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(get, _txs, _txmap, out) {
|
|
743
|
-
var _iterator4, _step4, v,
|
|
727
|
+
var _iterator4, _step4, v, _res3, _out;
|
|
744
728
|
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
745
729
|
while (1) switch (_context10.prev = _context10.next) {
|
|
746
730
|
case 0:
|
|
@@ -758,14 +742,14 @@ var AO = /*#__PURE__*/function () {
|
|
|
758
742
|
break;
|
|
759
743
|
}
|
|
760
744
|
_context10.next = 8;
|
|
761
|
-
return _this3.
|
|
762
|
-
|
|
763
|
-
|
|
745
|
+
return _this3.result({
|
|
746
|
+
process: pid,
|
|
747
|
+
message: v.id
|
|
764
748
|
});
|
|
765
749
|
case 8:
|
|
766
|
-
|
|
767
|
-
if (!hash) console.log(
|
|
768
|
-
_txmap[v.id].res =
|
|
750
|
+
_res3 = _context10.sent;
|
|
751
|
+
if (!hash) console.log(_res3);
|
|
752
|
+
_txmap[v.id].res = _res3;
|
|
769
753
|
case 11:
|
|
770
754
|
if (!(!(0, _ramda.isNil)(_txmap[v.id].res) && _txmap[v.id].out !== true)) {
|
|
771
755
|
_context10.next = 17;
|
|
@@ -806,35 +790,25 @@ var AO = /*#__PURE__*/function () {
|
|
|
806
790
|
};
|
|
807
791
|
}();
|
|
808
792
|
res = null, out = null, results = [];
|
|
809
|
-
_tags = (0, _utils.buildTags)(act, tags);
|
|
810
793
|
start = Date.now();
|
|
811
|
-
_context11.prev =
|
|
812
|
-
_context11.next = 20;
|
|
813
|
-
return this.message({
|
|
814
|
-
process: pid,
|
|
815
|
-
signer: this.toSigner(jwk),
|
|
816
|
-
tags: _tags,
|
|
817
|
-
data: (0, _utils.jsonToStr)(data)
|
|
818
|
-
});
|
|
819
|
-
case 20:
|
|
820
|
-
mid = _context11.sent;
|
|
794
|
+
_context11.prev = 7;
|
|
821
795
|
if (!(0, _ramda.is)(Array, check)) check = [check];
|
|
822
796
|
_context11.t0 = mid;
|
|
823
|
-
_context11.next =
|
|
797
|
+
_context11.next = 12;
|
|
824
798
|
return this.ar.toAddr(jwk);
|
|
825
|
-
case
|
|
799
|
+
case 12:
|
|
826
800
|
_context11.t1 = _context11.sent;
|
|
827
801
|
_context11.t2 = {
|
|
828
802
|
id: _context11.t0,
|
|
829
803
|
from: _context11.t1
|
|
830
804
|
};
|
|
831
805
|
_txs = [_context11.t2];
|
|
832
|
-
_context11.next =
|
|
833
|
-
return this.
|
|
834
|
-
|
|
835
|
-
|
|
806
|
+
_context11.next = 17;
|
|
807
|
+
return this.result({
|
|
808
|
+
process: pid,
|
|
809
|
+
message: mid
|
|
836
810
|
});
|
|
837
|
-
case
|
|
811
|
+
case 17:
|
|
838
812
|
res = _context11.sent;
|
|
839
813
|
hash = getHash(res);
|
|
840
814
|
_txmap = _defineProperty({}, mid, {
|
|
@@ -846,131 +820,131 @@ var AO = /*#__PURE__*/function () {
|
|
|
846
820
|
res: res
|
|
847
821
|
});
|
|
848
822
|
checked = false;
|
|
849
|
-
case
|
|
823
|
+
case 22:
|
|
850
824
|
_iterator5 = _createForOfIteratorHelper(_txs);
|
|
851
|
-
_context11.prev =
|
|
825
|
+
_context11.prev = 23;
|
|
852
826
|
_iterator5.s();
|
|
853
|
-
case
|
|
827
|
+
case 25:
|
|
854
828
|
if ((_step5 = _iterator5.n()).done) {
|
|
855
|
-
_context11.next =
|
|
829
|
+
_context11.next = 39;
|
|
856
830
|
break;
|
|
857
831
|
}
|
|
858
832
|
v = _step5.value;
|
|
859
833
|
if (_txmap[v.id].checked) {
|
|
860
|
-
_context11.next =
|
|
834
|
+
_context11.next = 37;
|
|
861
835
|
break;
|
|
862
836
|
}
|
|
863
837
|
_txmap[v.id].checked = true;
|
|
864
838
|
if (!(0, _ramda.isNil)(_txmap[v.id].res)) {
|
|
865
|
-
_context11.next =
|
|
839
|
+
_context11.next = 34;
|
|
866
840
|
break;
|
|
867
841
|
}
|
|
868
|
-
_context11.next =
|
|
869
|
-
return this.
|
|
870
|
-
|
|
871
|
-
|
|
842
|
+
_context11.next = 32;
|
|
843
|
+
return this.result({
|
|
844
|
+
process: pid,
|
|
845
|
+
message: v.id
|
|
872
846
|
});
|
|
873
|
-
case
|
|
847
|
+
case 32:
|
|
874
848
|
_res = _context11.sent;
|
|
875
849
|
_txmap[v.id].res = _res;
|
|
876
|
-
case
|
|
850
|
+
case 34:
|
|
877
851
|
if (!(0, _ramda.isNil)(check) && check.length > 0) {
|
|
878
852
|
checked = (0, _utils.allChecked)(check, _txmap[v.id].res, v.from);
|
|
879
853
|
} else {
|
|
880
854
|
checked = true;
|
|
881
855
|
}
|
|
882
856
|
if (!checked) {
|
|
883
|
-
_context11.next =
|
|
857
|
+
_context11.next = 37;
|
|
884
858
|
break;
|
|
885
859
|
}
|
|
886
|
-
return _context11.abrupt("break",
|
|
887
|
-
case
|
|
888
|
-
_context11.next =
|
|
860
|
+
return _context11.abrupt("break", 39);
|
|
861
|
+
case 37:
|
|
862
|
+
_context11.next = 25;
|
|
889
863
|
break;
|
|
890
|
-
case
|
|
891
|
-
_context11.next =
|
|
864
|
+
case 39:
|
|
865
|
+
_context11.next = 44;
|
|
892
866
|
break;
|
|
893
|
-
case
|
|
894
|
-
_context11.prev =
|
|
895
|
-
_context11.t3 = _context11["catch"](
|
|
867
|
+
case 41:
|
|
868
|
+
_context11.prev = 41;
|
|
869
|
+
_context11.t3 = _context11["catch"](23);
|
|
896
870
|
_iterator5.e(_context11.t3);
|
|
897
|
-
case
|
|
898
|
-
_context11.prev =
|
|
871
|
+
case 44:
|
|
872
|
+
_context11.prev = 44;
|
|
899
873
|
_iterator5.f();
|
|
900
|
-
return _context11.finish(
|
|
901
|
-
case
|
|
874
|
+
return _context11.finish(44);
|
|
875
|
+
case 47:
|
|
902
876
|
if (!checked) {
|
|
903
|
-
_context11.next =
|
|
877
|
+
_context11.next = 49;
|
|
904
878
|
break;
|
|
905
879
|
}
|
|
906
|
-
return _context11.abrupt("break",
|
|
907
|
-
case
|
|
908
|
-
_context11.next =
|
|
880
|
+
return _context11.abrupt("break", 54);
|
|
881
|
+
case 49:
|
|
882
|
+
_context11.next = 51;
|
|
909
883
|
return (0, _utils.wait)(1000);
|
|
910
|
-
case
|
|
911
|
-
_context11.next =
|
|
884
|
+
case 51:
|
|
885
|
+
_context11.next = 53;
|
|
912
886
|
return getNewTxs(pid, _txs, _txmap);
|
|
913
|
-
case
|
|
887
|
+
case 53:
|
|
914
888
|
if (Date.now() - start < timeout) {
|
|
915
|
-
_context11.next =
|
|
889
|
+
_context11.next = 22;
|
|
916
890
|
break;
|
|
917
891
|
}
|
|
918
|
-
case
|
|
892
|
+
case 54:
|
|
919
893
|
if (checked) {
|
|
920
|
-
_context11.next =
|
|
894
|
+
_context11.next = 58;
|
|
921
895
|
break;
|
|
922
896
|
}
|
|
923
897
|
err = "something went wrong!";
|
|
924
|
-
_context11.next =
|
|
898
|
+
_context11.next = 82;
|
|
925
899
|
break;
|
|
926
|
-
case
|
|
900
|
+
case 58:
|
|
927
901
|
_context11.t4 = _utils.mergeOut;
|
|
928
902
|
_context11.t5 = out;
|
|
929
|
-
_context11.next =
|
|
903
|
+
_context11.next = 62;
|
|
930
904
|
return checkOut(get, _txs, _txmap, out);
|
|
931
|
-
case
|
|
905
|
+
case 62:
|
|
932
906
|
_context11.t6 = _context11.sent;
|
|
933
907
|
_context11.t7 = get;
|
|
934
908
|
out = (0, _context11.t4)(_context11.t5, _context11.t6, _context11.t7);
|
|
935
909
|
if (!(!(0, _utils.isOutComplete)(out, get) && !(0, _ramda.isNil)(get))) {
|
|
936
|
-
_context11.next =
|
|
910
|
+
_context11.next = 82;
|
|
937
911
|
break;
|
|
938
912
|
}
|
|
939
|
-
case
|
|
913
|
+
case 66:
|
|
940
914
|
if (!(Date.now() - start < timeout)) {
|
|
941
|
-
_context11.next =
|
|
915
|
+
_context11.next = 82;
|
|
942
916
|
break;
|
|
943
917
|
}
|
|
944
|
-
_context11.next =
|
|
918
|
+
_context11.next = 69;
|
|
945
919
|
return getNewTxs(pid, _txs, _txmap);
|
|
946
|
-
case
|
|
920
|
+
case 69:
|
|
947
921
|
_context11.t8 = _utils.mergeOut;
|
|
948
922
|
_context11.t9 = out;
|
|
949
|
-
_context11.next =
|
|
923
|
+
_context11.next = 73;
|
|
950
924
|
return checkOut(get, _txs, _txmap, out);
|
|
951
|
-
case
|
|
925
|
+
case 73:
|
|
952
926
|
_context11.t10 = _context11.sent;
|
|
953
927
|
_context11.t11 = get;
|
|
954
928
|
out = (0, _context11.t8)(_context11.t9, _context11.t10, _context11.t11);
|
|
955
929
|
if (!(0, _utils.isOutComplete)(out, get)) {
|
|
956
|
-
_context11.next =
|
|
930
|
+
_context11.next = 78;
|
|
957
931
|
break;
|
|
958
932
|
}
|
|
959
|
-
return _context11.abrupt("break",
|
|
960
|
-
case
|
|
961
|
-
_context11.next =
|
|
933
|
+
return _context11.abrupt("break", 82);
|
|
934
|
+
case 78:
|
|
935
|
+
_context11.next = 80;
|
|
962
936
|
return (0, _utils.wait)(1000);
|
|
963
|
-
case
|
|
964
|
-
_context11.next =
|
|
937
|
+
case 80:
|
|
938
|
+
_context11.next = 66;
|
|
965
939
|
break;
|
|
966
|
-
case
|
|
967
|
-
_context11.next =
|
|
940
|
+
case 82:
|
|
941
|
+
_context11.next = 87;
|
|
968
942
|
break;
|
|
969
|
-
case
|
|
970
|
-
_context11.prev =
|
|
971
|
-
_context11.t12 = _context11["catch"](
|
|
943
|
+
case 84:
|
|
944
|
+
_context11.prev = 84;
|
|
945
|
+
_context11.t12 = _context11["catch"](7);
|
|
972
946
|
err = _context11.t12;
|
|
973
|
-
case
|
|
947
|
+
case 87:
|
|
974
948
|
return _context11.abrupt("return", {
|
|
975
949
|
mid: mid,
|
|
976
950
|
res: res,
|
|
@@ -978,13 +952,72 @@ var AO = /*#__PURE__*/function () {
|
|
|
978
952
|
out: out,
|
|
979
953
|
results: results
|
|
980
954
|
});
|
|
981
|
-
case
|
|
955
|
+
case 88:
|
|
982
956
|
case "end":
|
|
983
957
|
return _context11.stop();
|
|
984
958
|
}
|
|
985
|
-
}, _callee11, this, [[
|
|
959
|
+
}, _callee11, this, [[7, 84], [23, 41, 44, 47]]);
|
|
960
|
+
}));
|
|
961
|
+
function res(_x7) {
|
|
962
|
+
return _res2.apply(this, arguments);
|
|
963
|
+
}
|
|
964
|
+
return res;
|
|
965
|
+
}()
|
|
966
|
+
}, {
|
|
967
|
+
key: "msg",
|
|
968
|
+
value: function () {
|
|
969
|
+
var _msg = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(_ref15) {
|
|
970
|
+
var pid, jwk, data, _ref15$act, act, _ref15$tags, tags, _ref15$check, check, get, _ref15$timeout, timeout, _ref15$mode, mode, _ref15$limit, limit, err, _yield$this$ar$checkW2, _tags, mid;
|
|
971
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
972
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
973
|
+
case 0:
|
|
974
|
+
pid = _ref15.pid, jwk = _ref15.jwk, data = _ref15.data, _ref15$act = _ref15.act, act = _ref15$act === void 0 ? "Eval" : _ref15$act, _ref15$tags = _ref15.tags, tags = _ref15$tags === void 0 ? {} : _ref15$tags, _ref15$check = _ref15.check, check = _ref15$check === void 0 ? [] : _ref15$check, get = _ref15.get, _ref15$timeout = _ref15.timeout, timeout = _ref15$timeout === void 0 ? 0 : _ref15$timeout, _ref15$mode = _ref15.mode, mode = _ref15$mode === void 0 ? "aoconnect" : _ref15$mode, _ref15$limit = _ref15.limit, limit = _ref15$limit === void 0 ? 25 : _ref15$limit;
|
|
975
|
+
_context12.next = 3;
|
|
976
|
+
return this.ar.checkWallet({
|
|
977
|
+
jwk: jwk
|
|
978
|
+
});
|
|
979
|
+
case 3:
|
|
980
|
+
_yield$this$ar$checkW2 = _context12.sent;
|
|
981
|
+
jwk = _yield$this$ar$checkW2.jwk;
|
|
982
|
+
err = _yield$this$ar$checkW2.err;
|
|
983
|
+
if (!err) {
|
|
984
|
+
_context12.next = 8;
|
|
985
|
+
break;
|
|
986
|
+
}
|
|
987
|
+
return _context12.abrupt("return", {
|
|
988
|
+
err: err
|
|
989
|
+
});
|
|
990
|
+
case 8:
|
|
991
|
+
_tags = (0, _utils.buildTags)(act, tags);
|
|
992
|
+
_context12.next = 11;
|
|
993
|
+
return this.message({
|
|
994
|
+
process: pid,
|
|
995
|
+
signer: this.toSigner(jwk),
|
|
996
|
+
tags: _tags,
|
|
997
|
+
data: (0, _utils.jsonToStr)(data)
|
|
998
|
+
});
|
|
999
|
+
case 11:
|
|
1000
|
+
mid = _context12.sent;
|
|
1001
|
+
_context12.next = 14;
|
|
1002
|
+
return this.res({
|
|
1003
|
+
pid: pid,
|
|
1004
|
+
mid: mid,
|
|
1005
|
+
jwk: jwk,
|
|
1006
|
+
check: check,
|
|
1007
|
+
get: get,
|
|
1008
|
+
timeout: timeout,
|
|
1009
|
+
mode: mode,
|
|
1010
|
+
limit: limit
|
|
1011
|
+
});
|
|
1012
|
+
case 14:
|
|
1013
|
+
return _context12.abrupt("return", _context12.sent);
|
|
1014
|
+
case 15:
|
|
1015
|
+
case "end":
|
|
1016
|
+
return _context12.stop();
|
|
1017
|
+
}
|
|
1018
|
+
}, _callee12, this);
|
|
986
1019
|
}));
|
|
987
|
-
function msg(
|
|
1020
|
+
function msg(_x15) {
|
|
988
1021
|
return _msg.apply(this, arguments);
|
|
989
1022
|
}
|
|
990
1023
|
return msg;
|
|
@@ -992,60 +1025,60 @@ var AO = /*#__PURE__*/function () {
|
|
|
992
1025
|
}, {
|
|
993
1026
|
key: "asgn",
|
|
994
1027
|
value: function () {
|
|
995
|
-
var _asgn = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
996
|
-
var pid, mid, jwk,
|
|
997
|
-
return _regeneratorRuntime().wrap(function
|
|
998
|
-
while (1) switch (
|
|
1028
|
+
var _asgn = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(_ref16) {
|
|
1029
|
+
var pid, mid, jwk, _ref16$check, check, get, err, _yield$this$ar$checkW3, res, out;
|
|
1030
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
1031
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
999
1032
|
case 0:
|
|
1000
|
-
pid =
|
|
1033
|
+
pid = _ref16.pid, mid = _ref16.mid, jwk = _ref16.jwk, _ref16$check = _ref16.check, check = _ref16$check === void 0 ? [] : _ref16$check, get = _ref16.get;
|
|
1001
1034
|
err = null;
|
|
1002
|
-
|
|
1035
|
+
_context13.next = 4;
|
|
1003
1036
|
return this.ar.checkWallet({
|
|
1004
1037
|
jwk: jwk
|
|
1005
1038
|
});
|
|
1006
1039
|
case 4:
|
|
1007
|
-
_yield$this$ar$checkW3 =
|
|
1040
|
+
_yield$this$ar$checkW3 = _context13.sent;
|
|
1008
1041
|
jwk = _yield$this$ar$checkW3.jwk;
|
|
1009
1042
|
err = _yield$this$ar$checkW3.err;
|
|
1010
1043
|
if (!err) {
|
|
1011
|
-
|
|
1044
|
+
_context13.next = 9;
|
|
1012
1045
|
break;
|
|
1013
1046
|
}
|
|
1014
|
-
return
|
|
1047
|
+
return _context13.abrupt("return", {
|
|
1015
1048
|
err: err
|
|
1016
1049
|
});
|
|
1017
1050
|
case 9:
|
|
1018
1051
|
res = null, out = null;
|
|
1019
|
-
|
|
1020
|
-
|
|
1052
|
+
_context13.prev = 10;
|
|
1053
|
+
_context13.next = 13;
|
|
1021
1054
|
return this.assign({
|
|
1022
1055
|
process: pid,
|
|
1023
1056
|
message: mid,
|
|
1024
1057
|
signer: this.toSigner(jwk)
|
|
1025
1058
|
});
|
|
1026
1059
|
case 13:
|
|
1027
|
-
mid =
|
|
1028
|
-
|
|
1029
|
-
return this.
|
|
1030
|
-
|
|
1031
|
-
|
|
1060
|
+
mid = _context13.sent;
|
|
1061
|
+
_context13.next = 16;
|
|
1062
|
+
return this.result({
|
|
1063
|
+
process: pid,
|
|
1064
|
+
message: mid
|
|
1032
1065
|
});
|
|
1033
1066
|
case 16:
|
|
1034
|
-
res =
|
|
1067
|
+
res = _context13.sent;
|
|
1035
1068
|
if (!res) err = "something went wrong";
|
|
1036
1069
|
if (res.Error) err = res.Error;else {
|
|
1037
1070
|
if (!(0, _ramda.is)(Array, check)) check = [check];
|
|
1038
1071
|
if (!(0, _utils.allChecked)(check, res)) err = "something went wrong";
|
|
1039
1072
|
if (!err && !(0, _ramda.isNil)(get)) out = (0, _utils.getTagVal)(get, res); // todo: from
|
|
1040
1073
|
}
|
|
1041
|
-
|
|
1074
|
+
_context13.next = 24;
|
|
1042
1075
|
break;
|
|
1043
1076
|
case 21:
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
err =
|
|
1077
|
+
_context13.prev = 21;
|
|
1078
|
+
_context13.t0 = _context13["catch"](10);
|
|
1079
|
+
err = _context13.t0;
|
|
1047
1080
|
case 24:
|
|
1048
|
-
return
|
|
1081
|
+
return _context13.abrupt("return", {
|
|
1049
1082
|
mid: mid,
|
|
1050
1083
|
res: res,
|
|
1051
1084
|
err: err,
|
|
@@ -1053,11 +1086,11 @@ var AO = /*#__PURE__*/function () {
|
|
|
1053
1086
|
});
|
|
1054
1087
|
case 25:
|
|
1055
1088
|
case "end":
|
|
1056
|
-
return
|
|
1089
|
+
return _context13.stop();
|
|
1057
1090
|
}
|
|
1058
|
-
},
|
|
1091
|
+
}, _callee13, this, [[10, 21]]);
|
|
1059
1092
|
}));
|
|
1060
|
-
function asgn(
|
|
1093
|
+
function asgn(_x16) {
|
|
1061
1094
|
return _asgn.apply(this, arguments);
|
|
1062
1095
|
}
|
|
1063
1096
|
return asgn;
|
|
@@ -1065,33 +1098,33 @@ var AO = /*#__PURE__*/function () {
|
|
|
1065
1098
|
}, {
|
|
1066
1099
|
key: "dry",
|
|
1067
1100
|
value: function () {
|
|
1068
|
-
var _dry = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1069
|
-
var pid, jwk, data,
|
|
1070
|
-
return _regeneratorRuntime().wrap(function
|
|
1071
|
-
while (1) switch (
|
|
1101
|
+
var _dry = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(_ref17) {
|
|
1102
|
+
var pid, jwk, data, _ref17$act, act, _ref17$tags, tags, _ref17$check, check, get, err, _yield$this$ar$checkW4, res, out, _tags, _res, checks;
|
|
1103
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
1104
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
1072
1105
|
case 0:
|
|
1073
|
-
pid =
|
|
1106
|
+
pid = _ref17.pid, jwk = _ref17.jwk, data = _ref17.data, _ref17$act = _ref17.act, act = _ref17$act === void 0 ? "Eval" : _ref17$act, _ref17$tags = _ref17.tags, tags = _ref17$tags === void 0 ? {} : _ref17$tags, _ref17$check = _ref17.check, check = _ref17$check === void 0 ? [] : _ref17$check, get = _ref17.get;
|
|
1074
1107
|
err = null;
|
|
1075
|
-
|
|
1108
|
+
_context14.next = 4;
|
|
1076
1109
|
return this.ar.checkWallet({
|
|
1077
1110
|
jwk: jwk
|
|
1078
1111
|
});
|
|
1079
1112
|
case 4:
|
|
1080
|
-
_yield$this$ar$checkW4 =
|
|
1113
|
+
_yield$this$ar$checkW4 = _context14.sent;
|
|
1081
1114
|
jwk = _yield$this$ar$checkW4.jwk;
|
|
1082
1115
|
err = _yield$this$ar$checkW4.err;
|
|
1083
1116
|
if (!err) {
|
|
1084
|
-
|
|
1117
|
+
_context14.next = 9;
|
|
1085
1118
|
break;
|
|
1086
1119
|
}
|
|
1087
|
-
return
|
|
1120
|
+
return _context14.abrupt("return", {
|
|
1088
1121
|
err: err
|
|
1089
1122
|
});
|
|
1090
1123
|
case 9:
|
|
1091
1124
|
res = null, out = null;
|
|
1092
1125
|
_tags = (0, _utils.buildTags)(act, tags);
|
|
1093
|
-
|
|
1094
|
-
|
|
1126
|
+
_context14.prev = 11;
|
|
1127
|
+
_context14.next = 14;
|
|
1095
1128
|
return this.dryrun({
|
|
1096
1129
|
process: pid,
|
|
1097
1130
|
signer: this.toSigner(jwk),
|
|
@@ -1099,124 +1132,155 @@ var AO = /*#__PURE__*/function () {
|
|
|
1099
1132
|
data: (0, _utils.jsonToStr)(data)
|
|
1100
1133
|
});
|
|
1101
1134
|
case 14:
|
|
1102
|
-
_res =
|
|
1135
|
+
_res = _context14.sent;
|
|
1103
1136
|
res = _res;
|
|
1104
1137
|
checks = [];
|
|
1105
1138
|
if (!(0, _ramda.is)(Array, check)) check = [check];
|
|
1106
1139
|
if (!(0, _utils.allChecked)(check, res)) err = "something went wrong";
|
|
1107
1140
|
if (!err && !(0, _ramda.isNil)(get)) out = (0, _utils.getTagVal)(get, res);
|
|
1108
|
-
|
|
1141
|
+
_context14.next = 25;
|
|
1109
1142
|
break;
|
|
1110
1143
|
case 22:
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
err =
|
|
1144
|
+
_context14.prev = 22;
|
|
1145
|
+
_context14.t0 = _context14["catch"](11);
|
|
1146
|
+
err = _context14.t0;
|
|
1114
1147
|
case 25:
|
|
1115
|
-
return
|
|
1148
|
+
return _context14.abrupt("return", {
|
|
1116
1149
|
res: res,
|
|
1117
1150
|
err: err,
|
|
1118
1151
|
out: out
|
|
1119
1152
|
});
|
|
1120
1153
|
case 26:
|
|
1121
1154
|
case "end":
|
|
1122
|
-
return
|
|
1155
|
+
return _context14.stop();
|
|
1123
1156
|
}
|
|
1124
|
-
},
|
|
1157
|
+
}, _callee14, this, [[11, 22]]);
|
|
1125
1158
|
}));
|
|
1126
|
-
function dry(
|
|
1159
|
+
function dry(_x17) {
|
|
1127
1160
|
return _dry.apply(this, arguments);
|
|
1128
1161
|
}
|
|
1129
1162
|
return dry;
|
|
1130
1163
|
}()
|
|
1131
1164
|
}, {
|
|
1132
|
-
key: "
|
|
1165
|
+
key: "ress",
|
|
1133
1166
|
value: function () {
|
|
1134
|
-
var
|
|
1135
|
-
var
|
|
1136
|
-
|
|
1137
|
-
|
|
1167
|
+
var _ress = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee16(_ref18) {
|
|
1168
|
+
var _this4 = this;
|
|
1169
|
+
var pid, limit, asc, cursor, err, msgs, next, res, sort;
|
|
1170
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
1171
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
1138
1172
|
case 0:
|
|
1139
|
-
pid =
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1173
|
+
pid = _ref18.pid, limit = _ref18.limit, asc = _ref18.asc, cursor = _ref18.cursor;
|
|
1174
|
+
err = null;
|
|
1175
|
+
msgs = null;
|
|
1176
|
+
next = null;
|
|
1177
|
+
res = null;
|
|
1178
|
+
_context16.prev = 5;
|
|
1144
1179
|
sort = asc ? "ASC" : "DESC";
|
|
1145
|
-
|
|
1180
|
+
_context16.next = 9;
|
|
1146
1181
|
return this.results({
|
|
1147
1182
|
process: pid,
|
|
1148
1183
|
limit: limit,
|
|
1149
1184
|
sort: sort,
|
|
1150
|
-
|
|
1151
|
-
to: to
|
|
1185
|
+
cursor: cursor
|
|
1152
1186
|
});
|
|
1153
|
-
case
|
|
1154
|
-
|
|
1155
|
-
if (
|
|
1156
|
-
|
|
1187
|
+
case 9:
|
|
1188
|
+
res = _context16.sent;
|
|
1189
|
+
if (res.edges) {
|
|
1190
|
+
_context16.next = 12;
|
|
1157
1191
|
break;
|
|
1158
1192
|
}
|
|
1159
|
-
return
|
|
1160
|
-
case
|
|
1161
|
-
|
|
1193
|
+
return _context16.abrupt("return", null);
|
|
1194
|
+
case 12:
|
|
1195
|
+
msgs = (0, _ramda.map)(function (v) {
|
|
1162
1196
|
return _objectSpread({
|
|
1163
1197
|
cursor: v.cursor
|
|
1164
1198
|
}, v.node);
|
|
1165
|
-
})(
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1199
|
+
})(res.edges);
|
|
1200
|
+
if (res.page_info.has_next_page) {
|
|
1201
|
+
next = /*#__PURE__*/function () {
|
|
1202
|
+
var _ref19 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
|
|
1203
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
1204
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
1205
|
+
case 0:
|
|
1206
|
+
_context15.next = 2;
|
|
1207
|
+
return _this4.results({
|
|
1208
|
+
process: pid,
|
|
1209
|
+
limit: limit,
|
|
1210
|
+
sort: sort,
|
|
1211
|
+
cursor: (0, _ramda.last)(res.edges).cursor
|
|
1212
|
+
});
|
|
1213
|
+
case 2:
|
|
1214
|
+
return _context15.abrupt("return", _context15.sent);
|
|
1215
|
+
case 3:
|
|
1216
|
+
case "end":
|
|
1217
|
+
return _context15.stop();
|
|
1218
|
+
}
|
|
1219
|
+
}, _callee15);
|
|
1220
|
+
}));
|
|
1221
|
+
return function next() {
|
|
1222
|
+
return _ref19.apply(this, arguments);
|
|
1223
|
+
};
|
|
1224
|
+
}();
|
|
1225
|
+
}
|
|
1226
|
+
_context16.next = 19;
|
|
1227
|
+
break;
|
|
1228
|
+
case 16:
|
|
1229
|
+
_context16.prev = 16;
|
|
1230
|
+
_context16.t0 = _context16["catch"](5);
|
|
1231
|
+
err = _context16.t0;
|
|
1232
|
+
case 19:
|
|
1233
|
+
return _context16.abrupt("return", {
|
|
1234
|
+
err: err,
|
|
1235
|
+
out: msgs,
|
|
1236
|
+
res: res
|
|
1171
1237
|
});
|
|
1172
|
-
case
|
|
1173
|
-
return _context14.abrupt("return", _context14.sent);
|
|
1174
|
-
case 14:
|
|
1238
|
+
case 20:
|
|
1175
1239
|
case "end":
|
|
1176
|
-
return
|
|
1240
|
+
return _context16.stop();
|
|
1177
1241
|
}
|
|
1178
|
-
},
|
|
1242
|
+
}, _callee16, this, [[5, 16]]);
|
|
1179
1243
|
}));
|
|
1180
|
-
function
|
|
1181
|
-
return
|
|
1244
|
+
function ress(_x18) {
|
|
1245
|
+
return _ress.apply(this, arguments);
|
|
1182
1246
|
}
|
|
1183
|
-
return
|
|
1247
|
+
return ress;
|
|
1184
1248
|
}()
|
|
1185
1249
|
}, {
|
|
1186
1250
|
key: "eval",
|
|
1187
1251
|
value: function () {
|
|
1188
|
-
var _eval2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1252
|
+
var _eval2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee17(_ref20) {
|
|
1189
1253
|
var pid, jwk, data, fns;
|
|
1190
|
-
return _regeneratorRuntime().wrap(function
|
|
1191
|
-
while (1) switch (
|
|
1254
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
1255
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
1192
1256
|
case 0:
|
|
1193
|
-
pid =
|
|
1257
|
+
pid = _ref20.pid, jwk = _ref20.jwk, data = _ref20.data;
|
|
1194
1258
|
fns = [{
|
|
1195
1259
|
args: {
|
|
1196
1260
|
pid: pid,
|
|
1197
1261
|
data: data,
|
|
1198
1262
|
act: "Eval"
|
|
1199
1263
|
},
|
|
1200
|
-
err: function err(
|
|
1264
|
+
err: function err(_ref21) {
|
|
1201
1265
|
var _res$Output, _res$Output2, _res$Output3;
|
|
1202
|
-
var res =
|
|
1266
|
+
var res = _ref21.res;
|
|
1203
1267
|
return _typeof(res === null || res === void 0 || (_res$Output = res.Output) === null || _res$Output === void 0 ? void 0 : _res$Output.data) !== "object" && !(typeof (res === null || res === void 0 || (_res$Output2 = res.Output) === null || _res$Output2 === void 0 ? void 0 : _res$Output2.prompt) === "string" && /aos\-/.test(res === null || res === void 0 || (_res$Output3 = res.Output) === null || _res$Output3 === void 0 ? void 0 : _res$Output3.prompt));
|
|
1204
1268
|
}
|
|
1205
1269
|
}];
|
|
1206
|
-
|
|
1270
|
+
_context17.next = 4;
|
|
1207
1271
|
return this.pipe({
|
|
1208
1272
|
jwk: jwk,
|
|
1209
1273
|
fns: fns
|
|
1210
1274
|
});
|
|
1211
1275
|
case 4:
|
|
1212
|
-
return
|
|
1276
|
+
return _context17.abrupt("return", _context17.sent);
|
|
1213
1277
|
case 5:
|
|
1214
1278
|
case "end":
|
|
1215
|
-
return
|
|
1279
|
+
return _context17.stop();
|
|
1216
1280
|
}
|
|
1217
|
-
},
|
|
1281
|
+
}, _callee17, this);
|
|
1218
1282
|
}));
|
|
1219
|
-
function _eval(
|
|
1283
|
+
function _eval(_x19) {
|
|
1220
1284
|
return _eval2.apply(this, arguments);
|
|
1221
1285
|
}
|
|
1222
1286
|
return _eval;
|
|
@@ -1224,27 +1288,27 @@ var AO = /*#__PURE__*/function () {
|
|
|
1224
1288
|
}, {
|
|
1225
1289
|
key: "transform",
|
|
1226
1290
|
value: function () {
|
|
1227
|
-
var _transform = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1291
|
+
var _transform = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee18(_ref22) {
|
|
1228
1292
|
var src, data, fills, err, out, _data, k, text;
|
|
1229
|
-
return _regeneratorRuntime().wrap(function
|
|
1230
|
-
while (1) switch (
|
|
1293
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
1294
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
1231
1295
|
case 0:
|
|
1232
|
-
src =
|
|
1296
|
+
src = _ref22.src, data = _ref22.data, fills = _ref22.fills;
|
|
1233
1297
|
err = null, out = null;
|
|
1234
1298
|
if (!(data !== null && data !== void 0)) {
|
|
1235
|
-
|
|
1299
|
+
_context18.next = 6;
|
|
1236
1300
|
break;
|
|
1237
1301
|
}
|
|
1238
|
-
|
|
1239
|
-
|
|
1302
|
+
_context18.t0 = data;
|
|
1303
|
+
_context18.next = 9;
|
|
1240
1304
|
break;
|
|
1241
1305
|
case 6:
|
|
1242
|
-
|
|
1306
|
+
_context18.next = 8;
|
|
1243
1307
|
return this.ar.data(src, true);
|
|
1244
1308
|
case 8:
|
|
1245
|
-
|
|
1309
|
+
_context18.t0 = _context18.sent;
|
|
1246
1310
|
case 9:
|
|
1247
|
-
_data =
|
|
1311
|
+
_data = _context18.t0;
|
|
1248
1312
|
if (!_data) err = "data doesn't exist";else {
|
|
1249
1313
|
for (k in fills !== null && fills !== void 0 ? fills : {}) {
|
|
1250
1314
|
text = fills[k];
|
|
@@ -1253,17 +1317,17 @@ var AO = /*#__PURE__*/function () {
|
|
|
1253
1317
|
}
|
|
1254
1318
|
out = _data;
|
|
1255
1319
|
}
|
|
1256
|
-
return
|
|
1320
|
+
return _context18.abrupt("return", {
|
|
1257
1321
|
err: err,
|
|
1258
1322
|
out: out
|
|
1259
1323
|
});
|
|
1260
1324
|
case 12:
|
|
1261
1325
|
case "end":
|
|
1262
|
-
return
|
|
1326
|
+
return _context18.stop();
|
|
1263
1327
|
}
|
|
1264
|
-
},
|
|
1328
|
+
}, _callee18, this);
|
|
1265
1329
|
}));
|
|
1266
|
-
function transform(
|
|
1330
|
+
function transform(_x20) {
|
|
1267
1331
|
return _transform.apply(this, arguments);
|
|
1268
1332
|
}
|
|
1269
1333
|
return transform;
|
|
@@ -1271,12 +1335,12 @@ var AO = /*#__PURE__*/function () {
|
|
|
1271
1335
|
}, {
|
|
1272
1336
|
key: "load",
|
|
1273
1337
|
value: function () {
|
|
1274
|
-
var _load = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1338
|
+
var _load = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee19(_ref23) {
|
|
1275
1339
|
var src, data, fills, pid, jwk, fns;
|
|
1276
|
-
return _regeneratorRuntime().wrap(function
|
|
1277
|
-
while (1) switch (
|
|
1340
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
1341
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
1278
1342
|
case 0:
|
|
1279
|
-
src =
|
|
1343
|
+
src = _ref23.src, data = _ref23.data, fills = _ref23.fills, pid = _ref23.pid, jwk = _ref23.jwk;
|
|
1280
1344
|
fns = [{
|
|
1281
1345
|
fn: this.transform,
|
|
1282
1346
|
args: {
|
|
@@ -1293,20 +1357,20 @@ var AO = /*#__PURE__*/function () {
|
|
|
1293
1357
|
pid: pid
|
|
1294
1358
|
}
|
|
1295
1359
|
}];
|
|
1296
|
-
|
|
1360
|
+
_context19.next = 4;
|
|
1297
1361
|
return this.pipe({
|
|
1298
1362
|
jwk: jwk,
|
|
1299
1363
|
fns: fns
|
|
1300
1364
|
});
|
|
1301
1365
|
case 4:
|
|
1302
|
-
return
|
|
1366
|
+
return _context19.abrupt("return", _context19.sent);
|
|
1303
1367
|
case 5:
|
|
1304
1368
|
case "end":
|
|
1305
|
-
return
|
|
1369
|
+
return _context19.stop();
|
|
1306
1370
|
}
|
|
1307
|
-
},
|
|
1371
|
+
}, _callee19, this);
|
|
1308
1372
|
}));
|
|
1309
|
-
function load(
|
|
1373
|
+
function load(_x21) {
|
|
1310
1374
|
return _load.apply(this, arguments);
|
|
1311
1375
|
}
|
|
1312
1376
|
return load;
|
|
@@ -1314,66 +1378,66 @@ var AO = /*#__PURE__*/function () {
|
|
|
1314
1378
|
}, {
|
|
1315
1379
|
key: "wait",
|
|
1316
1380
|
value: function () {
|
|
1317
|
-
var _wait2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1318
|
-
var pid,
|
|
1319
|
-
return _regeneratorRuntime().wrap(function
|
|
1320
|
-
while (1) switch (
|
|
1381
|
+
var _wait2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee20(_ref24) {
|
|
1382
|
+
var pid, _ref24$attempts, attempts, exist, err, _yield$this$dry, res, _err;
|
|
1383
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
1384
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
1321
1385
|
case 0:
|
|
1322
|
-
pid =
|
|
1386
|
+
pid = _ref24.pid, _ref24$attempts = _ref24.attempts, attempts = _ref24$attempts === void 0 ? 10 : _ref24$attempts;
|
|
1323
1387
|
exist = false;
|
|
1324
1388
|
err = null;
|
|
1325
1389
|
case 3:
|
|
1326
1390
|
if (!(attempts > 0)) {
|
|
1327
|
-
|
|
1391
|
+
_context20.next = 20;
|
|
1328
1392
|
break;
|
|
1329
1393
|
}
|
|
1330
1394
|
if (this.in_memory) {
|
|
1331
|
-
|
|
1395
|
+
_context20.next = 7;
|
|
1332
1396
|
break;
|
|
1333
1397
|
}
|
|
1334
|
-
|
|
1398
|
+
_context20.next = 7;
|
|
1335
1399
|
return (0, _utils.wait)(1000);
|
|
1336
1400
|
case 7:
|
|
1337
|
-
|
|
1401
|
+
_context20.next = 9;
|
|
1338
1402
|
return this.dry({
|
|
1339
1403
|
pid: pid,
|
|
1340
1404
|
data: "#Inbox"
|
|
1341
1405
|
});
|
|
1342
1406
|
case 9:
|
|
1343
|
-
_yield$this$dry =
|
|
1407
|
+
_yield$this$dry = _context20.sent;
|
|
1344
1408
|
res = _yield$this$dry.res;
|
|
1345
1409
|
_err = _yield$this$dry.err;
|
|
1346
1410
|
if (!(res !== null && res !== void 0 && res.error)) {
|
|
1347
|
-
|
|
1411
|
+
_context20.next = 14;
|
|
1348
1412
|
break;
|
|
1349
1413
|
}
|
|
1350
|
-
return
|
|
1414
|
+
return _context20.abrupt("return", {
|
|
1351
1415
|
err: res.error,
|
|
1352
1416
|
pid: pid
|
|
1353
1417
|
});
|
|
1354
1418
|
case 14:
|
|
1355
1419
|
if (!(_typeof(res === null || res === void 0 ? void 0 : res.Output) === "object")) {
|
|
1356
|
-
|
|
1420
|
+
_context20.next = 16;
|
|
1357
1421
|
break;
|
|
1358
1422
|
}
|
|
1359
|
-
return
|
|
1423
|
+
return _context20.abrupt("break", 20);
|
|
1360
1424
|
case 16:
|
|
1361
1425
|
attempts -= 1;
|
|
1362
1426
|
if (attempts === 0) err = "timeout";
|
|
1363
|
-
|
|
1427
|
+
_context20.next = 3;
|
|
1364
1428
|
break;
|
|
1365
1429
|
case 20:
|
|
1366
|
-
return
|
|
1430
|
+
return _context20.abrupt("return", {
|
|
1367
1431
|
err: err,
|
|
1368
1432
|
pid: pid
|
|
1369
1433
|
});
|
|
1370
1434
|
case 21:
|
|
1371
1435
|
case "end":
|
|
1372
|
-
return
|
|
1436
|
+
return _context20.stop();
|
|
1373
1437
|
}
|
|
1374
|
-
},
|
|
1438
|
+
}, _callee20, this);
|
|
1375
1439
|
}));
|
|
1376
|
-
function wait(
|
|
1440
|
+
function wait(_x22) {
|
|
1377
1441
|
return _wait2.apply(this, arguments);
|
|
1378
1442
|
}
|
|
1379
1443
|
return wait;
|
|
@@ -1381,13 +1445,13 @@ var AO = /*#__PURE__*/function () {
|
|
|
1381
1445
|
}, {
|
|
1382
1446
|
key: "attest",
|
|
1383
1447
|
value: function () {
|
|
1384
|
-
var _attest = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1448
|
+
var _attest = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee21(_ref25) {
|
|
1385
1449
|
var id, jwk, tags;
|
|
1386
|
-
return _regeneratorRuntime().wrap(function
|
|
1387
|
-
while (1) switch (
|
|
1450
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
1451
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
1388
1452
|
case 0:
|
|
1389
|
-
id =
|
|
1390
|
-
|
|
1453
|
+
id = _ref25.id, jwk = _ref25.jwk, tags = _ref25.tags;
|
|
1454
|
+
_context21.next = 3;
|
|
1391
1455
|
return this.ar.post({
|
|
1392
1456
|
tags: (0, _ramda.mergeLeft)(tags, {
|
|
1393
1457
|
"Data-Protocol": "ao",
|
|
@@ -1397,14 +1461,14 @@ var AO = /*#__PURE__*/function () {
|
|
|
1397
1461
|
jwk: jwk
|
|
1398
1462
|
});
|
|
1399
1463
|
case 3:
|
|
1400
|
-
return
|
|
1464
|
+
return _context21.abrupt("return", _context21.sent);
|
|
1401
1465
|
case 4:
|
|
1402
1466
|
case "end":
|
|
1403
|
-
return
|
|
1467
|
+
return _context21.stop();
|
|
1404
1468
|
}
|
|
1405
|
-
},
|
|
1469
|
+
}, _callee21, this);
|
|
1406
1470
|
}));
|
|
1407
|
-
function attest(
|
|
1471
|
+
function attest(_x23) {
|
|
1408
1472
|
return _attest.apply(this, arguments);
|
|
1409
1473
|
}
|
|
1410
1474
|
return attest;
|
|
@@ -1412,13 +1476,13 @@ var AO = /*#__PURE__*/function () {
|
|
|
1412
1476
|
}, {
|
|
1413
1477
|
key: "avail",
|
|
1414
1478
|
value: function () {
|
|
1415
|
-
var _avail = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1479
|
+
var _avail = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee22(_ref26) {
|
|
1416
1480
|
var ids, jwk, tags;
|
|
1417
|
-
return _regeneratorRuntime().wrap(function
|
|
1418
|
-
while (1) switch (
|
|
1481
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
1482
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
1419
1483
|
case 0:
|
|
1420
|
-
ids =
|
|
1421
|
-
|
|
1484
|
+
ids = _ref26.ids, jwk = _ref26.jwk, tags = _ref26.tags;
|
|
1485
|
+
_context22.next = 3;
|
|
1422
1486
|
return this.ar.post({
|
|
1423
1487
|
tags: (0, _ramda.mergeLeft)(tags, {
|
|
1424
1488
|
"Data-Protocol": "WeaveDrive",
|
|
@@ -1429,14 +1493,14 @@ var AO = /*#__PURE__*/function () {
|
|
|
1429
1493
|
jwk: jwk
|
|
1430
1494
|
});
|
|
1431
1495
|
case 3:
|
|
1432
|
-
return
|
|
1496
|
+
return _context22.abrupt("return", _context22.sent);
|
|
1433
1497
|
case 4:
|
|
1434
1498
|
case "end":
|
|
1435
|
-
return
|
|
1499
|
+
return _context22.stop();
|
|
1436
1500
|
}
|
|
1437
|
-
},
|
|
1501
|
+
}, _callee22, this);
|
|
1438
1502
|
}));
|
|
1439
|
-
function avail(
|
|
1503
|
+
function avail(_x24) {
|
|
1440
1504
|
return _avail.apply(this, arguments);
|
|
1441
1505
|
}
|
|
1442
1506
|
return avail;
|
|
@@ -1444,12 +1508,12 @@ var AO = /*#__PURE__*/function () {
|
|
|
1444
1508
|
}, {
|
|
1445
1509
|
key: "deploy",
|
|
1446
1510
|
value: function () {
|
|
1447
|
-
var _deploy = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1448
|
-
var boot, loads, src, src_data,
|
|
1449
|
-
return _regeneratorRuntime().wrap(function
|
|
1450
|
-
while (1) switch (
|
|
1511
|
+
var _deploy = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee23(_ref27) {
|
|
1512
|
+
var boot, loads, src, src_data, _ref27$fills, fills, _ref27$module, module, _ref27$scheduler, scheduler, jwk, _ref27$tags, tags, data, fns, isBoot, i, _iterator6, _step6, v, args, result;
|
|
1513
|
+
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
1514
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
1451
1515
|
case 0:
|
|
1452
|
-
boot =
|
|
1516
|
+
boot = _ref27.boot, loads = _ref27.loads, src = _ref27.src, src_data = _ref27.src_data, _ref27$fills = _ref27.fills, fills = _ref27$fills === void 0 ? {} : _ref27$fills, _ref27$module = _ref27.module, module = _ref27$module === void 0 ? this.module : _ref27$module, _ref27$scheduler = _ref27.scheduler, scheduler = _ref27$scheduler === void 0 ? this.scheduler : _ref27$scheduler, jwk = _ref27.jwk, _ref27$tags = _ref27.tags, tags = _ref27$tags === void 0 ? {} : _ref27$tags, data = _ref27.data;
|
|
1453
1517
|
fns = [], isBoot = false;
|
|
1454
1518
|
if (boot === true && !data) {
|
|
1455
1519
|
isBoot = true;
|
|
@@ -1525,22 +1589,22 @@ var AO = /*#__PURE__*/function () {
|
|
|
1525
1589
|
} finally {
|
|
1526
1590
|
_iterator6.f();
|
|
1527
1591
|
}
|
|
1528
|
-
|
|
1592
|
+
_context23.next = 9;
|
|
1529
1593
|
return this.pipe({
|
|
1530
1594
|
jwk: jwk,
|
|
1531
1595
|
fns: fns
|
|
1532
1596
|
});
|
|
1533
1597
|
case 9:
|
|
1534
|
-
result =
|
|
1598
|
+
result = _context23.sent;
|
|
1535
1599
|
if (result.pid) result.p = this.p(result.pid);
|
|
1536
|
-
return
|
|
1600
|
+
return _context23.abrupt("return", result);
|
|
1537
1601
|
case 12:
|
|
1538
1602
|
case "end":
|
|
1539
|
-
return
|
|
1603
|
+
return _context23.stop();
|
|
1540
1604
|
}
|
|
1541
|
-
},
|
|
1605
|
+
}, _callee23, this);
|
|
1542
1606
|
}));
|
|
1543
|
-
function deploy(
|
|
1607
|
+
function deploy(_x25) {
|
|
1544
1608
|
return _deploy.apply(this, arguments);
|
|
1545
1609
|
}
|
|
1546
1610
|
return deploy;
|
|
@@ -1548,117 +1612,115 @@ var AO = /*#__PURE__*/function () {
|
|
|
1548
1612
|
}, {
|
|
1549
1613
|
key: "var",
|
|
1550
1614
|
value: function () {
|
|
1551
|
-
var _var2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1552
|
-
var pid, data,
|
|
1553
|
-
return _regeneratorRuntime().wrap(function
|
|
1554
|
-
while (1) switch (
|
|
1615
|
+
var _var2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee24(_ref28) {
|
|
1616
|
+
var pid, data, _ref28$json, json, _ref28$pretty, pretty, _yield$this$dry2, _var3, _yield$this$dry3, _var4;
|
|
1617
|
+
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
|
1618
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
1555
1619
|
case 0:
|
|
1556
|
-
pid =
|
|
1620
|
+
pid = _ref28.pid, data = _ref28.data, _ref28$json = _ref28.json, json = _ref28$json === void 0 ? true : _ref28$json, _ref28$pretty = _ref28.pretty, pretty = _ref28$pretty === void 0 ? false : _ref28$pretty;
|
|
1557
1621
|
if (!json) {
|
|
1558
|
-
|
|
1622
|
+
_context24.next = 31;
|
|
1559
1623
|
break;
|
|
1560
1624
|
}
|
|
1561
|
-
|
|
1625
|
+
_context24.next = 4;
|
|
1562
1626
|
return this.dry({
|
|
1563
|
-
act: "Eval",
|
|
1564
1627
|
data: "require(\"json\").encode(".concat(data, ")"),
|
|
1565
1628
|
pid: pid
|
|
1566
1629
|
});
|
|
1567
1630
|
case 4:
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
if (
|
|
1571
|
-
|
|
1631
|
+
_context24.t3 = _yield$this$dry2 = _context24.sent;
|
|
1632
|
+
_context24.t2 = _context24.t3 === null;
|
|
1633
|
+
if (_context24.t2) {
|
|
1634
|
+
_context24.next = 8;
|
|
1572
1635
|
break;
|
|
1573
1636
|
}
|
|
1574
|
-
|
|
1637
|
+
_context24.t2 = _yield$this$dry2 === void 0;
|
|
1575
1638
|
case 8:
|
|
1576
|
-
|
|
1577
|
-
if (
|
|
1578
|
-
|
|
1639
|
+
_context24.t1 = _context24.t2;
|
|
1640
|
+
if (_context24.t1) {
|
|
1641
|
+
_context24.next = 11;
|
|
1579
1642
|
break;
|
|
1580
1643
|
}
|
|
1581
|
-
|
|
1644
|
+
_context24.t1 = (_yield$this$dry2 = _yield$this$dry2.res) === null || _yield$this$dry2 === void 0;
|
|
1582
1645
|
case 11:
|
|
1583
|
-
|
|
1584
|
-
if (
|
|
1585
|
-
|
|
1646
|
+
_context24.t0 = _context24.t1;
|
|
1647
|
+
if (_context24.t0) {
|
|
1648
|
+
_context24.next = 14;
|
|
1586
1649
|
break;
|
|
1587
1650
|
}
|
|
1588
|
-
|
|
1651
|
+
_context24.t0 = (_yield$this$dry2 = _yield$this$dry2.Output) === null || _yield$this$dry2 === void 0;
|
|
1589
1652
|
case 14:
|
|
1590
|
-
if (!
|
|
1591
|
-
|
|
1653
|
+
if (!_context24.t0) {
|
|
1654
|
+
_context24.next = 18;
|
|
1592
1655
|
break;
|
|
1593
1656
|
}
|
|
1594
|
-
|
|
1595
|
-
|
|
1657
|
+
_context24.t4 = void 0;
|
|
1658
|
+
_context24.next = 19;
|
|
1596
1659
|
break;
|
|
1597
1660
|
case 18:
|
|
1598
|
-
|
|
1661
|
+
_context24.t4 = _yield$this$dry2.data;
|
|
1599
1662
|
case 19:
|
|
1600
|
-
_var3 =
|
|
1663
|
+
_var3 = _context24.t4;
|
|
1601
1664
|
if (!_var3) {
|
|
1602
|
-
|
|
1665
|
+
_context24.next = 28;
|
|
1603
1666
|
break;
|
|
1604
1667
|
}
|
|
1605
|
-
|
|
1606
|
-
return
|
|
1668
|
+
_context24.prev = 21;
|
|
1669
|
+
return _context24.abrupt("return", JSON.parse(strip(_var3)));
|
|
1607
1670
|
case 25:
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
return
|
|
1671
|
+
_context24.prev = 25;
|
|
1672
|
+
_context24.t5 = _context24["catch"](21);
|
|
1673
|
+
return _context24.abrupt("return", strip(_var3));
|
|
1611
1674
|
case 28:
|
|
1612
|
-
return
|
|
1675
|
+
return _context24.abrupt("return", _var3);
|
|
1613
1676
|
case 31:
|
|
1614
|
-
|
|
1677
|
+
_context24.next = 33;
|
|
1615
1678
|
return this.dry({
|
|
1616
|
-
act: "Eval",
|
|
1617
1679
|
data: data,
|
|
1618
1680
|
pid: pid
|
|
1619
1681
|
});
|
|
1620
1682
|
case 33:
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
if (
|
|
1624
|
-
|
|
1683
|
+
_context24.t9 = _yield$this$dry3 = _context24.sent;
|
|
1684
|
+
_context24.t8 = _context24.t9 === null;
|
|
1685
|
+
if (_context24.t8) {
|
|
1686
|
+
_context24.next = 37;
|
|
1625
1687
|
break;
|
|
1626
1688
|
}
|
|
1627
|
-
|
|
1689
|
+
_context24.t8 = _yield$this$dry3 === void 0;
|
|
1628
1690
|
case 37:
|
|
1629
|
-
|
|
1630
|
-
if (
|
|
1631
|
-
|
|
1691
|
+
_context24.t7 = _context24.t8;
|
|
1692
|
+
if (_context24.t7) {
|
|
1693
|
+
_context24.next = 40;
|
|
1632
1694
|
break;
|
|
1633
1695
|
}
|
|
1634
|
-
|
|
1696
|
+
_context24.t7 = (_yield$this$dry3 = _yield$this$dry3.res) === null || _yield$this$dry3 === void 0;
|
|
1635
1697
|
case 40:
|
|
1636
|
-
|
|
1637
|
-
if (
|
|
1638
|
-
|
|
1698
|
+
_context24.t6 = _context24.t7;
|
|
1699
|
+
if (_context24.t6) {
|
|
1700
|
+
_context24.next = 43;
|
|
1639
1701
|
break;
|
|
1640
1702
|
}
|
|
1641
|
-
|
|
1703
|
+
_context24.t6 = (_yield$this$dry3 = _yield$this$dry3.Output) === null || _yield$this$dry3 === void 0;
|
|
1642
1704
|
case 43:
|
|
1643
|
-
if (!
|
|
1644
|
-
|
|
1705
|
+
if (!_context24.t6) {
|
|
1706
|
+
_context24.next = 47;
|
|
1645
1707
|
break;
|
|
1646
1708
|
}
|
|
1647
|
-
|
|
1648
|
-
|
|
1709
|
+
_context24.t10 = void 0;
|
|
1710
|
+
_context24.next = 48;
|
|
1649
1711
|
break;
|
|
1650
1712
|
case 47:
|
|
1651
|
-
|
|
1713
|
+
_context24.t10 = _yield$this$dry3.data;
|
|
1652
1714
|
case 48:
|
|
1653
|
-
_var4 =
|
|
1654
|
-
return
|
|
1715
|
+
_var4 = _context24.t10;
|
|
1716
|
+
return _context24.abrupt("return", pretty ? _var4 : strip(_var4));
|
|
1655
1717
|
case 50:
|
|
1656
1718
|
case "end":
|
|
1657
|
-
return
|
|
1719
|
+
return _context24.stop();
|
|
1658
1720
|
}
|
|
1659
|
-
},
|
|
1721
|
+
}, _callee24, this, [[21, 25]]);
|
|
1660
1722
|
}));
|
|
1661
|
-
function _var(
|
|
1723
|
+
function _var(_x26) {
|
|
1662
1724
|
return _var2.apply(this, arguments);
|
|
1663
1725
|
}
|
|
1664
1726
|
return _var;
|
|
@@ -1676,7 +1738,7 @@ function strip(str) {
|
|
|
1676
1738
|
var getParams = function getParams(tags, opts) {
|
|
1677
1739
|
var _tags = tags;
|
|
1678
1740
|
var _opts = opts;
|
|
1679
|
-
if ((!(0, _ramda.isNil)(tags === null || tags === void 0 ? void 0 : tags.get) || !(0, _ramda.isNil)(tags === null || tags === void 0 ? void 0 : tags.check) || !(0, _ramda.isNil)(tags === null || tags === void 0 ? void 0 : tags.data) || (0, _ramda.is)(Boolean, tags) || (0, _ramda.is)(String, tags)) && (0, _ramda.isNil)(opts)) {
|
|
1741
|
+
if ((!(0, _ramda.isNil)(tags === null || tags === void 0 ? void 0 : tags.get) || !(0, _ramda.isNil)(tags === null || tags === void 0 ? void 0 : tags.check) || !(0, _ramda.isNil)(tags === null || tags === void 0 ? void 0 : tags.jwk) || !(0, _ramda.isNil)(tags === null || tags === void 0 ? void 0 : tags.data) || (0, _ramda.is)(Boolean, tags) || (0, _ramda.is)(String, tags)) && (0, _ramda.isNil)(opts)) {
|
|
1680
1742
|
_opts = tags;
|
|
1681
1743
|
_tags = null;
|
|
1682
1744
|
}
|
|
@@ -1699,24 +1761,24 @@ var Process = /*#__PURE__*/function () {
|
|
|
1699
1761
|
return _createClass(Process, [{
|
|
1700
1762
|
key: "load",
|
|
1701
1763
|
value: function () {
|
|
1702
|
-
var _load2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1764
|
+
var _load2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
|
|
1703
1765
|
var opt,
|
|
1704
|
-
|
|
1705
|
-
return _regeneratorRuntime().wrap(function
|
|
1706
|
-
while (1) switch (
|
|
1766
|
+
_args25 = arguments;
|
|
1767
|
+
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
|
|
1768
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
1707
1769
|
case 0:
|
|
1708
|
-
opt =
|
|
1709
|
-
|
|
1770
|
+
opt = _args25.length > 0 && _args25[0] !== undefined ? _args25[0] : {};
|
|
1771
|
+
_context25.next = 3;
|
|
1710
1772
|
return this.ao.load(_objectSpread({
|
|
1711
1773
|
pid: this.pid
|
|
1712
1774
|
}, opt));
|
|
1713
1775
|
case 3:
|
|
1714
|
-
return
|
|
1776
|
+
return _context25.abrupt("return", _context25.sent);
|
|
1715
1777
|
case 4:
|
|
1716
1778
|
case "end":
|
|
1717
|
-
return
|
|
1779
|
+
return _context25.stop();
|
|
1718
1780
|
}
|
|
1719
|
-
},
|
|
1781
|
+
}, _callee25, this);
|
|
1720
1782
|
}));
|
|
1721
1783
|
function load() {
|
|
1722
1784
|
return _load2.apply(this, arguments);
|
|
@@ -1726,27 +1788,27 @@ var Process = /*#__PURE__*/function () {
|
|
|
1726
1788
|
}, {
|
|
1727
1789
|
key: "msg",
|
|
1728
1790
|
value: function () {
|
|
1729
|
-
var _msg2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1791
|
+
var _msg2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee26(act, tags, opts) {
|
|
1730
1792
|
var _getParams, _tags, _opts;
|
|
1731
|
-
return _regeneratorRuntime().wrap(function
|
|
1732
|
-
while (1) switch (
|
|
1793
|
+
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
|
|
1794
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
1733
1795
|
case 0:
|
|
1734
1796
|
_getParams = getParams(tags, opts), _tags = _getParams._tags, _opts = _getParams._opts;
|
|
1735
|
-
|
|
1797
|
+
_context26.next = 3;
|
|
1736
1798
|
return this.ao.msg(_objectSpread({
|
|
1737
1799
|
pid: this.pid,
|
|
1738
1800
|
act: act,
|
|
1739
1801
|
tags: _tags
|
|
1740
1802
|
}, _opts));
|
|
1741
1803
|
case 3:
|
|
1742
|
-
return
|
|
1804
|
+
return _context26.abrupt("return", _context26.sent);
|
|
1743
1805
|
case 4:
|
|
1744
1806
|
case "end":
|
|
1745
|
-
return
|
|
1807
|
+
return _context26.stop();
|
|
1746
1808
|
}
|
|
1747
|
-
},
|
|
1809
|
+
}, _callee26, this);
|
|
1748
1810
|
}));
|
|
1749
|
-
function msg(
|
|
1811
|
+
function msg(_x27, _x28, _x29) {
|
|
1750
1812
|
return _msg2.apply(this, arguments);
|
|
1751
1813
|
}
|
|
1752
1814
|
return msg;
|
|
@@ -1754,56 +1816,107 @@ var Process = /*#__PURE__*/function () {
|
|
|
1754
1816
|
}, {
|
|
1755
1817
|
key: "dry",
|
|
1756
1818
|
value: function () {
|
|
1757
|
-
var _dry2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1819
|
+
var _dry2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee27(act, tags, opts) {
|
|
1758
1820
|
var _getParams2, _tags, _opts;
|
|
1759
|
-
return _regeneratorRuntime().wrap(function
|
|
1760
|
-
while (1) switch (
|
|
1821
|
+
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
|
|
1822
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
1761
1823
|
case 0:
|
|
1762
1824
|
_getParams2 = getParams(tags, opts), _tags = _getParams2._tags, _opts = _getParams2._opts;
|
|
1763
|
-
|
|
1825
|
+
_context27.next = 3;
|
|
1764
1826
|
return this.ao.dry(_objectSpread({
|
|
1765
1827
|
pid: this.pid,
|
|
1766
1828
|
act: act,
|
|
1767
1829
|
tags: _tags
|
|
1768
1830
|
}, _opts));
|
|
1769
1831
|
case 3:
|
|
1770
|
-
return
|
|
1832
|
+
return _context27.abrupt("return", _context27.sent);
|
|
1771
1833
|
case 4:
|
|
1772
1834
|
case "end":
|
|
1773
|
-
return
|
|
1835
|
+
return _context27.stop();
|
|
1774
1836
|
}
|
|
1775
|
-
},
|
|
1837
|
+
}, _callee27, this);
|
|
1776
1838
|
}));
|
|
1777
|
-
function dry(
|
|
1839
|
+
function dry(_x30, _x31, _x32) {
|
|
1778
1840
|
return _dry2.apply(this, arguments);
|
|
1779
1841
|
}
|
|
1780
1842
|
return dry;
|
|
1781
1843
|
}()
|
|
1782
1844
|
}, {
|
|
1783
|
-
key: "
|
|
1845
|
+
key: "res",
|
|
1784
1846
|
value: function () {
|
|
1785
|
-
var
|
|
1786
|
-
var
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1847
|
+
var _res4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee28(opts) {
|
|
1848
|
+
var _getParams3, _opts;
|
|
1849
|
+
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
|
|
1850
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
1851
|
+
case 0:
|
|
1852
|
+
_getParams3 = getParams(null, opts), _opts = _getParams3._opts;
|
|
1853
|
+
_context28.next = 3;
|
|
1854
|
+
return this.ao.res(_objectSpread({
|
|
1855
|
+
pid: this.pid
|
|
1856
|
+
}, _opts));
|
|
1857
|
+
case 3:
|
|
1858
|
+
return _context28.abrupt("return", _context28.sent);
|
|
1859
|
+
case 4:
|
|
1860
|
+
case "end":
|
|
1861
|
+
return _context28.stop();
|
|
1862
|
+
}
|
|
1863
|
+
}, _callee28, this);
|
|
1864
|
+
}));
|
|
1865
|
+
function res(_x33) {
|
|
1866
|
+
return _res4.apply(this, arguments);
|
|
1867
|
+
}
|
|
1868
|
+
return res;
|
|
1869
|
+
}()
|
|
1870
|
+
}, {
|
|
1871
|
+
key: "o",
|
|
1872
|
+
value: function () {
|
|
1873
|
+
var _o = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee29(name, opt) {
|
|
1874
|
+
var res;
|
|
1875
|
+
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
|
|
1876
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
1790
1877
|
case 0:
|
|
1791
|
-
|
|
1792
|
-
return this.
|
|
1878
|
+
_context29.next = 2;
|
|
1879
|
+
return this[name].apply(this, _toConsumableArray(opt));
|
|
1793
1880
|
case 2:
|
|
1794
|
-
res =
|
|
1881
|
+
res = _context29.sent;
|
|
1795
1882
|
if (!res.err) {
|
|
1796
|
-
|
|
1883
|
+
_context29.next = 5;
|
|
1797
1884
|
break;
|
|
1798
1885
|
}
|
|
1799
1886
|
throw Error(res.err);
|
|
1800
1887
|
case 5:
|
|
1801
|
-
return
|
|
1888
|
+
return _context29.abrupt("return", res.out);
|
|
1802
1889
|
case 6:
|
|
1803
1890
|
case "end":
|
|
1804
|
-
return
|
|
1891
|
+
return _context29.stop();
|
|
1805
1892
|
}
|
|
1806
|
-
},
|
|
1893
|
+
}, _callee29, this);
|
|
1894
|
+
}));
|
|
1895
|
+
function o(_x34, _x35) {
|
|
1896
|
+
return _o.apply(this, arguments);
|
|
1897
|
+
}
|
|
1898
|
+
return o;
|
|
1899
|
+
}()
|
|
1900
|
+
}, {
|
|
1901
|
+
key: "m",
|
|
1902
|
+
value: function () {
|
|
1903
|
+
var _m = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee30() {
|
|
1904
|
+
var _len,
|
|
1905
|
+
opt,
|
|
1906
|
+
_key,
|
|
1907
|
+
_args30 = arguments;
|
|
1908
|
+
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
|
|
1909
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
1910
|
+
case 0:
|
|
1911
|
+
for (_len = _args30.length, opt = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1912
|
+
opt[_key] = _args30[_key];
|
|
1913
|
+
}
|
|
1914
|
+
return _context30.abrupt("return", this.o("msg", opt));
|
|
1915
|
+
case 2:
|
|
1916
|
+
case "end":
|
|
1917
|
+
return _context30.stop();
|
|
1918
|
+
}
|
|
1919
|
+
}, _callee30, this);
|
|
1807
1920
|
}));
|
|
1808
1921
|
function m() {
|
|
1809
1922
|
return _m.apply(this, arguments);
|
|
@@ -1813,28 +1926,23 @@ var Process = /*#__PURE__*/function () {
|
|
|
1813
1926
|
}, {
|
|
1814
1927
|
key: "d",
|
|
1815
1928
|
value: function () {
|
|
1816
|
-
var _d = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1817
|
-
var
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1929
|
+
var _d = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee31() {
|
|
1930
|
+
var _len2,
|
|
1931
|
+
opt,
|
|
1932
|
+
_key2,
|
|
1933
|
+
_args31 = arguments;
|
|
1934
|
+
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
|
|
1935
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
1821
1936
|
case 0:
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
case 2:
|
|
1825
|
-
res = _context27.sent;
|
|
1826
|
-
if (!res.err) {
|
|
1827
|
-
_context27.next = 5;
|
|
1828
|
-
break;
|
|
1937
|
+
for (_len2 = _args31.length, opt = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
1938
|
+
opt[_key2] = _args31[_key2];
|
|
1829
1939
|
}
|
|
1830
|
-
|
|
1831
|
-
case
|
|
1832
|
-
return _context27.abrupt("return", res.out);
|
|
1833
|
-
case 6:
|
|
1940
|
+
return _context31.abrupt("return", this.o("dry", opt));
|
|
1941
|
+
case 2:
|
|
1834
1942
|
case "end":
|
|
1835
|
-
return
|
|
1943
|
+
return _context31.stop();
|
|
1836
1944
|
}
|
|
1837
|
-
},
|
|
1945
|
+
}, _callee31, this);
|
|
1838
1946
|
}));
|
|
1839
1947
|
function d() {
|
|
1840
1948
|
return _d.apply(this, arguments);
|
|
@@ -1844,16 +1952,16 @@ var Process = /*#__PURE__*/function () {
|
|
|
1844
1952
|
}, {
|
|
1845
1953
|
key: "v",
|
|
1846
1954
|
value: function () {
|
|
1847
|
-
var _v2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1955
|
+
var _v2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee32(data) {
|
|
1848
1956
|
var json,
|
|
1849
1957
|
pretty,
|
|
1850
|
-
|
|
1851
|
-
return _regeneratorRuntime().wrap(function
|
|
1852
|
-
while (1) switch (
|
|
1958
|
+
_args32 = arguments;
|
|
1959
|
+
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
|
|
1960
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
1853
1961
|
case 0:
|
|
1854
|
-
json =
|
|
1855
|
-
pretty =
|
|
1856
|
-
|
|
1962
|
+
json = _args32.length > 1 && _args32[1] !== undefined ? _args32[1] : true;
|
|
1963
|
+
pretty = _args32.length > 2 && _args32[2] !== undefined ? _args32[2] : false;
|
|
1964
|
+
_context32.next = 4;
|
|
1857
1965
|
return this.ao["var"]({
|
|
1858
1966
|
pid: this.pid,
|
|
1859
1967
|
data: data,
|
|
@@ -1861,18 +1969,44 @@ var Process = /*#__PURE__*/function () {
|
|
|
1861
1969
|
pretty: pretty
|
|
1862
1970
|
});
|
|
1863
1971
|
case 4:
|
|
1864
|
-
return
|
|
1972
|
+
return _context32.abrupt("return", _context32.sent);
|
|
1865
1973
|
case 5:
|
|
1866
1974
|
case "end":
|
|
1867
|
-
return
|
|
1975
|
+
return _context32.stop();
|
|
1868
1976
|
}
|
|
1869
|
-
},
|
|
1977
|
+
}, _callee32, this);
|
|
1870
1978
|
}));
|
|
1871
|
-
function v(
|
|
1979
|
+
function v(_x36) {
|
|
1872
1980
|
return _v2.apply(this, arguments);
|
|
1873
1981
|
}
|
|
1874
1982
|
return v;
|
|
1875
1983
|
}()
|
|
1984
|
+
}, {
|
|
1985
|
+
key: "r",
|
|
1986
|
+
value: function () {
|
|
1987
|
+
var _r = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee33() {
|
|
1988
|
+
var _len3,
|
|
1989
|
+
opt,
|
|
1990
|
+
_key3,
|
|
1991
|
+
_args33 = arguments;
|
|
1992
|
+
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
|
|
1993
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
1994
|
+
case 0:
|
|
1995
|
+
for (_len3 = _args33.length, opt = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
1996
|
+
opt[_key3] = _args33[_key3];
|
|
1997
|
+
}
|
|
1998
|
+
return _context33.abrupt("return", this.o("res", opt));
|
|
1999
|
+
case 2:
|
|
2000
|
+
case "end":
|
|
2001
|
+
return _context33.stop();
|
|
2002
|
+
}
|
|
2003
|
+
}, _callee33, this);
|
|
2004
|
+
}));
|
|
2005
|
+
function r() {
|
|
2006
|
+
return _r.apply(this, arguments);
|
|
2007
|
+
}
|
|
2008
|
+
return r;
|
|
2009
|
+
}()
|
|
1876
2010
|
}]);
|
|
1877
2011
|
}();
|
|
1878
2012
|
var _default = exports["default"] = AO;
|