construct-hub 0.3.224 → 0.3.225

Sign up to get free protection for your applications and to get access to all the features.
package/.jsii CHANGED
@@ -14544,6 +14544,6 @@
14544
14544
  "symbolId": "src/package-sources/npmjs:NpmJsProps"
14545
14545
  }
14546
14546
  },
14547
- "version": "0.3.224",
14548
- "fingerprint": "xnH/twRDKwut8UzjKvxAG3uMQblPY4zOa2majQKYpyA="
14547
+ "version": "0.3.225",
14548
+ "fingerprint": "dK82FEf38SAaoNyC7PQuZRYYUi3giW24KPAyZDTu+/w="
14549
14549
  }
package/changelog.md CHANGED
@@ -1,2 +1,2 @@
1
1
 
2
- ### [0.3.224](https://github.com/cdklabs/construct-hub/compare/v0.3.223...v0.3.224) (2022-02-01)
2
+ ### [0.3.225](https://github.com/cdklabs/construct-hub/compare/v0.3.224...v0.3.225) (2022-02-02)
@@ -3476,6 +3476,9 @@ var require_src3 = __commonJS({
3476
3476
  "use strict";
3477
3477
  var EventEmitter = require("events");
3478
3478
  var JSONB = require_json_buffer();
3479
+ BigInt.prototype.toJSON = function() {
3480
+ return this.toString();
3481
+ };
3479
3482
  var loadStore = (options) => {
3480
3483
  const adapters = {
3481
3484
  redis: "@keyv/redis",
@@ -3484,7 +3487,8 @@ var require_src3 = __commonJS({
3484
3487
  sqlite: "@keyv/sqlite",
3485
3488
  postgresql: "@keyv/postgres",
3486
3489
  postgres: "@keyv/postgres",
3487
- mysql: "@keyv/mysql"
3490
+ mysql: "@keyv/mysql",
3491
+ etcd: "@keyv/etcd"
3488
3492
  };
3489
3493
  if (options.adapter || options.uri) {
3490
3494
  const adapter = options.adapter || /^[^:]*/.exec(options.uri)[0];
@@ -3516,7 +3520,7 @@ var require_src3 = __commonJS({
3516
3520
  const keyPrefixed = this._getKeyPrefix(key);
3517
3521
  const { store } = this.opts;
3518
3522
  return Promise.resolve().then(() => store.get(keyPrefixed)).then((data) => typeof data === "string" ? this.opts.deserialize(data) : data).then((data) => {
3519
- if (data === void 0) {
3523
+ if (data === void 0 || data === null) {
3520
3524
  return void 0;
3521
3525
  }
3522
3526
  if (typeof data.expires === "number" && Date.now() > data.expires) {
@@ -3537,6 +3541,9 @@ var require_src3 = __commonJS({
3537
3541
  const { store } = this.opts;
3538
3542
  return Promise.resolve().then(() => {
3539
3543
  const expires = typeof ttl === "number" ? Date.now() + ttl : null;
3544
+ if (typeof value === "symbol") {
3545
+ this.emit("error", "symbol cannot be serialized");
3546
+ }
3540
3547
  value = { value, expires };
3541
3548
  return this.opts.serialize(value);
3542
3549
  }).then((value2) => store.set(keyPrefixed, value2, ttl)).then(() => true);