@nestjs-kitchen/connextion-presto
Version:
A flexible module to provide presto-client interface in NextJS.
35 lines (34 loc) • 1.14 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.definePresto = void 0;
const connextion_1 = require("@nestjs-kitchen/connextion");
const constants_1 = require("./constants");
const presto_instance_1 = require("./presto.instance");
const innerDefinePresto = (0, connextion_1.defineConnextionBuilder)({
connextionName: 'Presto',
InstanceClass: presto_instance_1.PrestoInstance,
defaultInstanceName: constants_1.DEFAULT_INSTANCE_NAME
});
/**
* Creates a set of Presto services and modules.
*/
const definePresto = () => {
const { Presto, PrestoModule } = innerDefinePresto();
return {
/**
* The Presto service, responsible for managing all presto connection instances registered by the module.
*/
Presto,
/**
* The Presto module, used to register and create presto connection instances with options.
*
* This module can be configured using 2 static methods:
*
* - `register`
* - `registerAsync`
*
*/
PrestoModule
};
};
exports.definePresto = definePresto;