-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adapt build plugin implementation to new API (#319)
Co-authored-by: Lothar Bender <lothar.bender@sap.com>
- Loading branch information
1 parent
95b6ee9
commit aec9966
Showing
2 changed files
with
14 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
const cds = require('@sap/cds/lib') | ||
const cds = require('@sap/cds') | ||
|
||
if (!cds.env.fiori.lean_draft) { | ||
throw new Error('"@cap-js/postgres" only works if cds.fiori.lean_draft is enabled. Please adapt your configuration.') | ||
} | ||
|
||
if (cds.cli.command === 'build') { | ||
module.exports = require('./lib/build') | ||
} | ||
// requires @sap/cds-dk version >= 7.3.2 | ||
cds.build?.register?.('postgres', { | ||
impl: '@cap-js/postgres/lib/build.js', | ||
taskDefaults: { src: cds.env.folders.db } | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters