spd-lib 1.1.4 → 1.1.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.
- package/index.js +7 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -90,6 +90,8 @@ this.salt = salt;
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
async extractData() {
|
|
93
|
+
return new Promise(async(res,rej)=>{
|
|
94
|
+
try{
|
|
93
95
|
await sodium.ready;
|
|
94
96
|
let extractedFiles = {};
|
|
95
97
|
this.data.forEach(async dat => {
|
|
@@ -98,7 +100,11 @@ this.salt = salt;
|
|
|
98
100
|
const dt = decompressedData.toString('utf8');
|
|
99
101
|
extractedFiles[dat.dataName] = await this.CSTI(dt, dat.dataType);
|
|
100
102
|
});
|
|
101
|
-
|
|
103
|
+
res(extractedFiles);
|
|
104
|
+
}catch{
|
|
105
|
+
rej()
|
|
106
|
+
}
|
|
107
|
+
})
|
|
102
108
|
}
|
|
103
109
|
|
|
104
110
|
|