"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const index_1 = __importDefault(require("./index"));
/**
 * A function to check whether a component serves as an Infrastructure
 *
 * used in the parser during compilation, we get a real object here!
 *
 * @param parsedComponent is the real object to be tested!
 */
exports.isConfiguration = (parsedComponent) => {
    //console.log("check if Configuration: " , parsedComponent)
    if (parsedComponent !== undefined) {
        return parsedComponent.createPlugins !== undefined &&
            parsedComponent.infrastructureType === index_1.default.INFRASTRUCTURE_TYPE_CONFIGURATION;
    }
    //console.log("NOPE!");
    return false;
};
/**
 * Extracts the plugins from an infrastructure
 *
 * @param infrastructure is the infrastructure-object
 * @param configPath specifies the path to the original configuration of the project, as passes as argument in the command
 *
 */
function extractPlugins(infrastructure, configPath, stage, parserMode) {
    return infrastructure.createPlugins(configPath, stage, parserMode);
}
exports.extractPlugins = extractPlugins;
//# sourceMappingURL=configuration.js.map