s3db.js 7.0.2 → 7.0.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "s3db.js",
3
- "version": "7.0.2",
3
+ "version": "7.0.3",
4
4
  "description": "Use AWS S3, the world's most reliable document storage, as a database with this ORM.",
5
5
  "main": "dist/s3db.cjs.js",
6
6
  "module": "dist/s3db.es.js",
@@ -1,4 +1,3 @@
1
- import amqp from 'amqplib';
2
1
  import tryFn from "../../concerns/try-fn.js";
3
2
 
4
3
  export class RabbitMqConsumer {
@@ -21,13 +20,14 @@ export class RabbitMqConsumer {
21
20
  }
22
21
 
23
22
  async stop() {
24
- this._stopped = true;https://github.com/browserbase/stagehand
23
+ this._stopped = true;
25
24
  if (this.channel) await this.channel.close();
26
25
  if (this.connection) await this.connection.close();
27
26
  }
28
27
 
29
28
  async _connect() {
30
29
  const [ok, err] = await tryFn(async () => {
30
+ const amqp = (await import('amqplib')).default;
31
31
  this.connection = await amqp.connect(this.amqpUrl);
32
32
  this.channel = await this.connection.createChannel();
33
33
  await this.channel.assertQueue(this.queue, { durable: true });