ag-common 0.0.613 → 0.0.614
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.
|
@@ -154,7 +154,7 @@ const scan = (tableName, opt) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
154
154
|
})), ((opt === null || opt === void 0 ? void 0 : opt.requiredAttributeList) && {
|
|
155
155
|
ProjectionExpression: opt.requiredAttributeList.join(', '),
|
|
156
156
|
})), { ExclusiveStartKey }));
|
|
157
|
-
(0, log_1.
|
|
157
|
+
(0, log_1.debug)(`running dynamo scan=${JSON.stringify(params, null, 2)}`);
|
|
158
158
|
const { Items: newitems, LastEvaluatedKey,
|
|
159
159
|
// eslint-disable-next-line no-await-in-loop
|
|
160
160
|
} = yield exports.dynamoDb.send(params);
|
|
@@ -163,7 +163,7 @@ const scan = (tableName, opt) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
163
163
|
Items.push(...newitems.map((r) => r));
|
|
164
164
|
}
|
|
165
165
|
} while (ExclusiveStartKey);
|
|
166
|
-
(0, log_1.
|
|
166
|
+
(0, log_1.debug)(`dynamo scan against ${tableName} ok, count=${Items === null || Items === void 0 ? void 0 : Items.length}`);
|
|
167
167
|
return { data: Items };
|
|
168
168
|
}
|
|
169
169
|
catch (e) {
|
|
@@ -86,14 +86,14 @@ function validateOpenApi({ event, next, authorized, schema, COGNITO_USER_POOL_ID
|
|
|
86
86
|
else {
|
|
87
87
|
try {
|
|
88
88
|
request.params = opm.pathParams;
|
|
89
|
-
(0, log_1.
|
|
89
|
+
(0, log_1.debug)('req=', JSON.stringify(Object.assign(Object.assign({}, request), { body: ((_d = (_c = request.body) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 2000
|
|
90
90
|
? '(truncating long body)'
|
|
91
91
|
: request.body }), null, 2));
|
|
92
92
|
const resp = new openapi_request_validator_1.default(Object.assign(Object.assign({}, opm.operation), { schemas: schema.components.schemas })).validateRequest(request);
|
|
93
93
|
if (resp) {
|
|
94
94
|
(0, log_1.warn)('bad request');
|
|
95
|
-
(0, log_1.
|
|
96
|
-
(0, log_1.
|
|
95
|
+
(0, log_1.debug)('opm=', JSON.stringify(opm, null, 2));
|
|
96
|
+
(0, log_1.debug)('resp=', JSON.stringify(resp, null, 2));
|
|
97
97
|
return (0, api_1.returnCode)(400, `error:${(_f = (_e = resp === null || resp === void 0 ? void 0 : resp.errors) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.message}`);
|
|
98
98
|
}
|
|
99
99
|
(0, log_1.debug)(`validated request:`, event.path);
|
|
@@ -30,7 +30,7 @@ const jwtVerify = ({ token, jwksUri, issuer, }) => __awaiter(void 0, void 0, voi
|
|
|
30
30
|
jwksRequestsPerMinute: 10,
|
|
31
31
|
jwksUri,
|
|
32
32
|
};
|
|
33
|
-
(0, log_1.
|
|
33
|
+
(0, log_1.debug)(`jwksClient config=`, jc);
|
|
34
34
|
jwksClient = (0, jwks_rsa_1.default)(jc);
|
|
35
35
|
}
|
|
36
36
|
jwksClient.getSigningKey(header.kid, (errorV, key) => {
|
package/package.json
CHANGED