@holochain-syn/client 0.3.0-alpha.2 → 0.3.0-alpha.3
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/package.json +2 -2
- package/dist/utils.d.ts +0 -1
- package/dist/utils.js +0 -23
- package/dist/utils.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holochain-syn/client",
|
|
3
|
-
"version": "0.3.0-alpha.
|
|
3
|
+
"version": "0.3.0-alpha.3",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"build:watch": "run-singleton \"tsc -w --preserveWatchOutput\""
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@holochain/client": "^0.11.
|
|
21
|
+
"@holochain/client": "^0.11.10",
|
|
22
22
|
"@holochain-open-dev/utils": "^0.7.2",
|
|
23
23
|
"@msgpack/msgpack": "^2.7.0",
|
|
24
24
|
"automerge": "^1.0.1-preview.7",
|
package/dist/utils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function deepDecodeUint8Arrays(object: any): any;
|
package/dist/utils.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { decode } from '@msgpack/msgpack';
|
|
2
|
-
export function deepDecodeUint8Arrays(object) {
|
|
3
|
-
if (object === undefined || object === null)
|
|
4
|
-
return object;
|
|
5
|
-
if (object instanceof Uint8Array) {
|
|
6
|
-
try {
|
|
7
|
-
return decode(object);
|
|
8
|
-
}
|
|
9
|
-
catch (e) {
|
|
10
|
-
return object;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
if (typeof object !== 'object')
|
|
14
|
-
return object;
|
|
15
|
-
if (Array.isArray(object))
|
|
16
|
-
return object.map(deepDecodeUint8Arrays);
|
|
17
|
-
const obj = {};
|
|
18
|
-
for (const key of Object.keys(object)) {
|
|
19
|
-
obj[key] = deepDecodeUint8Arrays(object[key]);
|
|
20
|
-
}
|
|
21
|
-
return obj;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=utils.js.map
|
package/dist/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,UAAU,qBAAqB,CAAC,MAAW;IAC/C,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,MAAM,CAAC;IAC3D,IAAI,MAAM,YAAY,UAAU,EAAE;QAChC,IAAI;YACF,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;SACvB;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,MAAM,CAAC;SACf;KACF;IAED,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC;IAE9C,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAEpE,MAAM,GAAG,GAAG,EAAE,CAAC;IAEf,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;QACrC,GAAG,CAAC,GAAG,CAAC,GAAG,qBAAqB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;KAC/C;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|