infrastructure-components
Version:
Infrastructure-Components configure the infrastructure of your React-App as part of your React-Components.
27 lines • 997 B
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const types_1 = __importDefault(require("../types"));
exports.ENVVALUE_INSTANCE_TYPE = "EnvValueComponent";
/**
* identifies a component as a EnvValue: it implements all the required fields
*
* @param component to be tested
*/
function isEnvValue(component) {
return component !== undefined &&
component.instanceType === exports.ENVVALUE_INSTANCE_TYPE;
}
exports.isEnvValue = isEnvValue;
exports.default = (props) => {
const componentProps = {
infrastructureType: types_1.default.INFRASTRUCTURE_TYPE_COMPONENT,
instanceType: exports.ENVVALUE_INSTANCE_TYPE,
instanceId: props.name
};
const environmentProps = {};
return Object.assign(props, componentProps, environmentProps);
};
//# sourceMappingURL=env-value-component.js.map
;