@xyo-network/hash 2.103.4 → 2.103.5
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,9 +6,16 @@
|
|
|
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
|
+
};
|
|
9
12
|
var __commonJS = (cb, mod) => function __require() {
|
|
10
13
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
14
|
};
|
|
15
|
+
var __export = (target, all) => {
|
|
16
|
+
for (var name in all)
|
|
17
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18
|
+
};
|
|
12
19
|
var __copyProps = (to, from, except, desc) => {
|
|
13
20
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
21
|
for (let key of __getOwnPropNames(from))
|
|
@@ -25,23 +32,27 @@
|
|
|
25
32
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
33
|
mod
|
|
27
34
|
));
|
|
35
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
36
|
|
|
29
37
|
// ../../../../../../node_modules/is-observable/index.js
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
var is_observable_exports = {};
|
|
39
|
+
__export(is_observable_exports, {
|
|
40
|
+
default: () => isObservable
|
|
41
|
+
});
|
|
42
|
+
function isObservable(value) {
|
|
43
|
+
if (!value) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
if (typeof Symbol.observable === "symbol" && typeof value[Symbol.observable] === "function") {
|
|
47
|
+
return value === value[Symbol.observable]();
|
|
48
|
+
}
|
|
49
|
+
if (typeof value["@@observable"] === "function") {
|
|
50
|
+
return value === value["@@observable"]();
|
|
51
|
+
}
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
var init_is_observable = __esm({
|
|
55
|
+
"../../../../../../node_modules/is-observable/index.js"() {
|
|
45
56
|
}
|
|
46
57
|
});
|
|
47
58
|
|
|
@@ -222,7 +233,7 @@
|
|
|
222
233
|
};
|
|
223
234
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
224
235
|
exports.expose = exports.isWorkerRuntime = exports.Transfer = exports.registerSerializer = void 0;
|
|
225
|
-
var is_observable_1 = __importDefault(
|
|
236
|
+
var is_observable_1 = __importDefault((init_is_observable(), __toCommonJS(is_observable_exports)));
|
|
226
237
|
var common_1 = require_common();
|
|
227
238
|
var transferable_1 = require_transferable();
|
|
228
239
|
var messages_1 = require_messages();
|
|
@@ -240,7 +251,7 @@
|
|
|
240
251
|
var activeSubscriptions = /* @__PURE__ */ new Map();
|
|
241
252
|
var isMasterJobCancelMessage = (thing) => thing && thing.type === messages_1.MasterMessageType.cancel;
|
|
242
253
|
var isMasterJobRunMessage = (thing) => thing && thing.type === messages_1.MasterMessageType.run;
|
|
243
|
-
var
|
|
254
|
+
var isObservable2 = (thing) => (0, is_observable_1.default)(thing) || isZenObservable(thing);
|
|
244
255
|
function isZenObservable(thing) {
|
|
245
256
|
return thing && typeof thing === "object" && typeof thing.subscribe === "function";
|
|
246
257
|
}
|
|
@@ -311,9 +322,9 @@
|
|
|
311
322
|
} catch (error) {
|
|
312
323
|
return postJobErrorMessage(jobUID, error);
|
|
313
324
|
}
|
|
314
|
-
const resultType =
|
|
325
|
+
const resultType = isObservable2(syncResult) ? "observable" : "promise";
|
|
315
326
|
postJobStartMessage(jobUID, resultType);
|
|
316
|
-
if (
|
|
327
|
+
if (isObservable2(syncResult)) {
|
|
317
328
|
const subscription = syncResult.subscribe((value) => postJobResultMessage(jobUID, false, (0, common_1.serialize)(value)), (error) => {
|
|
318
329
|
postJobErrorMessage(jobUID, (0, common_1.serialize)(error));
|
|
319
330
|
activeSubscriptions.delete(jobUID);
|
|
@@ -6,9 +6,16 @@
|
|
|
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
|
+
};
|
|
9
12
|
var __commonJS = (cb, mod) => function __require() {
|
|
10
13
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
14
|
};
|
|
15
|
+
var __export = (target, all) => {
|
|
16
|
+
for (var name in all)
|
|
17
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18
|
+
};
|
|
12
19
|
var __copyProps = (to, from, except, desc) => {
|
|
13
20
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
21
|
for (let key of __getOwnPropNames(from))
|
|
@@ -25,23 +32,27 @@
|
|
|
25
32
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
33
|
mod
|
|
27
34
|
));
|
|
35
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
36
|
|
|
29
37
|
// ../../../../../../node_modules/is-observable/index.js
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
var is_observable_exports = {};
|
|
39
|
+
__export(is_observable_exports, {
|
|
40
|
+
default: () => isObservable
|
|
41
|
+
});
|
|
42
|
+
function isObservable(value) {
|
|
43
|
+
if (!value) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
if (typeof Symbol.observable === "symbol" && typeof value[Symbol.observable] === "function") {
|
|
47
|
+
return value === value[Symbol.observable]();
|
|
48
|
+
}
|
|
49
|
+
if (typeof value["@@observable"] === "function") {
|
|
50
|
+
return value === value["@@observable"]();
|
|
51
|
+
}
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
var init_is_observable = __esm({
|
|
55
|
+
"../../../../../../node_modules/is-observable/index.js"() {
|
|
45
56
|
}
|
|
46
57
|
});
|
|
47
58
|
|
|
@@ -222,7 +233,7 @@
|
|
|
222
233
|
};
|
|
223
234
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
224
235
|
exports.expose = exports.isWorkerRuntime = exports.Transfer = exports.registerSerializer = void 0;
|
|
225
|
-
var is_observable_1 = __importDefault(
|
|
236
|
+
var is_observable_1 = __importDefault((init_is_observable(), __toCommonJS(is_observable_exports)));
|
|
226
237
|
var common_1 = require_common();
|
|
227
238
|
var transferable_1 = require_transferable();
|
|
228
239
|
var messages_1 = require_messages();
|
|
@@ -240,7 +251,7 @@
|
|
|
240
251
|
var activeSubscriptions = /* @__PURE__ */ new Map();
|
|
241
252
|
var isMasterJobCancelMessage = (thing) => thing && thing.type === messages_1.MasterMessageType.cancel;
|
|
242
253
|
var isMasterJobRunMessage = (thing) => thing && thing.type === messages_1.MasterMessageType.run;
|
|
243
|
-
var
|
|
254
|
+
var isObservable2 = (thing) => (0, is_observable_1.default)(thing) || isZenObservable(thing);
|
|
244
255
|
function isZenObservable(thing) {
|
|
245
256
|
return thing && typeof thing === "object" && typeof thing.subscribe === "function";
|
|
246
257
|
}
|
|
@@ -311,9 +322,9 @@
|
|
|
311
322
|
} catch (error) {
|
|
312
323
|
return postJobErrorMessage(jobUID, error);
|
|
313
324
|
}
|
|
314
|
-
const resultType =
|
|
325
|
+
const resultType = isObservable2(syncResult) ? "observable" : "promise";
|
|
315
326
|
postJobStartMessage(jobUID, resultType);
|
|
316
|
-
if (
|
|
327
|
+
if (isObservable2(syncResult)) {
|
|
317
328
|
const subscription = syncResult.subscribe((value) => postJobResultMessage(jobUID, false, (0, common_1.serialize)(value)), (error) => {
|
|
318
329
|
postJobErrorMessage(jobUID, (0, common_1.serialize)(error));
|
|
319
330
|
activeSubscriptions.delete(jobUID);
|
|
@@ -6,9 +6,16 @@
|
|
|
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
|
+
};
|
|
9
12
|
var __commonJS = (cb, mod) => function __require() {
|
|
10
13
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
14
|
};
|
|
15
|
+
var __export = (target, all) => {
|
|
16
|
+
for (var name in all)
|
|
17
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18
|
+
};
|
|
12
19
|
var __copyProps = (to, from, except, desc) => {
|
|
13
20
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
21
|
for (let key of __getOwnPropNames(from))
|
|
@@ -25,23 +32,27 @@
|
|
|
25
32
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
33
|
mod
|
|
27
34
|
));
|
|
35
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
36
|
|
|
29
37
|
// ../../../../../../node_modules/is-observable/index.js
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
var is_observable_exports = {};
|
|
39
|
+
__export(is_observable_exports, {
|
|
40
|
+
default: () => isObservable
|
|
41
|
+
});
|
|
42
|
+
function isObservable(value) {
|
|
43
|
+
if (!value) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
if (typeof Symbol.observable === "symbol" && typeof value[Symbol.observable] === "function") {
|
|
47
|
+
return value === value[Symbol.observable]();
|
|
48
|
+
}
|
|
49
|
+
if (typeof value["@@observable"] === "function") {
|
|
50
|
+
return value === value["@@observable"]();
|
|
51
|
+
}
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
var init_is_observable = __esm({
|
|
55
|
+
"../../../../../../node_modules/is-observable/index.js"() {
|
|
45
56
|
}
|
|
46
57
|
});
|
|
47
58
|
|
|
@@ -222,7 +233,7 @@
|
|
|
222
233
|
};
|
|
223
234
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
224
235
|
exports.expose = exports.isWorkerRuntime = exports.Transfer = exports.registerSerializer = void 0;
|
|
225
|
-
var is_observable_1 = __importDefault(
|
|
236
|
+
var is_observable_1 = __importDefault((init_is_observable(), __toCommonJS(is_observable_exports)));
|
|
226
237
|
var common_1 = require_common();
|
|
227
238
|
var transferable_1 = require_transferable();
|
|
228
239
|
var messages_1 = require_messages();
|
|
@@ -240,7 +251,7 @@
|
|
|
240
251
|
var activeSubscriptions = /* @__PURE__ */ new Map();
|
|
241
252
|
var isMasterJobCancelMessage = (thing) => thing && thing.type === messages_1.MasterMessageType.cancel;
|
|
242
253
|
var isMasterJobRunMessage = (thing) => thing && thing.type === messages_1.MasterMessageType.run;
|
|
243
|
-
var
|
|
254
|
+
var isObservable2 = (thing) => (0, is_observable_1.default)(thing) || isZenObservable(thing);
|
|
244
255
|
function isZenObservable(thing) {
|
|
245
256
|
return thing && typeof thing === "object" && typeof thing.subscribe === "function";
|
|
246
257
|
}
|
|
@@ -311,9 +322,9 @@
|
|
|
311
322
|
} catch (error) {
|
|
312
323
|
return postJobErrorMessage(jobUID, error);
|
|
313
324
|
}
|
|
314
|
-
const resultType =
|
|
325
|
+
const resultType = isObservable2(syncResult) ? "observable" : "promise";
|
|
315
326
|
postJobStartMessage(jobUID, resultType);
|
|
316
|
-
if (
|
|
327
|
+
if (isObservable2(syncResult)) {
|
|
317
328
|
const subscription = syncResult.subscribe((value) => postJobResultMessage(jobUID, false, (0, common_1.serialize)(value)), (error) => {
|
|
318
329
|
postJobErrorMessage(jobUID, (0, common_1.serialize)(error));
|
|
319
330
|
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.4.1",
|
|
14
|
+
"@xylabs/hex": "^3.4.1",
|
|
15
|
+
"@xylabs/lodash": "^3.4.1",
|
|
16
|
+
"@xylabs/object": "^3.4.1",
|
|
17
|
+
"@xylabs/platform": "^3.4.1",
|
|
18
|
+
"@xylabs/threads": "^3.4.1",
|
|
19
|
+
"@xylabs/typeof": "^3.4.1",
|
|
20
|
+
"@xyo-network/wasm": "~2.103.5",
|
|
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.4.1",
|
|
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.5",
|
|
79
79
|
"type": "module"
|
|
80
80
|
}
|