idea-aws 3.13.6 → 3.13.7
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.
|
@@ -32,6 +32,10 @@ export declare abstract class ResourceController extends GenericController {
|
|
|
32
32
|
constructor(event: APIGatewayProxyEventV2 | APIGatewayProxyEvent, callback: Callback, options?: ResourceControllerOptions);
|
|
33
33
|
private initFromEventV2;
|
|
34
34
|
private initFromEventV1;
|
|
35
|
+
/**
|
|
36
|
+
* Force the parsing of a query parameter as an array of strings.
|
|
37
|
+
*/
|
|
38
|
+
protected getQueryParamAsArray(paramName: string): string[];
|
|
35
39
|
handleRequest: () => Promise<void>;
|
|
36
40
|
private controlHandlerError;
|
|
37
41
|
protected done(err: any, res?: any, statusCode?: number): void;
|
|
@@ -156,6 +156,17 @@ class ResourceController extends genericController_1.GenericController {
|
|
|
156
156
|
throw new RCError('Malformed body');
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* Force the parsing of a query parameter as an array of strings.
|
|
161
|
+
*/
|
|
162
|
+
getQueryParamAsArray(paramName) {
|
|
163
|
+
if (!this.queryParams[paramName])
|
|
164
|
+
return [];
|
|
165
|
+
else if (Array.isArray(this.queryParams[paramName]))
|
|
166
|
+
return this.queryParams[paramName];
|
|
167
|
+
else
|
|
168
|
+
return String(this.queryParams[paramName]).split(',');
|
|
169
|
+
}
|
|
159
170
|
controlHandlerError(err = {}, context, replaceWithErrorMessage) {
|
|
160
171
|
if (err instanceof RCError)
|
|
161
172
|
return new Error(err.message);
|
package/dist/src/s3.js
CHANGED
|
@@ -72,7 +72,7 @@ class S3 {
|
|
|
72
72
|
* Get an object from a S3 bucket.
|
|
73
73
|
*/
|
|
74
74
|
async getObject(options) {
|
|
75
|
-
logger.debug(`S3 get object: ${options.
|
|
75
|
+
logger.debug(`S3 get object: ${options.key}`);
|
|
76
76
|
const result = await this.s3.getObject({ Bucket: options.bucket, Key: options.key }).promise();
|
|
77
77
|
switch (options.type) {
|
|
78
78
|
case GetObjectTypes.JSON:
|