godprotocol 1.0.781 → 1.0.783
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/Objects/Manager.js +159 -30
- package/package.json +3 -2
package/Objects/Manager.js
CHANGED
|
@@ -1,29 +1,153 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
4
|
+
value: true,
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _Index = _interopRequireDefault(require("../Index"));
|
|
8
8
|
var _Blockweb = _interopRequireDefault(require("./Blockweb"));
|
|
9
9
|
var _Oracle = _interopRequireDefault(require("./Oracle"));
|
|
10
|
-
function _interopRequireDefault(e) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
function
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
10
|
+
function _interopRequireDefault(e) {
|
|
11
|
+
return e && e.__esModule ? e : { default: e };
|
|
12
|
+
}
|
|
13
|
+
function _typeof(o) {
|
|
14
|
+
"@babel/helpers - typeof";
|
|
15
|
+
return (
|
|
16
|
+
(_typeof =
|
|
17
|
+
"function" == typeof Symbol && "symbol" == typeof Symbol.iterator
|
|
18
|
+
? function (o) {
|
|
19
|
+
return typeof o;
|
|
20
|
+
}
|
|
21
|
+
: function (o) {
|
|
22
|
+
return o &&
|
|
23
|
+
"function" == typeof Symbol &&
|
|
24
|
+
o.constructor === Symbol &&
|
|
25
|
+
o !== Symbol.prototype
|
|
26
|
+
? "symbol"
|
|
27
|
+
: typeof o;
|
|
28
|
+
}),
|
|
29
|
+
_typeof(o)
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
function ownKeys(e, r) {
|
|
33
|
+
var t = Object.keys(e);
|
|
34
|
+
if (Object.getOwnPropertySymbols) {
|
|
35
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
36
|
+
r &&
|
|
37
|
+
(o = o.filter(function (r) {
|
|
38
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
39
|
+
})),
|
|
40
|
+
t.push.apply(t, o);
|
|
41
|
+
}
|
|
42
|
+
return t;
|
|
43
|
+
}
|
|
44
|
+
function _objectSpread(e) {
|
|
45
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
46
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
47
|
+
r % 2
|
|
48
|
+
? ownKeys(Object(t), !0).forEach(function (r) {
|
|
49
|
+
_defineProperty(e, r, t[r]);
|
|
50
|
+
})
|
|
51
|
+
: Object.getOwnPropertyDescriptors
|
|
52
|
+
? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t))
|
|
53
|
+
: ownKeys(Object(t)).forEach(function (r) {
|
|
54
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
return e;
|
|
58
|
+
}
|
|
59
|
+
function _toConsumableArray(r) {
|
|
60
|
+
return (
|
|
61
|
+
_arrayWithoutHoles(r) ||
|
|
62
|
+
_iterableToArray(r) ||
|
|
63
|
+
_unsupportedIterableToArray(r) ||
|
|
64
|
+
_nonIterableSpread()
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
function _nonIterableSpread() {
|
|
68
|
+
throw new TypeError(
|
|
69
|
+
"Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
function _unsupportedIterableToArray(r, a) {
|
|
73
|
+
if (r) {
|
|
74
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
75
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
76
|
+
return (
|
|
77
|
+
"Object" === t && r.constructor && (t = r.constructor.name),
|
|
78
|
+
"Map" === t || "Set" === t
|
|
79
|
+
? Array.from(r)
|
|
80
|
+
: "Arguments" === t ||
|
|
81
|
+
/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)
|
|
82
|
+
? _arrayLikeToArray(r, a)
|
|
83
|
+
: void 0
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function _iterableToArray(r) {
|
|
88
|
+
if (
|
|
89
|
+
("undefined" != typeof Symbol && null != r[Symbol.iterator]) ||
|
|
90
|
+
null != r["@@iterator"]
|
|
91
|
+
)
|
|
92
|
+
return Array.from(r);
|
|
93
|
+
}
|
|
94
|
+
function _arrayWithoutHoles(r) {
|
|
95
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
96
|
+
}
|
|
97
|
+
function _arrayLikeToArray(r, a) {
|
|
98
|
+
(null == a || a > r.length) && (a = r.length);
|
|
99
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
100
|
+
return n;
|
|
101
|
+
}
|
|
102
|
+
function _defineProperties(e, r) {
|
|
103
|
+
for (var t = 0; t < r.length; t++) {
|
|
104
|
+
var o = r[t];
|
|
105
|
+
(o.enumerable = o.enumerable || !1),
|
|
106
|
+
(o.configurable = !0),
|
|
107
|
+
"value" in o && (o.writable = !0),
|
|
108
|
+
Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function _createClass(e, r, t) {
|
|
112
|
+
return (
|
|
113
|
+
r && _defineProperties(e.prototype, r),
|
|
114
|
+
t && _defineProperties(e, t),
|
|
115
|
+
Object.defineProperty(e, "prototype", { writable: !1 }),
|
|
116
|
+
e
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
function _classCallCheck(a, n) {
|
|
120
|
+
if (!(a instanceof n))
|
|
121
|
+
throw new TypeError("Cannot call a class as a function");
|
|
122
|
+
}
|
|
123
|
+
function _defineProperty(e, r, t) {
|
|
124
|
+
return (
|
|
125
|
+
(r = _toPropertyKey(r)) in e
|
|
126
|
+
? Object.defineProperty(e, r, {
|
|
127
|
+
value: t,
|
|
128
|
+
enumerable: !0,
|
|
129
|
+
configurable: !0,
|
|
130
|
+
writable: !0,
|
|
131
|
+
})
|
|
132
|
+
: (e[r] = t),
|
|
133
|
+
e
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
function _toPropertyKey(t) {
|
|
137
|
+
var i = _toPrimitive(t, "string");
|
|
138
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
139
|
+
}
|
|
140
|
+
function _toPrimitive(t, r) {
|
|
141
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
142
|
+
var e = t[Symbol.toPrimitive];
|
|
143
|
+
if (void 0 !== e) {
|
|
144
|
+
var i = e.call(t, r || "default");
|
|
145
|
+
if ("object" != _typeof(i)) return i;
|
|
146
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
147
|
+
}
|
|
148
|
+
return ("string" === r ? String : Number)(t);
|
|
149
|
+
}
|
|
150
|
+
var Manager = /*#__PURE__*/ _createClass(function Manager() {
|
|
27
151
|
var _this = this;
|
|
28
152
|
_classCallCheck(this, Manager);
|
|
29
153
|
_defineProperty(this, "start_clock", function () {
|
|
@@ -54,10 +178,8 @@ var Manager = /*#__PURE__*/_createClass(function Manager() {
|
|
|
54
178
|
_defineProperty(this, "add_account", function (name, meta) {
|
|
55
179
|
var account = _this.get_account(name);
|
|
56
180
|
if (!account) {
|
|
57
|
-
account =
|
|
58
|
-
|
|
59
|
-
}));
|
|
60
|
-
_this.accounts[name] = account;
|
|
181
|
+
account = (0, _Index["default"])(name, meta);
|
|
182
|
+
_this.accounts[account.name] = account;
|
|
61
183
|
} else if (meta && meta["private"] && !account["private"]) {
|
|
62
184
|
account["private"] = true;
|
|
63
185
|
}
|
|
@@ -68,7 +190,10 @@ var Manager = /*#__PURE__*/_createClass(function Manager() {
|
|
|
68
190
|
if (track) {
|
|
69
191
|
var _track$sequence;
|
|
70
192
|
track.breakpoint.push(track.pointer);
|
|
71
|
-
(_track$sequence = track.sequence).splice.apply(
|
|
193
|
+
(_track$sequence = track.sequence).splice.apply(
|
|
194
|
+
_track$sequence,
|
|
195
|
+
[track.pointer + 1, 0].concat(_toConsumableArray(program.sequence))
|
|
196
|
+
);
|
|
72
197
|
track.pids.push(program.pid);
|
|
73
198
|
if (!_this.running) {
|
|
74
199
|
_this.running++;
|
|
@@ -76,11 +201,15 @@ var Manager = /*#__PURE__*/_createClass(function Manager() {
|
|
|
76
201
|
_this.start_clock();
|
|
77
202
|
}
|
|
78
203
|
} else {
|
|
79
|
-
track = _objectSpread(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
204
|
+
track = _objectSpread(
|
|
205
|
+
_objectSpread({}, program),
|
|
206
|
+
{},
|
|
207
|
+
{
|
|
208
|
+
pointer: 0,
|
|
209
|
+
pids: [program.pid],
|
|
210
|
+
breakpoint: new Array(),
|
|
211
|
+
}
|
|
212
|
+
);
|
|
84
213
|
_this.tracks[track.account.name] = track;
|
|
85
214
|
_this.running++;
|
|
86
215
|
_this.running === 1 && _this.start_clock();
|
|
@@ -93,4 +222,4 @@ var Manager = /*#__PURE__*/_createClass(function Manager() {
|
|
|
93
222
|
this.oracle = new _Oracle["default"](this);
|
|
94
223
|
});
|
|
95
224
|
var _default = Manager;
|
|
96
|
-
exports["default"] = _default;
|
|
225
|
+
exports["default"] = _default;
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "godprotocol",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.783",
|
|
4
4
|
"description": "A data mediator.",
|
|
5
5
|
"main": "Index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
9
|
"start": "nodemon -r esm Index.js",
|
|
10
|
-
"prepack": "npmignore"
|
|
10
|
+
"prepack": "npmignore",
|
|
11
|
+
"build": "babel ./Objects/Manager.js --out-dir build"
|
|
11
12
|
},
|
|
12
13
|
"author": "Savvy",
|
|
13
14
|
"license": "ISC",
|