presidium 4.2.1 → 4.4.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/AwsCredentials.js CHANGED
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
package/Docker.js CHANGED
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
package/DynamoDBStream.js CHANGED
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
package/DynamoDBTable.js CHANGED
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
package/ECR.js CHANGED
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
package/HTTP.js CHANGED
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
package/LICENSE CHANGED
@@ -1,9 +1,5 @@
1
1
  The CLOUT Free and Open Source Software License (CFOSS)
2
2
 
3
- © Richard Yufei Tong, King of Software
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- 1. This permission notice is included in all copies or substantial portions of the Software.
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.
8
4
 
9
5
  THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE, OR IN THE USE OF OR OTHER DEALINGS OF THE SOFTWARE.
package/NpmToken.js CHANGED
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
package/Password.js CHANGED
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
package/Readable.js CHANGED
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
package/S3Bucket.js CHANGED
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
@@ -1285,7 +1282,8 @@ class S3Bucket {
1285
1282
 
1286
1283
  await fs.promises.mkdir(tmpDir, { recursive: true })
1287
1284
 
1288
- const promises = []
1285
+ let uploadingPromise = Promise.resolve()
1286
+ const parts = []
1289
1287
  const uploadId = multipartUpload.UploadId
1290
1288
  let contentMD5 = crypto.createHash('md5')
1291
1289
  let contentSHA256 = crypto.createHash('sha256')
@@ -1303,21 +1301,22 @@ class S3Bucket {
1303
1301
 
1304
1302
  partBody.end()
1305
1303
 
1306
- const promise = new Promise(resolve => {
1307
- partBody.on('finish', resolve)
1308
- }).then(thunkify.call(
1309
- this._uploadPart,
1310
- this,
1311
- key,
1312
- partBodyFilepath,
1313
- uploadId,
1314
- partNumber,
1315
- contentLength,
1316
- contentMD5,
1317
- contentSHA256,
1318
- progress
1319
- ))
1320
- promises.push(promise)
1304
+ const partBodyFinish =
1305
+ new Promise(curry.call(partBody.on, partBody, 'finish', __))
1306
+
1307
+ uploadingPromise =
1308
+ uploadingPromise.then(always(partBodyFinish)).then(thunkify.call(
1309
+ this._uploadPart,
1310
+ this,
1311
+ key,
1312
+ partBodyFilepath,
1313
+ uploadId,
1314
+ partNumber,
1315
+ contentLength,
1316
+ contentMD5,
1317
+ contentSHA256,
1318
+ progress
1319
+ )).then(curry.call(parts.push, parts, __))
1321
1320
 
1322
1321
  partNumber += 1
1323
1322
  partBodyFilepath = path.join(tmpDir, `presidium-S3Bucket-multipartUpload-${key}-${partNumber}`)
@@ -1340,23 +1339,24 @@ class S3Bucket {
1340
1339
 
1341
1340
  partBody.end()
1342
1341
 
1343
- const promise = new Promise(resolve => {
1344
- partBody.on('finish', resolve)
1345
- }).then(thunkify.call(
1346
- this._uploadPart,
1347
- this,
1348
- key,
1349
- partBodyFilepath,
1350
- uploadId,
1351
- partNumber,
1352
- contentLength,
1353
- contentMD5,
1354
- contentSHA256,
1355
- progress
1356
- ))
1357
- promises.push(promise)
1358
-
1359
- const parts = await Promise.all(promises)
1342
+ const partBodyFinish =
1343
+ new Promise(curry.call(partBody.on, partBody, 'finish', __))
1344
+
1345
+ uploadingPromise =
1346
+ uploadingPromise.then(always(partBodyFinish)).then(thunkify.call(
1347
+ this._uploadPart,
1348
+ this,
1349
+ key,
1350
+ partBodyFilepath,
1351
+ uploadId,
1352
+ partNumber,
1353
+ contentLength,
1354
+ contentMD5,
1355
+ contentSHA256,
1356
+ progress
1357
+ )).then(curry.call(parts.push, parts, __))
1358
+
1359
+ await uploadingPromise
1360
1360
 
1361
1361
  return this._completeMultipartUpload(key, uploadId, parts)
1362
1362
  }
package/Secrets.js CHANGED
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
package/SecretsManager.js CHANGED
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
package/XML.js CHANGED
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
package/index.js CHANGED
@@ -1,7 +1,4 @@
1
1
  /**
2
- * Presidium
3
- * https://presidium.services/
4
- * (c) Richard Tong
5
2
  * Presidium may be freely distributed under the CFOSS license.
6
3
  */
7
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "presidium",
3
- "version": "4.2.1",
3
+ "version": "4.4.0",
4
4
  "description": "The Presidium library.",
5
5
  "author": "Richard Tong",
6
6
  "license": "CFOSS",