UNPKG

@raintech-oss/jovo-dew

Version:
25 lines 933 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DewViewEnginePlugin = void 0; const framework_1 = require("@jovotech/framework"); const DewViewEngine_1 = require("./DewViewEngine"); class DewViewEnginePlugin extends framework_1.Plugin { mount(parent) { if (!(parent instanceof framework_1.HandleRequest)) { throw new framework_1.InvalidParentError(this.constructor.name, framework_1.HandleRequest); } parent.middlewareCollection.use('dialogue.start', async (jovo) => { jovo.$dew = new DewViewEngine_1.DewViewEngine(this.config, jovo); await jovo.$dew.init(); }); } getDefaultConfig() { return { audio: { defaultExt: '.mp3', }, }; } } exports.DewViewEnginePlugin = DewViewEnginePlugin; //# sourceMappingURL=DewViewEnginePlugin.js.map