Comparing version
@@ -34,2 +34,7 @@ "use strict"; | ||
// Notification config - array of target configs. | ||
// Target configs can be | ||
// 1. Topic (simple notification service) | ||
// 2. Queue (simple queue service) | ||
// 3. CloudFront (lambda function) | ||
var NotificationConfig = | ||
@@ -36,0 +41,0 @@ /*#__PURE__*/ |
@@ -25,2 +25,3 @@ "use strict"; | ||
*/ | ||
// List of currently supported endpoints. | ||
var awsS3Endpoint = { | ||
@@ -27,0 +28,0 @@ 'us-east-1': 's3.amazonaws.com', |
@@ -307,2 +307,8 @@ "use strict"; | ||
requestQuery.push(`X-Amz-SignedHeaders=${(0, _helpers.uriEscape)(signedHeaders.join(';').toLowerCase())}`); | ||
var sessionToken = request.headers['x-amz-security-token']; | ||
if (sessionToken) { | ||
requestQuery.push(`X-Amz-Security-Token=${sessionToken}`); | ||
} | ||
var resource = request.path.split('?')[0]; | ||
@@ -309,0 +315,0 @@ var query = request.path.split('?')[1]; |
@@ -16,2 +16,3 @@ "use strict"; | ||
exports.getListObjectsV2Transformer = getListObjectsV2Transformer; | ||
exports.getListObjectsV2WithMetadataTransformer = getListObjectsV2WithMetadataTransformer; | ||
exports.getCompleteMultipartTransformer = getCompleteMultipartTransformer; | ||
@@ -234,2 +235,7 @@ exports.getBucketRegionTransformer = getBucketRegionTransformer; | ||
return getConcater(xmlParsers.parseListObjectsV2); | ||
} // Parses listObjects with metadata response. | ||
function getListObjectsV2WithMetadataTransformer() { | ||
return getConcater(xmlParsers.parseListObjectsV2WithMetadata); | ||
} // Parses completeMultipartUpload response. | ||
@@ -236,0 +242,0 @@ |
@@ -17,2 +17,3 @@ "use strict"; | ||
exports.parseListObjectsV2 = parseListObjectsV2; | ||
exports.parseListObjectsV2WithMetadata = parseListObjectsV2WithMetadata; | ||
@@ -396,3 +397,44 @@ var _xml2js = _interopRequireDefault(require("xml2js")); | ||
return result; | ||
} // parse XML response for list objects v2 with metadata in a bucket | ||
function parseListObjectsV2WithMetadata(xml) { | ||
var result = { | ||
objects: [], | ||
isTruncated: false | ||
}; | ||
var xmlobj = parseXml(xml); | ||
if (xmlobj.IsTruncated && xmlobj.IsTruncated[0] === 'true') result.isTruncated = true; | ||
if (xmlobj.NextContinuationToken) result.nextContinuationToken = xmlobj.NextContinuationToken[0]; | ||
if (xmlobj.Contents) { | ||
xmlobj.Contents.forEach(function (content) { | ||
var name = content.Key[0]; | ||
var lastModified = new Date(content.LastModified[0]); | ||
var etag = content.ETag[0].replace(/^"/g, '').replace(/"$/g, '').replace(/^"/g, '').replace(/"$/g, '').replace(/^"/g, '').replace(/^"$/g, ''); | ||
var size = +content.Size[0]; | ||
var metadata = content.UserMetadata[0]; | ||
result.objects.push({ | ||
name, | ||
lastModified, | ||
etag, | ||
size, | ||
metadata | ||
}); | ||
}); | ||
} | ||
if (xmlobj.CommonPrefixes) { | ||
xmlobj.CommonPrefixes.forEach(function (commonPrefix) { | ||
var prefix = commonPrefix.Prefix[0]; | ||
var size = 0; | ||
result.objects.push({ | ||
prefix, | ||
size | ||
}); | ||
}); | ||
} | ||
return result; | ||
} | ||
//# sourceMappingURL=xml-parsers.js.map |
{ | ||
"name": "minio", | ||
"version": "7.0.13", | ||
"version": "7.0.14", | ||
"description": "S3 Compatible Cloud Storage client", | ||
@@ -5,0 +5,0 @@ "main": "./dist/main/minio.js", |
@@ -182,3 +182,3 @@ # 适用于Amazon S3兼容云存储的Minio JavaScript Library [](https://slack.min.io) | ||
####完整示例 : 存储桶通知 | ||
#### 完整示例 : 存储桶通知 | ||
* [get-bucket-notification.js](https://github.com/minio/minio-js/blob/master/examples/get-bucket-notification.js) | ||
@@ -185,0 +185,0 @@ * [set-bucket-notification.js](https://github.com/minio/minio-js/blob/master/examples/set-bucket-notification.js) |
@@ -126,2 +126,3 @@ # MinIO JavaScript Library for Amazon S3 Compatible Cloud Storage [](https://slack.min.io) | ||
* [`listObjectsV2`](https://docs.min.io/docs/javascript-client-api-reference#listObjectsV2) | ||
* [`listObjectsV2WithMetadata`](https://docs.min.io/docs/javascript-client-api-reference#listObjectsV2WithMetadata) (Extension) | ||
* [`listIncompleteUploads`](https://docs.min.io/docs/javascript-client-api-reference#listIncompleteUploads) | ||
@@ -170,2 +171,3 @@ | ||
* [list-objects-v2.js](https://github.com/minio/minio-js/blob/master/examples/list-objects-v2.js) | ||
* [list-objects-v2-with-metadata.js](https://github.com/minio/minio-js/blob/master/examples/list-objects-v2-with-metadata.js) (Extension) | ||
* [bucket-exists.js](https://github.com/minio/minio-js/blob/master/examples/bucket-exists.js) | ||
@@ -172,0 +174,0 @@ * [make-bucket.js](https://github.com/minio/minio-js/blob/master/examples/make-bucket.js) |
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
221538
5.27%16
6.67%4277
5.53%215
0.94%