@cumulus/aws-client
Advanced tools
Comparing version 10.0.1 to 10.0.2
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k; |
{ | ||
"name": "@cumulus/aws-client", | ||
"version": "10.0.1", | ||
"version": "10.0.2", | ||
"description": "Utilities for working with AWS", | ||
@@ -46,5 +46,5 @@ "keywords": [ | ||
"dependencies": { | ||
"@cumulus/checksum": "10.0.1", | ||
"@cumulus/errors": "10.0.1", | ||
"@cumulus/logger": "10.0.1", | ||
"@cumulus/checksum": "10.0.2", | ||
"@cumulus/errors": "10.0.2", | ||
"@cumulus/logger": "10.0.2", | ||
"aws-sdk": "^2.814.0", | ||
@@ -55,6 +55,7 @@ "jsonpath-plus": "^1.1.0", | ||
"p-retry": "^4.2.0", | ||
"p-wait-for": "^3.1.0", | ||
"p-timeout": "^4.1.0", | ||
"p-wait-for": "^3.2.0", | ||
"pump": "^3.0.0" | ||
}, | ||
"gitHead": "49c3c88336838184f22f35fbce298c71cd269138" | ||
"gitHead": "e678a624b5179759200b988de72292ce389f41e2" | ||
} |
20
S3.js
@@ -7,3 +7,7 @@ "use strict"; | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -36,2 +40,3 @@ if (k2 === undefined) k2 = k; | ||
const p_wait_for_1 = __importDefault(require("p-wait-for")); | ||
const p_timeout_1 = __importDefault(require("p-timeout")); | ||
const pump_1 = __importDefault(require("pump")); | ||
@@ -171,3 +176,14 @@ const querystring_1 = __importDefault(require("querystring")); | ||
const { bucket, key, interval = 1000, timeout = 30 * 1000, } = params; | ||
return await (0, p_wait_for_1.default)(() => (0, exports.s3ObjectExists)({ Bucket: bucket, Key: key }), { interval, timeout }); | ||
try { | ||
await (0, p_wait_for_1.default)(() => (0, exports.s3ObjectExists)({ Bucket: bucket, Key: key }), { interval, timeout }); | ||
} | ||
catch (error) { | ||
if (error instanceof p_timeout_1.default) { | ||
log.error(`Timed out after ${timeout}ms waiting for existence of s3://${bucket}/${key}`); | ||
} | ||
else { | ||
log.error(`Unexpected error while waiting for existence of s3://${bucket}/${key}: ${error}`); | ||
} | ||
throw error; | ||
} | ||
}; | ||
@@ -174,0 +190,0 @@ exports.waitForObjectToExist = waitForObjectToExist; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k; |
@@ -5,2 +5,3 @@ /** | ||
import Logger from '@cumulus/logger'; | ||
import { SQSRecord } from 'aws-lambda'; | ||
export interface SQSMessage extends AWS.SQS.Message { | ||
@@ -56,3 +57,5 @@ ReceiptHandle: string; | ||
export declare const receiveSQSMessages: (queueUrl: string, options: ReceiveSQSMessagesOptions) => Promise<SQSMessage[]>; | ||
export declare const parseSQSMessageBody: (message: any) => unknown; | ||
export declare const parseSQSMessageBody: (message: SQSRecord | AWS.SQS.Message) => { | ||
[key: string]: any; | ||
}; | ||
/** | ||
@@ -59,0 +62,0 @@ * Delete a given SQS message from a given queue. |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
202924
3424
11
+ Addedp-timeout@^4.1.0
+ Added@cumulus/checksum@10.0.2(transitive)
+ Added@cumulus/errors@10.0.2(transitive)
+ Added@cumulus/logger@10.0.2(transitive)
+ Addedp-timeout@4.1.0(transitive)
- Removed@cumulus/checksum@10.0.1(transitive)
- Removed@cumulus/errors@10.0.1(transitive)
- Removed@cumulus/logger@10.0.1(transitive)
Updated@cumulus/checksum@10.0.2
Updated@cumulus/errors@10.0.2
Updated@cumulus/logger@10.0.2
Updatedp-wait-for@^3.2.0