Skip to content

Commit 4748b65

Browse files
fix: bring back old admin-bro package
1 parent 14c6833 commit 4748b65

File tree

11 files changed

+364
-66
lines changed

11 files changed

+364
-66
lines changed

.github/workflows/push.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
fields: repo,message,commit,author,action,eventName,ref,workflow # selectable (default: repo,message)
9191
env:
9292
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
93+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
9494
if: always()
9595

9696
publish:
@@ -120,6 +120,7 @@ jobs:
120120
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
121121
JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }}
122122
JIRA_EMAIL: ${{ secrets.JIRA_EMAIL }}
123+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
123124
run: yarn release
124125

125126

.releaserc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
"ticketPrefixes": [ "AB" ],
2323
"released": true,
2424
"setReleaseDate": true
25-
}]
25+
}],
26+
[
27+
"semantic-release-slack-bot",
28+
{
29+
"notifyOnSuccess": true,
30+
"notifyOnFail": true
31+
}
32+
]
2633
]
2734
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This is an official [AdminBro](https://github.com/SoftwareBrothers/admin-bro) ad
77
The plugin can be registered using standard `AdminBro.registerAdapter` method.
88

99
```javascript
10-
const AdminBro = require('@admin-bro/core')
10+
const AdminBro = require('admin-bro')
1111
const AdminBroSequelize = require('@admin-bro/sequelize')
1212

1313
AdminBro.registerAdapter(AdminBroSequelize)

index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @module admin-bro-sequelizejs
2+
* @module @admin-bro/sequelize
33
*
44
* @description
55
* ### A Sequelize database adapter for AdminBro.
@@ -9,15 +9,15 @@
99
* To install the adapter run
1010
*
1111
* ```
12-
* yarn add admin-bro-sequelizejs
12+
* yarn add @admin-bro/sequelize
1313
* ```
1414
*
1515
* ### Usage
1616
*
1717
* In order to use it in your project register the adapter first:
1818
*
1919
* ```javascript
20-
* const AdminBro = require('@admin-bro/core')
20+
* const AdminBro = require('admin-bro')
2121
* const AdminBroSequelize = require('@admin-bro/sequelize')
2222
*
2323
* AdminBro.registerAdapter(AdminBroSequelize)
@@ -72,6 +72,7 @@
7272
/**
7373
* Implementation of {@link BaseDatabase} for Sequelize Adapter
7474
*
75+
* @memberof module:@admin-bro/sequelize
7576
* @type {typeof BaseDatabase}
7677
* @static
7778
*/
@@ -80,6 +81,7 @@ const Database = require('./src/database')
8081
/**
8182
* Implementation of {@link BaseResource} for Sequelize Adapter
8283
*
84+
* @memberof module:@admin-bro/sequelize
8385
* @type {typeof BaseResource}
8486
* @static
8587
*/

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"author": "Wojciech Krysiak",
1818
"license": "MIT",
1919
"peerDependencies": {
20-
"@admin-bro/core": ">=3.0.0",
20+
"admin-bro": ">=3.0.0.beta.1",
2121
"sequelize": ">=4"
2222
},
2323
"husky": {
@@ -30,7 +30,7 @@
3030
"@commitlint/config-conventional": "^8.3.4",
3131
"@semantic-release/git": "^9.0.0",
3232
"@types/mocha": "^7.0.2",
33-
"@admin-bro/core": "^3.0.0-beta.1",
33+
"admin-bro": "^3.0.0-beta.1",
3434
"chai": "^4.2.0",
3535
"eslint": "^5.10.0",
3636
"eslint-config-airbnb-base": "^13.1.0",
@@ -44,6 +44,7 @@
4444
"pg": "^7.7.1",
4545
"semantic-release": "^17.0.7",
4646
"semantic-release-jira-releases-sb": "^0.7.2",
47+
"semantic-release-slack-bot": "^1.6.2",
4748
"sequelize": "^4.42.0",
4849
"sequelize-cli": "^5.4.0",
4950
"sinon": "^7.1.1",

spec/resource.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { ValidationError, Filter, BaseRecord } = require('@admin-bro/core')
1+
const { ValidationError, Filter, BaseRecord } = require('admin-bro')
22
const Resource = require('../src/resource')
33
const Property = require('../src/property')
44
const config = require('../config/config')[process.env.NODE_ENV]

src/database.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { BaseDatabase } = require('@admin-bro/core')
1+
const { BaseDatabase } = require('admin-bro')
22
const Resource = require('./resource')
33

44
class Database extends BaseDatabase {

src/property.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const { BaseProperty } = require('@admin-bro/core')
1+
const { BaseProperty } = require('admin-bro')
22

3-
/** @typedef {import('@admin-bro/core').PropertyType} PropertyType */
3+
/** @typedef {import('admin-bro').PropertyType} PropertyType */
44

55
const TYPES_MAPPING = [
66
['STRING', 'string'],

src/resource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable no-param-reassign */
22
const { unflatten } = require('flat')
3-
const { BaseResource, BaseRecord } = require('@admin-bro/core')
3+
const { BaseResource, BaseRecord } = require('admin-bro')
44
const { Op } = require('sequelize')
55

66
const Property = require('./property')

src/utils/create-validation-error.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { ValidationError } = require('@admin-bro/core')
1+
const { ValidationError } = require('admin-bro')
22

33
const createValidationError = (originalError) => {
44
const errors = Object.keys(originalError.errors).reduce((memo, key) => {

0 commit comments

Comments
 (0)