ag-common 0.0.20 → 0.0.21

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.
@@ -46,6 +46,12 @@ const getOperation = ({ path, method, resource, schema, }) => {
46
46
  function validateOpenApi({ event, next, authorized, schema, COGNITO_USER_POOL_ID, }) {
47
47
  var _a, _b, _c, _d, _e;
48
48
  return __awaiter(this, void 0, void 0, function* () {
49
+ if (!schema) {
50
+ throw new Error('schema undefined!');
51
+ }
52
+ if (!COGNITO_USER_POOL_ID) {
53
+ throw new Error('COGNITO_USER_POOL_ID undefined');
54
+ }
49
55
  const request = {
50
56
  method: event.httpMethod,
51
57
  path: event.path,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ag-common",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Andrei Gec <@andreigec> (https://gec.dev/)",