diff --git a/README.md b/README.md index 50303b48..ad85dfcd 100644 --- a/README.md +++ b/README.md @@ -67,10 +67,7 @@ npm i @bull-board/koa const express = require('express'); const Queue = require('bull'); const QueueMQ = require('bullmq'); -const { createBullBoard } = require('@bull-board/api'); -const { BullAdapter } = require('@bull-board/api/bullAdapter'); -const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter'); -const { ExpressAdapter } = require('@bull-board/express'); +const { ExpressAdapter, createBullBoard, BullAdapter, BullMQAdapter } = require('@bull-board/express'); const someQueue = new Queue('someQueueName', { redis: { port: 6379, host: '127.0.0.1', password: 'foobared' }, @@ -160,9 +157,7 @@ If you host your express service on a different path than root (/) ie. https://< ```js const Queue = require('bull') -const { createBullBoard } = require('@bull-board/api') -const { BullAdapter } = require('@bull-board/api/bullAdapter') -const { ExpressAdapter } = require('@bull-board/express') +const { ExpressAdapter, createBullBoard, BullAdapter } = require('@bull-board/express') const basePath = '/my-base-path'; diff --git a/example.ts b/example.ts index 9a5b1d4d..25974fec 100644 --- a/example.ts +++ b/example.ts @@ -2,10 +2,7 @@ import * as Bull from 'bull'; import Queue3 from 'bull'; import { Queue as QueueMQ, QueueScheduler, Worker } from 'bullmq'; import express from 'express'; -import { BullMQAdapter } from '@bull-board/api/src/queueAdapters/bullMQ'; -import { BullAdapter } from '@bull-board/api/src/queueAdapters/bull'; -import { createBullBoard } from '@bull-board/api/src'; -import { ExpressAdapter } from '@bull-board/express/src'; +import { ExpressAdapter, createBullBoard, BullMQAdapter, BullAdapter } from '@bull-board/express/src'; const redisOptions = { port: 6379, diff --git a/examples/with-express-auth/index.js b/examples/with-express-auth/index.js index 0cfbf81e..cf435377 100644 --- a/examples/with-express-auth/index.js +++ b/examples/with-express-auth/index.js @@ -1,6 +1,4 @@ -const { createBullBoard } = require('@bull-board/api'); -const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter'); -const { ExpressAdapter } = require('@bull-board/express'); +const { ExpressAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/express'); const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq'); const session = require('express-session'); const bodyParser = require('body-parser'); diff --git a/examples/with-express/index.js b/examples/with-express/index.js index 2aa11eff..9b7bd6ab 100644 --- a/examples/with-express/index.js +++ b/examples/with-express/index.js @@ -1,6 +1,4 @@ -const { createBullBoard } = require('@bull-board/api'); -const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter'); -const { ExpressAdapter } = require('@bull-board/express'); +const { ExpressAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/express'); const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq'); const express = require('express'); diff --git a/examples/with-fastify-auth/basicAuth.js b/examples/with-fastify-auth/basicAuth.js index 16b7c360..65abf4f3 100644 --- a/examples/with-fastify-auth/basicAuth.js +++ b/examples/with-fastify-auth/basicAuth.js @@ -1,6 +1,4 @@ -const { FastifyAdapter } = require('@bull-board/fastify'); -const { createBullBoard } = require('@bull-board/api'); -const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter'); +const { FastifyAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/fastify'); module.exports.basicAuth = function basicAuth(fastify, { queue }, next) { const authenticate = { realm: 'Bull-Board' }; diff --git a/examples/with-fastify-auth/cookieAuth.js b/examples/with-fastify-auth/cookieAuth.js index fad9c8eb..1902b6b1 100644 --- a/examples/with-fastify-auth/cookieAuth.js +++ b/examples/with-fastify-auth/cookieAuth.js @@ -1,6 +1,4 @@ -const { FastifyAdapter } = require('@bull-board/fastify'); -const { createBullBoard } = require('@bull-board/api'); -const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter'); +const { FastifyAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/fastify'); const pointOfView = require('@fastify/view'); const path = require('path'); diff --git a/examples/with-fastify/index.js b/examples/with-fastify/index.js index b5c9360f..693b268e 100644 --- a/examples/with-fastify/index.js +++ b/examples/with-fastify/index.js @@ -1,6 +1,4 @@ -const { createBullBoard } = require('@bull-board/api'); -const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter'); -const { FastifyAdapter } = require('@bull-board/fastify'); +const { FastifyAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/fastify'); const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq'); const fastify = require('fastify'); diff --git a/examples/with-hapi-auth/index.js b/examples/with-hapi-auth/index.js index 9ead6725..7f96a34a 100644 --- a/examples/with-hapi-auth/index.js +++ b/examples/with-hapi-auth/index.js @@ -1,6 +1,4 @@ -const { createBullBoard } = require('@bull-board/api'); -const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter'); -const { HapiAdapter } = require('@bull-board/hapi'); +const { HapiAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/hapi'); const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq'); const Hapi = require('@hapi/hapi'); diff --git a/examples/with-hapi/index.js b/examples/with-hapi/index.js index 758b9df1..7cc85db8 100644 --- a/examples/with-hapi/index.js +++ b/examples/with-hapi/index.js @@ -1,6 +1,4 @@ -const { createBullBoard } = require('@bull-board/api'); -const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter'); -const { HapiAdapter } = require('@bull-board/hapi'); +const { HapiAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/hapi'); const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq'); const Hapi = require('@hapi/hapi'); diff --git a/examples/with-koa/index.js b/examples/with-koa/index.js index 760a0bed..1570c33c 100644 --- a/examples/with-koa/index.js +++ b/examples/with-koa/index.js @@ -1,6 +1,4 @@ -const { createBullBoard } = require('@bull-board/api'); -const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter'); -const { KoaAdapter } = require('@bull-board/koa'); +const { KoaAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/koa'); const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq'); const Koa = require('koa'); const Router = require('koa-router'); diff --git a/packages/express/src/index.ts b/packages/express/src/index.ts index cbdabd3a..008fe96c 100644 --- a/packages/express/src/index.ts +++ b/packages/express/src/index.ts @@ -1 +1,4 @@ +export { createBullBoard } from '@bull-board/api'; +export { BullAdapter } from '@bull-board/api/bullAdapter'; +export { BullMQAdapter } from '@bull-board/api/bullMQAdapter'; export { ExpressAdapter } from './ExpressAdapter'; diff --git a/packages/fastify/src/index.ts b/packages/fastify/src/index.ts index deb83f43..2020d40e 100644 --- a/packages/fastify/src/index.ts +++ b/packages/fastify/src/index.ts @@ -1 +1,4 @@ +export { createBullBoard } from '@bull-board/api'; +export { BullAdapter } from '@bull-board/api/bullAdapter'; +export { BullMQAdapter } from '@bull-board/api/bullMQAdapter'; export { FastifyAdapter } from './FastifyAdapter'; diff --git a/packages/hapi/src/index.ts b/packages/hapi/src/index.ts index 421c6fcf..de870af1 100644 --- a/packages/hapi/src/index.ts +++ b/packages/hapi/src/index.ts @@ -1 +1,4 @@ +export { createBullBoard } from '@bull-board/api'; +export { BullAdapter } from '@bull-board/api/bullAdapter'; +export { BullMQAdapter } from '@bull-board/api/bullMQAdapter'; export { HapiAdapter } from './HapiAdapter'; diff --git a/packages/koa/src/index.ts b/packages/koa/src/index.ts index 9b713b54..599b0f2c 100644 --- a/packages/koa/src/index.ts +++ b/packages/koa/src/index.ts @@ -1 +1,4 @@ +export { createBullBoard } from '@bull-board/api'; +export { BullAdapter } from '@bull-board/api/bullAdapter'; +export { BullMQAdapter } from '@bull-board/api/bullMQAdapter'; export { KoaAdapter } from './KoaAdapter';