UNPKG

@grouparoo/core

Version:
23 lines (22 loc) 1.03 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; var _a; Object.defineProperty(exports, "__esModule", { value: true }); const path_1 = __importDefault(require("path")); const pluginDetails_1 = require("../modules/pluginDetails"); // have any of the active plugins provided a file to inject into the server's boot process? const pluginManifest = (0, pluginDetails_1.getPluginManifest)(); for (const i in pluginManifest.plugins) { const plugin = pluginManifest.plugins[i]; if ((_a = plugin === null || plugin === void 0 ? void 0 : plugin.grouparoo) === null || _a === void 0 ? void 0 : _a.serverInjection) { for (const j in plugin.grouparoo.serverInjection) { const file = path_1.default.join(plugin.path, plugin.grouparoo.serverInjection[j]); const module = require(file).default; if (typeof module === "function") { module(); } } } }