Skip to content

Commit bcb9ea4

Browse files
authored
Merge pull request #70 from cap-js/fix/build
Fix issue with build step
2 parents 6d1f37d + 4fc0659 commit bcb9ea4

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

cds-plugin.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
const cds = require("@sap/cds/lib");
2+
const NotificationsBuildPlugin = require("./lib/build");
23

34
if (cds.cli.command === "build") {
45
// 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);
97
}
108

119
else cds.once("served", async () => {

lib/build.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
const cds = require('@sap/cds')
2-
const { BuildPlugin } = cds.build
32

43
const { copy, exists, path } = cds.utils
54

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+
88
static hasTask() {
99
const notificationTypesFile = cds.env.requires?.notifications?.types;
1010
return notificationTypesFile === undefined ? false : exists(notificationTypesFile);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cap-js/notifications",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "CDS plugin providing integration to the SAP BTP Alert Notification Service.",
55
"repository": "cap-js/notifications",
66
"author": "SAP SE (https://www.sap.com)",

0 commit comments

Comments
 (0)