Sorry, the diff of this file is not supported yet
| module.exports = require('./plugin/expoPluginBuild'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
| import { AndroidConfig } from "@expo/config-plugins"; | ||
| import type { ResourceXML } from "@expo/config-plugins/build/android/Resources"; | ||
| export declare function setStrings(strings: ResourceXML, name: string, value: string, moduleConfig?: boolean): AndroidConfig.Resources.ResourceXML; | ||
| export declare function applySettings(gradleSettings: string): string; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.setStrings = setStrings; | ||
| exports.applySettings = applySettings; | ||
| const config_plugins_1 = require("@expo/config-plugins"); | ||
| const constants_1 = require("../constants"); | ||
| function setStrings(strings, name, value, moduleConfig = false) { | ||
| const stringItem = moduleConfig | ||
| ? { $: { name, moduleConfig: "true" }, _: value } | ||
| : { $: { name }, _: value }; | ||
| return config_plugins_1.AndroidConfig.Strings.setStringItem([stringItem], strings); | ||
| } | ||
| function applySettings(gradleSettings) { | ||
| const moduleInclude = `include ':app', '${constants_1.MODULE_NAME}'`; | ||
| const projectDir = `project('${constants_1.MODULE_NAME}').projectDir = new File(rootProject.projectDir, '../node_modules/${constants_1.PACKAGE_PATH}')`; | ||
| const moduleSettings = `\n${moduleInclude}\n${projectDir}`; | ||
| if (gradleSettings.includes(constants_1.MODULE_NAME)) { | ||
| return gradleSettings; | ||
| } | ||
| const standaloneAppRegex = /^include\s+['"]:app['"]\s*$/gm; | ||
| gradleSettings = gradleSettings.replace(standaloneAppRegex, ""); | ||
| return gradleSettings + moduleSettings; | ||
| } |
| import type { ConfigPlugin } from "@expo/config-plugins"; | ||
| export declare const withAppBuildGradleModule: ConfigPlugin; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.withAppBuildGradleModule = void 0; | ||
| const config_plugins_1 = require("@expo/config-plugins"); | ||
| const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode"); | ||
| const constants_1 = require("../constants"); | ||
| const withAppBuildGradleModule = (config) => { | ||
| return (0, config_plugins_1.withAppBuildGradle)(config, (config) => { | ||
| try { | ||
| config.modResults.contents = (0, generateCode_1.mergeContents)({ | ||
| src: config.modResults.contents, | ||
| newSrc: constants_1.DEPENDENCY, | ||
| tag: "d11-dota-dependency", | ||
| comment: "//", | ||
| anchor: /dependencies\s*{/, | ||
| offset: 1, | ||
| }).contents; | ||
| if (!config.modResults.contents.includes(constants_1.APPLY_FROM)) { | ||
| config.modResults.contents = | ||
| config.modResults.contents.trimEnd() + `\n\n${constants_1.APPLY_FROM}\n`; | ||
| } | ||
| return config; | ||
| } | ||
| catch (error) { | ||
| console.error("Error modifying build.gradle:", error); | ||
| return config; | ||
| } | ||
| }); | ||
| }; | ||
| exports.withAppBuildGradleModule = withAppBuildGradleModule; |
| import type { ConfigPlugin } from "@expo/config-plugins"; | ||
| export declare const withCodePushMainApplication: ConfigPlugin; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.withCodePushMainApplication = void 0; | ||
| const config_plugins_1 = require("@expo/config-plugins"); | ||
| const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode"); | ||
| const constants_1 = require("../constants"); | ||
| const withCodePushMainApplication = (config) => { | ||
| return (0, config_plugins_1.withMainApplication)(config, (config) => { | ||
| try { | ||
| config.modResults.contents = (0, generateCode_1.mergeContents)({ | ||
| src: config.modResults.contents, | ||
| newSrc: constants_1.CODEPUSH_IMPORT, | ||
| tag: "d11-dota-import", | ||
| comment: "//", | ||
| anchor: /import\s+com\.facebook\.react\.ReactApplication/, | ||
| offset: 1, | ||
| }).contents; | ||
| const contents = config.modResults.contents; | ||
| const isKotlin = config.modResults?.language === | ||
| "kt" || | ||
| /class\s+MainApplication\s*:/.test(contents) || | ||
| /override val isNewArchEnabled: Boolean = BuildConfig\.IS_NEW_ARCHITECTURE_ENABLED/.test(contents); | ||
| if (isKotlin) { | ||
| config.modResults.contents = (0, generateCode_1.mergeContents)({ | ||
| src: config.modResults.contents, | ||
| newSrc: constants_1.JS_BUNDLE_OVERRIDE_KOTLIN, | ||
| tag: "d11-dota-js-bundle", | ||
| comment: "//", | ||
| anchor: /override val isNewArchEnabled: Boolean = BuildConfig\.IS_NEW_ARCHITECTURE_ENABLED/, | ||
| offset: 1, | ||
| }).contents; | ||
| const applyPattern = /PackageList\(this\)\.packages\.apply\s*\{/; | ||
| const variablePattern = /val\s+packages\s*=\s*PackageList\(this\)\.packages/; | ||
| if (applyPattern.test(contents)) { | ||
| config.modResults.contents = (0, generateCode_1.mergeContents)({ | ||
| src: config.modResults.contents, | ||
| newSrc: constants_1.CODEPUSH_PACKAGE_KOTLIN, | ||
| tag: "d11-dota-package", | ||
| comment: "//", | ||
| anchor: applyPattern, | ||
| offset: 1, // Insert inside the opening brace '{' | ||
| }).contents; | ||
| } | ||
| else if (variablePattern.test(contents)) { | ||
| config.modResults.contents = (0, generateCode_1.mergeContents)({ | ||
| src: config.modResults.contents, | ||
| newSrc: constants_1.CODEPUSH_PACKAGE_KOTLIN_WITH_PACKAGE_LIST, | ||
| tag: "d11-dota-package", | ||
| comment: "//", | ||
| anchor: variablePattern, | ||
| offset: 1, // Insert on the line after the variable definition | ||
| }).contents; | ||
| } | ||
| else { | ||
| // 4. Fallback / Warning | ||
| // It is good practice to throw or warn if the file structure is completely unrecognizable | ||
| console.warn("Could not find a suitable anchor for CodePush in MainApplication.kt. Please add it manually."); | ||
| } | ||
| } | ||
| else { | ||
| config.modResults.contents = (0, generateCode_1.mergeContents)({ | ||
| src: config.modResults.contents, | ||
| newSrc: constants_1.JS_BUNDLE_OVERRIDE_JAVA, | ||
| tag: "d11-dota-js-bundle", | ||
| comment: "//", | ||
| anchor: /new ReactNativeHost\(this\)\s*\{/, | ||
| offset: 1, | ||
| }).contents; | ||
| config.modResults.contents = (0, generateCode_1.mergeContents)({ | ||
| src: config.modResults.contents, | ||
| newSrc: constants_1.CODEPUSH_PACKAGE_JAVA, | ||
| tag: "d11-dota-package", | ||
| comment: "//", | ||
| anchor: /List<ReactPackage>\s+packages\s*=\s*new PackageList\(this\)\.getPackages\(\);/, | ||
| offset: 1, | ||
| }).contents; | ||
| } | ||
| return config; | ||
| } | ||
| catch (error) { | ||
| console.error("Error modifying MainApplication:", error); | ||
| return config; | ||
| } | ||
| }); | ||
| }; | ||
| exports.withCodePushMainApplication = withCodePushMainApplication; |
| import type { ConfigPlugin } from "@expo/config-plugins"; | ||
| export declare const withCodePushSettingsGradle: ConfigPlugin; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.withCodePushSettingsGradle = void 0; | ||
| const config_plugins_1 = require("@expo/config-plugins"); | ||
| const utils_1 = require("./utils"); | ||
| const withCodePushSettingsGradle = (config) => { | ||
| return (0, config_plugins_1.withSettingsGradle)(config, (config) => { | ||
| try { | ||
| config.modResults.contents = (0, utils_1.applySettings)(config.modResults.contents); | ||
| return config; | ||
| } | ||
| catch (error) { | ||
| console.error("Error modifying settings.gradle:", error); | ||
| return config; | ||
| } | ||
| }); | ||
| }; | ||
| exports.withCodePushSettingsGradle = withCodePushSettingsGradle; |
| import { type ConfigPlugin } from "@expo/config-plugins"; | ||
| import type { DotaPluginProps } from "../types"; | ||
| export declare const withCodePushStrings: ConfigPlugin<DotaPluginProps>; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.withCodePushStrings = void 0; | ||
| const config_plugins_1 = require("@expo/config-plugins"); | ||
| const constants_1 = require("../constants"); | ||
| const utils_1 = require("./utils"); | ||
| const withCodePushStrings = (config, props = {}) => { | ||
| return (0, config_plugins_1.withStringsXml)(config, (config) => { | ||
| if (props.androidDeploymentKey) { | ||
| config.modResults = (0, utils_1.setStrings)(config.modResults, constants_1.CODE_PUSH_DEPLOYMENT_KEY, props.androidDeploymentKey, true); | ||
| } | ||
| if (props.serverUrl) { | ||
| config.modResults = (0, utils_1.setStrings)(config.modResults, constants_1.CODE_PUSH_SERVER_URL, props.serverUrl, true); | ||
| } | ||
| return config; | ||
| }); | ||
| }; | ||
| exports.withCodePushStrings = withCodePushStrings; |
| export declare const CODE_PUSH_DEPLOYMENT_KEY = "CodePushDeploymentKey"; | ||
| export declare const CODE_PUSH_SERVER_URL = "CodePushServerUrl"; | ||
| export declare const MODULE_NAME = ":d11_dota"; | ||
| export declare const PACKAGE_PATH = "@d11/dota/android/app"; | ||
| export declare const DEPENDENCY = " implementation project(':d11_dota')"; | ||
| export declare const APPLY_FROM = "apply from: \"../../node_modules/@d11/dota/android/codepush.gradle\""; | ||
| export declare const CODEPUSH_IMPORT = "import com.microsoft.codepush.react.CodePush"; | ||
| export declare const CODEPUSH_PACKAGE_KOTLIN = "\n add(CodePush.getInstance(\n resources.getString(R.string.CodePushDeploymentKey),\n applicationContext,\n BuildConfig.DEBUG\n ))"; | ||
| export declare const CODEPUSH_PACKAGE_KOTLIN_WITH_PACKAGE_LIST = "\n packages.add(CodePush.getInstance(\n resources.getString(R.string.CodePushDeploymentKey),\n applicationContext,\n BuildConfig.DEBUG\n ))"; | ||
| export declare const CODEPUSH_PACKAGE_JAVA = "\n packages.add(CodePush.getInstance(\n getResources().getString(R.string.CodePushDeploymentKey),\n getApplicationContext(),\n BuildConfig.DEBUG\n ));\n "; | ||
| export declare const JS_BUNDLE_OVERRIDE_KOTLIN = "\n override fun getJSBundleFile(): String? {\n CodePush.getInstance(\n resources.getString(R.string.CodePushDeploymentKey),\n applicationContext,\n BuildConfig.DEBUG\n )\n return CodePush.getJSBundleFile()\n }"; | ||
| export declare const JS_BUNDLE_OVERRIDE_JAVA = "\n @Override\n protected String getJSBundleFile() {\n CodePush.getInstance(\n getResources().getString(R.string.CodePushDeploymentKey),\n getApplicationContext(),\n BuildConfig.DEBUG\n );\n return CodePush.getJSBundleFile();\n }"; | ||
| export declare const IOS_CODEPUSH_IMPORT_SWIFT = "import CodePush"; | ||
| export declare const IOS_CODEPUSH_IMPORT_OBJC = "#import <CodePush/CodePush.h>"; | ||
| export declare const DOTA_POD_HELPERS_REQUIRE = "require_relative '../node_modules/@d11/dota/ios/scripts/dota_pod_helpers.rb'"; | ||
| export declare const DOTA_POST_INSTALL_CALL: (projectName: string) => string; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.DOTA_POST_INSTALL_CALL = exports.DOTA_POD_HELPERS_REQUIRE = exports.IOS_CODEPUSH_IMPORT_OBJC = exports.IOS_CODEPUSH_IMPORT_SWIFT = exports.JS_BUNDLE_OVERRIDE_JAVA = exports.JS_BUNDLE_OVERRIDE_KOTLIN = exports.CODEPUSH_PACKAGE_JAVA = exports.CODEPUSH_PACKAGE_KOTLIN_WITH_PACKAGE_LIST = exports.CODEPUSH_PACKAGE_KOTLIN = exports.CODEPUSH_IMPORT = exports.APPLY_FROM = exports.DEPENDENCY = exports.PACKAGE_PATH = exports.MODULE_NAME = exports.CODE_PUSH_SERVER_URL = exports.CODE_PUSH_DEPLOYMENT_KEY = void 0; | ||
| exports.CODE_PUSH_DEPLOYMENT_KEY = "CodePushDeploymentKey"; | ||
| exports.CODE_PUSH_SERVER_URL = "CodePushServerUrl"; | ||
| exports.MODULE_NAME = ":d11_dota"; | ||
| exports.PACKAGE_PATH = "@d11/dota/android/app"; | ||
| const CODEPUSH_GRADLE_PATH = "../../node_modules/@d11/dota/android/codepush.gradle"; | ||
| exports.DEPENDENCY = ` implementation project('${exports.MODULE_NAME}')`; | ||
| exports.APPLY_FROM = `apply from: "${CODEPUSH_GRADLE_PATH}"`; | ||
| exports.CODEPUSH_IMPORT = `import com.microsoft.codepush.react.CodePush`; | ||
| exports.CODEPUSH_PACKAGE_KOTLIN = ` | ||
| add(CodePush.getInstance( | ||
| resources.getString(R.string.CodePushDeploymentKey), | ||
| applicationContext, | ||
| BuildConfig.DEBUG | ||
| ))`; | ||
| exports.CODEPUSH_PACKAGE_KOTLIN_WITH_PACKAGE_LIST = ` | ||
| packages.add(CodePush.getInstance( | ||
| resources.getString(R.string.CodePushDeploymentKey), | ||
| applicationContext, | ||
| BuildConfig.DEBUG | ||
| ))`; | ||
| exports.CODEPUSH_PACKAGE_JAVA = ` | ||
| packages.add(CodePush.getInstance( | ||
| getResources().getString(R.string.CodePushDeploymentKey), | ||
| getApplicationContext(), | ||
| BuildConfig.DEBUG | ||
| )); | ||
| `; | ||
| exports.JS_BUNDLE_OVERRIDE_KOTLIN = ` | ||
| override fun getJSBundleFile(): String? { | ||
| CodePush.getInstance( | ||
| resources.getString(R.string.CodePushDeploymentKey), | ||
| applicationContext, | ||
| BuildConfig.DEBUG | ||
| ) | ||
| return CodePush.getJSBundleFile() | ||
| }`; | ||
| exports.JS_BUNDLE_OVERRIDE_JAVA = ` | ||
| @Override | ||
| protected String getJSBundleFile() { | ||
| CodePush.getInstance( | ||
| getResources().getString(R.string.CodePushDeploymentKey), | ||
| getApplicationContext(), | ||
| BuildConfig.DEBUG | ||
| ); | ||
| return CodePush.getJSBundleFile(); | ||
| }`; | ||
| exports.IOS_CODEPUSH_IMPORT_SWIFT = `import CodePush`; | ||
| exports.IOS_CODEPUSH_IMPORT_OBJC = `#import <CodePush/CodePush.h>`; | ||
| exports.DOTA_POD_HELPERS_REQUIRE = `require_relative '../node_modules/@d11/dota/ios/scripts/dota_pod_helpers.rb'`; | ||
| const DOTA_POST_INSTALL_CALL = (projectName) => `dota_post_install(installer, '${projectName}', File.expand_path(__dir__))`; | ||
| exports.DOTA_POST_INSTALL_CALL = DOTA_POST_INSTALL_CALL; |
| import { type ConfigPlugin } from "@expo/config-plugins"; | ||
| import type { DotaPluginProps } from "./types"; | ||
| declare const _default: ConfigPlugin<DotaPluginProps>; | ||
| export default _default; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| const config_plugins_1 = require("@expo/config-plugins"); | ||
| const withAndroidDotaPlugin_1 = require("./withAndroidDotaPlugin"); | ||
| const withIosDotaPlugin_1 = require("./withIosDotaPlugin"); | ||
| const pkg = require("../../package.json"); | ||
| const withDotaPlugin = (config, props = {}) => { | ||
| config = (0, withAndroidDotaPlugin_1.withAndroidDotaPlugin)(config, props); | ||
| config = (0, withIosDotaPlugin_1.withIosDotaPlugin)(config, props); | ||
| return config; | ||
| }; | ||
| exports.default = (0, config_plugins_1.createRunOncePlugin)(withDotaPlugin, pkg.name, pkg.version); |
| import type { ConfigPlugin } from "@expo/config-plugins"; | ||
| export declare const withCodePushAppDelegate: ConfigPlugin; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.withCodePushAppDelegate = void 0; | ||
| const config_plugins_1 = require("@expo/config-plugins"); | ||
| const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode"); | ||
| const constants_1 = require("../constants"); | ||
| const withCodePushAppDelegate = (config) => { | ||
| return (0, config_plugins_1.withAppDelegate)(config, (config) => { | ||
| try { | ||
| const contents = config.modResults.contents; | ||
| const language = config.modResults?.language ?? | ||
| ""; | ||
| const isObjectiveC = language === "objc" || | ||
| /#import\s+<UIKit\/UIKit\.h>/.test(contents) || | ||
| /@interface\s+AppDelegate/.test(contents); | ||
| if (isObjectiveC) { | ||
| // Insert Objective-C import | ||
| config.modResults.contents = (0, generateCode_1.mergeContents)({ | ||
| src: config.modResults.contents, | ||
| newSrc: constants_1.IOS_CODEPUSH_IMPORT_OBJC, | ||
| tag: "codepush-import", | ||
| comment: "//", | ||
| anchor: /#import\s+<React\/RCTBundleURLProvider\.h>/, | ||
| offset: 1, | ||
| }).contents; | ||
| // Replace production bundle URL with CodePush in Obj-C | ||
| const objcBundleUrlPattern = /\[\[NSBundle\s+mainBundle\]\s+URLForResource:@"main"\s*,?\s*withExtension:@"jsbundle"\]/; | ||
| if (objcBundleUrlPattern.test(config.modResults.contents)) { | ||
| config.modResults.contents = config.modResults.contents.replace(objcBundleUrlPattern, "[CodePush bundleURL]"); | ||
| console.log("Successfully replaced Bundle URL with [CodePush bundleURL]"); | ||
| } | ||
| else { | ||
| console.error("Could not find NSBundle URL pattern in AppDelegate.m to replace with [CodePush bundleURL]."); | ||
| } | ||
| } | ||
| else { | ||
| // Swift path (default) | ||
| config.modResults.contents = (0, generateCode_1.mergeContents)({ | ||
| src: config.modResults.contents, | ||
| newSrc: constants_1.IOS_CODEPUSH_IMPORT_SWIFT, | ||
| tag: "codepush-import", | ||
| comment: "//", | ||
| anchor: /import\s+React/, | ||
| offset: 1, | ||
| }).contents; | ||
| const bundleUrlPattern = /Bundle\.main\.url\(forResource:\s*"main",\s*withExtension:\s*"jsbundle"\)/; | ||
| if (bundleUrlPattern.test(config.modResults.contents)) { | ||
| config.modResults.contents = config.modResults.contents.replace(bundleUrlPattern, "CodePush.bundleURL()"); | ||
| console.log("Successfully replaced Bundle URL with CodePush.bundleURL()"); | ||
| } | ||
| else { | ||
| console.error("Could not find Bundle.main.url pattern in AppDelegate.swift."); | ||
| } | ||
| } | ||
| return config; | ||
| } | ||
| catch (error) { | ||
| console.error("Error modifying AppDelegate.swift:", error); | ||
| return config; | ||
| } | ||
| }); | ||
| }; | ||
| exports.withCodePushAppDelegate = withCodePushAppDelegate; |
| import type { ConfigPlugin } from "@expo/config-plugins"; | ||
| import type { DotaPluginProps } from "../types"; | ||
| export declare const withCodePushInfoPlist: ConfigPlugin<DotaPluginProps>; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.withCodePushInfoPlist = void 0; | ||
| const config_plugins_1 = require("@expo/config-plugins"); | ||
| const withCodePushInfoPlist = (config, props) => { | ||
| if (!props.iosDeploymentKey || !props.serverUrl) | ||
| return config; | ||
| return (0, config_plugins_1.withInfoPlist)(config, (config) => { | ||
| config.modResults.CodePushDeploymentKey = props.iosDeploymentKey; | ||
| config.modResults.CodePushServerURL = props.serverUrl; | ||
| return config; | ||
| }); | ||
| }; | ||
| exports.withCodePushInfoPlist = withCodePushInfoPlist; |
| import type { ConfigPlugin } from "@expo/config-plugins"; | ||
| export declare const withCodePushPodfile: ConfigPlugin; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.withCodePushPodfile = void 0; | ||
| const config_plugins_1 = require("@expo/config-plugins"); | ||
| const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode"); | ||
| const constants_1 = require("../constants"); | ||
| const withCodePushPodfile = (config) => { | ||
| return (0, config_plugins_1.withPodfile)(config, (config) => { | ||
| const projectName = config.modRequest.projectName; | ||
| if (!projectName) | ||
| return config; | ||
| // Add require_relative at the top (anchor to first require statement) | ||
| try { | ||
| const importResult = (0, generateCode_1.mergeContents)({ | ||
| tag: "dota-pod-helpers", | ||
| src: config.modResults.contents, | ||
| newSrc: constants_1.DOTA_POD_HELPERS_REQUIRE, | ||
| anchor: /^require /m, | ||
| offset: 0, | ||
| comment: "#", | ||
| }); | ||
| config.modResults.contents = importResult.contents; | ||
| } | ||
| catch (error) { | ||
| console.error("Error modifying Podfile:", error); | ||
| return config; | ||
| } | ||
| // Add dota_post_install inside post_install block | ||
| try { | ||
| const postInstallResult = (0, generateCode_1.mergeContents)({ | ||
| tag: "dota-post-install", | ||
| src: config.modResults.contents, | ||
| newSrc: ` ${(0, constants_1.DOTA_POST_INSTALL_CALL)(projectName)}`, | ||
| anchor: /:mac_catalyst_enabled\s*=>/, | ||
| offset: 3, | ||
| comment: "#", | ||
| }); | ||
| config.modResults.contents = postInstallResult.contents; | ||
| } | ||
| catch (error) { | ||
| console.error("Error modifying Podfile:", error); | ||
| return config; | ||
| } | ||
| return config; | ||
| }); | ||
| }; | ||
| exports.withCodePushPodfile = withCodePushPodfile; |
| export interface DotaPluginProps { | ||
| serverUrl?: string; | ||
| androidDeploymentKey?: string; | ||
| iosDeploymentKey?: string; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); |
| import type { ConfigPlugin } from "@expo/config-plugins"; | ||
| import type { DotaPluginProps } from "./types"; | ||
| export declare const withAndroidDotaPlugin: ConfigPlugin<DotaPluginProps>; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.withAndroidDotaPlugin = void 0; | ||
| const withCodePushBuildGradle_1 = require("./android-config/withCodePushBuildGradle"); | ||
| const withCodePushMainApplication_1 = require("./android-config/withCodePushMainApplication"); | ||
| const withCodePushSettingsGradle_1 = require("./android-config/withCodePushSettingsGradle"); | ||
| const withCodePushStrings_1 = require("./android-config/withCodePushStrings"); | ||
| const withAndroidDotaPlugin = (config, props = {}) => { | ||
| config = (0, withCodePushStrings_1.withCodePushStrings)(config, props); | ||
| config = (0, withCodePushSettingsGradle_1.withCodePushSettingsGradle)(config); | ||
| config = (0, withCodePushBuildGradle_1.withAppBuildGradleModule)(config); | ||
| config = (0, withCodePushMainApplication_1.withCodePushMainApplication)(config); | ||
| return config; | ||
| }; | ||
| exports.withAndroidDotaPlugin = withAndroidDotaPlugin; |
| import type { ConfigPlugin } from "@expo/config-plugins"; | ||
| import type { DotaPluginProps } from "./types"; | ||
| export declare const withIosDotaPlugin: ConfigPlugin<DotaPluginProps>; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.withIosDotaPlugin = void 0; | ||
| const withCodePushAppDelegate_1 = require("./ios-config/withCodePushAppDelegate"); | ||
| const withCodePushInfoPlist_1 = require("./ios-config/withCodePushInfoPlist"); | ||
| const withCodePushPodfile_1 = require("./ios-config/withCodePushPodfile"); | ||
| const withIosDotaPlugin = (config, props = {}) => { | ||
| config = (0, withCodePushAppDelegate_1.withCodePushAppDelegate)(config); | ||
| config = (0, withCodePushInfoPlist_1.withCodePushInfoPlist)(config, props); | ||
| config = (0, withCodePushPodfile_1.withCodePushPodfile)(config); | ||
| return config; | ||
| }; | ||
| exports.withIosDotaPlugin = withIosDotaPlugin; |
| import { AndroidConfig } from "@expo/config-plugins"; | ||
| import type { ResourceXML } from "@expo/config-plugins/build/android/Resources"; | ||
| import { MODULE_NAME, PACKAGE_PATH } from "../constants"; | ||
| export function setStrings( | ||
| strings: ResourceXML, | ||
| name: string, | ||
| value: string, | ||
| moduleConfig: boolean = false | ||
| ) { | ||
| const stringItem = moduleConfig | ||
| ? { $: { name, moduleConfig: "true" }, _: value } | ||
| : { $: { name }, _: value }; | ||
| return AndroidConfig.Strings.setStringItem([stringItem], strings); | ||
| } | ||
| export function applySettings(gradleSettings: string) { | ||
| const moduleInclude = `include ':app', '${MODULE_NAME}'`; | ||
| const projectDir = `project('${MODULE_NAME}').projectDir = new File(rootProject.projectDir, '../node_modules/${PACKAGE_PATH}')`; | ||
| const moduleSettings = `\n${moduleInclude}\n${projectDir}`; | ||
| if (gradleSettings.includes(MODULE_NAME)) { | ||
| return gradleSettings; | ||
| } | ||
| const standaloneAppRegex = /^include\s+['"]:app['"]\s*$/gm; | ||
| gradleSettings = gradleSettings.replace(standaloneAppRegex, ""); | ||
| return gradleSettings + moduleSettings; | ||
| } |
| import type { ConfigPlugin } from "@expo/config-plugins"; | ||
| import { withAppBuildGradle } from "@expo/config-plugins"; | ||
| import { mergeContents } from "@expo/config-plugins/build/utils/generateCode"; | ||
| import { APPLY_FROM, DEPENDENCY } from "../constants"; | ||
| export const withAppBuildGradleModule: ConfigPlugin = (config) => { | ||
| return withAppBuildGradle(config, (config) => { | ||
| try { | ||
| config.modResults.contents = mergeContents({ | ||
| src: config.modResults.contents, | ||
| newSrc: DEPENDENCY, | ||
| tag: "d11-dota-dependency", | ||
| comment: "//", | ||
| anchor: /dependencies\s*{/, | ||
| offset: 1, | ||
| }).contents; | ||
| if (!config.modResults.contents.includes(APPLY_FROM)) { | ||
| config.modResults.contents = | ||
| config.modResults.contents.trimEnd() + `\n\n${APPLY_FROM}\n`; | ||
| } | ||
| return config; | ||
| } catch (error) { | ||
| console.error("Error modifying build.gradle:", error); | ||
| return config; | ||
| } | ||
| }); | ||
| }; |
| import type { ConfigPlugin } from "@expo/config-plugins"; | ||
| import { withMainApplication } from "@expo/config-plugins"; | ||
| import { mergeContents } from "@expo/config-plugins/build/utils/generateCode"; | ||
| import { | ||
| CODEPUSH_IMPORT, | ||
| JS_BUNDLE_OVERRIDE_KOTLIN, | ||
| JS_BUNDLE_OVERRIDE_JAVA, | ||
| CODEPUSH_PACKAGE_KOTLIN, | ||
| CODEPUSH_PACKAGE_JAVA, | ||
| CODEPUSH_PACKAGE_KOTLIN_WITH_PACKAGE_LIST, | ||
| } from "../constants"; | ||
| export const withCodePushMainApplication: ConfigPlugin = (config) => { | ||
| return withMainApplication(config, (config) => { | ||
| try { | ||
| config.modResults.contents = mergeContents({ | ||
| src: config.modResults.contents, | ||
| newSrc: CODEPUSH_IMPORT, | ||
| tag: "d11-dota-import", | ||
| comment: "//", | ||
| anchor: /import\s+com\.facebook\.react\.ReactApplication/, | ||
| offset: 1, | ||
| }).contents; | ||
| const contents = config.modResults.contents; | ||
| const isKotlin = | ||
| (config.modResults as unknown as { language?: string })?.language === | ||
| "kt" || | ||
| /class\s+MainApplication\s*:/.test(contents) || | ||
| /override val isNewArchEnabled: Boolean = BuildConfig\.IS_NEW_ARCHITECTURE_ENABLED/.test( | ||
| contents | ||
| ); | ||
| if (isKotlin) { | ||
| config.modResults.contents = mergeContents({ | ||
| src: config.modResults.contents, | ||
| newSrc: JS_BUNDLE_OVERRIDE_KOTLIN, | ||
| tag: "d11-dota-js-bundle", | ||
| comment: "//", | ||
| anchor: | ||
| /override val isNewArchEnabled: Boolean = BuildConfig\.IS_NEW_ARCHITECTURE_ENABLED/, | ||
| offset: 1, | ||
| }).contents; | ||
| const applyPattern = /PackageList\(this\)\.packages\.apply\s*\{/; | ||
| const variablePattern = /val\s+packages\s*=\s*PackageList\(this\)\.packages/; | ||
| if (applyPattern.test(contents)) { | ||
| config.modResults.contents = mergeContents({ | ||
| src: config.modResults.contents, | ||
| newSrc: CODEPUSH_PACKAGE_KOTLIN, | ||
| tag: "d11-dota-package", | ||
| comment: "//", | ||
| anchor: applyPattern, | ||
| offset: 1, // Insert inside the opening brace '{' | ||
| }).contents; | ||
| } else if (variablePattern.test(contents)) { | ||
| config.modResults.contents = mergeContents({ | ||
| src: config.modResults.contents, | ||
| newSrc: CODEPUSH_PACKAGE_KOTLIN_WITH_PACKAGE_LIST, | ||
| tag: "d11-dota-package", | ||
| comment: "//", | ||
| anchor: variablePattern, | ||
| offset: 1, // Insert on the line after the variable definition | ||
| }).contents; | ||
| } else { | ||
| // 4. Fallback / Warning | ||
| // It is good practice to throw or warn if the file structure is completely unrecognizable | ||
| console.warn( | ||
| "Could not find a suitable anchor for CodePush in MainApplication.kt. Please add it manually." | ||
| ); | ||
| } | ||
| } else { | ||
| config.modResults.contents = mergeContents({ | ||
| src: config.modResults.contents, | ||
| newSrc: JS_BUNDLE_OVERRIDE_JAVA, | ||
| tag: "d11-dota-js-bundle", | ||
| comment: "//", | ||
| anchor: /new ReactNativeHost\(this\)\s*\{/, | ||
| offset: 1, | ||
| }).contents; | ||
| config.modResults.contents = mergeContents({ | ||
| src: config.modResults.contents, | ||
| newSrc: CODEPUSH_PACKAGE_JAVA, | ||
| tag: "d11-dota-package", | ||
| comment: "//", | ||
| anchor: | ||
| /List<ReactPackage>\s+packages\s*=\s*new PackageList\(this\)\.getPackages\(\);/, | ||
| offset: 1, | ||
| }).contents; | ||
| } | ||
| return config; | ||
| } catch (error) { | ||
| console.error("Error modifying MainApplication:", error); | ||
| return config; | ||
| } | ||
| }); | ||
| }; |
| import type { ConfigPlugin } from "@expo/config-plugins"; | ||
| import { withSettingsGradle } from "@expo/config-plugins"; | ||
| import { applySettings } from "./utils"; | ||
| export const withCodePushSettingsGradle: ConfigPlugin = (config) => { | ||
| return withSettingsGradle(config, (config) => { | ||
| try { | ||
| config.modResults.contents = applySettings(config.modResults.contents); | ||
| return config; | ||
| } catch (error) { | ||
| console.error("Error modifying settings.gradle:", error); | ||
| return config; | ||
| } | ||
| }); | ||
| }; |
| import { withStringsXml, type ConfigPlugin } from "@expo/config-plugins"; | ||
| import { CODE_PUSH_DEPLOYMENT_KEY, CODE_PUSH_SERVER_URL } from "../constants"; | ||
| import type { DotaPluginProps } from "../types"; | ||
| import { setStrings } from "./utils"; | ||
| export const withCodePushStrings: ConfigPlugin<DotaPluginProps> = ( | ||
| config, | ||
| props = {} | ||
| ) => { | ||
| return withStringsXml(config, (config) => { | ||
| if (props.androidDeploymentKey) { | ||
| config.modResults = setStrings( | ||
| config.modResults, | ||
| CODE_PUSH_DEPLOYMENT_KEY, | ||
| props.androidDeploymentKey, | ||
| true | ||
| ); | ||
| } | ||
| if (props.serverUrl) { | ||
| config.modResults = setStrings( | ||
| config.modResults, | ||
| CODE_PUSH_SERVER_URL, | ||
| props.serverUrl, | ||
| true | ||
| ); | ||
| } | ||
| return config; | ||
| }); | ||
| }; |
| export const CODE_PUSH_DEPLOYMENT_KEY = "CodePushDeploymentKey"; | ||
| export const CODE_PUSH_SERVER_URL = "CodePushServerUrl"; | ||
| export const MODULE_NAME = ":d11_dota"; | ||
| export const PACKAGE_PATH = "@d11/dota/android/app"; | ||
| const CODEPUSH_GRADLE_PATH = | ||
| "../../node_modules/@d11/dota/android/codepush.gradle"; | ||
| export const DEPENDENCY = ` implementation project('${MODULE_NAME}')`; | ||
| export const APPLY_FROM = `apply from: "${CODEPUSH_GRADLE_PATH}"`; | ||
| export const CODEPUSH_IMPORT = `import com.microsoft.codepush.react.CodePush`; | ||
| export const CODEPUSH_PACKAGE_KOTLIN = ` | ||
| add(CodePush.getInstance( | ||
| resources.getString(R.string.CodePushDeploymentKey), | ||
| applicationContext, | ||
| BuildConfig.DEBUG | ||
| ))`; | ||
| export const CODEPUSH_PACKAGE_KOTLIN_WITH_PACKAGE_LIST = ` | ||
| packages.add(CodePush.getInstance( | ||
| resources.getString(R.string.CodePushDeploymentKey), | ||
| applicationContext, | ||
| BuildConfig.DEBUG | ||
| ))`; | ||
| export const CODEPUSH_PACKAGE_JAVA = ` | ||
| packages.add(CodePush.getInstance( | ||
| getResources().getString(R.string.CodePushDeploymentKey), | ||
| getApplicationContext(), | ||
| BuildConfig.DEBUG | ||
| )); | ||
| `; | ||
| export const JS_BUNDLE_OVERRIDE_KOTLIN = ` | ||
| override fun getJSBundleFile(): String? { | ||
| CodePush.getInstance( | ||
| resources.getString(R.string.CodePushDeploymentKey), | ||
| applicationContext, | ||
| BuildConfig.DEBUG | ||
| ) | ||
| return CodePush.getJSBundleFile() | ||
| }`; | ||
| export const JS_BUNDLE_OVERRIDE_JAVA = ` | ||
| @Override | ||
| protected String getJSBundleFile() { | ||
| CodePush.getInstance( | ||
| getResources().getString(R.string.CodePushDeploymentKey), | ||
| getApplicationContext(), | ||
| BuildConfig.DEBUG | ||
| ); | ||
| return CodePush.getJSBundleFile(); | ||
| }`; | ||
| export const IOS_CODEPUSH_IMPORT_SWIFT = `import CodePush`; | ||
| export const IOS_CODEPUSH_IMPORT_OBJC = `#import <CodePush/CodePush.h>`; | ||
| export const DOTA_POD_HELPERS_REQUIRE = `require_relative '../node_modules/@d11/dota/ios/scripts/dota_pod_helpers.rb'`; | ||
| export const DOTA_POST_INSTALL_CALL = (projectName: string): string => | ||
| `dota_post_install(installer, '${projectName}', File.expand_path(__dir__))`; |
| import { createRunOncePlugin, type ConfigPlugin } from "@expo/config-plugins"; | ||
| import type { DotaPluginProps } from "./types"; | ||
| import { withAndroidDotaPlugin } from "./withAndroidDotaPlugin"; | ||
| import { withIosDotaPlugin } from "./withIosDotaPlugin"; | ||
| const pkg = require("../../package.json"); | ||
| const withDotaPlugin: ConfigPlugin<DotaPluginProps> = (config, props = {}) => { | ||
| config = withAndroidDotaPlugin(config, props); | ||
| config = withIosDotaPlugin(config, props); | ||
| return config; | ||
| }; | ||
| export default createRunOncePlugin(withDotaPlugin, pkg.name, pkg.version); |
| import type { ConfigPlugin } from "@expo/config-plugins"; | ||
| import { withAppDelegate } from "@expo/config-plugins"; | ||
| import { mergeContents } from "@expo/config-plugins/build/utils/generateCode"; | ||
| import { IOS_CODEPUSH_IMPORT_SWIFT, IOS_CODEPUSH_IMPORT_OBJC } from "../constants"; | ||
| export const withCodePushAppDelegate: ConfigPlugin = (config) => { | ||
| return withAppDelegate(config, (config) => { | ||
| try { | ||
| const contents = config.modResults.contents; | ||
| const language = | ||
| (config.modResults as unknown as { language?: string })?.language ?? | ||
| ""; | ||
| const isObjectiveC = | ||
| language === "objc" || | ||
| /#import\s+<UIKit\/UIKit\.h>/.test(contents) || | ||
| /@interface\s+AppDelegate/.test(contents); | ||
| if (isObjectiveC) { | ||
| // Insert Objective-C import | ||
| config.modResults.contents = mergeContents({ | ||
| src: config.modResults.contents, | ||
| newSrc: IOS_CODEPUSH_IMPORT_OBJC, | ||
| tag: "codepush-import", | ||
| comment: "//", | ||
| anchor: /#import\s+<React\/RCTBundleURLProvider\.h>/, | ||
| offset: 1, | ||
| }).contents; | ||
| // Replace production bundle URL with CodePush in Obj-C | ||
| const objcBundleUrlPattern = | ||
| /\[\[NSBundle\s+mainBundle\]\s+URLForResource:@"main"\s*,?\s*withExtension:@"jsbundle"\]/; | ||
| if (objcBundleUrlPattern.test(config.modResults.contents)) { | ||
| config.modResults.contents = config.modResults.contents.replace( | ||
| objcBundleUrlPattern, | ||
| "[CodePush bundleURL]" | ||
| ); | ||
| console.log( | ||
| "Successfully replaced Bundle URL with [CodePush bundleURL]" | ||
| ); | ||
| } else { | ||
| console.error( | ||
| "Could not find NSBundle URL pattern in AppDelegate.m to replace with [CodePush bundleURL]." | ||
| ); | ||
| } | ||
| } else { | ||
| // Swift path (default) | ||
| config.modResults.contents = mergeContents({ | ||
| src: config.modResults.contents, | ||
| newSrc: IOS_CODEPUSH_IMPORT_SWIFT, | ||
| tag: "codepush-import", | ||
| comment: "//", | ||
| anchor: /import\s+React/, | ||
| offset: 1, | ||
| }).contents; | ||
| const bundleUrlPattern = | ||
| /Bundle\.main\.url\(forResource:\s*"main",\s*withExtension:\s*"jsbundle"\)/; | ||
| if (bundleUrlPattern.test(config.modResults.contents)) { | ||
| config.modResults.contents = config.modResults.contents.replace( | ||
| bundleUrlPattern, | ||
| "CodePush.bundleURL()" | ||
| ); | ||
| console.log( | ||
| "Successfully replaced Bundle URL with CodePush.bundleURL()" | ||
| ); | ||
| } else { | ||
| console.error( | ||
| "Could not find Bundle.main.url pattern in AppDelegate.swift." | ||
| ); | ||
| } | ||
| } | ||
| return config; | ||
| } catch (error) { | ||
| console.error("Error modifying AppDelegate.swift:", error); | ||
| return config; | ||
| } | ||
| }); | ||
| }; |
| import type { ConfigPlugin } from "@expo/config-plugins"; | ||
| import { withInfoPlist } from "@expo/config-plugins"; | ||
| import type { DotaPluginProps } from "../types"; | ||
| export const withCodePushInfoPlist: ConfigPlugin<DotaPluginProps> = ( | ||
| config, | ||
| props | ||
| ) => { | ||
| if (!props.iosDeploymentKey || !props.serverUrl) return config; | ||
| return withInfoPlist(config, (config) => { | ||
| config.modResults.CodePushDeploymentKey = props.iosDeploymentKey; | ||
| config.modResults.CodePushServerURL = props.serverUrl; | ||
| return config; | ||
| }); | ||
| }; |
| import type { ConfigPlugin } from "@expo/config-plugins"; | ||
| import { withPodfile } from "@expo/config-plugins"; | ||
| import { mergeContents } from "@expo/config-plugins/build/utils/generateCode"; | ||
| import { DOTA_POD_HELPERS_REQUIRE, DOTA_POST_INSTALL_CALL } from "../constants"; | ||
| export const withCodePushPodfile: ConfigPlugin = (config) => { | ||
| return withPodfile(config, (config) => { | ||
| const projectName = config.modRequest.projectName; | ||
| if (!projectName) return config; | ||
| // Add require_relative at the top (anchor to first require statement) | ||
| try { | ||
| const importResult = mergeContents({ | ||
| tag: "dota-pod-helpers", | ||
| src: config.modResults.contents, | ||
| newSrc: DOTA_POD_HELPERS_REQUIRE, | ||
| anchor: /^require /m, | ||
| offset: 0, | ||
| comment: "#", | ||
| }); | ||
| config.modResults.contents = importResult.contents; | ||
| } catch (error: unknown) { | ||
| console.error("Error modifying Podfile:", error); | ||
| return config; | ||
| } | ||
| // Add dota_post_install inside post_install block | ||
| try { | ||
| const postInstallResult = mergeContents({ | ||
| tag: "dota-post-install", | ||
| src: config.modResults.contents, | ||
| newSrc: ` ${DOTA_POST_INSTALL_CALL(projectName)}`, | ||
| anchor: /:mac_catalyst_enabled\s*=>/, | ||
| offset: 3, | ||
| comment: "#", | ||
| }); | ||
| config.modResults.contents = postInstallResult.contents; | ||
| } catch (error: unknown) { | ||
| console.error("Error modifying Podfile:", error); | ||
| return config; | ||
| } | ||
| return config; | ||
| }); | ||
| }; |
| export interface DotaPluginProps { | ||
| serverUrl?: string; | ||
| androidDeploymentKey?: string; | ||
| iosDeploymentKey?: string; | ||
| } |
| import type { ConfigPlugin } from "@expo/config-plugins"; | ||
| import { withAppBuildGradleModule } from "./android-config/withCodePushBuildGradle"; | ||
| import { withCodePushMainApplication } from "./android-config/withCodePushMainApplication"; | ||
| import { withCodePushSettingsGradle } from "./android-config/withCodePushSettingsGradle"; | ||
| import { withCodePushStrings } from "./android-config/withCodePushStrings"; | ||
| import type { DotaPluginProps } from "./types"; | ||
| export const withAndroidDotaPlugin: ConfigPlugin<DotaPluginProps> = ( | ||
| config, | ||
| props = {} | ||
| ) => { | ||
| config = withCodePushStrings(config, props); | ||
| config = withCodePushSettingsGradle(config); | ||
| config = withAppBuildGradleModule(config); | ||
| config = withCodePushMainApplication(config); | ||
| return config; | ||
| }; |
| import type { ConfigPlugin } from "@expo/config-plugins"; | ||
| import { withCodePushAppDelegate } from "./ios-config/withCodePushAppDelegate"; | ||
| import { withCodePushInfoPlist } from "./ios-config/withCodePushInfoPlist"; | ||
| import { withCodePushPodfile } from "./ios-config/withCodePushPodfile"; | ||
| import type { DotaPluginProps } from "./types"; | ||
| export const withIosDotaPlugin: ConfigPlugin<DotaPluginProps> = ( | ||
| config, | ||
| props = {} | ||
| ) => { | ||
| config = withCodePushAppDelegate(config); | ||
| config = withCodePushInfoPlist(config, props); | ||
| config = withCodePushPodfile(config); | ||
| return config; | ||
| }; |
| { | ||
| "extends": "expo-module-scripts/tsconfig.plugin", | ||
| "compilerOptions": { | ||
| "outDir": "expoPluginBuild", | ||
| "rootDir": "src" | ||
| }, | ||
| "include": ["./src"], | ||
| } |
+7
-4
| { | ||
| "name": "@d11/dota", | ||
| "version": "1.2.0", | ||
| "version": "1.3.0", | ||
| "description": "React Native plugin for the CodePush service", | ||
@@ -23,2 +23,4 @@ "main": "CodePush.js", | ||
| "build:tests": "tsc", | ||
| "build:plugin": "tsc -p plugin/tsconfig.json", | ||
| "prepack": "npm run build:plugin", | ||
| "test": "npm run build:tests && npm run test:setup && npm run test:fast", | ||
@@ -50,5 +52,4 @@ "test:android": "npm run build:tests && npm run test:setup:android && npm run test:fast:android", | ||
| "devDependencies": { | ||
| "code-push": "^4.2.2", | ||
| "@expo/config-plugins": "^54.0.2", | ||
| "@types/assert": "^1.5.2", | ||
| "commander": "^11.1.0", | ||
| "@types/mkdirp": "^1.0.1", | ||
@@ -61,3 +62,5 @@ "@types/mocha": "^9.0.0", | ||
| "code-push-plugin-testing-framework": "file:./code-push-plugin-testing-framework", | ||
| "commander": "11.1.0", | ||
| "del": "v6.0.0", | ||
| "expo-module-scripts": "^5.0.7", | ||
| "express": "latest", | ||
@@ -71,4 +74,4 @@ "mkdirp": "latest", | ||
| "tslint": "^6.1.3", | ||
| "typescript": "^4.4.3" | ||
| "typescript": "^5.6.3" | ||
| } | ||
| } |
| module.exports = { | ||
| dependency: { | ||
| platforms: { | ||
| android: { | ||
| packageInstance: | ||
| "new CodePush(getResources().getString(R.string.CodePushDeploymentKey), getApplicationContext(), BuildConfig.DEBUG)" | ||
| } | ||
| android: null | ||
| } | ||
| } | ||
| }; |
+13
-2
@@ -46,2 +46,3 @@ # React Native Module for OTA Updates | ||
| - [Expo Setup using Plugin](docs/setup-expo.md) β if your app uses Expo (managed or prebuild) this wires up Android and iOS automatically via the config plugin. | ||
| - [iOS Setup](docs/setup-ios.md) | ||
@@ -64,3 +65,3 @@ - [Android Setup](docs/setup-android.md) | ||
| ### 1. Build-time Bundling (Recommended) | ||
| ### 1. Automated Bundle Generation (Recommended) | ||
@@ -143,2 +144,13 @@ This method effortlessly integrates DOTA and Hermes by automatically using the bundle generated during your app's build process. | ||
| ### 3. Bundle Generation for Expo | ||
| You can export the JavaScript and assets for your expo app using Metro bundler by running: | ||
| ```bash | ||
| npx expo export | ||
| ``` | ||
| For more information refer to the Expo documentation: | ||
| https://docs.expo.dev/more/expo-cli/#exporting | ||
| > **Note**: When generating a patch bundle using this script, ensure that the base bundle shipped with the APK is identical to the one generated here. Any discrepancy in flags, especially if additional flags are passed to React Native during bundle generation, may lead to patch application issues. If uncertain, follow the Automated Bundle Generation step to maintain consistency. | ||
@@ -296,3 +308,2 @@ | ||
| ## Contributing | ||
@@ -299,0 +310,0 @@ |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
3151258
16.59%232
23.4%5687
17.77%311
3.67%21
5%