Skip to content

Commit 4097b2a

Browse files
authored
Merge pull request #81 from SoftwareBrothers/feat/rebrand
chore: rebrand AdminBro to AdminJS
2 parents 45b6268 + fd68832 commit 4097b2a

18 files changed

+428
-304
lines changed

.env-example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
NODE_ENV=test
2-
POSTGRES_USER="adminbro"
3-
POSTGRES_PASSWORD="adminbro"
4-
POSTGRES_DATABASE="adminbro-sequelize-test"
2+
POSTGRES_USER="adminjs"
3+
POSTGRES_PASSWORD="adminjs"
4+
POSTGRES_DATABASE="adminjs-sequelize-test"
55
POSTGRES_HOST
66
POSTGRES_PORT

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
## admin-bro-sequelizejs
1+
## adminjs-sequelizejs
22

3-
This is an official [AdminBro](https://github.com/SoftwareBrothers/admin-bro) adapter which integrates [sequelize ORM](http://docs.sequelizejs.com/) into admin-bro.
3+
This is an official [AdminJS](https://github.com/SoftwareBrothers/adminjs) adapter which integrates [sequelize ORM](http://docs.sequelizejs.com/) into AdminJS.
44

55
## Usage
66

7-
The plugin can be registered using standard `AdminBro.registerAdapter` method.
7+
The plugin can be registered using standard `AdminJS.registerAdapter` method.
88

99
```javascript
10-
const AdminBro = require('admin-bro')
11-
const AdminBroSequelize = require('@admin-bro/sequelize')
10+
const AdminJS = require('adminjs')
11+
const AdminJSSequelize = require('@adminjs/sequelize')
1212

13-
AdminBro.registerAdapter(AdminBroSequelize)
13+
AdminJS.registerAdapter(AdminJSSequelize)
1414
```
1515

16-
More options can be found on [AdminBro](https://github.com/SoftwareBrothers/admin-bro) official website.
16+
More options can be found on [AdminJS](https://github.com/SoftwareBrothers/adminjs) official website.
1717

1818
## Testing
1919

@@ -29,7 +29,7 @@ npm run sequelize db:migrate
2929

3030
## License
3131

32-
AdminBro is Copyright © 2018 SoftwareBrothers.co. It is free software, and may be redistributed under the terms specified in the [LICENSE](LICENSE) file.
32+
AdminJS is Copyright © 2021 SoftwareBrothers.co. It is free software, and may be redistributed under the terms specified in the [LICENSE](LICENSE) file.
3333

3434
## About SoftwareBrothers.co
3535

example-app/.adminbro/.entry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
AdminBro.UserComponents = {}
1+
AdminJS.UserComponents = {}

example-app/.adminbro/bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example-app/.env-example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
NODE_ENV=test
2-
POSTGRES_USER="adminbro"
3-
POSTGRES_PASSWORD="adminbro"
4-
POSTGRES_DATABASE="adminbro-sequelize"
2+
POSTGRES_USER="adminjs"
3+
POSTGRES_PASSWORD="adminjs"
4+
POSTGRES_DATABASE="adminjs-sequelize"

example-app/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
"wait-on": "^5.2.0"
2121
},
2222
"dependencies": {
23-
"@admin-bro/express": "^3.0.0",
24-
"@admin-bro/sequelize": "1.0.0-beta.5",
25-
"admin-bro": "^3.1.1",
23+
"@adminjs/express": "^3.0.0",
24+
"@adminjs/sequelize": "1.0.0-beta.5",
25+
"adminjs": "^3.1.1",
2626
"dotenv": "^8.2.0",
2727
"express": "^4.17.1",
2828
"express-formidable": "^1.2.0",

example-app/src/connect.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import buildUser from './users/user.entity'
44
import buildComment from './comments/comment.entity'
55

66
const connect = async (): Promise<Sequelize> => {
7-
const dbName = process.env.POSTGRES_DATABASE || 'adminbro-sequelize'
7+
const dbName = process.env.POSTGRES_DATABASE || 'adminjs-sequelize'
88
const host = process.env.POSTGRES_HOST || 'localhost'
9-
const password = process.env.POSTGRES_PASSWORD || 'adminbro'
10-
const user = process.env.POSTGRES_USER || 'adminbro'
9+
const password = process.env.POSTGRES_PASSWORD || 'adminjs'
10+
const user = process.env.POSTGRES_USER || 'adminjs'
1111
const port = process.env.POSTGRES_PORT || 5432
1212

1313
const sequelize = new Sequelize(

example-app/src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ import { config } from 'dotenv'
55
config({ path: path.join(__dirname, '../../.env') })
66

77
import express from 'express'
8-
import AdminBro from 'admin-bro'
9-
import { buildRouter } from '@admin-bro/express'
10-
import AdminBroSequelize from '@admin-bro/sequelize'
8+
import AdminJS from 'adminjs'
9+
import { buildRouter } from '@adminjs/express'
10+
import AdminJSSequelize from '@adminjs/sequelize'
1111

1212
import userAdmin from './users/user.admin'
1313

1414
import connect from './connect'
1515

1616
const PORT = 3000
1717

18-
AdminBro.registerAdapter(AdminBroSequelize)
18+
AdminJS.registerAdapter(AdminJSSequelize)
1919
const run = async () => {
2020
const sequelize = await connect()
2121
const app = express()
22-
const admin = new AdminBro({
22+
const admin = new AdminJS({
2323
databases: [sequelize],
2424
resources: [{
2525
resource: sequelize.models.User,

example-app/src/users/user.admin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ResourceOptions } from 'admin-bro'
1+
import { ResourceOptions } from 'adminjs'
22

33
const options: ResourceOptions = {
44
properties: {

example-app/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"types": ["cypress"],
1717
"paths": {
1818
"react": ["node_modules/@types/react"],
19-
"admin-bro": ["node_modules/admin-bro"],
19+
"adminjs": ["node_modules/adminjs"],
2020
},
2121
"baseUrl": "."
2222
},

0 commit comments

Comments
 (0)