@nxtedition/lib 19.0.33 → 19.0.34
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 +1 -1
- package/s3.js +2 -16
package/package.json
CHANGED
package/s3.js
CHANGED
|
@@ -95,9 +95,7 @@ class PartUploader {
|
|
|
95
95
|
)
|
|
96
96
|
this.#logger?.debug({ etag: ETag }, 'uploaded part')
|
|
97
97
|
|
|
98
|
-
return {
|
|
99
|
-
} catch (err) {
|
|
100
|
-
return { error: err }
|
|
98
|
+
return { ETag, PartNumber: this.#number }
|
|
101
99
|
} finally {
|
|
102
100
|
await fs.promises.unlink(this.#writable.path)
|
|
103
101
|
this.#logger?.debug('deleted part')
|
|
@@ -210,21 +208,9 @@ export async function upload({
|
|
|
210
208
|
}
|
|
211
209
|
maybeFlush()
|
|
212
210
|
|
|
213
|
-
const parts =
|
|
214
|
-
const errors = []
|
|
215
|
-
for (const { part, error } of await Promise.all(promises)) {
|
|
216
|
-
if (error) {
|
|
217
|
-
errors.push(error)
|
|
218
|
-
} else {
|
|
219
|
-
parts.push(part)
|
|
220
|
-
}
|
|
221
|
-
}
|
|
211
|
+
const parts = await Promise.all(promises)
|
|
222
212
|
signal.throwIfAborted()
|
|
223
213
|
|
|
224
|
-
if (errors.length > 0) {
|
|
225
|
-
throw new AggregateError(errors, 'upload failed')
|
|
226
|
-
}
|
|
227
|
-
|
|
228
214
|
if (parts.length === 0) {
|
|
229
215
|
throw new Error('upload empty')
|
|
230
216
|
}
|