presidium 3.4.8 → 3.5.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 +7 -0
- package/DiskHashTable.js +3 -0
- package/DiskSortedHashTable.js +3 -0
- package/Docker.js +7 -0
- package/DynamoDBGlobalSecondaryIndex.js +7 -0
- package/DynamoDBStream.js +7 -0
- package/DynamoDBTable.js +7 -0
- package/ECR.js +7 -0
- package/GoogleChromeDevTools.js +7 -0
- package/GoogleChromeForTesting.js +7 -0
- package/HTTP.js +7 -0
- package/NpmToken.js +7 -0
- package/OptionalValidator.js +7 -0
- package/Password.js +7 -0
- package/README.md +6 -0
- package/Readable.js +7 -0
- package/S3Bucket.js +45 -0
- package/Secrets.js +7 -0
- package/SecretsManager.js +7 -0
- package/StrictValidator.js +7 -0
- package/TranscribeStream.js +7 -0
- package/XML.js +7 -0
- package/index.js +9 -0
- package/internal/RetryAwsErrors.test.js +1 -1
- package/package.json +5 -2
package/AwsCredentials.js
CHANGED
package/DiskHashTable.js
ADDED
package/Docker.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presidium
|
|
3
|
+
* https://presidium.services/
|
|
4
|
+
* (c) Richard Tong
|
|
5
|
+
* Presidium may be freely distributed under the CFOSS license.
|
|
6
|
+
*/
|
|
7
|
+
|
|
1
8
|
require('rubico/global')
|
|
2
9
|
const isString = require('rubico/x/isString')
|
|
3
10
|
const identity = require('rubico/x/identity')
|
package/DynamoDBStream.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presidium
|
|
3
|
+
* https://presidium.services/
|
|
4
|
+
* (c) Richard Tong
|
|
5
|
+
* Presidium may be freely distributed under the CFOSS license.
|
|
6
|
+
*/
|
|
7
|
+
|
|
1
8
|
require('rubico/global')
|
|
2
9
|
const { differenceWith } = require('rubico/x')
|
|
3
10
|
const Transducer = require('rubico/Transducer')
|
package/DynamoDBTable.js
CHANGED
package/ECR.js
CHANGED
package/GoogleChromeDevTools.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presidium
|
|
3
|
+
* https://presidium.services/
|
|
4
|
+
* (c) Richard Tong
|
|
5
|
+
* Presidium may be freely distributed under the CFOSS license.
|
|
6
|
+
*/
|
|
7
|
+
|
|
1
8
|
const EventEmitter = require('events')
|
|
2
9
|
const GoogleChromeForTesting = require('./GoogleChromeForTesting')
|
|
3
10
|
const WebSocket = require('./WebSocket')
|
package/HTTP.js
CHANGED
package/NpmToken.js
CHANGED
package/OptionalValidator.js
CHANGED
package/Password.js
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Presidium
|
|
2
2
|

|
|
3
3
|
|
|
4
|
+
Source code: [GitHub](https://github.com/richytong/presidium) |
|
|
5
|
+
License: [CFOSS](https://cloutsworld.com/en-us/legal/license/cfoss)
|
|
6
|
+
|
|
4
7
|

|
|
5
8
|
[](https://codecov.io/gh/richytong/presidium)
|
|
6
9
|
[](https://www.npmjs.com/package/presidium)
|
|
@@ -350,5 +353,8 @@ const data = await googleChromeDevTools.Page.navigate({
|
|
|
350
353
|
})
|
|
351
354
|
```
|
|
352
355
|
|
|
356
|
+
## License
|
|
357
|
+
Presidium is distributed under the [CFOSS License](https://cloutsworld.com/en-us/legal/license/cfoss).
|
|
358
|
+
|
|
353
359
|
# Support
|
|
354
360
|
* minimum Node.js version: 16
|
package/Readable.js
CHANGED
package/S3Bucket.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presidium
|
|
3
|
+
* https://presidium.services/
|
|
4
|
+
* (c) Richard Tong
|
|
5
|
+
* Presidium may be freely distributed under the CFOSS license.
|
|
6
|
+
*/
|
|
7
|
+
|
|
1
8
|
require('rubico/global')
|
|
2
9
|
const crypto = require('crypto')
|
|
3
10
|
const HTTP = require('./HTTP')
|
|
@@ -173,6 +180,7 @@ class S3Bucket {
|
|
|
173
180
|
await this.create()
|
|
174
181
|
await this.putPublicAccessBlock()
|
|
175
182
|
await this.putRequestPayment()
|
|
183
|
+
await this._putBucketEncryption()
|
|
176
184
|
if (this.VersioningStatus == 'Enabled') {
|
|
177
185
|
await this.putVersioning()
|
|
178
186
|
}
|
|
@@ -314,6 +322,43 @@ class S3Bucket {
|
|
|
314
322
|
return this.http1[method](url, { headers, body })
|
|
315
323
|
}
|
|
316
324
|
|
|
325
|
+
// _putBucketEncryption() -> Promise<>
|
|
326
|
+
async _putBucketEncryption() {
|
|
327
|
+
const body = `
|
|
328
|
+
<ServerSideEncryptionConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
|
|
329
|
+
<Rule>
|
|
330
|
+
<ApplyServerSideEncryptionByDefault>
|
|
331
|
+
<SSEAlgorithm>AES256</SSEAlgorithm>
|
|
332
|
+
</ApplyServerSideEncryptionByDefault>
|
|
333
|
+
<BlockedEncryptionTypes>
|
|
334
|
+
<EncryptionType>NONE</EncryptionType>
|
|
335
|
+
</BlockedEncryptionTypes>
|
|
336
|
+
<BucketKeyEnabled>true</BucketKeyEnabled>
|
|
337
|
+
</Rule>
|
|
338
|
+
</ServerSideEncryptionConfiguration>
|
|
339
|
+
`.trim()
|
|
340
|
+
|
|
341
|
+
const response = await this._awsRequest0('PUT', '/?encryption', {}, body)
|
|
342
|
+
|
|
343
|
+
if (response.ok) {
|
|
344
|
+
await Readable.Text(response)
|
|
345
|
+
return {}
|
|
346
|
+
}
|
|
347
|
+
throw new AwsError(await Readable.Text(response), response.status)
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/*
|
|
351
|
+
// _getBucketEncryption() -> data object
|
|
352
|
+
async _getBucketEncryption() {
|
|
353
|
+
const response = await this._awsRequest0('GET', '/?encryption', {}, '')
|
|
354
|
+
if (response.ok) {
|
|
355
|
+
const text = await Readable.Text(response)
|
|
356
|
+
return text
|
|
357
|
+
}
|
|
358
|
+
throw new AwsError(await Readable.Text(response), response.status)
|
|
359
|
+
}
|
|
360
|
+
*/
|
|
361
|
+
|
|
317
362
|
/**
|
|
318
363
|
* @name getLocation
|
|
319
364
|
*
|
package/Secrets.js
CHANGED
package/SecretsManager.js
CHANGED
package/StrictValidator.js
CHANGED
package/TranscribeStream.js
CHANGED
package/XML.js
CHANGED
package/index.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presidium
|
|
3
|
+
* https://presidium.services/
|
|
4
|
+
* (c) Richard Tong
|
|
5
|
+
* Presidium may be freely distributed under the CFOSS license.
|
|
6
|
+
*/
|
|
7
|
+
|
|
1
8
|
module.exports = {
|
|
2
9
|
AwsCredentials: require('./AwsCredentials.js'),
|
|
10
|
+
DiskHashTable: require('./DiskHashTable.js'),
|
|
11
|
+
DiskSortedHashTable: require('./DiskSortedHashTable.js'),
|
|
3
12
|
Docker: require('./Docker.js'),
|
|
4
13
|
DynamoDBGlobalSecondaryIndex: require('./DynamoDBGlobalSecondaryIndex.js'),
|
|
5
14
|
DynamoDBStream: require('./DynamoDBStream.js'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "presidium",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "A library for creating web services",
|
|
5
5
|
"author": "Richard Tong",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
"internal",
|
|
15
15
|
"AwsCredentials.js",
|
|
16
|
+
"DiskHashTable.js",
|
|
17
|
+
"DiskSortedHashTable.js",
|
|
16
18
|
"Docker.js",
|
|
17
19
|
"DynamoDBGlobalSecondaryIndex.js",
|
|
18
20
|
"DynamoDBStream.js",
|
|
@@ -62,7 +64,8 @@
|
|
|
62
64
|
"dependencies": {
|
|
63
65
|
"extract-zip": "^2.0.1",
|
|
64
66
|
"html-entities": "^2.6.0",
|
|
65
|
-
"presidium-
|
|
67
|
+
"presidium-db": ">=3.0.0",
|
|
68
|
+
"presidium-websocket": ">=3.2.1",
|
|
66
69
|
"rubico": "^2.7.7",
|
|
67
70
|
"tar-stream": "^3.1.7"
|
|
68
71
|
},
|