UNPKG

@xo-union/tk-component-header-nav

Version:
30 lines (29 loc) 1.38 kB
"use strict"; var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property"); _Object$defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; const qa = {}; const production = {}; var _default = (() => { if (process.env.UNION_FLIPPER_ENV) { if (process.env.UNION_FLIPPER_ENV !== "qa" && process.env.UNION_FLIPPER_ENV !== "production") { throw new Error(`Expected UNION_FLIPPER_ENV to be 'qa' or 'production'.`); } console.warn('Using UNION_FLIPPER_ENV could result in a misconfigured environment. It is best that you use UNION_DEPLOYMENT_ENV for all your Union services integrations.'); return process.env.UNION_FLIPPER_ENV; } if (process.env.UNION_DEPLOYMENT_ENV) { if (process.env.UNION_DEPLOYMENT_ENV !== "qa" && process.env.UNION_DEPLOYMENT_ENV !== "production") { throw new Error(`Expected UNION_DEPLOYMENT_ENV to be 'qa' or 'production'.`); } return process.env.UNION_DEPLOYMENT_ENV; } if (false) { console.warn("Expected UNION_DEPLOYMENT_ENV to be 'qa' or 'production'. NODE_ENV fallback will be removed in a future version."); return process.env.NODE_ENV === 'production' ? 'production' : 'qa'; } throw new Error("Expected UNION_DEPLOYMENT_ENV to be either 'qa' or 'production'."); })() === 'production' ? production : qa; exports.default = _default;