@pi-r/aws 0.6.5 → 0.6.6
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/client/index.js +0 -1
- package/download/index.js +2 -4
- package/package.json +5 -5
- package/upload/index.js +2 -4
package/client/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
2
|
exports.isNoSuchBucket = exports.getBucketKey = exports.parseAttributeValue = exports.writeMessageDefaultRetention = exports.checkBucketCannedACL = exports.setDatabaseEndpoint = exports.executeBatchQuery = exports.executeQuery = exports.deleteObjectsV2 = exports.deleteObjects = exports.setBucketWebsite = exports.setBucketPolicy = exports.createBucketV2 = exports.createBucket = exports.createDatabaseClient = exports.createStorageClient = exports.validateDatabase = exports.validateStorage = exports.getPrivatePolicy = exports.getBucketPublicReadPolicy = exports.getPublicReadPolicy = exports.isDatabaseDefined = exports.isProviderChainDefined = exports.isEnvDefined = exports.isSharedCredentialsDefined = exports.isAccessDefined = void 0;
|
|
4
3
|
const aws = require("aws-sdk");
|
|
5
4
|
const types_1 = require("@e-mc/types");
|
package/download/index.js
CHANGED
|
@@ -3,7 +3,7 @@ const types_1 = require("@e-mc/types");
|
|
|
3
3
|
const Module = require("@e-mc/module");
|
|
4
4
|
const Cloud = require("@e-mc/cloud");
|
|
5
5
|
const client_1 = require("@pi-r/aws");
|
|
6
|
-
function download(credential, service = 'aws', sdk = 'aws-sdk/clients/s3') {
|
|
6
|
+
module.exports = function download(credential, service = 'aws', sdk = 'aws-sdk/clients/s3') {
|
|
7
7
|
const s3 = client_1.createStorageClient.call(this, credential, service, sdk);
|
|
8
8
|
return (data, callback) => {
|
|
9
9
|
const { bucket: Bucket, download: target } = data;
|
|
@@ -34,6 +34,4 @@ function download(credential, service = 'aws', sdk = 'aws-sdk/clients/s3') {
|
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
module.exports = download;
|
|
37
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/aws",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
4
4
|
"description": "AWS V2 cloud functions for E-mc.",
|
|
5
5
|
"main": "client/index.js",
|
|
6
6
|
"types": "client/index.d.ts",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@e-mc/cloud": "^0.8.
|
|
25
|
-
"@e-mc/module": "^0.8.
|
|
26
|
-
"@e-mc/types": "^0.8.
|
|
27
|
-
"aws-sdk": "^2.
|
|
24
|
+
"@e-mc/cloud": "^0.8.7",
|
|
25
|
+
"@e-mc/module": "^0.8.7",
|
|
26
|
+
"@e-mc/types": "^0.8.7",
|
|
27
|
+
"aws-sdk": "^2.1591.0"
|
|
28
28
|
}
|
|
29
29
|
}
|
package/upload/index.js
CHANGED
|
@@ -7,7 +7,7 @@ const Cloud = require("@e-mc/cloud");
|
|
|
7
7
|
const client_1 = require("@pi-r/aws");
|
|
8
8
|
const BUCKET_SESSION = new Set();
|
|
9
9
|
const BUCKET_RESPONSE = {};
|
|
10
|
-
function upload(credential, service = 'aws', sdk = 'aws-sdk/clients/s3') {
|
|
10
|
+
module.exports = function upload(credential, service = 'aws', sdk = 'aws-sdk/clients/s3') {
|
|
11
11
|
const s3 = client_1.createStorageClient.call(this, credential, service, sdk);
|
|
12
12
|
return async (data, callback) => {
|
|
13
13
|
var _a;
|
|
@@ -164,6 +164,4 @@ function upload(credential, service = 'aws', sdk = 'aws-sdk/clients/s3') {
|
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
};
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
module.exports = upload;
|
|
167
|
+
};
|