Skip to content

Commit

Permalink
Merge pull request #2 from SoftwareBrothers/feat/rebrand
Browse files Browse the repository at this point in the history
feat: rebrand to AdminJS
  • Loading branch information
dziraf authored Jan 24, 2022
2 parents 45a68a2 + 76d5461 commit 1dbf1ce
Show file tree
Hide file tree
Showing 31 changed files with 5,421 additions and 2,354 deletions.
56 changes: 35 additions & 21 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: CI/CD
on: push
on: [push, pull_request]
env:
SLACK_WEBHOOK: ${{ secrets.ADMIN_SLACK_WEBHOOK }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
jobs:
Expand All @@ -13,7 +13,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Setup
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: '14.x'
- uses: actions/cache@v1
Expand All @@ -32,27 +32,41 @@ jobs:
run: yarn build
- name: Test
run: yarn test
- name: Release
if: github.event_name == 'push'
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn release

notify:
name: Notify
publish:
name: Publish
needs: test
if: |
github.event_name == 'push'
&& (
contains(github.ref, 'refs/heads/next')
|| contains(github.ref, 'refs/heads/main')
|| contains(github.ref, 'refs/heads/next-major')
|| contains(github.ref, 'refs/heads/beta')
)
runs-on: ubuntu-latest
if: failure()
needs:
- test
steps:
- uses: technote-space/workflow-conclusion-action@v1
- uses: 8398a7/action-slack@v3
- name: Checkout
uses: actions/checkout@v2
- name: Setup
uses: actions/setup-node@v2
with:
node-version: '14.x'
- uses: actions/cache@v1
id: yarn-cache
with:
status: ${{ env.WORKFLOW_CONCLUSION }}
fields: repo,message,commit,author,action,eventName,ref,workflow
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-
- name: Install
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install
- name: Build
run: yarn build
- name: Release
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
if: always()
run: yarn release
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ build/Release

# Dependency directories
node_modules/
example/node_modules/
example-app/node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
Expand Down Expand Up @@ -123,5 +123,5 @@ dist
/build
/lib
/types
.adminbro
example/.adminbro
.adminjs
example-app/.adminjs
3 changes: 1 addition & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
@softwarebrothers:registry=https://npm.pkg.github.com/SoftwareBrothers
registry=https://registry.npmjs.org/
access=public
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
# Feature for AdminBro
# Import/Export feature for AdminJS

This is feature that allows importing and exporting resources.

## AdminBro
## AdminJS

AdminBro is an automatic admin interface which can be plugged into your application. You, as a developer, provide database models (like posts, comments, stores, products or whatever else your application uses), and AdminBro generates UI which allows you (or other trusted users) to manage content.
AdminJS is an automatic admin interface which can be plugged into your application. You, as a developer, provide database models (like posts, comments, stores, products or whatever else your application uses), and AdminJS generates UI which allows you (or other trusted users) to manage content.

Check out the example application with mongo and postgres models here: https://admin-bro-example-app-staging.herokuapp.com/admin

Or visit [AdminBro](https://github.com/SoftwareBrothers/admin-bro) github page.
Or visit [AdminJS](https://github.com/SoftwareBrothers/adminjs) github page.

## Usage

See: https://github.com/SoftwareBrothers/adminjs-import-export/tree/main/example-app

## License

AdminBro is Copyright © 2020 SoftwareBrothers.co. It is free software, and may be redistributed under the terms specified in the [LICENSE](LICENSE.md) file.
AdminJS is Copyright © 2022 SoftwareBrothers.co. It is free software, and may be redistributed under the terms specified in the [LICENSE](LICENSE.md) file.

## About SoftwareBrothers.co

Expand Down
3 changes: 1 addition & 2 deletions example/.gitignore → example-app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,4 @@ temp/

# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)

.adminbro

.adminjs
File renamed without changes.
7 changes: 4 additions & 3 deletions example/package.json → example-app/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "firebase-example-admin-bro",
"name": "adminjs-import-export-example",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
Expand All @@ -8,8 +8,9 @@
"lint": "eslint src --ext ts"
},
"dependencies": {
"@admin-bro/design-system": "^1.7.0",
"admin-bro-expressjs": "^2.1.1",
"@adminjs/design-system": "^2.0.4",
"@adminjs/express": "^4.0.1",
"adminjs": "^5.5.1",
"express": "^4.17.1",
"express-formidable": "^1.2.0",
"nodemon": "^2.0.6",
Expand Down
23 changes: 23 additions & 0 deletions example-app/src/admin/admin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import AdminJSExpress from '@adminjs/express';
import MongooseAdapter from '@adminjs/mongoose';
import AdminJS from 'adminjs';
import { Express } from 'express';
import { createUserResource } from './resources/user/user.resource';
import mongoose from 'mongoose';

const setupAdmin = async (app: Express): Promise<void> => {
await mongoose.connect('mongodb://localhost:27017/adminjs-import-export', {
useNewUrlParser: true,
useUnifiedTopology: true,
});

AdminJS.registerAdapter(MongooseAdapter);
const adminJs = new AdminJS({
resources: [createUserResource()],
});

const router = await AdminJSExpress.buildRouter(adminJs);
app.use(adminJs.options.rootPath, router);
};

export default setupAdmin;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ResourceWithOptions } from 'admin-bro';
import { ResourceWithOptions } from 'adminjs';
import { User } from './user.entity';
import importExportFeature from '../../../../../src/index';

Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 1dbf1ce

Please sign in to comment.