UNPKG

997 BJavaScriptView Raw
1"use strict";
2var __importDefault = (this && this.__importDefault) || function (mod) {
3 return (mod && mod.__esModule) ? mod : { "default": mod };
4};
5Object.defineProperty(exports, "__esModule", { value: true });
6const types_1 = __importDefault(require("../types"));
7exports.ENVVALUE_INSTANCE_TYPE = "EnvValueComponent";
8/**
9 * identifies a component as a EnvValue: it implements all the required fields
10 *
11 * @param component to be tested
12 */
13function isEnvValue(component) {
14 return component !== undefined &&
15 component.instanceType === exports.ENVVALUE_INSTANCE_TYPE;
16}
17exports.isEnvValue = isEnvValue;
18exports.default = (props) => {
19 const componentProps = {
20 infrastructureType: types_1.default.INFRASTRUCTURE_TYPE_COMPONENT,
21 instanceType: exports.ENVVALUE_INSTANCE_TYPE,
22 instanceId: props.name
23 };
24 const environmentProps = {};
25 return Object.assign(props, componentProps, environmentProps);
26};
27//# sourceMappingURL=env-value-component.js.map
\No newline at end of file