@sigiljs/sigil
Version:
TypeScript-first Node.js HTTP framework offering schema-driven routing, modifier-based middleware, plugin extensibility, and flexible response templating
21 lines (20 loc) • 479 B
JavaScript
import n from "../../utils/make-log.mjs";
function a(g, e) {
const t = `Modifier:${g.name}`;
g.prototype.__$ctx = {
/**
* Internal Sigil APIs exposed to plugins.
*/
sigilApi: e.sigilApi ? {
plugin: (i) => e.sigilApi?.plugin(i),
withPlugin: (i, l) => e.sigilApi.withPlugin(i, l)
} : void 0,
/**
* Logger function scoped to this plugin.
*/
logger: (i) => n(e.debugOpts, { module: t, ...i })
};
}
export {
a as default
};