UNPKG

@expo/xdl

Version:
97 lines (83 loc) 2.84 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function _getenv() { const data = _interopRequireDefault(require("getenv")); _getenv = function () { return data; }; return data; } function Env() { const data = _interopRequireWildcard(require("./Env")); Env = function () { return data; }; return data; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const apiConfig = { local: { scheme: 'http', host: 'localhost', port: 3000 }, staging: { scheme: _getenv().default.string('XDL_SCHEME', 'https'), host: 'staging.exp.host', port: _getenv().default.int('XDL_PORT', 0) || null }, production: { scheme: _getenv().default.string('XDL_SCHEME', 'https'), host: _getenv().default.string('XDL_HOST', 'exp.host'), port: _getenv().default.int('XDL_PORT', 0) || null } }; const turtleApiConfig = { local: { scheme: 'http', host: 'localhost', port: 3006 }, staging: { scheme: 'https', host: 'staging.turtle.expo.io', port: 443 }, production: { scheme: 'https', host: 'turtle.expo.io', port: 443 } }; let api = apiConfig.production; let turtleApi = turtleApiConfig.production; if (Env().isLocal()) { api = apiConfig.local; turtleApi = turtleApiConfig.local; } else if (Env().isStaging()) { api = apiConfig.staging; turtleApi = turtleApiConfig.staging; } const config = { api, turtleApi, ngrok: { authToken: '5W1bR67GNbWcXqmxZzBG1_56GezNeaX6sSRvn8npeQ8', authTokenPublicId: '5W1bR67GNbWcXqmxZzBG1', domain: 'exp.direct' }, developerTool: null, validation: { reactNativeVersionWarnings: true }, helpUrl: 'https://docs.expo.io/', offline: false }; var _default = config; exports.default = _default; //# sourceMappingURL=__sourcemaps__/Config.js.map