UNPKG

adonis-ally-vk

Version:
43 lines (42 loc) 1.57 kB
"use strict"; /* * adonis-ally-vk * * (c) Lookin Anton <lookin@lookinlab.ru> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); class VkDriverProvider { constructor(app) { this.app = app; } async boot() { const Ally = this.app.container.resolveBinding('Adonis/Addons/Ally'); const { VkDriver } = await Promise.resolve().then(() => __importStar(require('../src/Vk'))); Ally.extend('vk', (_, __, config, ctx) => { return new VkDriver(ctx, config); }); } } exports.default = VkDriverProvider;