@xyo-network/hash 2.103.5 → 2.103.6
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.
|
@@ -6,16 +6,9 @@
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __esm = (fn, res) => function __init() {
|
|
10
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
11
|
-
};
|
|
12
9
|
var __commonJS = (cb, mod) => function __require() {
|
|
13
10
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
14
11
|
};
|
|
15
|
-
var __export = (target, all) => {
|
|
16
|
-
for (var name in all)
|
|
17
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18
|
-
};
|
|
19
12
|
var __copyProps = (to, from, except, desc) => {
|
|
20
13
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
21
14
|
for (let key of __getOwnPropNames(from))
|
|
@@ -32,27 +25,23 @@
|
|
|
32
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
33
26
|
mod
|
|
34
27
|
));
|
|
35
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
28
|
|
|
37
29
|
// ../../../../../../node_modules/is-observable/index.js
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
var init_is_observable = __esm({
|
|
55
|
-
"../../../../../../node_modules/is-observable/index.js"() {
|
|
30
|
+
var require_is_observable = __commonJS({
|
|
31
|
+
"../../../../../../node_modules/is-observable/index.js"(exports, module) {
|
|
32
|
+
"use strict";
|
|
33
|
+
module.exports = (value) => {
|
|
34
|
+
if (!value) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
if (typeof Symbol.observable === "symbol" && typeof value[Symbol.observable] === "function") {
|
|
38
|
+
return value === value[Symbol.observable]();
|
|
39
|
+
}
|
|
40
|
+
if (typeof value["@@observable"] === "function") {
|
|
41
|
+
return value === value["@@observable"]();
|
|
42
|
+
}
|
|
43
|
+
return false;
|
|
44
|
+
};
|
|
56
45
|
}
|
|
57
46
|
});
|
|
58
47
|
|
|
@@ -233,7 +222,7 @@
|
|
|
233
222
|
};
|
|
234
223
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
235
224
|
exports.expose = exports.isWorkerRuntime = exports.Transfer = exports.registerSerializer = void 0;
|
|
236
|
-
var is_observable_1 = __importDefault((
|
|
225
|
+
var is_observable_1 = __importDefault(require_is_observable());
|
|
237
226
|
var common_1 = require_common();
|
|
238
227
|
var transferable_1 = require_transferable();
|
|
239
228
|
var messages_1 = require_messages();
|
|
@@ -251,7 +240,7 @@
|
|
|
251
240
|
var activeSubscriptions = /* @__PURE__ */ new Map();
|
|
252
241
|
var isMasterJobCancelMessage = (thing) => thing && thing.type === messages_1.MasterMessageType.cancel;
|
|
253
242
|
var isMasterJobRunMessage = (thing) => thing && thing.type === messages_1.MasterMessageType.run;
|
|
254
|
-
var
|
|
243
|
+
var isObservable = (thing) => (0, is_observable_1.default)(thing) || isZenObservable(thing);
|
|
255
244
|
function isZenObservable(thing) {
|
|
256
245
|
return thing && typeof thing === "object" && typeof thing.subscribe === "function";
|
|
257
246
|
}
|
|
@@ -322,9 +311,9 @@
|
|
|
322
311
|
} catch (error) {
|
|
323
312
|
return postJobErrorMessage(jobUID, error);
|
|
324
313
|
}
|
|
325
|
-
const resultType =
|
|
314
|
+
const resultType = isObservable(syncResult) ? "observable" : "promise";
|
|
326
315
|
postJobStartMessage(jobUID, resultType);
|
|
327
|
-
if (
|
|
316
|
+
if (isObservable(syncResult)) {
|
|
328
317
|
const subscription = syncResult.subscribe((value) => postJobResultMessage(jobUID, false, (0, common_1.serialize)(value)), (error) => {
|
|
329
318
|
postJobErrorMessage(jobUID, (0, common_1.serialize)(error));
|
|
330
319
|
activeSubscriptions.delete(jobUID);
|
|
@@ -6,16 +6,9 @@
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __esm = (fn, res) => function __init() {
|
|
10
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
11
|
-
};
|
|
12
9
|
var __commonJS = (cb, mod) => function __require() {
|
|
13
10
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
14
11
|
};
|
|
15
|
-
var __export = (target, all) => {
|
|
16
|
-
for (var name in all)
|
|
17
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18
|
-
};
|
|
19
12
|
var __copyProps = (to, from, except, desc) => {
|
|
20
13
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
21
14
|
for (let key of __getOwnPropNames(from))
|
|
@@ -32,27 +25,23 @@
|
|
|
32
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
33
26
|
mod
|
|
34
27
|
));
|
|
35
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
28
|
|
|
37
29
|
// ../../../../../../node_modules/is-observable/index.js
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
var init_is_observable = __esm({
|
|
55
|
-
"../../../../../../node_modules/is-observable/index.js"() {
|
|
30
|
+
var require_is_observable = __commonJS({
|
|
31
|
+
"../../../../../../node_modules/is-observable/index.js"(exports, module) {
|
|
32
|
+
"use strict";
|
|
33
|
+
module.exports = (value) => {
|
|
34
|
+
if (!value) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
if (typeof Symbol.observable === "symbol" && typeof value[Symbol.observable] === "function") {
|
|
38
|
+
return value === value[Symbol.observable]();
|
|
39
|
+
}
|
|
40
|
+
if (typeof value["@@observable"] === "function") {
|
|
41
|
+
return value === value["@@observable"]();
|
|
42
|
+
}
|
|
43
|
+
return false;
|
|
44
|
+
};
|
|
56
45
|
}
|
|
57
46
|
});
|
|
58
47
|
|
|
@@ -233,7 +222,7 @@
|
|
|
233
222
|
};
|
|
234
223
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
235
224
|
exports.expose = exports.isWorkerRuntime = exports.Transfer = exports.registerSerializer = void 0;
|
|
236
|
-
var is_observable_1 = __importDefault((
|
|
225
|
+
var is_observable_1 = __importDefault(require_is_observable());
|
|
237
226
|
var common_1 = require_common();
|
|
238
227
|
var transferable_1 = require_transferable();
|
|
239
228
|
var messages_1 = require_messages();
|
|
@@ -251,7 +240,7 @@
|
|
|
251
240
|
var activeSubscriptions = /* @__PURE__ */ new Map();
|
|
252
241
|
var isMasterJobCancelMessage = (thing) => thing && thing.type === messages_1.MasterMessageType.cancel;
|
|
253
242
|
var isMasterJobRunMessage = (thing) => thing && thing.type === messages_1.MasterMessageType.run;
|
|
254
|
-
var
|
|
243
|
+
var isObservable = (thing) => (0, is_observable_1.default)(thing) || isZenObservable(thing);
|
|
255
244
|
function isZenObservable(thing) {
|
|
256
245
|
return thing && typeof thing === "object" && typeof thing.subscribe === "function";
|
|
257
246
|
}
|
|
@@ -322,9 +311,9 @@
|
|
|
322
311
|
} catch (error) {
|
|
323
312
|
return postJobErrorMessage(jobUID, error);
|
|
324
313
|
}
|
|
325
|
-
const resultType =
|
|
314
|
+
const resultType = isObservable(syncResult) ? "observable" : "promise";
|
|
326
315
|
postJobStartMessage(jobUID, resultType);
|
|
327
|
-
if (
|
|
316
|
+
if (isObservable(syncResult)) {
|
|
328
317
|
const subscription = syncResult.subscribe((value) => postJobResultMessage(jobUID, false, (0, common_1.serialize)(value)), (error) => {
|
|
329
318
|
postJobErrorMessage(jobUID, (0, common_1.serialize)(error));
|
|
330
319
|
activeSubscriptions.delete(jobUID);
|
|
@@ -6,16 +6,9 @@
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __esm = (fn, res) => function __init() {
|
|
10
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
11
|
-
};
|
|
12
9
|
var __commonJS = (cb, mod) => function __require() {
|
|
13
10
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
14
11
|
};
|
|
15
|
-
var __export = (target, all) => {
|
|
16
|
-
for (var name in all)
|
|
17
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18
|
-
};
|
|
19
12
|
var __copyProps = (to, from, except, desc) => {
|
|
20
13
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
21
14
|
for (let key of __getOwnPropNames(from))
|
|
@@ -32,27 +25,23 @@
|
|
|
32
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
33
26
|
mod
|
|
34
27
|
));
|
|
35
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
28
|
|
|
37
29
|
// ../../../../../../node_modules/is-observable/index.js
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
var init_is_observable = __esm({
|
|
55
|
-
"../../../../../../node_modules/is-observable/index.js"() {
|
|
30
|
+
var require_is_observable = __commonJS({
|
|
31
|
+
"../../../../../../node_modules/is-observable/index.js"(exports, module) {
|
|
32
|
+
"use strict";
|
|
33
|
+
module.exports = (value) => {
|
|
34
|
+
if (!value) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
if (typeof Symbol.observable === "symbol" && typeof value[Symbol.observable] === "function") {
|
|
38
|
+
return value === value[Symbol.observable]();
|
|
39
|
+
}
|
|
40
|
+
if (typeof value["@@observable"] === "function") {
|
|
41
|
+
return value === value["@@observable"]();
|
|
42
|
+
}
|
|
43
|
+
return false;
|
|
44
|
+
};
|
|
56
45
|
}
|
|
57
46
|
});
|
|
58
47
|
|
|
@@ -233,7 +222,7 @@
|
|
|
233
222
|
};
|
|
234
223
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
235
224
|
exports.expose = exports.isWorkerRuntime = exports.Transfer = exports.registerSerializer = void 0;
|
|
236
|
-
var is_observable_1 = __importDefault((
|
|
225
|
+
var is_observable_1 = __importDefault(require_is_observable());
|
|
237
226
|
var common_1 = require_common();
|
|
238
227
|
var transferable_1 = require_transferable();
|
|
239
228
|
var messages_1 = require_messages();
|
|
@@ -251,7 +240,7 @@
|
|
|
251
240
|
var activeSubscriptions = /* @__PURE__ */ new Map();
|
|
252
241
|
var isMasterJobCancelMessage = (thing) => thing && thing.type === messages_1.MasterMessageType.cancel;
|
|
253
242
|
var isMasterJobRunMessage = (thing) => thing && thing.type === messages_1.MasterMessageType.run;
|
|
254
|
-
var
|
|
243
|
+
var isObservable = (thing) => (0, is_observable_1.default)(thing) || isZenObservable(thing);
|
|
255
244
|
function isZenObservable(thing) {
|
|
256
245
|
return thing && typeof thing === "object" && typeof thing.subscribe === "function";
|
|
257
246
|
}
|
|
@@ -322,9 +311,9 @@
|
|
|
322
311
|
} catch (error) {
|
|
323
312
|
return postJobErrorMessage(jobUID, error);
|
|
324
313
|
}
|
|
325
|
-
const resultType =
|
|
314
|
+
const resultType = isObservable(syncResult) ? "observable" : "promise";
|
|
326
315
|
postJobStartMessage(jobUID, resultType);
|
|
327
|
-
if (
|
|
316
|
+
if (isObservable(syncResult)) {
|
|
328
317
|
const subscription = syncResult.subscribe((value) => postJobResultMessage(jobUID, false, (0, common_1.serialize)(value)), (error) => {
|
|
329
318
|
postJobErrorMessage(jobUID, (0, common_1.serialize)(error));
|
|
330
319
|
activeSubscriptions.delete(jobUID);
|
package/package.json
CHANGED
|
@@ -10,21 +10,21 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/assert": "^3.
|
|
14
|
-
"@xylabs/hex": "^3.
|
|
15
|
-
"@xylabs/lodash": "^3.
|
|
16
|
-
"@xylabs/object": "^3.
|
|
17
|
-
"@xylabs/platform": "^3.
|
|
18
|
-
"@xylabs/threads": "^3.
|
|
19
|
-
"@xylabs/typeof": "^3.
|
|
20
|
-
"@xyo-network/wasm": "~2.103.
|
|
13
|
+
"@xylabs/assert": "^3.5.0",
|
|
14
|
+
"@xylabs/hex": "^3.5.0",
|
|
15
|
+
"@xylabs/lodash": "^3.5.0",
|
|
16
|
+
"@xylabs/object": "^3.5.0",
|
|
17
|
+
"@xylabs/platform": "^3.5.0",
|
|
18
|
+
"@xylabs/threads": "^3.5.0",
|
|
19
|
+
"@xylabs/typeof": "^3.5.0",
|
|
20
|
+
"@xyo-network/wasm": "~2.103.6",
|
|
21
21
|
"hash-wasm": "^4.11.0",
|
|
22
22
|
"sha.js": "^2.4.11"
|
|
23
23
|
},
|
|
24
24
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/sha.js": "^2.4.4",
|
|
27
|
-
"@xylabs/delay": "^3.
|
|
27
|
+
"@xylabs/delay": "^3.5.0",
|
|
28
28
|
"@xylabs/ts-scripts-yarn3": "^3.10.4",
|
|
29
29
|
"@xylabs/tsconfig": "^3.10.4",
|
|
30
30
|
"esbuild": "^0.21.3",
|
|
@@ -75,6 +75,6 @@
|
|
|
75
75
|
"package-compile": "package-compile-only && yarn bundle"
|
|
76
76
|
},
|
|
77
77
|
"sideEffects": false,
|
|
78
|
-
"version": "2.103.
|
|
78
|
+
"version": "2.103.6",
|
|
79
79
|
"type": "module"
|
|
80
80
|
}
|