@secrecy/lib 1.47.3-feat-pay-for-user-billing.1 → 1.48.0
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/README.md +1 -1
- package/dist/lib/client/SecrecyCloudClient.js +2 -10
- package/dist/types/client.d.ts +2490 -493
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -137,18 +137,11 @@ export class SecrecyCloudClient {
|
|
|
137
137
|
return uploadData.id;
|
|
138
138
|
}
|
|
139
139
|
const uploadDataPartEnd = async (md5, order) => {
|
|
140
|
-
|
|
140
|
+
return this.#apiClient.cloud.uploadDataPartEnd.mutate({
|
|
141
141
|
dataId: uploadData.id,
|
|
142
142
|
md5,
|
|
143
143
|
order,
|
|
144
144
|
}, { signal });
|
|
145
|
-
return isUploadPartEnded;
|
|
146
|
-
};
|
|
147
|
-
const uploadEnded = async () => {
|
|
148
|
-
const { isUploadEnded } = await this.#apiClient.cloud.uploadDataEnd.mutate({
|
|
149
|
-
dataId: uploadData.id,
|
|
150
|
-
}, { signal });
|
|
151
|
-
return isUploadEnded;
|
|
152
145
|
};
|
|
153
146
|
const chunkParts = new Array();
|
|
154
147
|
for (const [index, chunk] of enumerate(chunks(encryptedData, Number(uploadData.partSize)))) {
|
|
@@ -184,12 +177,11 @@ export class SecrecyCloudClient {
|
|
|
184
177
|
},
|
|
185
178
|
signal,
|
|
186
179
|
});
|
|
187
|
-
|
|
180
|
+
return uploadDataPartEnd(chunk.md5, chunk.order);
|
|
188
181
|
};
|
|
189
182
|
await promiseAllLimit(3, uploadData.parts.map((p) => async () => {
|
|
190
183
|
await byPart(p);
|
|
191
184
|
}));
|
|
192
|
-
await uploadEnded();
|
|
193
185
|
dataContentCache.set(uploadData.id, dataBuffer);
|
|
194
186
|
return uploadData.id;
|
|
195
187
|
}
|