Skip to content

Commit

Permalink
Revert "Re-Export api functions in server adapters (#501)" due to #546
Browse files Browse the repository at this point in the history
This reverts commit d3dddbb
  • Loading branch information
felixmosh committed Mar 8, 2023
1 parent 7981790 commit 0f69f47
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 28 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ npm i @bull-board/koa
const express = require('express');
const Queue = require('bull');
const QueueMQ = require('bullmq');
const { ExpressAdapter, createBullBoard, BullAdapter, BullMQAdapter } = require('@bull-board/express');
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 someQueue = new Queue('someQueueName', {
redis: { port: 6379, host: '127.0.0.1', password: 'foobared' },
Expand Down Expand Up @@ -213,7 +216,9 @@ If you host your express service on a different path than root (/) ie. https://<

```js
const Queue = require('bull')
const { ExpressAdapter, createBullBoard, BullAdapter } = require('@bull-board/express')
const { createBullBoard } = require('@bull-board/api')
const { BullAdapter } = require('@bull-board/api/bullAdapter')
const { ExpressAdapter } = require('@bull-board/express')

const basePath = '/my-base-path';

Expand Down
10 changes: 4 additions & 6 deletions example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ import * as Bull from 'bull';
import Queue3 from 'bull';
import { Queue as QueueMQ, QueueScheduler, Worker } from 'bullmq';
import express from 'express';
import {
ExpressAdapter,
createBullBoard,
BullMQAdapter,
BullAdapter,
} from '@bull-board/express/src';
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';

const redisOptions = {
port: 6379,
Expand Down
4 changes: 3 additions & 1 deletion examples/with-express-auth/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const { ExpressAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/express');
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const { ExpressAdapter } = require('@bull-board/express');
const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq');
const session = require('express-session');
const bodyParser = require('body-parser');
Expand Down
4 changes: 3 additions & 1 deletion examples/with-express/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const { ExpressAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/express');
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const { ExpressAdapter } = require('@bull-board/express');
const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq');
const express = require('express');

Expand Down
4 changes: 3 additions & 1 deletion examples/with-fastify-auth/basicAuth.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const { FastifyAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/fastify');
const { FastifyAdapter } = require('@bull-board/fastify');
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');

module.exports.basicAuth = function basicAuth(fastify, { queue }, next) {
const authenticate = { realm: 'Bull-Board' };
Expand Down
4 changes: 3 additions & 1 deletion examples/with-fastify-auth/cookieAuth.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const { FastifyAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/fastify');
const { FastifyAdapter } = require('@bull-board/fastify');
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const pointOfView = require('@fastify/view');
const path = require('path');

Expand Down
4 changes: 3 additions & 1 deletion examples/with-fastify/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const { FastifyAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/fastify');
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const { FastifyAdapter } = require('@bull-board/fastify');
const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq');
const fastify = require('fastify');

Expand Down
4 changes: 3 additions & 1 deletion examples/with-hapi-auth/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const { HapiAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/hapi');
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const { HapiAdapter } = require('@bull-board/hapi');
const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq');
const Hapi = require('@hapi/hapi');

Expand Down
4 changes: 3 additions & 1 deletion examples/with-hapi/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const { HapiAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/hapi');
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const { HapiAdapter } = require('@bull-board/hapi');
const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq');
const Hapi = require('@hapi/hapi');

Expand Down
4 changes: 3 additions & 1 deletion examples/with-koa/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const { KoaAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/koa');
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const { KoaAdapter } = require('@bull-board/koa');
const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq');
const Koa = require('koa');
const Router = require('koa-router');
Expand Down
3 changes: 0 additions & 3 deletions packages/express/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
export { createBullBoard } from '@bull-board/api';
export { BullAdapter } from '@bull-board/api/bullAdapter';
export { BullMQAdapter } from '@bull-board/api/bullMQAdapter';
export { ExpressAdapter } from './ExpressAdapter';
3 changes: 0 additions & 3 deletions packages/fastify/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
export { createBullBoard } from '@bull-board/api';
export { BullAdapter } from '@bull-board/api/bullAdapter';
export { BullMQAdapter } from '@bull-board/api/bullMQAdapter';
export { FastifyAdapter } from './FastifyAdapter';
3 changes: 0 additions & 3 deletions packages/hapi/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
export { createBullBoard } from '@bull-board/api';
export { BullAdapter } from '@bull-board/api/bullAdapter';
export { BullMQAdapter } from '@bull-board/api/bullMQAdapter';
export { HapiAdapter } from './HapiAdapter';
3 changes: 0 additions & 3 deletions packages/koa/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
export { createBullBoard } from '@bull-board/api';
export { BullAdapter } from '@bull-board/api/bullAdapter';
export { BullMQAdapter } from '@bull-board/api/bullMQAdapter';
export { KoaAdapter } from './KoaAdapter';

0 comments on commit 0f69f47

Please sign in to comment.