UNPKG

expo-updates

Version:

Fetches and manages remotely-hosted assets and updates to your app's JS bundle.

15 lines (14 loc) 864 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const config_1 = require("@expo/config"); const config_plugins_1 = require("expo/config-plugins"); const pkg = require('expo-updates/package.json'); // when making changes to this config plugin, ensure the same changes are also made in eas-cli and build-tools const withUpdates = (config, props = {}) => { // The username will be passed from the CLI when the plugin is automatically used. const expoUsername = (props || {}).expoUsername ?? (0, config_1.getAccountUsername)(config); config = config_plugins_1.AndroidConfig.Updates.withUpdates(config, { expoUsername }); config = config_plugins_1.IOSConfig.Updates.withUpdates(config, { expoUsername }); return config; }; exports.default = (0, config_plugins_1.createRunOncePlugin)(withUpdates, pkg.name, pkg.version);