cds-plugin.js plugin packages
cds-plugin.jscapire documents that a file cds-plugin.js next to a package's package.json is detected and loaded automatically when a CAP Node.js server bootstraps through cds serve, cds watch, cds run, cds build, cds deploy, cds env or cds.test(); inside it the package uses the cds facade, for example to react to lifecycle events such as 'served'. capire's plugin list states that all the listed Node.js plugins are built with this technique, so a reuse package that adds behaviour to an application without the application writing code uses it.
CDS plugins in CAP// cds-plugin.js, next to the package's package.json
const cds = require('@sap/cds')
cds.on('served', (services) => {
// the application's services are bootstrapped here;
// register handlers on them as needed
})