File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 1
1
const cds = require ( "@sap/cds/lib" ) ;
2
+ const NotificationsBuildPlugin = require ( "./lib/build" ) ;
2
3
3
4
if ( cds . cli . command === "build" ) {
4
5
// register build plugin
5
- cds . build ?. register ?. ( 'notifications' , {
6
- impl : '@cap-js/notifications/lib/build' ,
7
- taskDefaults : { src : cds . env . folders . srv }
8
- } ) ;
6
+ cds . build ?. register ?. ( 'notifications' , NotificationsBuildPlugin ) ;
9
7
}
10
8
11
9
else cds . once ( "served" , async ( ) => {
Original file line number Diff line number Diff line change 1
1
const cds = require ( '@sap/cds' )
2
- const { BuildPlugin } = cds . build
3
2
4
3
const { copy, exists, path } = cds . utils
5
4
6
- module . exports = class NotificationsBuildPlugin extends BuildPlugin {
7
-
5
+ module . exports = class NotificationsBuildPlugin extends cds . build . Plugin {
6
+ static taskDefaults = { src : cds . env . folders . srv }
7
+
8
8
static hasTask ( ) {
9
9
const notificationTypesFile = cds . env . requires ?. notifications ?. types ;
10
10
return notificationTypesFile === undefined ? false : exists ( notificationTypesFile ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @cap-js/notifications" ,
3
- "version" : " 0.2.1 " ,
3
+ "version" : " 0.2.2 " ,
4
4
"description" : " CDS plugin providing integration to the SAP BTP Alert Notification Service." ,
5
5
"repository" : " cap-js/notifications" ,
6
6
"author" : " SAP SE (https://www.sap.com)" ,
You can’t perform that action at this time.
0 commit comments