@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 CHANGED
@@ -1,3 +1,3 @@
1
- # Anonymize Secrecy Library 📚🔐🔐
1
+ # Anonymize Secrecy Library 📚🔐
2
2
 
3
3
  - [Docs](https://docs.secrecy.tech)
@@ -137,18 +137,11 @@ export class SecrecyCloudClient {
137
137
  return uploadData.id;
138
138
  }
139
139
  const uploadDataPartEnd = async (md5, order) => {
140
- const { isUploadPartEnded } = await this.#apiClient.cloud.uploadDataPartEnd.mutate({
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
- await uploadDataPartEnd(chunk.md5, chunk.order);
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
  }