ag-common 0.0.95 → 0.0.96

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.
@@ -20,10 +20,12 @@ const enforceDynamoProvisionCap = ({ tables, readsMax = 25, writesMax = 25, }) =
20
20
  const reads = extractSum({ str: s, regex: /readCapacityUnits.*/gim });
21
21
  const writes = extractSum({ str: s, regex: /writeCapacityUnits.*/gim });
22
22
  if (reads > readsMax) {
23
- throw new Error(`dynamo table provisioned reads:${reads} greater than max:${readsMax}`);
23
+ (0, log_1.warn)(`dynamo table provisioned reads:${reads} greater than max:${readsMax}`);
24
+ throw new Error('exceeded dynamo provision cap');
24
25
  }
25
26
  if (writes > writesMax) {
26
- throw new Error(`dynamo table provisioned writes:${writes} greater than max:${writesMax}`);
27
+ (0, log_1.warn)(`dynamo table provisioned writes:${writes} greater than max:${writesMax}`);
28
+ throw new Error('exceeded dynamo provision cap');
27
29
  }
28
30
  (0, log_1.warn)(`dynamo provisioned total: R=${reads} W=${writes}`);
29
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ag-common",
3
- "version": "0.0.95",
3
+ "version": "0.0.96",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Andrei Gec <@andreigec> (https://gec.dev/)",