vxrn 2.0.0-beta.61.1 → 2.0.0-beta.66.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/exports/prebuildWithoutExpo.mjs +22 -9
- package/dist/exports/prebuildWithoutExpo.mjs.map +1 -1
- package/dist/exports/prebuildWithoutExpo.native.js +41 -27
- package/dist/exports/prebuildWithoutExpo.native.js.map +1 -1
- package/package.json +11 -11
- package/src/exports/prebuildWithoutExpo.test.ts +20 -1
- package/src/exports/prebuildWithoutExpo.ts +26 -13
- package/types/exports/prebuildWithoutExpo.d.ts.map +1 -1
|
@@ -404,8 +404,10 @@ function renderPrebuildFile(args) {
|
|
|
404
404
|
for (const [find, value] of replacements) {
|
|
405
405
|
rendered = rendered.split(find).join(value);
|
|
406
406
|
}
|
|
407
|
-
if (platform === "ios" && relativePath.endsWith("/Info.plist")
|
|
408
|
-
|
|
407
|
+
if (platform === "ios" && relativePath.endsWith("/Info.plist")) {
|
|
408
|
+
const stamps = [];
|
|
409
|
+
if (schemes.length) {
|
|
410
|
+
stamps.push(` <key>CFBundleURLTypes</key>
|
|
409
411
|
<array>
|
|
410
412
|
<dict>
|
|
411
413
|
<key>CFBundleTypeRole</key>
|
|
@@ -415,8 +417,24 @@ function renderPrebuildFile(args) {
|
|
|
415
417
|
${schemes.map((scheme) => ` <string>${scheme}</string>`).join("\n")}
|
|
416
418
|
</array>
|
|
417
419
|
</dict>
|
|
418
|
-
</array
|
|
419
|
-
|
|
420
|
+
</array>`);
|
|
421
|
+
}
|
|
422
|
+
if (app.ios?.usesNonExemptEncryption !== void 0) {
|
|
423
|
+
stamps.push(` <key>ITSAppUsesNonExemptEncryption</key>
|
|
424
|
+
<${app.ios.usesNonExemptEncryption ? "true" : "false"}/>`);
|
|
425
|
+
}
|
|
426
|
+
if (app.ios?.fileSharing) {
|
|
427
|
+
stamps.push(` <key>UIFileSharingEnabled</key>
|
|
428
|
+
<true/>
|
|
429
|
+
<key>LSSupportsOpeningDocumentsInPlace</key>
|
|
430
|
+
<true/>`);
|
|
431
|
+
}
|
|
432
|
+
if (stamps.length) {
|
|
433
|
+
const anchor = " <key>LSRequiresIPhoneOS</key>";
|
|
434
|
+
if (!rendered.includes(anchor)) throw new Error(`[vxrn] prebuild template ${relativePath} lost its LSRequiresIPhoneOS anchor`);
|
|
435
|
+
rendered = rendered.replace(anchor, `${stamps.join("\n")}
|
|
436
|
+
${anchor}`);
|
|
437
|
+
}
|
|
420
438
|
}
|
|
421
439
|
if (platform === "android" && relativePath === "app/src/main/AndroidManifest.xml" && app.imagePicker?.camera !== void 0) {
|
|
422
440
|
const anchor = "<uses-permission android:name=\"android.permission.INTERNET\" />";
|
|
@@ -447,11 +465,6 @@ ${schemes.map((scheme) => ` <data android:scheme="${scheme}" />`).joi
|
|
|
447
465
|
}
|
|
448
466
|
}
|
|
449
467
|
if (platform === "ios" && relativePath.endsWith("/Info.plist")) {
|
|
450
|
-
if (app.ios?.usesNonExemptEncryption !== void 0) {
|
|
451
|
-
rendered = rendered.replace(" <key>LSRequiresIPhoneOS</key>", ` <key>ITSAppUsesNonExemptEncryption</key>
|
|
452
|
-
<${app.ios.usesNonExemptEncryption ? "true" : "false"}/>
|
|
453
|
-
<key>LSRequiresIPhoneOS</key>`);
|
|
454
|
-
}
|
|
455
468
|
if (app.imagePicker?.camera !== void 0) {
|
|
456
469
|
const anchor = " <key>LSRequiresIPhoneOS</key>";
|
|
457
470
|
if (!rendered.includes(anchor)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prebuildWithoutExpo.js","names":[],"sources":["exports/prebuildWithoutExpo.js"],"sourcesContent":["import { execFileSync } from \"node:child_process\";\nimport module from \"node:module\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { validateNativeApp } from \"@vxrn/utils/nativeAppManifest\";\nimport FSExtra from \"fs-extra\";\nimport sharp from \"sharp\";\nconst nativeProjectPatches = module.createRequire(import.meta.url)(\n \"../../native-project-patches.cjs\"\n);\nconst validatePrebuildApp = validateNativeApp;\nconst ANDROID_DENSITIES = {\n mdpi: 1,\n hdpi: 1.5,\n xhdpi: 2,\n xxhdpi: 3,\n xxxhdpi: 4\n};\nconst IOS_BUNDLE_PLACEHOLDER = \"org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)\";\nconst ANDROID_PACKAGE_PLACEHOLDER = \"com.helloworld\";\nconst ANDROID_PACKAGE_PATH = \"com/helloworld\";\nfunction patchIosBundlePhase(project) {\n let patchedBundlePhases = 0;\n const patchedProject = project.replace(\n /shellScript = (\"(?:\\\\.|[^\"\\\\])*\");/g,\n (assignment, serializedScript) => {\n let script;\n try {\n script = JSON.parse(serializedScript);\n } catch {\n return assignment;\n }\n if (typeof script !== \"string\" || !script.includes(\"react-native-xcode.sh\")) {\n return assignment;\n }\n let patched = script;\n patched = nativeProjectPatches.addSetCliPathToBundleReactNativeShellScript(patched);\n patched = nativeProjectPatches.addPodHermescToBundleReactNativeShellScript(patched);\n patched = nativeProjectPatches.addDepsPatchToBundleReactNativeShellScript(patched);\n if (!patched.includes(\"[vxrn/one] React Native now defaults CLI_PATH\") || !patched.includes(\"[vxrn/one] use the hermes-engine pod\") || !patched.includes(\"[vxrn/one] ensure patches are applied\")) {\n throw new Error(\"[vxrn] failed to apply required iOS bundle phase patches\");\n }\n patchedBundlePhases++;\n return `shellScript = ${JSON.stringify(patched)};`;\n }\n );\n if (patchedBundlePhases !== 1) {\n throw new Error(\n `[vxrn] expected one iOS React Native bundle phase, found ${patchedBundlePhases}`\n );\n }\n return patchedProject;\n}\nfunction escapeXml(value) {\n return value.replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\");\n}\nconst SCENE_DELEGATE_FILE_REF_ID = \"1A2B3C4D5E6F7A8B9C0D1E2F\";\nconst SCENE_DELEGATE_BUILD_FILE_ID = \"2B3C4D5E6F7A8B9C0D1E2F1A\";\nfunction renderSceneDelegateSwift(appName) {\n return `import UIKit\nimport React\nimport React_RCTAppDelegate\nimport ReactAppDependencyProvider\n\n// owns the window and the react native root. with a scene manifest the\n// system creates this delegate per foreground scene instead of asking the\n// app delegate for a window, which is what the xcode 27 sdk requires.\nclass SceneDelegate: UIResponder, UIWindowSceneDelegate {\n var window: UIWindow?\n\n var reactNativeDelegate: ReactNativeDelegate?\n var reactNativeFactory: RCTReactNativeFactory?\n\n func scene(\n _ scene: UIScene,\n willConnectTo session: UISceneSession,\n options connectionOptions: UIScene.ConnectionOptions\n ) {\n guard let windowScene = scene as? UIWindowScene else { return }\n let delegate = ReactNativeDelegate()\n let factory = RCTReactNativeFactory(delegate: delegate)\n delegate.dependencyProvider = RCTAppDependencyProvider()\n\n reactNativeDelegate = delegate\n reactNativeFactory = factory\n\n let window = UIWindow(windowScene: windowScene)\n self.window = window\n\n // cold-start links arrive in connectionOptions under scenes, never in\n // the app launchOptions, so they are translated into the launchOptions\n // shape RCTLinkingManager.getInitialURL reads.\n var launchOptions: [UIApplication.LaunchOptionsKey: Any] = [:]\n if let url = connectionOptions.urlContexts.first?.url {\n launchOptions[.url] = url\n }\n if let activity = connectionOptions.userActivities.first(where: {\n $0.activityType == NSUserActivityTypeBrowsingWeb\n }) {\n launchOptions[.userActivityDictionary] = [\n \"UIApplicationLaunchOptionsUserActivityTypeKey\": activity.activityType,\n \"UIApplicationLaunchOptionsUserActivityKey\": activity,\n ]\n }\n\n factory.startReactNative(\n withModuleName: \"${appName}\",\n in: window,\n launchOptions: launchOptions\n )\n }\n\n func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {\n guard let url = URLContexts.first?.url else { return }\n RCTLinkingManager.application(UIApplication.shared, open: url, options: [:])\n }\n\n func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {\n RCTLinkingManager.application(\n UIApplication.shared,\n continue: userActivity,\n restorationHandler: { _ in }\n )\n }\n}\n`;\n}\nfunction insertAfterLine(haystack, anchor, insertion) {\n const anchorIndex = haystack.indexOf(anchor);\n if (anchorIndex === -1) return haystack;\n const lineEnd = haystack.indexOf(\"\\n\", anchorIndex);\n if (lineEnd === -1) return `${haystack}\n${insertion}`;\n return `${haystack.slice(0, lineEnd + 1)}${insertion}\n${haystack.slice(lineEnd + 1)}`;\n}\nfunction patchIosInfoPlistSceneManifest(rendered) {\n const anchor = \"\t<key>LSRequiresIPhoneOS</key>\";\n if (!rendered.includes(anchor)) {\n throw new Error(\"[vxrn] prebuild template Info.plist lost its LSRequiresIPhoneOS anchor\");\n }\n return rendered.replace(\n anchor,\n `\t<key>UIApplicationSceneManifest</key>\n\t<dict>\n\t\t<key>UIApplicationSupportsMultipleScenes</key>\n\t\t<false/>\n\t\t<key>UISceneConfigurations</key>\n\t\t<dict>\n\t\t\t<key>UIWindowSceneSessionRoleApplication</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>UISceneConfigurationName</key>\n\t\t\t\t\t<string>Default Configuration</string>\n\t\t\t\t\t<key>UISceneDelegateClassName</key>\n\t\t\t\t\t<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t</dict>\n\t</dict>\n${anchor}`\n );\n}\nfunction patchIosAppDelegateSceneLifecycle(rendered, appName) {\n const anchor = `@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n var window: UIWindow?\n\n var reactNativeDelegate: ReactNativeDelegate?\n var reactNativeFactory: RCTReactNativeFactory?\n\n func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n ) -> Bool {\n let delegate = ReactNativeDelegate()\n let factory = RCTReactNativeFactory(delegate: delegate)\n delegate.dependencyProvider = RCTAppDependencyProvider()\n\n reactNativeDelegate = delegate\n reactNativeFactory = factory\n\n window = UIWindow(frame: UIScreen.main.bounds)\n\n factory.startReactNative(\n withModuleName: \"${appName}\",\n in: window,\n launchOptions: launchOptions\n )\n\n return true\n }\n}`;\n if (!rendered.includes(anchor)) {\n throw new Error(\n \"[vxrn] prebuild template AppDelegate.swift changed shape: cannot move the RN root to the scene delegate\"\n );\n }\n return rendered.replace(\n anchor,\n `@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n ) -> Bool {\n true\n }\n}`\n );\n}\nfunction patchIosPbxprojSceneDelegate(rendered, appName) {\n const edits = [\n [\n \"/* AppDelegate.swift in Sources */ = {isa = PBXBuildFile;\",\n `\t\t${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */; };`\n ],\n [\n \"/* AppDelegate.swift */ = {isa = PBXFileReference;\",\n `\t\t${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SceneDelegate.swift; path = ${appName}/SceneDelegate.swift; sourceTree = \"<group>\"; };`\n ],\n [\n \"/* AppDelegate.swift */,\",\n `\t\t\t\t${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */,`\n ],\n [\n \"/* AppDelegate.swift in Sources */,\",\n `\t\t\t\t${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */,`\n ]\n ];\n let patched = rendered;\n for (const [anchor, insertion] of edits) {\n const next = insertAfterLine(patched, anchor, insertion);\n if (next === patched) {\n throw new Error(\n `[vxrn] prebuild template project.pbxproj lost its AppDelegate.swift anchor (${anchor})`\n );\n }\n patched = next;\n }\n return patched;\n}\nfunction generateSceneDelegate(args) {\n const { dest, platform, app } = args;\n if (platform !== \"ios\") return;\n FSExtra.writeFileSync(\n path.join(dest, app.name, \"SceneDelegate.swift\"),\n renderSceneDelegateSwift(app.name)\n );\n}\nasync function generateAppIcons(args) {\n const { root, dest, platform, app } = args;\n if (!app.icon) return;\n const source = path.resolve(root, app.icon.source);\n if (!FSExtra.existsSync(source)) {\n throw new Error(`[vxrn] native.app.icon source does not exist: ${source}`);\n }\n const metadata = await sharp(source).metadata();\n if (metadata.width === void 0 || metadata.height === void 0 || metadata.width !== metadata.height || metadata.width < 1024) {\n throw new Error(\n \"[vxrn] native.app.icon source must be a square image at least 1024px wide\"\n );\n }\n if (platform === \"ios\") {\n const iconDir = path.join(dest, app.name, \"Images.xcassets\", \"AppIcon.appiconset\");\n const contentsPath = path.join(iconDir, \"Contents.json\");\n const contents = JSON.parse(FSExtra.readFileSync(contentsPath, \"utf8\"));\n for (const image of contents.images) {\n const points = Number.parseFloat(image.size.split(\"x\")[0]);\n const scale = Number.parseInt(image.scale, 10);\n const pixels = points * scale;\n const filename = image.idiom === \"ios-marketing\" ? \"icon-1024.png\" : `icon-${points}@${image.scale}.png`;\n image.filename = filename;\n await sharp(source).rotate().resize(pixels, pixels, { fit: \"cover\" }).flatten({ background: app.icon.backgroundColor }).png().toFile(path.join(iconDir, filename));\n }\n FSExtra.writeFileSync(contentsPath, `${JSON.stringify(contents, null, 2)}\n`);\n return;\n }\n for (const [density, multiplier] of Object.entries(ANDROID_DENSITIES)) {\n const pixels = 48 * multiplier;\n const iconDir = path.join(dest, \"app\", \"src\", \"main\", \"res\", `mipmap-${density}`);\n for (const filename of [\"ic_launcher.png\", \"ic_launcher_round.png\"]) {\n await sharp(source).rotate().resize(pixels, pixels, { fit: \"cover\" }).flatten({ background: app.icon.backgroundColor }).png().toFile(path.join(iconDir, filename));\n }\n }\n}\nasync function generateSplashScreen(args) {\n const { root, dest, platform, app } = args;\n if (!app.splash) return;\n const source = path.resolve(root, app.splash.source);\n if (!FSExtra.existsSync(source)) {\n throw new Error(`[vxrn] native.app.splash source does not exist: ${source}`);\n }\n const { data: artwork, info: metadata } = await sharp(source).rotate().trim({ background: app.splash.backgroundColor }).png().toBuffer({ resolveWithObject: true });\n if (!metadata.width || !metadata.height) {\n throw new Error(\"[vxrn] native.app.splash source must be an image\");\n }\n const artworkWidth = app.splash.width ?? 200;\n const artworkHeight = Number(\n (artworkWidth * (metadata.height / metadata.width)).toFixed(3)\n );\n if (platform === \"ios\") {\n const appDir = path.join(dest, app.name);\n const splashDir = path.join(appDir, \"Images.xcassets\", \"Splash.imageset\");\n FSExtra.mkdirSync(splashDir, { recursive: true });\n await sharp(artwork).toFile(path.join(splashDir, \"splash.png\"));\n FSExtra.writeFileSync(\n path.join(splashDir, \"Contents.json\"),\n `${JSON.stringify(\n {\n images: [{ filename: \"splash.png\", idiom: \"universal\", scale: \"1x\" }],\n info: { author: \"xcode\", version: 1 }\n },\n null,\n 2\n )}\n`\n );\n const red = Number.parseInt(app.splash.backgroundColor.slice(1, 3), 16) / 255;\n const green = Number.parseInt(app.splash.backgroundColor.slice(3, 5), 16) / 255;\n const blue = Number.parseInt(app.splash.backgroundColor.slice(5, 7), 16) / 255;\n FSExtra.writeFileSync(\n path.join(appDir, \"LaunchScreen.storyboard\"),\n `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"15702\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"launch-controller\">\n <device id=\"retina6_12\" orientation=\"portrait\" appearance=\"light\"/>\n <dependencies>\n <deployment identifier=\"iOS\"/>\n <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"15704\"/>\n <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n </dependencies>\n <scenes>\n <scene sceneID=\"launch-scene\">\n <objects>\n <viewController id=\"launch-controller\" sceneMemberID=\"viewController\">\n <view key=\"view\" contentMode=\"scaleToFill\" id=\"launch-view\">\n <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"390\" height=\"844\"/>\n <subviews>\n <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFit\" image=\"Splash\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"splash-image\"/>\n </subviews>\n <color key=\"backgroundColor\" red=\"${red}\" green=\"${green}\" blue=\"${blue}\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n <constraints>\n <constraint firstItem=\"splash-image\" firstAttribute=\"centerX\" secondItem=\"launch-view\" secondAttribute=\"centerX\" id=\"splash-center-x\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"centerY\" secondItem=\"launch-view\" secondAttribute=\"centerY\" id=\"splash-center-y\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"width\" constant=\"${artworkWidth}\" id=\"splash-width\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"height\" constant=\"${artworkHeight}\" id=\"splash-height\"/>\n </constraints>\n </view>\n </viewController>\n <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"launch-responder\" sceneMemberID=\"firstResponder\"/>\n </objects>\n </scene>\n </scenes>\n <resources>\n <image name=\"Splash\" width=\"${metadata.width}\" height=\"${metadata.height}\"/>\n </resources>\n</document>\n`\n );\n return;\n }\n const mainRes = path.join(dest, \"app\", \"src\", \"main\", \"res\");\n const drawable = path.join(mainRes, \"drawable\");\n for (const [density, multiplier] of Object.entries(ANDROID_DENSITIES)) {\n const canvasSize = 288 * multiplier;\n const imageSize = Math.round(artworkWidth * multiplier);\n const contained = await sharp(artwork).resize(imageSize, imageSize, {\n fit: \"contain\",\n background: { r: 0, g: 0, b: 0, alpha: 0 }\n }).png().toBuffer();\n const drawableDensity = path.join(mainRes, `drawable-${density}`);\n FSExtra.mkdirSync(drawableDensity, { recursive: true });\n await sharp({\n create: {\n width: canvasSize,\n height: canvasSize,\n channels: 4,\n background: { r: 0, g: 0, b: 0, alpha: 0 }\n }\n }).composite([\n {\n input: contained,\n left: Math.round((canvasSize - imageSize) / 2),\n top: Math.round((canvasSize - imageSize) / 2)\n }\n ]).png().toFile(path.join(drawableDensity, \"splash.png\"));\n }\n FSExtra.writeFileSync(\n path.join(drawable, \"launch_screen.xml\"),\n `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item android:drawable=\"@color/splash_background\" />\n <item>\n <bitmap android:gravity=\"center\" android:src=\"@drawable/splash\" />\n </item>\n</layer-list>\n`\n );\n FSExtra.writeFileSync(\n path.join(mainRes, \"values\", \"colors.xml\"),\n `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"splash_background\">${app.splash.backgroundColor}</color>\n</resources>\n`\n );\n const stylesPath = path.join(mainRes, \"values\", \"styles.xml\");\n const styles = FSExtra.readFileSync(stylesPath, \"utf8\").replace(\n \" <!-- Customize your theme here. -->\",\n ' <item name=\"android:windowBackground\">@drawable/launch_screen</item>'\n );\n FSExtra.writeFileSync(stylesPath, styles);\n const stylesV31 = path.join(mainRes, \"values-v31\");\n FSExtra.mkdirSync(stylesV31, { recursive: true });\n FSExtra.writeFileSync(\n path.join(stylesV31, \"styles.xml\"),\n `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <style name=\"AppTheme\">\n <item name=\"android:windowSplashScreenBackground\">@color/splash_background</item>\n <item name=\"android:windowSplashScreenAnimatedIcon\">@drawable/splash</item>\n </style>\n</resources>\n`\n );\n}\nfunction renderPrebuildFile(args) {\n const { relativePath, content, platform, app } = args;\n const appName = app.name;\n const schemes = app.scheme === void 0 ? [] : Array.isArray(app.scheme) ? app.scheme : [app.scheme];\n let destRelativePath = transformPath(relativePath);\n if (platform === \"android\" && app.android) {\n const packagePath = app.android.applicationId.split(\".\").join(\"/\");\n destRelativePath = destRelativePath.split(ANDROID_PACKAGE_PATH).join(packagePath);\n }\n destRelativePath = destRelativePath.replace(/HelloWorld/g, appName).replace(/helloworld/g, appName.toLowerCase());\n let rendered = content;\n if (rendered !== null) {\n const replacements = [];\n if (platform === \"ios\" && app.ios) {\n replacements.push([IOS_BUNDLE_PLACEHOLDER, app.ios.bundleId]);\n }\n if (platform === \"android\" && app.android) {\n replacements.push([ANDROID_PACKAGE_PLACEHOLDER, app.android.applicationId]);\n }\n replacements.push(\n [\"Hello App Display Name\", app.displayName || appName],\n [\"HelloWorld\", appName],\n [\"helloworld\", appName.toLowerCase()]\n );\n for (const [find, value] of replacements) {\n rendered = rendered.split(find).join(value);\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/Info.plist\") && schemes.length) {\n rendered = rendered.replace(\n \"\t<key>LSRequiresIPhoneOS</key>\",\n `\t<key>CFBundleURLTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t\t<key>CFBundleURLSchemes</key>\n\t\t\t<array>\n${schemes.map((scheme) => `\t\t\t\t<string>${scheme}</string>`).join(\"\\n\")}\n\t\t\t</array>\n\t\t</dict>\n\t</array>\n\t<key>LSRequiresIPhoneOS</key>`\n );\n }\n if (platform === \"android\" && relativePath === \"app/src/main/AndroidManifest.xml\" && app.imagePicker?.camera !== void 0) {\n const anchor = '<uses-permission android:name=\"android.permission.INTERNET\" />';\n if (!rendered.includes(anchor)) {\n throw new Error(\n \"[vxrn] cannot stamp the camera permission: expected the INTERNET permission in app/src/main/AndroidManifest.xml\"\n );\n }\n rendered = rendered.replace(\n anchor,\n `${anchor}\n <uses-permission android:name=\"android.permission.CAMERA\" />`\n );\n }\n if (platform === \"android\" && relativePath === \"app/src/main/AndroidManifest.xml\" && schemes.length) {\n rendered = rendered.replace(\n \" </activity>\",\n ` <intent-filter>\n <action android:name=\"android.intent.action.VIEW\" />\n <category android:name=\"android.intent.category.DEFAULT\" />\n <category android:name=\"android.intent.category.BROWSABLE\" />\n${schemes.map((scheme) => ` <data android:scheme=\"${scheme}\" />`).join(\"\\n\")}\n </intent-filter>\n </activity>`\n );\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n rendered = rendered.replace(\n /TARGETED_DEVICE_FAMILY = \"1,2\";/g,\n `TARGETED_DEVICE_FAMILY = \"${app.ios?.tablet ? \"1,2\" : \"1\"}\";`\n );\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n if (app.version !== void 0) {\n rendered = rendered.replace(\n /MARKETING_VERSION = [^;]+;/g,\n `MARKETING_VERSION = \"${app.version}\";`\n );\n }\n if (app.ios?.buildNumber !== void 0) {\n rendered = rendered.replace(\n /CURRENT_PROJECT_VERSION = [^;]+;/g,\n `CURRENT_PROJECT_VERSION = ${app.ios.buildNumber};`\n );\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/Info.plist\")) {\n if (app.ios?.usesNonExemptEncryption !== void 0) {\n rendered = rendered.replace(\n \"\t<key>LSRequiresIPhoneOS</key>\",\n `\t<key>ITSAppUsesNonExemptEncryption</key>\n\t<${app.ios.usesNonExemptEncryption ? \"true\" : \"false\"}/>\n\t<key>LSRequiresIPhoneOS</key>`\n );\n }\n if (app.imagePicker?.camera !== void 0) {\n const anchor = \"\t<key>LSRequiresIPhoneOS</key>\";\n if (!rendered.includes(anchor)) {\n throw new Error(\n \"[vxrn] cannot stamp NSCameraUsageDescription: expected LSRequiresIPhoneOS in Info.plist\"\n );\n }\n rendered = rendered.replace(\n anchor,\n `\t<key>NSCameraUsageDescription</key>\n\t<string>${escapeXml(app.imagePicker.camera)}</string>\n${anchor}`\n );\n }\n rendered = patchIosInfoPlistSceneManifest(rendered);\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/AppDelegate.swift\")) {\n rendered = patchIosAppDelegateSceneLifecycle(rendered, appName);\n }\n if (platform === \"ios\" && app.ios?.deploymentTarget) {\n rendered = rendered.replace(\n \"platform :ios, min_ios_version_supported\",\n `platform :ios, '${app.ios.deploymentTarget}'`\n ).replace(\n /IPHONEOS_DEPLOYMENT_TARGET = \\d+(?:\\.\\d+)?;/g,\n `IPHONEOS_DEPLOYMENT_TARGET = ${app.ios.deploymentTarget};`\n );\n if (relativePath === \"Podfile\") {\n rendered = rendered.replace(\n \" )\\n end\\nend\",\n ` )\n\n installer.pods_project.targets.each do |target|\n target.build_configurations.each do |config|\n config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '${app.ios.deploymentTarget}'\n end\n end\n end\nend`\n );\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n rendered = patchIosBundlePhase(rendered);\n rendered = patchIosPbxprojSceneDelegate(rendered, appName);\n }\n if (platform === \"ios\" && relativePath === \"Podfile\") {\n if (app.ios?.ccache) rendered = `ENV['USE_CCACHE'] ||= '1'\n${rendered}`;\n if (app.ios?.useFrameworks) {\n rendered = rendered.replace(\n /^(platform :ios, .+)$/m,\n `$1\nuse_frameworks! :linkage => :${app.ios.useFrameworks}`\n );\n }\n if (app.ios?.screensGamma) {\n rendered = nativeProjectPatches.injectReactNativeScreensGammaIntoPodfile(rendered);\n }\n rendered = nativeProjectPatches.injectFmtCxx17FixIntoPodfile(rendered);\n rendered = nativeProjectPatches.injectHermesMinificationPatchIntoPodfile(rendered);\n if (!rendered.includes(\"[vxrn/one] fmt c++17 fix\") || !rendered.includes(\"[vxrn/one] minify iOS Hermes Release bundle input\")) {\n throw new Error(\"[vxrn] failed to apply required iOS Podfile patches\");\n }\n }\n if (platform === \"android\" && relativePath === \"app/build.gradle\") {\n rendered = nativeProjectPatches.replaceAppBuildGradleReactBlock(rendered);\n rendered = nativeProjectPatches.addDepsPatchToAppBuildGradle(rendered);\n if (!rendered.includes('entryFile = file(\"../../package.json\")') || !rendered.includes(\"[vxrn/one] ensure patches are applied\")) {\n throw new Error(\"[vxrn] failed to apply required Android Gradle patches\");\n }\n if (app.version !== void 0) {\n rendered = rendered.replace(\n /versionName \"[^\"]*\"/g,\n `versionName \"${app.version}\"`\n );\n }\n if (app.android?.versionCode !== void 0) {\n rendered = rendered.replace(\n /versionCode \\d+/g,\n `versionCode ${app.android.versionCode}`\n );\n }\n }\n if (platform === \"android\" && relativePath === \"settings.gradle\") {\n const hardcodedGradlePlugin = /includeBuild\\((['\"])\\.\\.\\/node_modules\\/@react-native\\/gradle-plugin\\1\\)/g;\n if ([...rendered.matchAll(hardcodedGradlePlugin)].length !== 2) {\n throw new Error(\"[vxrn] expected two React Native Gradle plugin paths\");\n }\n rendered = rendered.replace(\n hardcodedGradlePlugin,\n `includeBuild(new File([\"node\", \"--print\", \"require('module').createRequire(require.resolve('react-native/package.json')).resolve('@react-native/gradle-plugin/package.json')\"].execute(null, settingsDir).text.trim()).parentFile.canonicalPath)`\n );\n }\n if (platform === \"android\" && app.android?.minSdk !== void 0) {\n rendered = rendered.replace(\n /minSdkVersion = \\d+/g,\n `minSdkVersion = ${app.android.minSdk}`\n );\n }\n }\n return { destRelativePath, content: rendered };\n}\nconst generateForPlatform = async (root, platform, app, outDir = path.resolve(root, platform)) => {\n validatePrebuildApp(app, platform);\n const dest = outDir;\n const require2 = module.createRequire(root + \"/\");\n const importPath = require2.resolve(\"@react-native-community/cli/build/tools/walk.js\", {\n paths: [root]\n });\n const src = path.join(\n path.dirname(\n require2.resolve(\"@react-native-community/template/template/package.json\", {\n paths: [root]\n })\n ),\n platform\n );\n const walkModule = await import(pathToFileURL(importPath).href);\n const walkFn = walkModule?.default?.default ?? walkModule?.default ?? walkModule;\n if (typeof walkFn !== \"function\") {\n throw new Error(\"[vxrn] could not resolve the community template walker\");\n }\n const files = [...walkFn(src)].sort();\n FSExtra.removeSync(dest);\n for (const absoluteSrc of files) {\n const relativeFilePath = path.relative(src, absoluteSrc);\n const stat = FSExtra.lstatSync(absoluteSrc);\n if (stat.isDirectory()) continue;\n const extension = path.extname(absoluteSrc);\n const raw = [\".png\", \".jar\", \".keystore\"].includes(extension) ? null : FSExtra.readFileSync(absoluteSrc, \"utf8\");\n const { destRelativePath, content } = renderPrebuildFile({\n relativePath: relativeFilePath,\n content: raw,\n platform,\n app\n });\n const destPath = path.resolve(dest, destRelativePath);\n FSExtra.mkdirSync(path.dirname(destPath), { recursive: true });\n console.info(\"copying\", '\"' + absoluteSrc + '\"', \"to\", '\"' + destPath + '\"');\n if (content === null) {\n FSExtra.copyFileSync(absoluteSrc, destPath);\n continue;\n }\n FSExtra.writeFileSync(destPath, content, {\n encoding: \"utf8\",\n mode: stat.mode\n });\n }\n await generateAppIcons({ root, dest, platform, app });\n await generateSplashScreen({ root, dest, platform, app });\n generateSceneDelegate({ dest, platform, app });\n};\nfunction applyAndroidDependencyPatches(args) {\n const { root, app, inventory } = args;\n if (!app.android || !inventory.some(\n (dependency) => dependency.name === \"react-native-screens\" && dependency.platforms.includes(\"android\")\n )) {\n return;\n }\n const activityPath = path.join(\n root,\n \"android\",\n \"app\",\n \"src\",\n \"main\",\n \"java\",\n ...app.android.applicationId.split(\".\"),\n \"MainActivity.kt\"\n );\n const rendered = nativeProjectPatches.addReactNativeScreensFix(\n FSExtra.readFileSync(activityPath, \"utf8\")\n );\n if (!rendered.includes(\"RNScreensFragmentFactory\")) {\n throw new Error(\"[vxrn] failed to apply the react-native-screens activity patch\");\n }\n FSExtra.writeFileSync(activityPath, rendered);\n}\nasync function getNativeDependencyInventory(root) {\n const require2 = module.createRequire(root + \"/\");\n const cliConfigPath = require2.resolve(\"@react-native-community/cli-config\", {\n paths: [root]\n });\n const cliConfig = await import(pathToFileURL(cliConfigPath).href);\n const config = await cliConfig.loadConfigAsync({ projectRoot: root });\n const inventory = [];\n for (const name of Object.keys(config.dependencies).sort()) {\n const dependency = config.dependencies[name];\n const depRoot = dependency.root;\n let version = \"unknown\";\n try {\n version = JSON.parse(FSExtra.readFileSync(path.join(depRoot, \"package.json\"), \"utf8\")).version ?? \"unknown\";\n } catch {\n }\n const platforms = Object.entries(dependency.platforms).filter(([, platformConfig]) => platformConfig !== null).map(([platform]) => platform).sort();\n if (platforms.length > 0) inventory.push({ name, version, platforms });\n }\n return inventory;\n}\nfunction installNativeDependencies(args) {\n const { root, platform } = args;\n if (!platform || platform === \"ios\") {\n execFileSync(\"pod\", [\"install\", `--project-directory=${path.join(root, \"ios\")}`], {\n stdio: \"inherit\"\n });\n }\n}\nconst transformPath = (filePath) => {\n return filePath.replace(\"_BUCK\", \"BUCK\").replace(\"_gitignore\", \".gitignore\").replace(\"_gitattributes\", \".gitattributes\").replace(\"_babelrc\", \".babelrc\").replace(\"_editorconfig\", \".editorconfig\").replace(\"_eslintrc.js\", \".eslintrc.js\").replace(\"_flowconfig\", \".flowconfig\").replace(\"_buckconfig\", \".buckconfig\").replace(\"_prettierrc.js\", \".prettierrc.js\").replace(\"_bundle\", \".bundle\").replace(\"_ruby-version\", \".ruby-version\").replace(\"_node-version\", \".node-version\").replace(\"_watchmanconfig\", \".watchmanconfig\").replace(\"_xcode.env\", \".xcode.env\");\n};\nexport {\n applyAndroidDependencyPatches,\n generateForPlatform,\n getNativeDependencyInventory,\n installNativeDependencies,\n renderPrebuildFile,\n renderSceneDelegateSwift,\n validatePrebuildApp\n};\n//# sourceMappingURL=prebuildWithoutExpo.js.map\n"],"mappings":";;;;;;;;;AAOA,MAAM,uBAAuB,OAAO,cAAc,YAAY,GAAG,CAAC,CAChE,kCACF;AACA,MAAM,sBAAsB;AAC5B,MAAM,oBAAoB;CACxB,MAAM;CACN,MAAM;CACN,OAAO;CACP,QAAQ;CACR,SAAS;AACX;AACA,MAAM,yBAAyB;AAC/B,MAAM,8BAA8B;AACpC,MAAM,uBAAuB;AAC7B,SAAS,oBAAoB,SAAS;CACpC,IAAI,sBAAsB;CAC1B,MAAM,iBAAiB,QAAQ,QAC7B,wCACC,YAAY,qBAAqB;EAChC,IAAI;EACJ,IAAI;GACF,SAAS,KAAK,MAAM,gBAAgB;EACtC,QAAQ;GACN,OAAO;EACT;EACA,IAAI,OAAO,WAAW,YAAY,CAAC,OAAO,SAAS,uBAAuB,GAAG;GAC3E,OAAO;EACT;EACA,IAAI,UAAU;EACd,UAAU,qBAAqB,4CAA4C,OAAO;EACl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AM,EAAE,MAAM,aAAa;CAC3B,IAAI,CAAC,YAAY,aAAa,OAAO;EACnC,aAAa,OAAO,CAAC,WAAW,uBAAuB,KAAK,KAAK,MAAM,KAAK,GAAG,GAAG,EAChF,OAAO,UACT,CAAC;CACH;AACF;AACA,MAAM,iBAAiB,aAAa;CAClC,OAAO,SAAS,QAAQ,SAAS,MAAM,CAAC,CAAC,QAAQ,cAAc,YAAY,CAAC,CAAC,QAAQ,kBAAkB,gBAAgB,CAAC,CAAC,QAAQ,YAAY,UAAU,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,gBAAgB,cAAc,CAAC,CAAC,QAAQ,eAAe,aAAa,CAAC,CAAC,QAAQ,eAAe,aAAa,CAAC,CAAC,QAAQ,kBAAkB,gBAAgB,CAAC,CAAC,QAAQ,WAAW,SAAS,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,mBAAmB,iBAAiB,CAAC,CAAC,QAAQ,cAAc,YAAY;AACviB"}
|
|
1
|
+
{"version":3,"file":"prebuildWithoutExpo.js","names":[],"sources":["exports/prebuildWithoutExpo.js"],"sourcesContent":["import { execFileSync } from \"node:child_process\";\nimport module from \"node:module\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { validateNativeApp } from \"@vxrn/utils/nativeAppManifest\";\nimport FSExtra from \"fs-extra\";\nimport sharp from \"sharp\";\nconst nativeProjectPatches = module.createRequire(import.meta.url)(\n \"../../native-project-patches.cjs\"\n);\nconst validatePrebuildApp = validateNativeApp;\nconst ANDROID_DENSITIES = {\n mdpi: 1,\n hdpi: 1.5,\n xhdpi: 2,\n xxhdpi: 3,\n xxxhdpi: 4\n};\nconst IOS_BUNDLE_PLACEHOLDER = \"org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)\";\nconst ANDROID_PACKAGE_PLACEHOLDER = \"com.helloworld\";\nconst ANDROID_PACKAGE_PATH = \"com/helloworld\";\nfunction patchIosBundlePhase(project) {\n let patchedBundlePhases = 0;\n const patchedProject = project.replace(\n /shellScript = (\"(?:\\\\.|[^\"\\\\])*\");/g,\n (assignment, serializedScript) => {\n let script;\n try {\n script = JSON.parse(serializedScript);\n } catch {\n return assignment;\n }\n if (typeof script !== \"string\" || !script.includes(\"react-native-xcode.sh\")) {\n return assignment;\n }\n let patched = script;\n patched = nativeProjectPatches.addSetCliPathToBundleReactNativeShellScript(patched);\n patched = nativeProjectPatches.addPodHermescToBundleReactNativeShellScript(patched);\n patched = nativeProjectPatches.addDepsPatchToBundleReactNativeShellScript(patched);\n if (!patched.includes(\"[vxrn/one] React Native now defaults CLI_PATH\") || !patched.includes(\"[vxrn/one] use the hermes-engine pod\") || !patched.includes(\"[vxrn/one] ensure patches are applied\")) {\n throw new Error(\"[vxrn] failed to apply required iOS bundle phase patches\");\n }\n patchedBundlePhases++;\n return `shellScript = ${JSON.stringify(patched)};`;\n }\n );\n if (patchedBundlePhases !== 1) {\n throw new Error(\n `[vxrn] expected one iOS React Native bundle phase, found ${patchedBundlePhases}`\n );\n }\n return patchedProject;\n}\nfunction escapeXml(value) {\n return value.replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\");\n}\nconst SCENE_DELEGATE_FILE_REF_ID = \"1A2B3C4D5E6F7A8B9C0D1E2F\";\nconst SCENE_DELEGATE_BUILD_FILE_ID = \"2B3C4D5E6F7A8B9C0D1E2F1A\";\nfunction renderSceneDelegateSwift(appName) {\n return `import UIKit\nimport React\nimport React_RCTAppDelegate\nimport ReactAppDependencyProvider\n\n// owns the window and the react native root. with a scene manifest the\n// system creates this delegate per foreground scene instead of asking the\n// app delegate for a window, which is what the xcode 27 sdk requires.\nclass SceneDelegate: UIResponder, UIWindowSceneDelegate {\n var window: UIWindow?\n\n var reactNativeDelegate: ReactNativeDelegate?\n var reactNativeFactory: RCTReactNativeFactory?\n\n func scene(\n _ scene: UIScene,\n willConnectTo session: UISceneSession,\n options connectionOptions: UIScene.ConnectionOptions\n ) {\n guard let windowScene = scene as? UIWindowScene else { return }\n let delegate = ReactNativeDelegate()\n let factory = RCTReactNativeFactory(delegate: delegate)\n delegate.dependencyProvider = RCTAppDependencyProvider()\n\n reactNativeDelegate = delegate\n reactNativeFactory = factory\n\n let window = UIWindow(windowScene: windowScene)\n self.window = window\n\n // cold-start links arrive in connectionOptions under scenes, never in\n // the app launchOptions, so they are translated into the launchOptions\n // shape RCTLinkingManager.getInitialURL reads.\n var launchOptions: [UIApplication.LaunchOptionsKey: Any] = [:]\n if let url = connectionOptions.urlContexts.first?.url {\n launchOptions[.url] = url\n }\n if let activity = connectionOptions.userActivities.first(where: {\n $0.activityType == NSUserActivityTypeBrowsingWeb\n }) {\n launchOptions[.userActivityDictionary] = [\n \"UIApplicationLaunchOptionsUserActivityTypeKey\": activity.activityType,\n \"UIApplicationLaunchOptionsUserActivityKey\": activity,\n ]\n }\n\n factory.startReactNative(\n withModuleName: \"${appName}\",\n in: window,\n launchOptions: launchOptions\n )\n }\n\n func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {\n guard let url = URLContexts.first?.url else { return }\n RCTLinkingManager.application(UIApplication.shared, open: url, options: [:])\n }\n\n func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {\n RCTLinkingManager.application(\n UIApplication.shared,\n continue: userActivity,\n restorationHandler: { _ in }\n )\n }\n}\n`;\n}\nfunction insertAfterLine(haystack, anchor, insertion) {\n const anchorIndex = haystack.indexOf(anchor);\n if (anchorIndex === -1) return haystack;\n const lineEnd = haystack.indexOf(\"\\n\", anchorIndex);\n if (lineEnd === -1) return `${haystack}\n${insertion}`;\n return `${haystack.slice(0, lineEnd + 1)}${insertion}\n${haystack.slice(lineEnd + 1)}`;\n}\nfunction patchIosInfoPlistSceneManifest(rendered) {\n const anchor = \"\t<key>LSRequiresIPhoneOS</key>\";\n if (!rendered.includes(anchor)) {\n throw new Error(\"[vxrn] prebuild template Info.plist lost its LSRequiresIPhoneOS anchor\");\n }\n return rendered.replace(\n anchor,\n `\t<key>UIApplicationSceneManifest</key>\n\t<dict>\n\t\t<key>UIApplicationSupportsMultipleScenes</key>\n\t\t<false/>\n\t\t<key>UISceneConfigurations</key>\n\t\t<dict>\n\t\t\t<key>UIWindowSceneSessionRoleApplication</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>UISceneConfigurationName</key>\n\t\t\t\t\t<string>Default Configuration</string>\n\t\t\t\t\t<key>UISceneDelegateClassName</key>\n\t\t\t\t\t<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t</dict>\n\t</dict>\n${anchor}`\n );\n}\nfunction patchIosAppDelegateSceneLifecycle(rendered, appName) {\n const anchor = `@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n var window: UIWindow?\n\n var reactNativeDelegate: ReactNativeDelegate?\n var reactNativeFactory: RCTReactNativeFactory?\n\n func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n ) -> Bool {\n let delegate = ReactNativeDelegate()\n let factory = RCTReactNativeFactory(delegate: delegate)\n delegate.dependencyProvider = RCTAppDependencyProvider()\n\n reactNativeDelegate = delegate\n reactNativeFactory = factory\n\n window = UIWindow(frame: UIScreen.main.bounds)\n\n factory.startReactNative(\n withModuleName: \"${appName}\",\n in: window,\n launchOptions: launchOptions\n )\n\n return true\n }\n}`;\n if (!rendered.includes(anchor)) {\n throw new Error(\n \"[vxrn] prebuild template AppDelegate.swift changed shape: cannot move the RN root to the scene delegate\"\n );\n }\n return rendered.replace(\n anchor,\n `@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n ) -> Bool {\n true\n }\n}`\n );\n}\nfunction patchIosPbxprojSceneDelegate(rendered, appName) {\n const edits = [\n [\n \"/* AppDelegate.swift in Sources */ = {isa = PBXBuildFile;\",\n `\t\t${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */; };`\n ],\n [\n \"/* AppDelegate.swift */ = {isa = PBXFileReference;\",\n `\t\t${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SceneDelegate.swift; path = ${appName}/SceneDelegate.swift; sourceTree = \"<group>\"; };`\n ],\n [\n \"/* AppDelegate.swift */,\",\n `\t\t\t\t${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */,`\n ],\n [\n \"/* AppDelegate.swift in Sources */,\",\n `\t\t\t\t${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */,`\n ]\n ];\n let patched = rendered;\n for (const [anchor, insertion] of edits) {\n const next = insertAfterLine(patched, anchor, insertion);\n if (next === patched) {\n throw new Error(\n `[vxrn] prebuild template project.pbxproj lost its AppDelegate.swift anchor (${anchor})`\n );\n }\n patched = next;\n }\n return patched;\n}\nfunction generateSceneDelegate(args) {\n const { dest, platform, app } = args;\n if (platform !== \"ios\") return;\n FSExtra.writeFileSync(\n path.join(dest, app.name, \"SceneDelegate.swift\"),\n renderSceneDelegateSwift(app.name)\n );\n}\nasync function generateAppIcons(args) {\n const { root, dest, platform, app } = args;\n if (!app.icon) return;\n const source = path.resolve(root, app.icon.source);\n if (!FSExtra.existsSync(source)) {\n throw new Error(`[vxrn] native.app.icon source does not exist: ${source}`);\n }\n const metadata = await sharp(source).metadata();\n if (metadata.width === void 0 || metadata.height === void 0 || metadata.width !== metadata.height || metadata.width < 1024) {\n throw new Error(\n \"[vxrn] native.app.icon source must be a square image at least 1024px wide\"\n );\n }\n if (platform === \"ios\") {\n const iconDir = path.join(dest, app.name, \"Images.xcassets\", \"AppIcon.appiconset\");\n const contentsPath = path.join(iconDir, \"Contents.json\");\n const contents = JSON.parse(FSExtra.readFileSync(contentsPath, \"utf8\"));\n for (const image of contents.images) {\n const points = Number.parseFloat(image.size.split(\"x\")[0]);\n const scale = Number.parseInt(image.scale, 10);\n const pixels = points * scale;\n const filename = image.idiom === \"ios-marketing\" ? \"icon-1024.png\" : `icon-${points}@${image.scale}.png`;\n image.filename = filename;\n await sharp(source).rotate().resize(pixels, pixels, { fit: \"cover\" }).flatten({ background: app.icon.backgroundColor }).png().toFile(path.join(iconDir, filename));\n }\n FSExtra.writeFileSync(contentsPath, `${JSON.stringify(contents, null, 2)}\n`);\n return;\n }\n for (const [density, multiplier] of Object.entries(ANDROID_DENSITIES)) {\n const pixels = 48 * multiplier;\n const iconDir = path.join(dest, \"app\", \"src\", \"main\", \"res\", `mipmap-${density}`);\n for (const filename of [\"ic_launcher.png\", \"ic_launcher_round.png\"]) {\n await sharp(source).rotate().resize(pixels, pixels, { fit: \"cover\" }).flatten({ background: app.icon.backgroundColor }).png().toFile(path.join(iconDir, filename));\n }\n }\n}\nasync function generateSplashScreen(args) {\n const { root, dest, platform, app } = args;\n if (!app.splash) return;\n const source = path.resolve(root, app.splash.source);\n if (!FSExtra.existsSync(source)) {\n throw new Error(`[vxrn] native.app.splash source does not exist: ${source}`);\n }\n const { data: artwork, info: metadata } = await sharp(source).rotate().trim({ background: app.splash.backgroundColor }).png().toBuffer({ resolveWithObject: true });\n if (!metadata.width || !metadata.height) {\n throw new Error(\"[vxrn] native.app.splash source must be an image\");\n }\n const artworkWidth = app.splash.width ?? 200;\n const artworkHeight = Number(\n (artworkWidth * (metadata.height / metadata.width)).toFixed(3)\n );\n if (platform === \"ios\") {\n const appDir = path.join(dest, app.name);\n const splashDir = path.join(appDir, \"Images.xcassets\", \"Splash.imageset\");\n FSExtra.mkdirSync(splashDir, { recursive: true });\n await sharp(artwork).toFile(path.join(splashDir, \"splash.png\"));\n FSExtra.writeFileSync(\n path.join(splashDir, \"Contents.json\"),\n `${JSON.stringify(\n {\n images: [{ filename: \"splash.png\", idiom: \"universal\", scale: \"1x\" }],\n info: { author: \"xcode\", version: 1 }\n },\n null,\n 2\n )}\n`\n );\n const red = Number.parseInt(app.splash.backgroundColor.slice(1, 3), 16) / 255;\n const green = Number.parseInt(app.splash.backgroundColor.slice(3, 5), 16) / 255;\n const blue = Number.parseInt(app.splash.backgroundColor.slice(5, 7), 16) / 255;\n FSExtra.writeFileSync(\n path.join(appDir, \"LaunchScreen.storyboard\"),\n `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"15702\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"launch-controller\">\n <device id=\"retina6_12\" orientation=\"portrait\" appearance=\"light\"/>\n <dependencies>\n <deployment identifier=\"iOS\"/>\n <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"15704\"/>\n <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n </dependencies>\n <scenes>\n <scene sceneID=\"launch-scene\">\n <objects>\n <viewController id=\"launch-controller\" sceneMemberID=\"viewController\">\n <view key=\"view\" contentMode=\"scaleToFill\" id=\"launch-view\">\n <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"390\" height=\"844\"/>\n <subviews>\n <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFit\" image=\"Splash\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"splash-image\"/>\n </subviews>\n <color key=\"backgroundColor\" red=\"${red}\" green=\"${green}\" blue=\"${blue}\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n <constraints>\n <constraint firstItem=\"splash-image\" firstAttribute=\"centerX\" secondItem=\"launch-view\" secondAttribute=\"centerX\" id=\"splash-center-x\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"centerY\" secondItem=\"launch-view\" secondAttribute=\"centerY\" id=\"splash-center-y\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"width\" constant=\"${artworkWidth}\" id=\"splash-width\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"height\" constant=\"${artworkHeight}\" id=\"splash-height\"/>\n </constraints>\n </view>\n </viewController>\n <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"launch-responder\" sceneMemberID=\"firstResponder\"/>\n </objects>\n </scene>\n </scenes>\n <resources>\n <image name=\"Splash\" width=\"${metadata.width}\" height=\"${metadata.height}\"/>\n </resources>\n</document>\n`\n );\n return;\n }\n const mainRes = path.join(dest, \"app\", \"src\", \"main\", \"res\");\n const drawable = path.join(mainRes, \"drawable\");\n for (const [density, multiplier] of Object.entries(ANDROID_DENSITIES)) {\n const canvasSize = 288 * multiplier;\n const imageSize = Math.round(artworkWidth * multiplier);\n const contained = await sharp(artwork).resize(imageSize, imageSize, {\n fit: \"contain\",\n background: { r: 0, g: 0, b: 0, alpha: 0 }\n }).png().toBuffer();\n const drawableDensity = path.join(mainRes, `drawable-${density}`);\n FSExtra.mkdirSync(drawableDensity, { recursive: true });\n await sharp({\n create: {\n width: canvasSize,\n height: canvasSize,\n channels: 4,\n background: { r: 0, g: 0, b: 0, alpha: 0 }\n }\n }).composite([\n {\n input: contained,\n left: Math.round((canvasSize - imageSize) / 2),\n top: Math.round((canvasSize - imageSize) / 2)\n }\n ]).png().toFile(path.join(drawableDensity, \"splash.png\"));\n }\n FSExtra.writeFileSync(\n path.join(drawable, \"launch_screen.xml\"),\n `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item android:drawable=\"@color/splash_background\" />\n <item>\n <bitmap android:gravity=\"center\" android:src=\"@drawable/splash\" />\n </item>\n</layer-list>\n`\n );\n FSExtra.writeFileSync(\n path.join(mainRes, \"values\", \"colors.xml\"),\n `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"splash_background\">${app.splash.backgroundColor}</color>\n</resources>\n`\n );\n const stylesPath = path.join(mainRes, \"values\", \"styles.xml\");\n const styles = FSExtra.readFileSync(stylesPath, \"utf8\").replace(\n \" <!-- Customize your theme here. -->\",\n ' <item name=\"android:windowBackground\">@drawable/launch_screen</item>'\n );\n FSExtra.writeFileSync(stylesPath, styles);\n const stylesV31 = path.join(mainRes, \"values-v31\");\n FSExtra.mkdirSync(stylesV31, { recursive: true });\n FSExtra.writeFileSync(\n path.join(stylesV31, \"styles.xml\"),\n `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <style name=\"AppTheme\">\n <item name=\"android:windowSplashScreenBackground\">@color/splash_background</item>\n <item name=\"android:windowSplashScreenAnimatedIcon\">@drawable/splash</item>\n </style>\n</resources>\n`\n );\n}\nfunction renderPrebuildFile(args) {\n const { relativePath, content, platform, app } = args;\n const appName = app.name;\n const schemes = app.scheme === void 0 ? [] : Array.isArray(app.scheme) ? app.scheme : [app.scheme];\n let destRelativePath = transformPath(relativePath);\n if (platform === \"android\" && app.android) {\n const packagePath = app.android.applicationId.split(\".\").join(\"/\");\n destRelativePath = destRelativePath.split(ANDROID_PACKAGE_PATH).join(packagePath);\n }\n destRelativePath = destRelativePath.replace(/HelloWorld/g, appName).replace(/helloworld/g, appName.toLowerCase());\n let rendered = content;\n if (rendered !== null) {\n const replacements = [];\n if (platform === \"ios\" && app.ios) {\n replacements.push([IOS_BUNDLE_PLACEHOLDER, app.ios.bundleId]);\n }\n if (platform === \"android\" && app.android) {\n replacements.push([ANDROID_PACKAGE_PLACEHOLDER, app.android.applicationId]);\n }\n replacements.push(\n [\"Hello App Display Name\", app.displayName || appName],\n [\"HelloWorld\", appName],\n [\"helloworld\", appName.toLowerCase()]\n );\n for (const [find, value] of replacements) {\n rendered = rendered.split(find).join(value);\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/Info.plist\")) {\n const stamps = [];\n if (schemes.length) {\n stamps.push(`\t<key>CFBundleURLTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t\t<key>CFBundleURLSchemes</key>\n\t\t\t<array>\n${schemes.map((scheme) => `\t\t\t\t<string>${scheme}</string>`).join(\"\\n\")}\n\t\t\t</array>\n\t\t</dict>\n\t</array>`);\n }\n if (app.ios?.usesNonExemptEncryption !== void 0) {\n stamps.push(\n `\t<key>ITSAppUsesNonExemptEncryption</key>\n\t<${app.ios.usesNonExemptEncryption ? \"true\" : \"false\"}/>`\n );\n }\n if (app.ios?.fileSharing) {\n stamps.push(\n `\t<key>UIFileSharingEnabled</key>\n\t<true/>\n\t<key>LSSupportsOpeningDocumentsInPlace</key>\n\t<true/>`\n );\n }\n if (stamps.length) {\n const anchor = \"\t<key>LSRequiresIPhoneOS</key>\";\n if (!rendered.includes(anchor))\n throw new Error(\n `[vxrn] prebuild template ${relativePath} lost its LSRequiresIPhoneOS anchor`\n );\n rendered = rendered.replace(anchor, `${stamps.join(\"\\n\")}\n${anchor}`);\n }\n }\n if (platform === \"android\" && relativePath === \"app/src/main/AndroidManifest.xml\" && app.imagePicker?.camera !== void 0) {\n const anchor = '<uses-permission android:name=\"android.permission.INTERNET\" />';\n if (!rendered.includes(anchor)) {\n throw new Error(\n \"[vxrn] cannot stamp the camera permission: expected the INTERNET permission in app/src/main/AndroidManifest.xml\"\n );\n }\n rendered = rendered.replace(\n anchor,\n `${anchor}\n <uses-permission android:name=\"android.permission.CAMERA\" />`\n );\n }\n if (platform === \"android\" && relativePath === \"app/src/main/AndroidManifest.xml\" && schemes.length) {\n rendered = rendered.replace(\n \" </activity>\",\n ` <intent-filter>\n <action android:name=\"android.intent.action.VIEW\" />\n <category android:name=\"android.intent.category.DEFAULT\" />\n <category android:name=\"android.intent.category.BROWSABLE\" />\n${schemes.map((scheme) => ` <data android:scheme=\"${scheme}\" />`).join(\"\\n\")}\n </intent-filter>\n </activity>`\n );\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n rendered = rendered.replace(\n /TARGETED_DEVICE_FAMILY = \"1,2\";/g,\n `TARGETED_DEVICE_FAMILY = \"${app.ios?.tablet ? \"1,2\" : \"1\"}\";`\n );\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n if (app.version !== void 0) {\n rendered = rendered.replace(\n /MARKETING_VERSION = [^;]+;/g,\n `MARKETING_VERSION = \"${app.version}\";`\n );\n }\n if (app.ios?.buildNumber !== void 0) {\n rendered = rendered.replace(\n /CURRENT_PROJECT_VERSION = [^;]+;/g,\n `CURRENT_PROJECT_VERSION = ${app.ios.buildNumber};`\n );\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/Info.plist\")) {\n if (app.imagePicker?.camera !== void 0) {\n const anchor = \"\t<key>LSRequiresIPhoneOS</key>\";\n if (!rendered.includes(anchor)) {\n throw new Error(\n \"[vxrn] cannot stamp NSCameraUsageDescription: expected LSRequiresIPhoneOS in Info.plist\"\n );\n }\n rendered = rendered.replace(\n anchor,\n `\t<key>NSCameraUsageDescription</key>\n\t<string>${escapeXml(app.imagePicker.camera)}</string>\n${anchor}`\n );\n }\n rendered = patchIosInfoPlistSceneManifest(rendered);\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/AppDelegate.swift\")) {\n rendered = patchIosAppDelegateSceneLifecycle(rendered, appName);\n }\n if (platform === \"ios\" && app.ios?.deploymentTarget) {\n rendered = rendered.replace(\n \"platform :ios, min_ios_version_supported\",\n `platform :ios, '${app.ios.deploymentTarget}'`\n ).replace(\n /IPHONEOS_DEPLOYMENT_TARGET = \\d+(?:\\.\\d+)?;/g,\n `IPHONEOS_DEPLOYMENT_TARGET = ${app.ios.deploymentTarget};`\n );\n if (relativePath === \"Podfile\") {\n rendered = rendered.replace(\n \" )\\n end\\nend\",\n ` )\n\n installer.pods_project.targets.each do |target|\n target.build_configurations.each do |config|\n config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '${app.ios.deploymentTarget}'\n end\n end\n end\nend`\n );\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n rendered = patchIosBundlePhase(rendered);\n rendered = patchIosPbxprojSceneDelegate(rendered, appName);\n }\n if (platform === \"ios\" && relativePath === \"Podfile\") {\n if (app.ios?.ccache) rendered = `ENV['USE_CCACHE'] ||= '1'\n${rendered}`;\n if (app.ios?.useFrameworks) {\n rendered = rendered.replace(\n /^(platform :ios, .+)$/m,\n `$1\nuse_frameworks! :linkage => :${app.ios.useFrameworks}`\n );\n }\n if (app.ios?.screensGamma) {\n rendered = nativeProjectPatches.injectReactNativeScreensGammaIntoPodfile(rendered);\n }\n rendered = nativeProjectPatches.injectFmtCxx17FixIntoPodfile(rendered);\n rendered = nativeProjectPatches.injectHermesMinificationPatchIntoPodfile(rendered);\n if (!rendered.includes(\"[vxrn/one] fmt c++17 fix\") || !rendered.includes(\"[vxrn/one] minify iOS Hermes Release bundle input\")) {\n throw new Error(\"[vxrn] failed to apply required iOS Podfile patches\");\n }\n }\n if (platform === \"android\" && relativePath === \"app/build.gradle\") {\n rendered = nativeProjectPatches.replaceAppBuildGradleReactBlock(rendered);\n rendered = nativeProjectPatches.addDepsPatchToAppBuildGradle(rendered);\n if (!rendered.includes('entryFile = file(\"../../package.json\")') || !rendered.includes(\"[vxrn/one] ensure patches are applied\")) {\n throw new Error(\"[vxrn] failed to apply required Android Gradle patches\");\n }\n if (app.version !== void 0) {\n rendered = rendered.replace(\n /versionName \"[^\"]*\"/g,\n `versionName \"${app.version}\"`\n );\n }\n if (app.android?.versionCode !== void 0) {\n rendered = rendered.replace(\n /versionCode \\d+/g,\n `versionCode ${app.android.versionCode}`\n );\n }\n }\n if (platform === \"android\" && relativePath === \"settings.gradle\") {\n const hardcodedGradlePlugin = /includeBuild\\((['\"])\\.\\.\\/node_modules\\/@react-native\\/gradle-plugin\\1\\)/g;\n if ([...rendered.matchAll(hardcodedGradlePlugin)].length !== 2) {\n throw new Error(\"[vxrn] expected two React Native Gradle plugin paths\");\n }\n rendered = rendered.replace(\n hardcodedGradlePlugin,\n `includeBuild(new File([\"node\", \"--print\", \"require('module').createRequire(require.resolve('react-native/package.json')).resolve('@react-native/gradle-plugin/package.json')\"].execute(null, settingsDir).text.trim()).parentFile.canonicalPath)`\n );\n }\n if (platform === \"android\" && app.android?.minSdk !== void 0) {\n rendered = rendered.replace(\n /minSdkVersion = \\d+/g,\n `minSdkVersion = ${app.android.minSdk}`\n );\n }\n }\n return { destRelativePath, content: rendered };\n}\nconst generateForPlatform = async (root, platform, app, outDir = path.resolve(root, platform)) => {\n validatePrebuildApp(app, platform);\n const dest = outDir;\n const require2 = module.createRequire(root + \"/\");\n const importPath = require2.resolve(\"@react-native-community/cli/build/tools/walk.js\", {\n paths: [root]\n });\n const src = path.join(\n path.dirname(\n require2.resolve(\"@react-native-community/template/template/package.json\", {\n paths: [root]\n })\n ),\n platform\n );\n const walkModule = await import(pathToFileURL(importPath).href);\n const walkFn = walkModule?.default?.default ?? walkModule?.default ?? walkModule;\n if (typeof walkFn !== \"function\") {\n throw new Error(\"[vxrn] could not resolve the community template walker\");\n }\n const files = [...walkFn(src)].sort();\n FSExtra.removeSync(dest);\n for (const absoluteSrc of files) {\n const relativeFilePath = path.relative(src, absoluteSrc);\n const stat = FSExtra.lstatSync(absoluteSrc);\n if (stat.isDirectory()) continue;\n const extension = path.extname(absoluteSrc);\n const raw = [\".png\", \".jar\", \".keystore\"].includes(extension) ? null : FSExtra.readFileSync(absoluteSrc, \"utf8\");\n const { destRelativePath, content } = renderPrebuildFile({\n relativePath: relativeFilePath,\n content: raw,\n platform,\n app\n });\n const destPath = path.resolve(dest, destRelativePath);\n FSExtra.mkdirSync(path.dirname(destPath), { recursive: true });\n console.info(\"copying\", '\"' + absoluteSrc + '\"', \"to\", '\"' + destPath + '\"');\n if (content === null) {\n FSExtra.copyFileSync(absoluteSrc, destPath);\n continue;\n }\n FSExtra.writeFileSync(destPath, content, {\n encoding: \"utf8\",\n mode: stat.mode\n });\n }\n await generateAppIcons({ root, dest, platform, app });\n await generateSplashScreen({ root, dest, platform, app });\n generateSceneDelegate({ dest, platform, app });\n};\nfunction applyAndroidDependencyPatches(args) {\n const { root, app, inventory } = args;\n if (!app.android || !inventory.some(\n (dependency) => dependency.name === \"react-native-screens\" && dependency.platforms.includes(\"android\")\n )) {\n return;\n }\n const activityPath = path.join(\n root,\n \"android\",\n \"app\",\n \"src\",\n \"main\",\n \"java\",\n ...app.android.applicationId.split(\".\"),\n \"MainActivity.kt\"\n );\n const rendered = nativeProjectPatches.addReactNativeScreensFix(\n FSExtra.readFileSync(activityPath, \"utf8\")\n );\n if (!rendered.includes(\"RNScreensFragmentFactory\")) {\n throw new Error(\"[vxrn] failed to apply the react-native-screens activity patch\");\n }\n FSExtra.writeFileSync(activityPath, rendered);\n}\nasync function getNativeDependencyInventory(root) {\n const require2 = module.createRequire(root + \"/\");\n const cliConfigPath = require2.resolve(\"@react-native-community/cli-config\", {\n paths: [root]\n });\n const cliConfig = await import(pathToFileURL(cliConfigPath).href);\n const config = await cliConfig.loadConfigAsync({ projectRoot: root });\n const inventory = [];\n for (const name of Object.keys(config.dependencies).sort()) {\n const dependency = config.dependencies[name];\n const depRoot = dependency.root;\n let version = \"unknown\";\n try {\n version = JSON.parse(FSExtra.readFileSync(path.join(depRoot, \"package.json\"), \"utf8\")).version ?? \"unknown\";\n } catch {\n }\n const platforms = Object.entries(dependency.platforms).filter(([, platformConfig]) => platformConfig !== null).map(([platform]) => platform).sort();\n if (platforms.length > 0) inventory.push({ name, version, platforms });\n }\n return inventory;\n}\nfunction installNativeDependencies(args) {\n const { root, platform } = args;\n if (!platform || platform === \"ios\") {\n execFileSync(\"pod\", [\"install\", `--project-directory=${path.join(root, \"ios\")}`], {\n stdio: \"inherit\"\n });\n }\n}\nconst transformPath = (filePath) => {\n return filePath.replace(\"_BUCK\", \"BUCK\").replace(\"_gitignore\", \".gitignore\").replace(\"_gitattributes\", \".gitattributes\").replace(\"_babelrc\", \".babelrc\").replace(\"_editorconfig\", \".editorconfig\").replace(\"_eslintrc.js\", \".eslintrc.js\").replace(\"_flowconfig\", \".flowconfig\").replace(\"_buckconfig\", \".buckconfig\").replace(\"_prettierrc.js\", \".prettierrc.js\").replace(\"_bundle\", \".bundle\").replace(\"_ruby-version\", \".ruby-version\").replace(\"_node-version\", \".node-version\").replace(\"_watchmanconfig\", \".watchmanconfig\").replace(\"_xcode.env\", \".xcode.env\");\n};\nexport {\n applyAndroidDependencyPatches,\n generateForPlatform,\n getNativeDependencyInventory,\n installNativeDependencies,\n renderPrebuildFile,\n renderSceneDelegateSwift,\n validatePrebuildApp\n};\n//# sourceMappingURL=prebuildWithoutExpo.js.map\n"],"mappings":";;;;;;;;;AAOA,MAAM,uBAAuB,OAAO,cAAc,YAAY,GAAG,CAAC,CAChE,kCACF;AACA,MAAM,sBAAsB;AAC5B,MAAM,oBAAoB;CACxB,MAAM;CACN,MAAM;CACN,OAAO;CACP,QAAQ;CACR,SAAS;AACX;AACA,MAAM,yBAAyB;AAC/B,MAAM,8BAA8B;AACpC,MAAM,uBAAuB;AAC7B,SAAS,oBAAoB,SAAS;CACpC,IAAI,sBAAsB;CAC1B,MAAM,iBAAiB,QAAQ,QAC7B,wCACC,YAAY,qBAAqB;EAChC,IAAI;EACJ,IAAI;GACF,SAAS,KAAK,MAAM,gBAAgB;EACtC,QAAQ;GACN,OAAO;EACT;EACA,IAAI,OAAO,WAAW,YAAY,CAAC,OAAO,SAAS,uBAAuB,GAAG;GAC3E,OAAO;EACT;EACA,IAAI,UAAU;EACd,UAAU,qBAAqB,4CAA4C,OAAO;EAClF,UAAU,qBAAqB,4CAA4C,OAAO;EAClF,UAAU,qBAAqB,2CAA2C,OAAO;EACjF,IAAI,CAAC,QAAQ,SAA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I,CAAC,CAAC,KAAK,CAAC,cAAc,QAAQ,CAAC,CAAC,KAAK;EAClJ,IAAI,UAAU,SAAS,GAAG,UAAU,KAAK;GAAE;GAAM;GAAS;EAAU,CAAC;CACvE;CACA,OAAO;AACT;AACA,SAAS,0BAA0B,MAAM;CACvC,MAAM,EAAE,MAAM,aAAa;CAC3B,IAAI,CAAC,YAAY,aAAa,OAAO;EACnC,aAAa,OAAO,CAAC,WAAW,uBAAuB,KAAK,KAAK,MAAM,KAAK,GAAG,GAAG,EAChF,OAAO,UACT,CAAC;CACH;AACF;AACA,MAAM,iBAAiB,aAAa;CAClC,OAAO,SAAS,QAAQ,SAAS,MAAM,CAAC,CAAC,QAAQ,cAAc,YAAY,CAAC,CAAC,QAAQ,kBAAkB,gBAAgB,CAAC,CAAC,QAAQ,YAAY,UAAU,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,gBAAgB,cAAc,CAAC,CAAC,QAAQ,eAAe,aAAa,CAAC,CAAC,QAAQ,eAAe,aAAa,CAAC,CAAC,QAAQ,kBAAkB,gBAAgB,CAAC,CAAC,QAAQ,WAAW,SAAS,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,mBAAmB,iBAAiB,CAAC,CAAC,QAAQ,cAAc,YAAY;AACviB"}
|
|
@@ -492,8 +492,11 @@ function renderPrebuildFile(args) {
|
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
-
if (platform === "ios" && relativePath.endsWith("/Info.plist")
|
|
496
|
-
|
|
495
|
+
if (platform === "ios" && relativePath.endsWith("/Info.plist")) {
|
|
496
|
+
var _app_ios1, _app_ios2;
|
|
497
|
+
var stamps = [];
|
|
498
|
+
if (schemes.length) {
|
|
499
|
+
stamps.push(` <key>CFBundleURLTypes</key>
|
|
497
500
|
<array>
|
|
498
501
|
<dict>
|
|
499
502
|
<key>CFBundleTypeRole</key>
|
|
@@ -501,19 +504,35 @@ function renderPrebuildFile(args) {
|
|
|
501
504
|
<key>CFBundleURLSchemes</key>
|
|
502
505
|
<array>
|
|
503
506
|
${schemes.map(function(scheme) {
|
|
504
|
-
|
|
505
|
-
|
|
507
|
+
return ` <string>${scheme}</string>`;
|
|
508
|
+
}).join("\n")}
|
|
506
509
|
</array>
|
|
507
510
|
</dict>
|
|
508
|
-
</array
|
|
509
|
-
|
|
511
|
+
</array>`);
|
|
512
|
+
}
|
|
513
|
+
if (((_app_ios1 = app.ios) === null || _app_ios1 === void 0 ? void 0 : _app_ios1.usesNonExemptEncryption) !== void 0) {
|
|
514
|
+
stamps.push(` <key>ITSAppUsesNonExemptEncryption</key>
|
|
515
|
+
<${app.ios.usesNonExemptEncryption ? "true" : "false"}/>`);
|
|
516
|
+
}
|
|
517
|
+
if ((_app_ios2 = app.ios) === null || _app_ios2 === void 0 ? void 0 : _app_ios2.fileSharing) {
|
|
518
|
+
stamps.push(` <key>UIFileSharingEnabled</key>
|
|
519
|
+
<true/>
|
|
520
|
+
<key>LSSupportsOpeningDocumentsInPlace</key>
|
|
521
|
+
<true/>`);
|
|
522
|
+
}
|
|
523
|
+
if (stamps.length) {
|
|
524
|
+
var anchor = " <key>LSRequiresIPhoneOS</key>";
|
|
525
|
+
if (!rendered.includes(anchor)) throw new Error(`[vxrn] prebuild template ${relativePath} lost its LSRequiresIPhoneOS anchor`);
|
|
526
|
+
rendered = rendered.replace(anchor, `${stamps.join("\n")}
|
|
527
|
+
${anchor}`);
|
|
528
|
+
}
|
|
510
529
|
}
|
|
511
530
|
if (platform === "android" && relativePath === "app/src/main/AndroidManifest.xml" && ((_app_imagePicker = app.imagePicker) === null || _app_imagePicker === void 0 ? void 0 : _app_imagePicker.camera) !== void 0) {
|
|
512
|
-
var
|
|
513
|
-
if (!rendered.includes(
|
|
531
|
+
var anchor1 = "<uses-permission android:name=\"android.permission.INTERNET\" />";
|
|
532
|
+
if (!rendered.includes(anchor1)) {
|
|
514
533
|
throw new Error("[vxrn] cannot stamp the camera permission: expected the INTERNET permission in app/src/main/AndroidManifest.xml");
|
|
515
534
|
}
|
|
516
|
-
rendered = rendered.replace(
|
|
535
|
+
rendered = rendered.replace(anchor1, `${anchor1}
|
|
517
536
|
<uses-permission android:name="android.permission.CAMERA" />`);
|
|
518
537
|
}
|
|
519
538
|
if (platform === "android" && relativePath === "app/src/main/AndroidManifest.xml" && schemes.length) {
|
|
@@ -528,33 +547,28 @@ ${schemes.map(function(scheme) {
|
|
|
528
547
|
</activity>`);
|
|
529
548
|
}
|
|
530
549
|
if (platform === "ios" && relativePath.endsWith(".xcodeproj/project.pbxproj")) {
|
|
531
|
-
var
|
|
532
|
-
rendered = rendered.replace(/TARGETED_DEVICE_FAMILY = "1,2";/g, `TARGETED_DEVICE_FAMILY = "${((
|
|
550
|
+
var _app_ios3;
|
|
551
|
+
rendered = rendered.replace(/TARGETED_DEVICE_FAMILY = "1,2";/g, `TARGETED_DEVICE_FAMILY = "${((_app_ios3 = app.ios) === null || _app_ios3 === void 0 ? void 0 : _app_ios3.tablet) ? "1,2" : "1"}";`);
|
|
533
552
|
}
|
|
534
553
|
if (platform === "ios" && relativePath.endsWith(".xcodeproj/project.pbxproj")) {
|
|
535
|
-
var
|
|
554
|
+
var _app_ios4;
|
|
536
555
|
if (app.version !== void 0) {
|
|
537
556
|
rendered = rendered.replace(/MARKETING_VERSION = [^;]+;/g, `MARKETING_VERSION = "${app.version}";`);
|
|
538
557
|
}
|
|
539
|
-
if (((
|
|
558
|
+
if (((_app_ios4 = app.ios) === null || _app_ios4 === void 0 ? void 0 : _app_ios4.buildNumber) !== void 0) {
|
|
540
559
|
rendered = rendered.replace(/CURRENT_PROJECT_VERSION = [^;]+;/g, `CURRENT_PROJECT_VERSION = ${app.ios.buildNumber};`);
|
|
541
560
|
}
|
|
542
561
|
}
|
|
543
562
|
if (platform === "ios" && relativePath.endsWith("/Info.plist")) {
|
|
544
|
-
var
|
|
545
|
-
if (((_app_ios3 = app.ios) === null || _app_ios3 === void 0 ? void 0 : _app_ios3.usesNonExemptEncryption) !== void 0) {
|
|
546
|
-
rendered = rendered.replace(" <key>LSRequiresIPhoneOS</key>", ` <key>ITSAppUsesNonExemptEncryption</key>
|
|
547
|
-
<${app.ios.usesNonExemptEncryption ? "true" : "false"}/>
|
|
548
|
-
<key>LSRequiresIPhoneOS</key>`);
|
|
549
|
-
}
|
|
563
|
+
var _app_imagePicker1;
|
|
550
564
|
if (((_app_imagePicker1 = app.imagePicker) === null || _app_imagePicker1 === void 0 ? void 0 : _app_imagePicker1.camera) !== void 0) {
|
|
551
|
-
var
|
|
552
|
-
if (!rendered.includes(
|
|
565
|
+
var anchor2 = " <key>LSRequiresIPhoneOS</key>";
|
|
566
|
+
if (!rendered.includes(anchor2)) {
|
|
553
567
|
throw new Error("[vxrn] cannot stamp NSCameraUsageDescription: expected LSRequiresIPhoneOS in Info.plist");
|
|
554
568
|
}
|
|
555
|
-
rendered = rendered.replace(
|
|
569
|
+
rendered = rendered.replace(anchor2, ` <key>NSCameraUsageDescription</key>
|
|
556
570
|
<string>${escapeXml(app.imagePicker.camera)}</string>
|
|
557
|
-
${
|
|
571
|
+
${anchor2}`);
|
|
558
572
|
}
|
|
559
573
|
rendered = patchIosInfoPlistSceneManifest(rendered);
|
|
560
574
|
}
|
|
@@ -580,14 +594,14 @@ end`);
|
|
|
580
594
|
rendered = patchIosPbxprojSceneDelegate(rendered, appName);
|
|
581
595
|
}
|
|
582
596
|
if (platform === "ios" && relativePath === "Podfile") {
|
|
583
|
-
var
|
|
584
|
-
if ((
|
|
597
|
+
var _app_ios5, _app_ios6, _app_ios7;
|
|
598
|
+
if ((_app_ios5 = app.ios) === null || _app_ios5 === void 0 ? void 0 : _app_ios5.ccache) rendered = `ENV['USE_CCACHE'] ||= '1'
|
|
585
599
|
${rendered}`;
|
|
586
|
-
if ((
|
|
600
|
+
if ((_app_ios6 = app.ios) === null || _app_ios6 === void 0 ? void 0 : _app_ios6.useFrameworks) {
|
|
587
601
|
rendered = rendered.replace(/^(platform :ios, .+)$/m, `$1
|
|
588
602
|
use_frameworks! :linkage => :${app.ios.useFrameworks}`);
|
|
589
603
|
}
|
|
590
|
-
if ((
|
|
604
|
+
if ((_app_ios7 = app.ios) === null || _app_ios7 === void 0 ? void 0 : _app_ios7.screensGamma) {
|
|
591
605
|
rendered = nativeProjectPatches.injectReactNativeScreensGammaIntoPodfile(rendered);
|
|
592
606
|
}
|
|
593
607
|
rendered = nativeProjectPatches.injectFmtCxx17FixIntoPodfile(rendered);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prebuildWithoutExpo.native.js","names":[],"sources":["exports/prebuildWithoutExpo.native.js"],"sourcesContent":["import { execFileSync } from \"child_process\";\nimport module from \"module\";\nimport path from \"path\";\nimport { pathToFileURL } from \"url\";\nimport { validateNativeApp } from \"@vxrn/utils/nativeAppManifest\";\nimport FSExtra from \"fs-extra\";\nimport sharp from \"sharp\";\nvar nativeProjectPatches = module.createRequire(import.meta.url)(\"../../native-project-patches.cjs\");\nvar validatePrebuildApp = validateNativeApp;\nvar ANDROID_DENSITIES = {\n mdpi: 1,\n hdpi: 1.5,\n xhdpi: 2,\n xxhdpi: 3,\n xxxhdpi: 4\n};\nvar IOS_BUNDLE_PLACEHOLDER = \"org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)\";\nvar ANDROID_PACKAGE_PLACEHOLDER = \"com.helloworld\";\nvar ANDROID_PACKAGE_PATH = \"com/helloworld\";\nfunction patchIosBundlePhase(project) {\n var patchedBundlePhases = 0;\n var patchedProject = project.replace(/shellScript = (\"(?:\\\\.|[^\"\\\\])*\");/g, function(assignment, serializedScript) {\n var script;\n try {\n script = JSON.parse(serializedScript);\n } catch (unused) {\n return assignment;\n }\n if (typeof script !== \"string\" || !script.includes(\"react-native-xcode.sh\")) {\n return assignment;\n }\n var patched = script;\n patched = nativeProjectPatches.addSetCliPathToBundleReactNativeShellScript(patched);\n patched = nativeProjectPatches.addPodHermescToBundleReactNativeShellScript(patched);\n patched = nativeProjectPatches.addDepsPatchToBundleReactNativeShellScript(patched);\n if (!patched.includes(\"[vxrn/one] React Native now defaults CLI_PATH\") || !patched.includes(\"[vxrn/one] use the hermes-engine pod\") || !patched.includes(\"[vxrn/one] ensure patches are applied\")) {\n throw new Error(\"[vxrn] failed to apply required iOS bundle phase patches\");\n }\n patchedBundlePhases++;\n return `shellScript = ${JSON.stringify(patched)};`;\n });\n if (patchedBundlePhases !== 1) {\n throw new Error(`[vxrn] expected one iOS React Native bundle phase, found ${patchedBundlePhases}`);\n }\n return patchedProject;\n}\nfunction escapeXml(value) {\n return value.replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\");\n}\nvar SCENE_DELEGATE_FILE_REF_ID = \"1A2B3C4D5E6F7A8B9C0D1E2F\";\nvar SCENE_DELEGATE_BUILD_FILE_ID = \"2B3C4D5E6F7A8B9C0D1E2F1A\";\nfunction renderSceneDelegateSwift(appName) {\n return `import UIKit\nimport React\nimport React_RCTAppDelegate\nimport ReactAppDependencyProvider\n\n// owns the window and the react native root. with a scene manifest the\n// system creates this delegate per foreground scene instead of asking the\n// app delegate for a window, which is what the xcode 27 sdk requires.\nclass SceneDelegate: UIResponder, UIWindowSceneDelegate {\n var window: UIWindow?\n\n var reactNativeDelegate: ReactNativeDelegate?\n var reactNativeFactory: RCTReactNativeFactory?\n\n func scene(\n _ scene: UIScene,\n willConnectTo session: UISceneSession,\n options connectionOptions: UIScene.ConnectionOptions\n ) {\n guard let windowScene = scene as? UIWindowScene else { return }\n let delegate = ReactNativeDelegate()\n let factory = RCTReactNativeFactory(delegate: delegate)\n delegate.dependencyProvider = RCTAppDependencyProvider()\n\n reactNativeDelegate = delegate\n reactNativeFactory = factory\n\n let window = UIWindow(windowScene: windowScene)\n self.window = window\n\n // cold-start links arrive in connectionOptions under scenes, never in\n // the app launchOptions, so they are translated into the launchOptions\n // shape RCTLinkingManager.getInitialURL reads.\n var launchOptions: [UIApplication.LaunchOptionsKey: Any] = [:]\n if let url = connectionOptions.urlContexts.first?.url {\n launchOptions[.url] = url\n }\n if let activity = connectionOptions.userActivities.first(where: {\n $0.activityType == NSUserActivityTypeBrowsingWeb\n }) {\n launchOptions[.userActivityDictionary] = [\n \"UIApplicationLaunchOptionsUserActivityTypeKey\": activity.activityType,\n \"UIApplicationLaunchOptionsUserActivityKey\": activity,\n ]\n }\n\n factory.startReactNative(\n withModuleName: \"${appName}\",\n in: window,\n launchOptions: launchOptions\n )\n }\n\n func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {\n guard let url = URLContexts.first?.url else { return }\n RCTLinkingManager.application(UIApplication.shared, open: url, options: [:])\n }\n\n func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {\n RCTLinkingManager.application(\n UIApplication.shared,\n continue: userActivity,\n restorationHandler: { _ in }\n )\n }\n}\n`;\n}\nfunction insertAfterLine(haystack, anchor, insertion) {\n var anchorIndex = haystack.indexOf(anchor);\n if (anchorIndex === -1) return haystack;\n var lineEnd = haystack.indexOf(\"\\n\", anchorIndex);\n if (lineEnd === -1) return `${haystack}\n${insertion}`;\n return `${haystack.slice(0, lineEnd + 1)}${insertion}\n${haystack.slice(lineEnd + 1)}`;\n}\nfunction patchIosInfoPlistSceneManifest(rendered) {\n var anchor = \"\t<key>LSRequiresIPhoneOS</key>\";\n if (!rendered.includes(anchor)) {\n throw new Error(\"[vxrn] prebuild template Info.plist lost its LSRequiresIPhoneOS anchor\");\n }\n return rendered.replace(anchor, `\t<key>UIApplicationSceneManifest</key>\n\t<dict>\n\t\t<key>UIApplicationSupportsMultipleScenes</key>\n\t\t<false/>\n\t\t<key>UISceneConfigurations</key>\n\t\t<dict>\n\t\t\t<key>UIWindowSceneSessionRoleApplication</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>UISceneConfigurationName</key>\n\t\t\t\t\t<string>Default Configuration</string>\n\t\t\t\t\t<key>UISceneDelegateClassName</key>\n\t\t\t\t\t<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t</dict>\n\t</dict>\n${anchor}`);\n}\nfunction patchIosAppDelegateSceneLifecycle(rendered, appName) {\n var anchor = `@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n var window: UIWindow?\n\n var reactNativeDelegate: ReactNativeDelegate?\n var reactNativeFactory: RCTReactNativeFactory?\n\n func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n ) -> Bool {\n let delegate = ReactNativeDelegate()\n let factory = RCTReactNativeFactory(delegate: delegate)\n delegate.dependencyProvider = RCTAppDependencyProvider()\n\n reactNativeDelegate = delegate\n reactNativeFactory = factory\n\n window = UIWindow(frame: UIScreen.main.bounds)\n\n factory.startReactNative(\n withModuleName: \"${appName}\",\n in: window,\n launchOptions: launchOptions\n )\n\n return true\n }\n}`;\n if (!rendered.includes(anchor)) {\n throw new Error(\"[vxrn] prebuild template AppDelegate.swift changed shape: cannot move the RN root to the scene delegate\");\n }\n return rendered.replace(anchor, `@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n ) -> Bool {\n true\n }\n}`);\n}\nfunction patchIosPbxprojSceneDelegate(rendered, appName) {\n var edits = [\n [\n \"/* AppDelegate.swift in Sources */ = {isa = PBXBuildFile;\",\n `\t\t${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */; };`\n ],\n [\n \"/* AppDelegate.swift */ = {isa = PBXFileReference;\",\n `\t\t${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SceneDelegate.swift; path = ${appName}/SceneDelegate.swift; sourceTree = \"<group>\"; };`\n ],\n [\n \"/* AppDelegate.swift */,\",\n `\t\t\t\t${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */,`\n ],\n [\n \"/* AppDelegate.swift in Sources */,\",\n `\t\t\t\t${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */,`\n ]\n ];\n var patched = rendered;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = edits[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [anchor, insertion] = _step.value;\n var next = insertAfterLine(patched, anchor, insertion);\n if (next === patched) {\n throw new Error(`[vxrn] prebuild template project.pbxproj lost its AppDelegate.swift anchor (${anchor})`);\n }\n patched = next;\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return patched;\n}\nfunction generateSceneDelegate(args) {\n var { dest, platform, app } = args;\n if (platform !== \"ios\") return;\n FSExtra.writeFileSync(path.join(dest, app.name, \"SceneDelegate.swift\"), renderSceneDelegateSwift(app.name));\n}\nasync function generateAppIcons(args) {\n var { root, dest, platform, app } = args;\n if (!app.icon) return;\n var source = path.resolve(root, app.icon.source);\n if (!FSExtra.existsSync(source)) {\n throw new Error(`[vxrn] native.app.icon source does not exist: ${source}`);\n }\n var metadata = await sharp(source).metadata();\n if (metadata.width === void 0 || metadata.height === void 0 || metadata.width !== metadata.height || metadata.width < 1024) {\n throw new Error(\"[vxrn] native.app.icon source must be a square image at least 1024px wide\");\n }\n if (platform === \"ios\") {\n var iconDir = path.join(dest, app.name, \"Images.xcassets\", \"AppIcon.appiconset\");\n var contentsPath = path.join(iconDir, \"Contents.json\");\n var contents = JSON.parse(FSExtra.readFileSync(contentsPath, \"utf8\"));\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = contents.images[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var image = _step.value;\n var points = Number.parseFloat(image.size.split(\"x\")[0]);\n var scale = Number.parseInt(image.scale, 10);\n var pixels = points * scale;\n var filename = image.idiom === \"ios-marketing\" ? \"icon-1024.png\" : `icon-${points}@${image.scale}.png`;\n image.filename = filename;\n await sharp(source).rotate().resize(pixels, pixels, {\n fit: \"cover\"\n }).flatten({\n background: app.icon.backgroundColor\n }).png().toFile(path.join(iconDir, filename));\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n FSExtra.writeFileSync(contentsPath, `${JSON.stringify(contents, null, 2)}\n`);\n return;\n }\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = Object.entries(ANDROID_DENSITIES)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var [density, multiplier] = _step1.value;\n var pixels1 = 48 * multiplier;\n var iconDir1 = path.join(dest, \"app\", \"src\", \"main\", \"res\", `mipmap-${density}`);\n for (var _i = 0, _iter = [\n \"ic_launcher.png\",\n \"ic_launcher_round.png\"\n ]; _i < _iter.length; _i++) {\n var filename1 = _iter[_i];\n await sharp(source).rotate().resize(pixels1, pixels1, {\n fit: \"cover\"\n }).flatten({\n background: app.icon.backgroundColor\n }).png().toFile(path.join(iconDir1, filename1));\n }\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\n}\nasync function generateSplashScreen(args) {\n var _app_splash_width;\n var { root, dest, platform, app } = args;\n if (!app.splash) return;\n var source = path.resolve(root, app.splash.source);\n if (!FSExtra.existsSync(source)) {\n throw new Error(`[vxrn] native.app.splash source does not exist: ${source}`);\n }\n var { data: artwork, info: metadata } = await sharp(source).rotate().trim({\n background: app.splash.backgroundColor\n }).png().toBuffer({\n resolveWithObject: true\n });\n if (!metadata.width || !metadata.height) {\n throw new Error(\"[vxrn] native.app.splash source must be an image\");\n }\n var artworkWidth = (_app_splash_width = app.splash.width) !== null && _app_splash_width !== void 0 ? _app_splash_width : 200;\n var artworkHeight = Number((artworkWidth * (metadata.height / metadata.width)).toFixed(3));\n if (platform === \"ios\") {\n var appDir = path.join(dest, app.name);\n var splashDir = path.join(appDir, \"Images.xcassets\", \"Splash.imageset\");\n FSExtra.mkdirSync(splashDir, {\n recursive: true\n });\n await sharp(artwork).toFile(path.join(splashDir, \"splash.png\"));\n FSExtra.writeFileSync(path.join(splashDir, \"Contents.json\"), `${JSON.stringify({\n images: [\n {\n filename: \"splash.png\",\n idiom: \"universal\",\n scale: \"1x\"\n }\n ],\n info: {\n author: \"xcode\",\n version: 1\n }\n }, null, 2)}\n`);\n var red = Number.parseInt(app.splash.backgroundColor.slice(1, 3), 16) / 255;\n var green = Number.parseInt(app.splash.backgroundColor.slice(3, 5), 16) / 255;\n var blue = Number.parseInt(app.splash.backgroundColor.slice(5, 7), 16) / 255;\n FSExtra.writeFileSync(path.join(appDir, \"LaunchScreen.storyboard\"), `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"15702\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"launch-controller\">\n <device id=\"retina6_12\" orientation=\"portrait\" appearance=\"light\"/>\n <dependencies>\n <deployment identifier=\"iOS\"/>\n <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"15704\"/>\n <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n </dependencies>\n <scenes>\n <scene sceneID=\"launch-scene\">\n <objects>\n <viewController id=\"launch-controller\" sceneMemberID=\"viewController\">\n <view key=\"view\" contentMode=\"scaleToFill\" id=\"launch-view\">\n <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"390\" height=\"844\"/>\n <subviews>\n <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFit\" image=\"Splash\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"splash-image\"/>\n </subviews>\n <color key=\"backgroundColor\" red=\"${red}\" green=\"${green}\" blue=\"${blue}\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n <constraints>\n <constraint firstItem=\"splash-image\" firstAttribute=\"centerX\" secondItem=\"launch-view\" secondAttribute=\"centerX\" id=\"splash-center-x\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"centerY\" secondItem=\"launch-view\" secondAttribute=\"centerY\" id=\"splash-center-y\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"width\" constant=\"${artworkWidth}\" id=\"splash-width\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"height\" constant=\"${artworkHeight}\" id=\"splash-height\"/>\n </constraints>\n </view>\n </viewController>\n <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"launch-responder\" sceneMemberID=\"firstResponder\"/>\n </objects>\n </scene>\n </scenes>\n <resources>\n <image name=\"Splash\" width=\"${metadata.width}\" height=\"${metadata.height}\"/>\n </resources>\n</document>\n`);\n return;\n }\n var mainRes = path.join(dest, \"app\", \"src\", \"main\", \"res\");\n var drawable = path.join(mainRes, \"drawable\");\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.entries(ANDROID_DENSITIES)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [density, multiplier] = _step.value;\n var canvasSize = 288 * multiplier;\n var imageSize = Math.round(artworkWidth * multiplier);\n var contained = await sharp(artwork).resize(imageSize, imageSize, {\n fit: \"contain\",\n background: {\n r: 0,\n g: 0,\n b: 0,\n alpha: 0\n }\n }).png().toBuffer();\n var drawableDensity = path.join(mainRes, `drawable-${density}`);\n FSExtra.mkdirSync(drawableDensity, {\n recursive: true\n });\n await sharp({\n create: {\n width: canvasSize,\n height: canvasSize,\n channels: 4,\n background: {\n r: 0,\n g: 0,\n b: 0,\n alpha: 0\n }\n }\n }).composite([\n {\n input: contained,\n left: Math.round((canvasSize - imageSize) / 2),\n top: Math.round((canvasSize - imageSize) / 2)\n }\n ]).png().toFile(path.join(drawableDensity, \"splash.png\"));\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n FSExtra.writeFileSync(path.join(drawable, \"launch_screen.xml\"), `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item android:drawable=\"@color/splash_background\" />\n <item>\n <bitmap android:gravity=\"center\" android:src=\"@drawable/splash\" />\n </item>\n</layer-list>\n`);\n FSExtra.writeFileSync(path.join(mainRes, \"values\", \"colors.xml\"), `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"splash_background\">${app.splash.backgroundColor}</color>\n</resources>\n`);\n var stylesPath = path.join(mainRes, \"values\", \"styles.xml\");\n var styles = FSExtra.readFileSync(stylesPath, \"utf8\").replace(\" <!-- Customize your theme here. -->\", ' <item name=\"android:windowBackground\">@drawable/launch_screen</item>');\n FSExtra.writeFileSync(stylesPath, styles);\n var stylesV31 = path.join(mainRes, \"values-v31\");\n FSExtra.mkdirSync(stylesV31, {\n recursive: true\n });\n FSExtra.writeFileSync(path.join(stylesV31, \"styles.xml\"), `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <style name=\"AppTheme\">\n <item name=\"android:windowSplashScreenBackground\">@color/splash_background</item>\n <item name=\"android:windowSplashScreenAnimatedIcon\">@drawable/splash</item>\n </style>\n</resources>\n`);\n}\nfunction renderPrebuildFile(args) {\n var { relativePath, content, platform, app } = args;\n var appName = app.name;\n var schemes = app.scheme === void 0 ? [] : Array.isArray(app.scheme) ? app.scheme : [\n app.scheme\n ];\n var destRelativePath = transformPath(relativePath);\n if (platform === \"android\" && app.android) {\n var packagePath = app.android.applicationId.split(\".\").join(\"/\");\n destRelativePath = destRelativePath.split(ANDROID_PACKAGE_PATH).join(packagePath);\n }\n destRelativePath = destRelativePath.replace(/HelloWorld/g, appName).replace(/helloworld/g, appName.toLowerCase());\n var rendered = content;\n if (rendered !== null) {\n var _app_imagePicker, _app_ios, _app_android;\n var replacements = [];\n if (platform === \"ios\" && app.ios) {\n replacements.push([\n IOS_BUNDLE_PLACEHOLDER,\n app.ios.bundleId\n ]);\n }\n if (platform === \"android\" && app.android) {\n replacements.push([\n ANDROID_PACKAGE_PLACEHOLDER,\n app.android.applicationId\n ]);\n }\n replacements.push([\n \"Hello App Display Name\",\n app.displayName || appName\n ], [\n \"HelloWorld\",\n appName\n ], [\n \"helloworld\",\n appName.toLowerCase()\n ]);\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = replacements[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [find, value] = _step.value;\n rendered = rendered.split(find).join(value);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/Info.plist\") && schemes.length) {\n rendered = rendered.replace(\"\t<key>LSRequiresIPhoneOS</key>\", `\t<key>CFBundleURLTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t\t<key>CFBundleURLSchemes</key>\n\t\t\t<array>\n${schemes.map(function(scheme) {\n return `\t\t\t\t<string>${scheme}</string>`;\n }).join(\"\\n\")}\n\t\t\t</array>\n\t\t</dict>\n\t</array>\n\t<key>LSRequiresIPhoneOS</key>`);\n }\n if (platform === \"android\" && relativePath === \"app/src/main/AndroidManifest.xml\" && ((_app_imagePicker = app.imagePicker) === null || _app_imagePicker === void 0 ? void 0 : _app_imagePicker.camera) !== void 0) {\n var anchor = '<uses-permission android:name=\"android.permission.INTERNET\" />';\n if (!rendered.includes(anchor)) {\n throw new Error(\"[vxrn] cannot stamp the camera permission: expected the INTERNET permission in app/src/main/AndroidManifest.xml\");\n }\n rendered = rendered.replace(anchor, `${anchor}\n <uses-permission android:name=\"android.permission.CAMERA\" />`);\n }\n if (platform === \"android\" && relativePath === \"app/src/main/AndroidManifest.xml\" && schemes.length) {\n rendered = rendered.replace(\" </activity>\", ` <intent-filter>\n <action android:name=\"android.intent.action.VIEW\" />\n <category android:name=\"android.intent.category.DEFAULT\" />\n <category android:name=\"android.intent.category.BROWSABLE\" />\n${schemes.map(function(scheme) {\n return ` <data android:scheme=\"${scheme}\" />`;\n }).join(\"\\n\")}\n </intent-filter>\n </activity>`);\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n var _app_ios1;\n rendered = rendered.replace(/TARGETED_DEVICE_FAMILY = \"1,2\";/g, `TARGETED_DEVICE_FAMILY = \"${((_app_ios1 = app.ios) === null || _app_ios1 === void 0 ? void 0 : _app_ios1.tablet) ? \"1,2\" : \"1\"}\";`);\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n var _app_ios2;\n if (app.version !== void 0) {\n rendered = rendered.replace(/MARKETING_VERSION = [^;]+;/g, `MARKETING_VERSION = \"${app.version}\";`);\n }\n if (((_app_ios2 = app.ios) === null || _app_ios2 === void 0 ? void 0 : _app_ios2.buildNumber) !== void 0) {\n rendered = rendered.replace(/CURRENT_PROJECT_VERSION = [^;]+;/g, `CURRENT_PROJECT_VERSION = ${app.ios.buildNumber};`);\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/Info.plist\")) {\n var _app_ios3, _app_imagePicker1;\n if (((_app_ios3 = app.ios) === null || _app_ios3 === void 0 ? void 0 : _app_ios3.usesNonExemptEncryption) !== void 0) {\n rendered = rendered.replace(\"\t<key>LSRequiresIPhoneOS</key>\", `\t<key>ITSAppUsesNonExemptEncryption</key>\n\t<${app.ios.usesNonExemptEncryption ? \"true\" : \"false\"}/>\n\t<key>LSRequiresIPhoneOS</key>`);\n }\n if (((_app_imagePicker1 = app.imagePicker) === null || _app_imagePicker1 === void 0 ? void 0 : _app_imagePicker1.camera) !== void 0) {\n var anchor1 = \"\t<key>LSRequiresIPhoneOS</key>\";\n if (!rendered.includes(anchor1)) {\n throw new Error(\"[vxrn] cannot stamp NSCameraUsageDescription: expected LSRequiresIPhoneOS in Info.plist\");\n }\n rendered = rendered.replace(anchor1, `\t<key>NSCameraUsageDescription</key>\n\t<string>${escapeXml(app.imagePicker.camera)}</string>\n${anchor1}`);\n }\n rendered = patchIosInfoPlistSceneManifest(rendered);\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/AppDelegate.swift\")) {\n rendered = patchIosAppDelegateSceneLifecycle(rendered, appName);\n }\n if (platform === \"ios\" && ((_app_ios = app.ios) === null || _app_ios === void 0 ? void 0 : _app_ios.deploymentTarget)) {\n rendered = rendered.replace(\"platform :ios, min_ios_version_supported\", `platform :ios, '${app.ios.deploymentTarget}'`).replace(/IPHONEOS_DEPLOYMENT_TARGET = \\d+(?:\\.\\d+)?;/g, `IPHONEOS_DEPLOYMENT_TARGET = ${app.ios.deploymentTarget};`);\n if (relativePath === \"Podfile\") {\n rendered = rendered.replace(\" )\\n end\\nend\", ` )\n\n installer.pods_project.targets.each do |target|\n target.build_configurations.each do |config|\n config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '${app.ios.deploymentTarget}'\n end\n end\n end\nend`);\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n rendered = patchIosBundlePhase(rendered);\n rendered = patchIosPbxprojSceneDelegate(rendered, appName);\n }\n if (platform === \"ios\" && relativePath === \"Podfile\") {\n var _app_ios4, _app_ios5, _app_ios6;\n if ((_app_ios4 = app.ios) === null || _app_ios4 === void 0 ? void 0 : _app_ios4.ccache) rendered = `ENV['USE_CCACHE'] ||= '1'\n${rendered}`;\n if ((_app_ios5 = app.ios) === null || _app_ios5 === void 0 ? void 0 : _app_ios5.useFrameworks) {\n rendered = rendered.replace(/^(platform :ios, .+)$/m, `$1\nuse_frameworks! :linkage => :${app.ios.useFrameworks}`);\n }\n if ((_app_ios6 = app.ios) === null || _app_ios6 === void 0 ? void 0 : _app_ios6.screensGamma) {\n rendered = nativeProjectPatches.injectReactNativeScreensGammaIntoPodfile(rendered);\n }\n rendered = nativeProjectPatches.injectFmtCxx17FixIntoPodfile(rendered);\n rendered = nativeProjectPatches.injectHermesMinificationPatchIntoPodfile(rendered);\n if (!rendered.includes(\"[vxrn/one] fmt c++17 fix\") || !rendered.includes(\"[vxrn/one] minify iOS Hermes Release bundle input\")) {\n throw new Error(\"[vxrn] failed to apply required iOS Podfile patches\");\n }\n }\n if (platform === \"android\" && relativePath === \"app/build.gradle\") {\n var _app_android1;\n rendered = nativeProjectPatches.replaceAppBuildGradleReactBlock(rendered);\n rendered = nativeProjectPatches.addDepsPatchToAppBuildGradle(rendered);\n if (!rendered.includes('entryFile = file(\"../../package.json\")') || !rendered.includes(\"[vxrn/one] ensure patches are applied\")) {\n throw new Error(\"[vxrn] failed to apply required Android Gradle patches\");\n }\n if (app.version !== void 0) {\n rendered = rendered.replace(/versionName \"[^\"]*\"/g, `versionName \"${app.version}\"`);\n }\n if (((_app_android1 = app.android) === null || _app_android1 === void 0 ? void 0 : _app_android1.versionCode) !== void 0) {\n rendered = rendered.replace(/versionCode \\d+/g, `versionCode ${app.android.versionCode}`);\n }\n }\n if (platform === \"android\" && relativePath === \"settings.gradle\") {\n var hardcodedGradlePlugin = /includeBuild\\((['\"])\\.\\.\\/node_modules\\/@react-native\\/gradle-plugin\\1\\)/g;\n if ([\n ...rendered.matchAll(hardcodedGradlePlugin)\n ].length !== 2) {\n throw new Error(\"[vxrn] expected two React Native Gradle plugin paths\");\n }\n rendered = rendered.replace(hardcodedGradlePlugin, `includeBuild(new File([\"node\", \"--print\", \"require('module').createRequire(require.resolve('react-native/package.json')).resolve('@react-native/gradle-plugin/package.json')\"].execute(null, settingsDir).text.trim()).parentFile.canonicalPath)`);\n }\n if (platform === \"android\" && ((_app_android = app.android) === null || _app_android === void 0 ? void 0 : _app_android.minSdk) !== void 0) {\n rendered = rendered.replace(/minSdkVersion = \\d+/g, `minSdkVersion = ${app.android.minSdk}`);\n }\n }\n return {\n destRelativePath,\n content: rendered\n };\n}\nvar generateForPlatform = async function(root, platform, app) {\n var outDir = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : path.resolve(root, platform);\n var _ref, _ref1;\n var _walkModule_default;\n validatePrebuildApp(app, platform);\n var dest = outDir;\n var require2 = module.createRequire(root + \"/\");\n var importPath = require2.resolve(\"@react-native-community/cli/build/tools/walk.js\", {\n paths: [\n root\n ]\n });\n var src = path.join(path.dirname(require2.resolve(\"@react-native-community/template/template/package.json\", {\n paths: [\n root\n ]\n })), platform);\n var walkModule = await import(pathToFileURL(importPath).href);\n var walkFn = (_ref = (_ref1 = walkModule === null || walkModule === void 0 ? void 0 : (_walkModule_default = walkModule.default) === null || _walkModule_default === void 0 ? void 0 : _walkModule_default.default) !== null && _ref1 !== void 0 ? _ref1 : walkModule === null || walkModule === void 0 ? void 0 : walkModule.default) !== null && _ref !== void 0 ? _ref : walkModule;\n if (typeof walkFn !== \"function\") {\n throw new Error(\"[vxrn] could not resolve the community template walker\");\n }\n var files = [\n ...walkFn(src)\n ].sort();\n FSExtra.removeSync(dest);\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = files[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var absoluteSrc = _step.value;\n var relativeFilePath = path.relative(src, absoluteSrc);\n var stat = FSExtra.lstatSync(absoluteSrc);\n if (stat.isDirectory()) continue;\n var extension = path.extname(absoluteSrc);\n var raw = [\n \".png\",\n \".jar\",\n \".keystore\"\n ].includes(extension) ? null : FSExtra.readFileSync(absoluteSrc, \"utf8\");\n var { destRelativePath, content } = renderPrebuildFile({\n relativePath: relativeFilePath,\n content: raw,\n platform,\n app\n });\n var destPath = path.resolve(dest, destRelativePath);\n FSExtra.mkdirSync(path.dirname(destPath), {\n recursive: true\n });\n console.info(\"copying\", '\"' + absoluteSrc + '\"', \"to\", '\"' + destPath + '\"');\n if (content === null) {\n FSExtra.copyFileSync(absoluteSrc, destPath);\n continue;\n }\n FSExtra.writeFileSync(destPath, content, {\n encoding: \"utf8\",\n mode: stat.mode\n });\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n await generateAppIcons({\n root,\n dest,\n platform,\n app\n });\n await generateSplashScreen({\n root,\n dest,\n platform,\n app\n });\n generateSceneDelegate({\n dest,\n platform,\n app\n });\n};\nfunction applyAndroidDependencyPatches(args) {\n var { root, app, inventory } = args;\n if (!app.android || !inventory.some(function(dependency) {\n return dependency.name === \"react-native-screens\" && dependency.platforms.includes(\"android\");\n })) {\n return;\n }\n var activityPath = path.join(root, \"android\", \"app\", \"src\", \"main\", \"java\", ...app.android.applicationId.split(\".\"), \"MainActivity.kt\");\n var rendered = nativeProjectPatches.addReactNativeScreensFix(FSExtra.readFileSync(activityPath, \"utf8\"));\n if (!rendered.includes(\"RNScreensFragmentFactory\")) {\n throw new Error(\"[vxrn] failed to apply the react-native-screens activity patch\");\n }\n FSExtra.writeFileSync(activityPath, rendered);\n}\nasync function getNativeDependencyInventory(root) {\n var require2 = module.createRequire(root + \"/\");\n var cliConfigPath = require2.resolve(\"@react-native-community/cli-config\", {\n paths: [\n root\n ]\n });\n var cliConfig = await import(pathToFileURL(cliConfigPath).href);\n var config = await cliConfig.loadConfigAsync({\n projectRoot: root\n });\n var inventory = [];\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.keys(config.dependencies).sort()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var name = _step.value;\n var dependency = config.dependencies[name];\n var depRoot = dependency.root;\n var version = \"unknown\";\n try {\n var _JSON_parse_version;\n version = (_JSON_parse_version = JSON.parse(FSExtra.readFileSync(path.join(depRoot, \"package.json\"), \"utf8\")).version) !== null && _JSON_parse_version !== void 0 ? _JSON_parse_version : \"unknown\";\n } catch (unused) {\n }\n var platforms = Object.entries(dependency.platforms).filter(function(param) {\n var [, platformConfig] = param;\n return platformConfig !== null;\n }).map(function(param) {\n var [platform] = param;\n return platform;\n }).sort();\n if (platforms.length > 0) inventory.push({\n name,\n version,\n platforms\n });\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return inventory;\n}\nfunction installNativeDependencies(args) {\n var { root, platform } = args;\n if (!platform || platform === \"ios\") {\n execFileSync(\"pod\", [\n \"install\",\n `--project-directory=${path.join(root, \"ios\")}`\n ], {\n stdio: \"inherit\"\n });\n }\n}\nvar transformPath = function(filePath) {\n return filePath.replace(\"_BUCK\", \"BUCK\").replace(\"_gitignore\", \".gitignore\").replace(\"_gitattributes\", \".gitattributes\").replace(\"_babelrc\", \".babelrc\").replace(\"_editorconfig\", \".editorconfig\").replace(\"_eslintrc.js\", \".eslintrc.js\").replace(\"_flowconfig\", \".flowconfig\").replace(\"_buckconfig\", \".buckconfig\").replace(\"_prettierrc.js\", \".prettierrc.js\").replace(\"_bundle\", \".bundle\").replace(\"_ruby-version\", \".ruby-version\").replace(\"_node-version\", \".node-version\").replace(\"_watchmanconfig\", \".watchmanconfig\").replace(\"_xcode.env\", \".xcode.env\");\n};\nexport {\n applyAndroidDependencyPatches,\n generateForPlatform,\n getNativeDependencyInventory,\n installNativeDependencies,\n renderPrebuildFile,\n renderSceneDelegateSwift,\n validatePrebuildApp\n};\n//# sourceMappingURL=prebuildWithoutExpo.js.map\n"],"mappings":";;;;;;;;;AAOA,IAAI,uBAAuB,OAAO,cAAc,YAAY,GAAG,CAAC,CAAC,kCAAkC;AACnG,IAAI,sBAAsB;AAC1B,IAAI,oBAAoB;CACtB,MAAM;CACN,MAAM;CACN,OAAO;CACP,QAAQ;CACR,SAAS;AACX;AACA,IAAI,yBAAyB;AAC7B,IAAI,8BAA8B;AAClC,IAAI,uBAAuB;AAC3B,SAAS,oBAAoB,SAAS;CACpC,IAAI,sBAAsB;CAC1B,IAAI,iBAAiB,QAAQ,QAAQ,uCAAuC,SAAS,YAAY,kBAAkB;EACjH,IAAI;EACJ,IAAI;GACF,SAAS,KAAK,MAAM,gBAAgB;EACtC,SAAS,QAAQ;GACf,OAAO;EACT;EACA,IAAI,OAAO,WAAW,YAAY,CAAC,OAAO,SAAS,uBAAuB,GAAG;GAC3E,OAAO;EACT;EACA,IAAI,UAAU;EACd,UAAU,qBAAqB,4CAA4C,OAAO;EAClF,U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OAAO;GACT,CAAC,CAAC,CAAC,KAAK;GACR,IAAI,UAAU,SAAS,GAAG,UAAU,KAAK;IACvC;IACA;IACA;GACF,CAAC;EACH;CACF,SAAS,KAAK;EACZ,oBAAoB;EACpB,iBAAiB;CACnB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;IAC1D,UAAU,OAAO;GACnB;EACF,UAAU;GACR,IAAI,mBAAmB;IACrB,MAAM;GACR;EACF;CACF;CACA,OAAO;AACT;AACA,SAAS,0BAA0B,MAAM;CACvC,IAAI,EAAE,MAAM,aAAa;CACzB,IAAI,CAAC,YAAY,aAAa,OAAO;EACnC,aAAa,OAAO,CAClB,WACA,uBAAuB,KAAK,KAAK,MAAM,KAAK,GAC9C,GAAG,EACD,OAAO,UACT,CAAC;CACH;AACF;AACA,IAAI,gBAAgB,SAAS,UAAU;CACrC,OAAO,SAAS,QAAQ,SAAS,MAAM,CAAC,CAAC,QAAQ,cAAc,YAAY,CAAC,CAAC,QAAQ,kBAAkB,gBAAgB,CAAC,CAAC,QAAQ,YAAY,UAAU,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,gBAAgB,cAAc,CAAC,CAAC,QAAQ,eAAe,aAAa,CAAC,CAAC,QAAQ,eAAe,aAAa,CAAC,CAAC,QAAQ,kBAAkB,gBAAgB,CAAC,CAAC,QAAQ,WAAW,SAAS,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,iBAAiB,eAAe,CAAC,CAAC,QAAQ,mBAAmB,iBAAiB,CAAC,CAAC,QAAQ,cAAc,YAAY;AACviB"}
|
|
1
|
+
{"version":3,"file":"prebuildWithoutExpo.native.js","names":[],"sources":["exports/prebuildWithoutExpo.native.js"],"sourcesContent":["import { execFileSync } from \"child_process\";\nimport module from \"module\";\nimport path from \"path\";\nimport { pathToFileURL } from \"url\";\nimport { validateNativeApp } from \"@vxrn/utils/nativeAppManifest\";\nimport FSExtra from \"fs-extra\";\nimport sharp from \"sharp\";\nvar nativeProjectPatches = module.createRequire(import.meta.url)(\"../../native-project-patches.cjs\");\nvar validatePrebuildApp = validateNativeApp;\nvar ANDROID_DENSITIES = {\n mdpi: 1,\n hdpi: 1.5,\n xhdpi: 2,\n xxhdpi: 3,\n xxxhdpi: 4\n};\nvar IOS_BUNDLE_PLACEHOLDER = \"org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)\";\nvar ANDROID_PACKAGE_PLACEHOLDER = \"com.helloworld\";\nvar ANDROID_PACKAGE_PATH = \"com/helloworld\";\nfunction patchIosBundlePhase(project) {\n var patchedBundlePhases = 0;\n var patchedProject = project.replace(/shellScript = (\"(?:\\\\.|[^\"\\\\])*\");/g, function(assignment, serializedScript) {\n var script;\n try {\n script = JSON.parse(serializedScript);\n } catch (unused) {\n return assignment;\n }\n if (typeof script !== \"string\" || !script.includes(\"react-native-xcode.sh\")) {\n return assignment;\n }\n var patched = script;\n patched = nativeProjectPatches.addSetCliPathToBundleReactNativeShellScript(patched);\n patched = nativeProjectPatches.addPodHermescToBundleReactNativeShellScript(patched);\n patched = nativeProjectPatches.addDepsPatchToBundleReactNativeShellScript(patched);\n if (!patched.includes(\"[vxrn/one] React Native now defaults CLI_PATH\") || !patched.includes(\"[vxrn/one] use the hermes-engine pod\") || !patched.includes(\"[vxrn/one] ensure patches are applied\")) {\n throw new Error(\"[vxrn] failed to apply required iOS bundle phase patches\");\n }\n patchedBundlePhases++;\n return `shellScript = ${JSON.stringify(patched)};`;\n });\n if (patchedBundlePhases !== 1) {\n throw new Error(`[vxrn] expected one iOS React Native bundle phase, found ${patchedBundlePhases}`);\n }\n return patchedProject;\n}\nfunction escapeXml(value) {\n return value.replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\");\n}\nvar SCENE_DELEGATE_FILE_REF_ID = \"1A2B3C4D5E6F7A8B9C0D1E2F\";\nvar SCENE_DELEGATE_BUILD_FILE_ID = \"2B3C4D5E6F7A8B9C0D1E2F1A\";\nfunction renderSceneDelegateSwift(appName) {\n return `import UIKit\nimport React\nimport React_RCTAppDelegate\nimport ReactAppDependencyProvider\n\n// owns the window and the react native root. with a scene manifest the\n// system creates this delegate per foreground scene instead of asking the\n// app delegate for a window, which is what the xcode 27 sdk requires.\nclass SceneDelegate: UIResponder, UIWindowSceneDelegate {\n var window: UIWindow?\n\n var reactNativeDelegate: ReactNativeDelegate?\n var reactNativeFactory: RCTReactNativeFactory?\n\n func scene(\n _ scene: UIScene,\n willConnectTo session: UISceneSession,\n options connectionOptions: UIScene.ConnectionOptions\n ) {\n guard let windowScene = scene as? UIWindowScene else { return }\n let delegate = ReactNativeDelegate()\n let factory = RCTReactNativeFactory(delegate: delegate)\n delegate.dependencyProvider = RCTAppDependencyProvider()\n\n reactNativeDelegate = delegate\n reactNativeFactory = factory\n\n let window = UIWindow(windowScene: windowScene)\n self.window = window\n\n // cold-start links arrive in connectionOptions under scenes, never in\n // the app launchOptions, so they are translated into the launchOptions\n // shape RCTLinkingManager.getInitialURL reads.\n var launchOptions: [UIApplication.LaunchOptionsKey: Any] = [:]\n if let url = connectionOptions.urlContexts.first?.url {\n launchOptions[.url] = url\n }\n if let activity = connectionOptions.userActivities.first(where: {\n $0.activityType == NSUserActivityTypeBrowsingWeb\n }) {\n launchOptions[.userActivityDictionary] = [\n \"UIApplicationLaunchOptionsUserActivityTypeKey\": activity.activityType,\n \"UIApplicationLaunchOptionsUserActivityKey\": activity,\n ]\n }\n\n factory.startReactNative(\n withModuleName: \"${appName}\",\n in: window,\n launchOptions: launchOptions\n )\n }\n\n func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {\n guard let url = URLContexts.first?.url else { return }\n RCTLinkingManager.application(UIApplication.shared, open: url, options: [:])\n }\n\n func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {\n RCTLinkingManager.application(\n UIApplication.shared,\n continue: userActivity,\n restorationHandler: { _ in }\n )\n }\n}\n`;\n}\nfunction insertAfterLine(haystack, anchor, insertion) {\n var anchorIndex = haystack.indexOf(anchor);\n if (anchorIndex === -1) return haystack;\n var lineEnd = haystack.indexOf(\"\\n\", anchorIndex);\n if (lineEnd === -1) return `${haystack}\n${insertion}`;\n return `${haystack.slice(0, lineEnd + 1)}${insertion}\n${haystack.slice(lineEnd + 1)}`;\n}\nfunction patchIosInfoPlistSceneManifest(rendered) {\n var anchor = \"\t<key>LSRequiresIPhoneOS</key>\";\n if (!rendered.includes(anchor)) {\n throw new Error(\"[vxrn] prebuild template Info.plist lost its LSRequiresIPhoneOS anchor\");\n }\n return rendered.replace(anchor, `\t<key>UIApplicationSceneManifest</key>\n\t<dict>\n\t\t<key>UIApplicationSupportsMultipleScenes</key>\n\t\t<false/>\n\t\t<key>UISceneConfigurations</key>\n\t\t<dict>\n\t\t\t<key>UIWindowSceneSessionRoleApplication</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>UISceneConfigurationName</key>\n\t\t\t\t\t<string>Default Configuration</string>\n\t\t\t\t\t<key>UISceneDelegateClassName</key>\n\t\t\t\t\t<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t</dict>\n\t</dict>\n${anchor}`);\n}\nfunction patchIosAppDelegateSceneLifecycle(rendered, appName) {\n var anchor = `@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n var window: UIWindow?\n\n var reactNativeDelegate: ReactNativeDelegate?\n var reactNativeFactory: RCTReactNativeFactory?\n\n func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n ) -> Bool {\n let delegate = ReactNativeDelegate()\n let factory = RCTReactNativeFactory(delegate: delegate)\n delegate.dependencyProvider = RCTAppDependencyProvider()\n\n reactNativeDelegate = delegate\n reactNativeFactory = factory\n\n window = UIWindow(frame: UIScreen.main.bounds)\n\n factory.startReactNative(\n withModuleName: \"${appName}\",\n in: window,\n launchOptions: launchOptions\n )\n\n return true\n }\n}`;\n if (!rendered.includes(anchor)) {\n throw new Error(\"[vxrn] prebuild template AppDelegate.swift changed shape: cannot move the RN root to the scene delegate\");\n }\n return rendered.replace(anchor, `@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n func application(\n _ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n ) -> Bool {\n true\n }\n}`);\n}\nfunction patchIosPbxprojSceneDelegate(rendered, appName) {\n var edits = [\n [\n \"/* AppDelegate.swift in Sources */ = {isa = PBXBuildFile;\",\n `\t\t${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */; };`\n ],\n [\n \"/* AppDelegate.swift */ = {isa = PBXFileReference;\",\n `\t\t${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SceneDelegate.swift; path = ${appName}/SceneDelegate.swift; sourceTree = \"<group>\"; };`\n ],\n [\n \"/* AppDelegate.swift */,\",\n `\t\t\t\t${SCENE_DELEGATE_FILE_REF_ID} /* SceneDelegate.swift */,`\n ],\n [\n \"/* AppDelegate.swift in Sources */,\",\n `\t\t\t\t${SCENE_DELEGATE_BUILD_FILE_ID} /* SceneDelegate.swift in Sources */,`\n ]\n ];\n var patched = rendered;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = edits[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [anchor, insertion] = _step.value;\n var next = insertAfterLine(patched, anchor, insertion);\n if (next === patched) {\n throw new Error(`[vxrn] prebuild template project.pbxproj lost its AppDelegate.swift anchor (${anchor})`);\n }\n patched = next;\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return patched;\n}\nfunction generateSceneDelegate(args) {\n var { dest, platform, app } = args;\n if (platform !== \"ios\") return;\n FSExtra.writeFileSync(path.join(dest, app.name, \"SceneDelegate.swift\"), renderSceneDelegateSwift(app.name));\n}\nasync function generateAppIcons(args) {\n var { root, dest, platform, app } = args;\n if (!app.icon) return;\n var source = path.resolve(root, app.icon.source);\n if (!FSExtra.existsSync(source)) {\n throw new Error(`[vxrn] native.app.icon source does not exist: ${source}`);\n }\n var metadata = await sharp(source).metadata();\n if (metadata.width === void 0 || metadata.height === void 0 || metadata.width !== metadata.height || metadata.width < 1024) {\n throw new Error(\"[vxrn] native.app.icon source must be a square image at least 1024px wide\");\n }\n if (platform === \"ios\") {\n var iconDir = path.join(dest, app.name, \"Images.xcassets\", \"AppIcon.appiconset\");\n var contentsPath = path.join(iconDir, \"Contents.json\");\n var contents = JSON.parse(FSExtra.readFileSync(contentsPath, \"utf8\"));\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = contents.images[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var image = _step.value;\n var points = Number.parseFloat(image.size.split(\"x\")[0]);\n var scale = Number.parseInt(image.scale, 10);\n var pixels = points * scale;\n var filename = image.idiom === \"ios-marketing\" ? \"icon-1024.png\" : `icon-${points}@${image.scale}.png`;\n image.filename = filename;\n await sharp(source).rotate().resize(pixels, pixels, {\n fit: \"cover\"\n }).flatten({\n background: app.icon.backgroundColor\n }).png().toFile(path.join(iconDir, filename));\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n FSExtra.writeFileSync(contentsPath, `${JSON.stringify(contents, null, 2)}\n`);\n return;\n }\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = Object.entries(ANDROID_DENSITIES)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var [density, multiplier] = _step1.value;\n var pixels1 = 48 * multiplier;\n var iconDir1 = path.join(dest, \"app\", \"src\", \"main\", \"res\", `mipmap-${density}`);\n for (var _i = 0, _iter = [\n \"ic_launcher.png\",\n \"ic_launcher_round.png\"\n ]; _i < _iter.length; _i++) {\n var filename1 = _iter[_i];\n await sharp(source).rotate().resize(pixels1, pixels1, {\n fit: \"cover\"\n }).flatten({\n background: app.icon.backgroundColor\n }).png().toFile(path.join(iconDir1, filename1));\n }\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\n}\nasync function generateSplashScreen(args) {\n var _app_splash_width;\n var { root, dest, platform, app } = args;\n if (!app.splash) return;\n var source = path.resolve(root, app.splash.source);\n if (!FSExtra.existsSync(source)) {\n throw new Error(`[vxrn] native.app.splash source does not exist: ${source}`);\n }\n var { data: artwork, info: metadata } = await sharp(source).rotate().trim({\n background: app.splash.backgroundColor\n }).png().toBuffer({\n resolveWithObject: true\n });\n if (!metadata.width || !metadata.height) {\n throw new Error(\"[vxrn] native.app.splash source must be an image\");\n }\n var artworkWidth = (_app_splash_width = app.splash.width) !== null && _app_splash_width !== void 0 ? _app_splash_width : 200;\n var artworkHeight = Number((artworkWidth * (metadata.height / metadata.width)).toFixed(3));\n if (platform === \"ios\") {\n var appDir = path.join(dest, app.name);\n var splashDir = path.join(appDir, \"Images.xcassets\", \"Splash.imageset\");\n FSExtra.mkdirSync(splashDir, {\n recursive: true\n });\n await sharp(artwork).toFile(path.join(splashDir, \"splash.png\"));\n FSExtra.writeFileSync(path.join(splashDir, \"Contents.json\"), `${JSON.stringify({\n images: [\n {\n filename: \"splash.png\",\n idiom: \"universal\",\n scale: \"1x\"\n }\n ],\n info: {\n author: \"xcode\",\n version: 1\n }\n }, null, 2)}\n`);\n var red = Number.parseInt(app.splash.backgroundColor.slice(1, 3), 16) / 255;\n var green = Number.parseInt(app.splash.backgroundColor.slice(3, 5), 16) / 255;\n var blue = Number.parseInt(app.splash.backgroundColor.slice(5, 7), 16) / 255;\n FSExtra.writeFileSync(path.join(appDir, \"LaunchScreen.storyboard\"), `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"15702\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"launch-controller\">\n <device id=\"retina6_12\" orientation=\"portrait\" appearance=\"light\"/>\n <dependencies>\n <deployment identifier=\"iOS\"/>\n <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"15704\"/>\n <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n </dependencies>\n <scenes>\n <scene sceneID=\"launch-scene\">\n <objects>\n <viewController id=\"launch-controller\" sceneMemberID=\"viewController\">\n <view key=\"view\" contentMode=\"scaleToFill\" id=\"launch-view\">\n <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"390\" height=\"844\"/>\n <subviews>\n <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFit\" image=\"Splash\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"splash-image\"/>\n </subviews>\n <color key=\"backgroundColor\" red=\"${red}\" green=\"${green}\" blue=\"${blue}\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n <constraints>\n <constraint firstItem=\"splash-image\" firstAttribute=\"centerX\" secondItem=\"launch-view\" secondAttribute=\"centerX\" id=\"splash-center-x\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"centerY\" secondItem=\"launch-view\" secondAttribute=\"centerY\" id=\"splash-center-y\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"width\" constant=\"${artworkWidth}\" id=\"splash-width\"/>\n <constraint firstItem=\"splash-image\" firstAttribute=\"height\" constant=\"${artworkHeight}\" id=\"splash-height\"/>\n </constraints>\n </view>\n </viewController>\n <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"launch-responder\" sceneMemberID=\"firstResponder\"/>\n </objects>\n </scene>\n </scenes>\n <resources>\n <image name=\"Splash\" width=\"${metadata.width}\" height=\"${metadata.height}\"/>\n </resources>\n</document>\n`);\n return;\n }\n var mainRes = path.join(dest, \"app\", \"src\", \"main\", \"res\");\n var drawable = path.join(mainRes, \"drawable\");\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.entries(ANDROID_DENSITIES)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [density, multiplier] = _step.value;\n var canvasSize = 288 * multiplier;\n var imageSize = Math.round(artworkWidth * multiplier);\n var contained = await sharp(artwork).resize(imageSize, imageSize, {\n fit: \"contain\",\n background: {\n r: 0,\n g: 0,\n b: 0,\n alpha: 0\n }\n }).png().toBuffer();\n var drawableDensity = path.join(mainRes, `drawable-${density}`);\n FSExtra.mkdirSync(drawableDensity, {\n recursive: true\n });\n await sharp({\n create: {\n width: canvasSize,\n height: canvasSize,\n channels: 4,\n background: {\n r: 0,\n g: 0,\n b: 0,\n alpha: 0\n }\n }\n }).composite([\n {\n input: contained,\n left: Math.round((canvasSize - imageSize) / 2),\n top: Math.round((canvasSize - imageSize) / 2)\n }\n ]).png().toFile(path.join(drawableDensity, \"splash.png\"));\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n FSExtra.writeFileSync(path.join(drawable, \"launch_screen.xml\"), `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<layer-list xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item android:drawable=\"@color/splash_background\" />\n <item>\n <bitmap android:gravity=\"center\" android:src=\"@drawable/splash\" />\n </item>\n</layer-list>\n`);\n FSExtra.writeFileSync(path.join(mainRes, \"values\", \"colors.xml\"), `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"splash_background\">${app.splash.backgroundColor}</color>\n</resources>\n`);\n var stylesPath = path.join(mainRes, \"values\", \"styles.xml\");\n var styles = FSExtra.readFileSync(stylesPath, \"utf8\").replace(\" <!-- Customize your theme here. -->\", ' <item name=\"android:windowBackground\">@drawable/launch_screen</item>');\n FSExtra.writeFileSync(stylesPath, styles);\n var stylesV31 = path.join(mainRes, \"values-v31\");\n FSExtra.mkdirSync(stylesV31, {\n recursive: true\n });\n FSExtra.writeFileSync(path.join(stylesV31, \"styles.xml\"), `<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <style name=\"AppTheme\">\n <item name=\"android:windowSplashScreenBackground\">@color/splash_background</item>\n <item name=\"android:windowSplashScreenAnimatedIcon\">@drawable/splash</item>\n </style>\n</resources>\n`);\n}\nfunction renderPrebuildFile(args) {\n var { relativePath, content, platform, app } = args;\n var appName = app.name;\n var schemes = app.scheme === void 0 ? [] : Array.isArray(app.scheme) ? app.scheme : [\n app.scheme\n ];\n var destRelativePath = transformPath(relativePath);\n if (platform === \"android\" && app.android) {\n var packagePath = app.android.applicationId.split(\".\").join(\"/\");\n destRelativePath = destRelativePath.split(ANDROID_PACKAGE_PATH).join(packagePath);\n }\n destRelativePath = destRelativePath.replace(/HelloWorld/g, appName).replace(/helloworld/g, appName.toLowerCase());\n var rendered = content;\n if (rendered !== null) {\n var _app_imagePicker, _app_ios, _app_android;\n var replacements = [];\n if (platform === \"ios\" && app.ios) {\n replacements.push([\n IOS_BUNDLE_PLACEHOLDER,\n app.ios.bundleId\n ]);\n }\n if (platform === \"android\" && app.android) {\n replacements.push([\n ANDROID_PACKAGE_PLACEHOLDER,\n app.android.applicationId\n ]);\n }\n replacements.push([\n \"Hello App Display Name\",\n app.displayName || appName\n ], [\n \"HelloWorld\",\n appName\n ], [\n \"helloworld\",\n appName.toLowerCase()\n ]);\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = replacements[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [find, value] = _step.value;\n rendered = rendered.split(find).join(value);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/Info.plist\")) {\n var _app_ios1, _app_ios2;\n var stamps = [];\n if (schemes.length) {\n stamps.push(`\t<key>CFBundleURLTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t\t<key>CFBundleURLSchemes</key>\n\t\t\t<array>\n${schemes.map(function(scheme) {\n return `\t\t\t\t<string>${scheme}</string>`;\n }).join(\"\\n\")}\n\t\t\t</array>\n\t\t</dict>\n\t</array>`);\n }\n if (((_app_ios1 = app.ios) === null || _app_ios1 === void 0 ? void 0 : _app_ios1.usesNonExemptEncryption) !== void 0) {\n stamps.push(`\t<key>ITSAppUsesNonExemptEncryption</key>\n\t<${app.ios.usesNonExemptEncryption ? \"true\" : \"false\"}/>`);\n }\n if ((_app_ios2 = app.ios) === null || _app_ios2 === void 0 ? void 0 : _app_ios2.fileSharing) {\n stamps.push(`\t<key>UIFileSharingEnabled</key>\n\t<true/>\n\t<key>LSSupportsOpeningDocumentsInPlace</key>\n\t<true/>`);\n }\n if (stamps.length) {\n var anchor = \"\t<key>LSRequiresIPhoneOS</key>\";\n if (!rendered.includes(anchor)) throw new Error(`[vxrn] prebuild template ${relativePath} lost its LSRequiresIPhoneOS anchor`);\n rendered = rendered.replace(anchor, `${stamps.join(\"\\n\")}\n${anchor}`);\n }\n }\n if (platform === \"android\" && relativePath === \"app/src/main/AndroidManifest.xml\" && ((_app_imagePicker = app.imagePicker) === null || _app_imagePicker === void 0 ? void 0 : _app_imagePicker.camera) !== void 0) {\n var anchor1 = '<uses-permission android:name=\"android.permission.INTERNET\" />';\n if (!rendered.includes(anchor1)) {\n throw new Error(\"[vxrn] cannot stamp the camera permission: expected the INTERNET permission in app/src/main/AndroidManifest.xml\");\n }\n rendered = rendered.replace(anchor1, `${anchor1}\n <uses-permission android:name=\"android.permission.CAMERA\" />`);\n }\n if (platform === \"android\" && relativePath === \"app/src/main/AndroidManifest.xml\" && schemes.length) {\n rendered = rendered.replace(\" </activity>\", ` <intent-filter>\n <action android:name=\"android.intent.action.VIEW\" />\n <category android:name=\"android.intent.category.DEFAULT\" />\n <category android:name=\"android.intent.category.BROWSABLE\" />\n${schemes.map(function(scheme) {\n return ` <data android:scheme=\"${scheme}\" />`;\n }).join(\"\\n\")}\n </intent-filter>\n </activity>`);\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n var _app_ios3;\n rendered = rendered.replace(/TARGETED_DEVICE_FAMILY = \"1,2\";/g, `TARGETED_DEVICE_FAMILY = \"${((_app_ios3 = app.ios) === null || _app_ios3 === void 0 ? void 0 : _app_ios3.tablet) ? \"1,2\" : \"1\"}\";`);\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n var _app_ios4;\n if (app.version !== void 0) {\n rendered = rendered.replace(/MARKETING_VERSION = [^;]+;/g, `MARKETING_VERSION = \"${app.version}\";`);\n }\n if (((_app_ios4 = app.ios) === null || _app_ios4 === void 0 ? void 0 : _app_ios4.buildNumber) !== void 0) {\n rendered = rendered.replace(/CURRENT_PROJECT_VERSION = [^;]+;/g, `CURRENT_PROJECT_VERSION = ${app.ios.buildNumber};`);\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/Info.plist\")) {\n var _app_imagePicker1;\n if (((_app_imagePicker1 = app.imagePicker) === null || _app_imagePicker1 === void 0 ? void 0 : _app_imagePicker1.camera) !== void 0) {\n var anchor2 = \"\t<key>LSRequiresIPhoneOS</key>\";\n if (!rendered.includes(anchor2)) {\n throw new Error(\"[vxrn] cannot stamp NSCameraUsageDescription: expected LSRequiresIPhoneOS in Info.plist\");\n }\n rendered = rendered.replace(anchor2, `\t<key>NSCameraUsageDescription</key>\n\t<string>${escapeXml(app.imagePicker.camera)}</string>\n${anchor2}`);\n }\n rendered = patchIosInfoPlistSceneManifest(rendered);\n }\n if (platform === \"ios\" && relativePath.endsWith(\"/AppDelegate.swift\")) {\n rendered = patchIosAppDelegateSceneLifecycle(rendered, appName);\n }\n if (platform === \"ios\" && ((_app_ios = app.ios) === null || _app_ios === void 0 ? void 0 : _app_ios.deploymentTarget)) {\n rendered = rendered.replace(\"platform :ios, min_ios_version_supported\", `platform :ios, '${app.ios.deploymentTarget}'`).replace(/IPHONEOS_DEPLOYMENT_TARGET = \\d+(?:\\.\\d+)?;/g, `IPHONEOS_DEPLOYMENT_TARGET = ${app.ios.deploymentTarget};`);\n if (relativePath === \"Podfile\") {\n rendered = rendered.replace(\" )\\n end\\nend\", ` )\n\n installer.pods_project.targets.each do |target|\n target.build_configurations.each do |config|\n config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '${app.ios.deploymentTarget}'\n end\n end\n end\nend`);\n }\n }\n if (platform === \"ios\" && relativePath.endsWith(\".xcodeproj/project.pbxproj\")) {\n rendered = patchIosBundlePhase(rendered);\n rendered = patchIosPbxprojSceneDelegate(rendered, appName);\n }\n if (platform === \"ios\" && relativePath === \"Podfile\") {\n var _app_ios5, _app_ios6, _app_ios7;\n if ((_app_ios5 = app.ios) === null || _app_ios5 === void 0 ? void 0 : _app_ios5.ccache) rendered = `ENV['USE_CCACHE'] ||= '1'\n${rendered}`;\n if ((_app_ios6 = app.ios) === null || _app_ios6 === void 0 ? void 0 : _app_ios6.useFrameworks) {\n rendered = rendered.replace(/^(platform :ios, .+)$/m, `$1\nuse_frameworks! :linkage => :${app.ios.useFrameworks}`);\n }\n if ((_app_ios7 = app.ios) === null || _app_ios7 === void 0 ? void 0 : _app_ios7.screensGamma) {\n rendered = nativeProjectPatches.injectReactNativeScreensGammaIntoPodfile(rendered);\n }\n rendered = nativeProjectPatches.injectFmtCxx17FixIntoPodfile(rendered);\n rendered = nativeProjectPatches.injectHermesMinificationPatchIntoPodfile(rendered);\n if (!rendered.includes(\"[vxrn/one] fmt c++17 fix\") || !rendered.includes(\"[vxrn/one] minify iOS Hermes Release bundle input\")) {\n throw new Error(\"[vxrn] failed to apply required iOS Podfile patches\");\n }\n }\n if (platform === \"android\" && relativePath === \"app/build.gradle\") {\n var _app_android1;\n rendered = nativeProjectPatches.replaceAppBuildGradleReactBlock(rendered);\n rendered = nativeProjectPatches.addDepsPatchToAppBuildGradle(rendered);\n if (!rendered.includes('entryFile = file(\"../../package.json\")') || !rendered.includes(\"[vxrn/one] ensure patches are applied\")) {\n throw new Error(\"[vxrn] failed to apply required Android Gradle patches\");\n }\n if (app.version !== void 0) {\n rendered = rendered.replace(/versionName \"[^\"]*\"/g, `versionName \"${app.version}\"`);\n }\n if (((_app_android1 = app.android) === null || _app_android1 === void 0 ? void 0 : _app_android1.versionCode) !== void 0) {\n rendered = rendered.replace(/versionCode \\d+/g, `versionCode ${app.android.versionCode}`);\n }\n }\n if (platform === \"android\" && relativePath === \"settings.gradle\") {\n var hardcodedGradlePlugin = /includeBuild\\((['\"])\\.\\.\\/node_modules\\/@react-native\\/gradle-plugin\\1\\)/g;\n if ([\n ...rendered.matchAll(hardcodedGradlePlugin)\n ].length !== 2) {\n throw new Error(\"[vxrn] expected two React Native Gradle plugin paths\");\n }\n rendered = rendered.replace(hardcodedGradlePlugin, `includeBuild(new File([\"node\", \"--print\", \"require('module').createRequire(require.resolve('react-native/package.json')).resolve('@react-native/gradle-plugin/package.json')\"].execute(null, settingsDir).text.trim()).parentFile.canonicalPath)`);\n }\n if (platform === \"android\" && ((_app_android = app.android) === null || _app_android === void 0 ? void 0 : _app_android.minSdk) !== void 0) {\n rendered = rendered.replace(/minSdkVersion = \\d+/g, `minSdkVersion = ${app.android.minSdk}`);\n }\n }\n return {\n destRelativePath,\n content: rendered\n };\n}\nvar generateForPlatform = async function(root, platform, app) {\n var outDir = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : path.resolve(root, platform);\n var _ref, _ref1;\n var _walkModule_default;\n validatePrebuildApp(app, platform);\n var dest = outDir;\n var require2 = module.createRequire(root + \"/\");\n var importPath = require2.resolve(\"@react-native-community/cli/build/tools/walk.js\", {\n paths: [\n root\n ]\n });\n var src = path.join(path.dirname(require2.resolve(\"@react-native-community/template/template/package.json\", {\n paths: [\n root\n ]\n })), platform);\n var walkModule = await import(pathToFileURL(importPath).href);\n var walkFn = (_ref = (_ref1 = walkModule === null || walkModule === void 0 ? void 0 : (_walkModule_default = walkModule.default) === null || _walkModule_default === void 0 ? void 0 : _walkModule_default.default) !== null && _ref1 !== void 0 ? _ref1 : walkModule === null || walkModule === void 0 ? void 0 : walkModule.default) !== null && _ref !== void 0 ? _ref : walkModule;\n if (typeof walkFn !== \"function\") {\n throw new Error(\"[vxrn] could not resolve the community template walker\");\n }\n var files = [\n ...walkFn(src)\n ].sort();\n FSExtra.removeSync(dest);\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = files[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var absoluteSrc = _step.value;\n var relativeFilePath = path.relative(src, absoluteSrc);\n var stat = FSExtra.lstatSync(absoluteSrc);\n if (stat.isDirectory()) continue;\n var extension = path.extname(absoluteSrc);\n var raw = [\n \".png\",\n \".jar\",\n \".keystore\"\n ].includes(extension) ? null : FSExtra.readFileSync(absoluteSrc, \"utf8\");\n var { destRelativePath, content } = renderPrebuildFile({\n relativePath: relativeFilePath,\n content: raw,\n platform,\n app\n });\n var destPath = path.resolve(dest, destRelativePath);\n FSExtra.mkdirSync(path.dirname(destPath), {\n recursive: true\n });\n console.info(\"copying\", '\"' + absoluteSrc + '\"', \"to\", '\"' + destPath + '\"');\n if (content === null) {\n FSExtra.copyFileSync(absoluteSrc, destPath);\n continue;\n }\n FSExtra.writeFileSync(destPath, content, {\n encoding: \"utf8\",\n mode: stat.mode\n });\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n await generateAppIcons({\n root,\n dest,\n platform,\n app\n });\n await generateSplashScreen({\n root,\n dest,\n platform,\n app\n });\n generateSceneDelegate({\n dest,\n platform,\n app\n });\n};\nfunction applyAndroidDependencyPatches(args) {\n var { root, app, inventory } = args;\n if (!app.android || !inventory.some(function(dependency) {\n return dependency.name === \"react-native-screens\" && dependency.platforms.includes(\"android\");\n })) {\n return;\n }\n var activityPath = path.join(root, \"android\", \"app\", \"src\", \"main\", \"java\", ...app.android.applicationId.split(\".\"), \"MainActivity.kt\");\n var rendered = nativeProjectPatches.addReactNativeScreensFix(FSExtra.readFileSync(activityPath, \"utf8\"));\n if (!rendered.includes(\"RNScreensFragmentFactory\")) {\n throw new Error(\"[vxrn] failed to apply the react-native-screens activity patch\");\n }\n FSExtra.writeFileSync(activityPath, rendered);\n}\nasync function getNativeDependencyInventory(root) {\n var require2 = module.createRequire(root + \"/\");\n var cliConfigPath = require2.resolve(\"@react-native-community/cli-config\", {\n paths: [\n root\n ]\n });\n var cliConfig = await import(pathToFileURL(cliConfigPath).href);\n var config = await cliConfig.loadConfigAsync({\n projectRoot: root\n });\n var inventory = [];\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.keys(config.dependencies).sort()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var name = _step.value;\n var dependency = config.dependencies[name];\n var depRoot = dependency.root;\n var version = \"unknown\";\n try {\n var _JSON_parse_version;\n version = (_JSON_parse_version = JSON.parse(FSExtra.readFileSync(path.join(depRoot, \"package.json\"), \"utf8\")).version) !== null && _JSON_parse_version !== void 0 ? _JSON_parse_version : \"unknown\";\n } catch (unused) {\n }\n var platforms = Object.entries(dependency.platforms).filter(function(param) {\n var [, platformConfig] = param;\n return platformConfig !== null;\n }).map(function(param) {\n var [platform] = param;\n return platform;\n }).sort();\n if (platforms.length > 0) inventory.push({\n name,\n version,\n platforms\n });\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return inventory;\n}\nfunction installNativeDependencies(args) {\n var { root, platform } = args;\n if (!platform || platform === \"ios\") {\n execFileSync(\"pod\", [\n \"install\",\n `--project-directory=${path.join(root, \"ios\")}`\n ], {\n stdio: \"inherit\"\n });\n }\n}\nvar transformPath = function(filePath) {\n return filePath.replace(\"_BUCK\", \"BUCK\").replace(\"_gitignore\", \".gitignore\").replace(\"_gitattributes\", \".gitattributes\").replace(\"_babelrc\", \".babelrc\").replace(\"_editorconfig\", \".editorconfig\").replace(\"_eslintrc.js\", \".eslintrc.js\").replace(\"_flowconfig\", \".flowconfig\").replace(\"_buckconfig\", \".buckconfig\").replace(\"_prettierrc.js\", \".prettierrc.js\").replace(\"_bundle\", \".bundle\").replace(\"_ruby-version\", \".ruby-version\").replace(\"_node-version\", \".node-version\").replace(\"_watchmanconfig\", \".watchmanconfig\").replace(\"_xcode.env\", \".xcode.env\");\n};\nexport {\n applyAndroidDependencyPatches,\n generateForPlatform,\n getNativeDependencyInventory,\n installNativeDependencies,\n renderPrebuildFile,\n renderSceneDelegateSwift,\n validatePrebuildApp\n};\n//# sourceMappingURL=prebuildWithoutExpo.js.map\n"],"mappings":";;;;;;;;;AAOA,IAAI,uBAAuB,OAAO,cAAc,YAAY,GAAG,CAAC,CAAC,kCAAkC;AACnG,IAAI,sBAAsB;AAC1B,IAAI,oBAAoB;CACtB,MAAM;CACN,MAAM;CACN,OAAO;CACP,QAAQ;CACR,SAAS;AACX;AACA,IAAI,yBAAyB;AAC7B,IAAI,8BAA8B;AAClC,IAAI,uBAAuB;AAC3B,SAAS,oBAAoB,SAAS;CACpC,IAAI,sBAAsB;CAC1B,IAAI,iBAAiB,QAAQ,QAAQ,uCAAuC,SAAS,YAAY,kBAAkB;EACjH,IAAI;EACJ,IAAI;GACF,SAAS,KAAK,MAAM,gBAAgB;EACtC,SAAS,QAAQ;GACf,OAAO;EACT;EACA,IAAI,OAAO,WAAW,YAAY,CAAC,OAAO,SAAS,uBAAuB,GAAG;GAC3E,OAAO;EACT;EACA,IAAI,UAAU;EACd,UAAU,qBAAqB,4CAA4C,OAAO;EAClF,UAAU,qBAAqB,4CAA4C,OAAO;EAClF,UAAU,qBAAqB,2CAA2C,OAAO;EACjF,IAAI,CAAC,QAAQ,SAAS,+CAA+C,KAAK,CAAC,QAAQ,SAAS,sCAAsC,KAAK,CAAC,QAAQ,SAAS,uCAAuC,GAAG;GACjM,MAAM,IAAI,MAAM,0DAA0D;EAC5E;EACA;EACA,OAAO,iBAAiB,KAAK,UAAU,OAAO,EAAE;CAClD,CAAC;CACD,IAAI,wBAAwB,GAAG;EAC7B,MAAM,IAAI,MAAM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"exports": {
|
|
@@ -64,16 +64,16 @@
|
|
|
64
64
|
"@react-native/codegen": "^0.87.1",
|
|
65
65
|
"@react-native-community/cli-config": "^20.2.0",
|
|
66
66
|
"@react-native/dev-middleware": "^0.87.1",
|
|
67
|
-
"@vxrn/compiler": "2.0.0-beta.
|
|
68
|
-
"@vxrn/debug": "2.0.0-beta.
|
|
69
|
-
"@vxrn/query-string": "2.0.0-beta.
|
|
70
|
-
"@vxrn/resolve": "2.0.0-beta.
|
|
71
|
-
"@vxrn/safe-area": "2.0.0-beta.
|
|
72
|
-
"@vxrn/url-parse": "2.0.0-beta.
|
|
73
|
-
"@vxrn/utils": "2.0.0-beta.
|
|
74
|
-
"@vxrn/vendor": "2.0.0-beta.
|
|
75
|
-
"@vxrn/vite-flow": "2.0.0-beta.
|
|
76
|
-
"@vxrn/vite-plugin-metro": "2.0.0-beta.
|
|
67
|
+
"@vxrn/compiler": "2.0.0-beta.66.1",
|
|
68
|
+
"@vxrn/debug": "2.0.0-beta.66.1",
|
|
69
|
+
"@vxrn/query-string": "2.0.0-beta.66.1",
|
|
70
|
+
"@vxrn/resolve": "2.0.0-beta.66.1",
|
|
71
|
+
"@vxrn/safe-area": "2.0.0-beta.66.1",
|
|
72
|
+
"@vxrn/url-parse": "2.0.0-beta.66.1",
|
|
73
|
+
"@vxrn/utils": "2.0.0-beta.66.1",
|
|
74
|
+
"@vxrn/vendor": "2.0.0-beta.66.1",
|
|
75
|
+
"@vxrn/vite-flow": "2.0.0-beta.66.1",
|
|
76
|
+
"@vxrn/vite-plugin-metro": "2.0.0-beta.66.1",
|
|
77
77
|
"citty": "^0.1.6",
|
|
78
78
|
"dotenv": "^17.2.1",
|
|
79
79
|
"dotenv-expand": "^12.0.2",
|
|
@@ -36,6 +36,7 @@ const app = {
|
|
|
36
36
|
useFrameworks: 'static',
|
|
37
37
|
ccache: true,
|
|
38
38
|
usesNonExemptEncryption: false,
|
|
39
|
+
fileSharing: true,
|
|
39
40
|
},
|
|
40
41
|
android: { applicationId: 'dev.one.myapp', minSdk: 28 },
|
|
41
42
|
} satisfies PrebuildAppConfig
|
|
@@ -175,6 +176,16 @@ ${APP_DELEGATE_PBXPROJ}`,
|
|
|
175
176
|
expect(infoPlist.content).toContain('<string>myapp-dev</string>')
|
|
176
177
|
expect(infoPlist.content).toContain('<key>ITSAppUsesNonExemptEncryption</key>')
|
|
177
178
|
expect(infoPlist.content).toContain('<false/>')
|
|
179
|
+
expect(infoPlist.content).toContain('<key>UIFileSharingEnabled</key>')
|
|
180
|
+
expect(infoPlist.content).toContain('<key>LSSupportsOpeningDocumentsInPlace</key>')
|
|
181
|
+
expect(() =>
|
|
182
|
+
renderPrebuildFile({
|
|
183
|
+
relativePath: 'HelloWorld/Info.plist',
|
|
184
|
+
content: '<dict>\n</dict>',
|
|
185
|
+
platform: 'ios',
|
|
186
|
+
app,
|
|
187
|
+
})
|
|
188
|
+
).toThrow('lost its LSRequiresIPhoneOS anchor')
|
|
178
189
|
expect(infoPlist.content).toContain('<key>NSCameraUsageDescription</key>')
|
|
179
190
|
expect(infoPlist.content).toContain('<string>Capture photos & videos</string>')
|
|
180
191
|
|
|
@@ -298,12 +309,20 @@ includeBuild('../node_modules/@react-native/gradle-plugin')`,
|
|
|
298
309
|
})
|
|
299
310
|
|
|
300
311
|
it('throws instead of silently skipping a missing camera anchor', () => {
|
|
312
|
+
// camera-only manifest: with schemes set the shared schemes stamper
|
|
313
|
+
// reports the missing anchor first, so the camera error needs the
|
|
314
|
+
// camera stamper to be the one reaching for it.
|
|
315
|
+
const cameraOnly = {
|
|
316
|
+
name: 'MyApp',
|
|
317
|
+
imagePicker: { camera: 'Capture photos' },
|
|
318
|
+
ios: { bundleId: 'dev.one.myapp' },
|
|
319
|
+
} satisfies PrebuildAppConfig
|
|
301
320
|
expect(() =>
|
|
302
321
|
renderPrebuildFile({
|
|
303
322
|
relativePath: 'HelloWorld/Info.plist',
|
|
304
323
|
content: '<dict>\n</dict>',
|
|
305
324
|
platform: 'ios',
|
|
306
|
-
app,
|
|
325
|
+
app: cameraOnly,
|
|
307
326
|
})
|
|
308
327
|
).toThrow(
|
|
309
328
|
'[vxrn] cannot stamp NSCameraUsageDescription: expected LSRequiresIPhoneOS in Info.plist'
|
|
@@ -573,10 +573,10 @@ export function renderPrebuildFile(args: {
|
|
|
573
573
|
for (const [find, value] of replacements) {
|
|
574
574
|
rendered = rendered.split(find).join(value)
|
|
575
575
|
}
|
|
576
|
-
if (platform === 'ios' && relativePath.endsWith('/Info.plist')
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
`\t<key>CFBundleURLTypes</key>
|
|
576
|
+
if (platform === 'ios' && relativePath.endsWith('/Info.plist')) {
|
|
577
|
+
const stamps: string[] = []
|
|
578
|
+
if (schemes.length) {
|
|
579
|
+
stamps.push(`\t<key>CFBundleURLTypes</key>
|
|
580
580
|
\t<array>
|
|
581
581
|
\t\t<dict>
|
|
582
582
|
\t\t\t<key>CFBundleTypeRole</key>
|
|
@@ -586,9 +586,26 @@ export function renderPrebuildFile(args: {
|
|
|
586
586
|
${schemes.map((scheme) => `\t\t\t\t<string>${scheme}</string>`).join('\n')}
|
|
587
587
|
\t\t\t</array>
|
|
588
588
|
\t\t</dict>
|
|
589
|
-
\t</array
|
|
590
|
-
|
|
591
|
-
)
|
|
589
|
+
\t</array>`)
|
|
590
|
+
}
|
|
591
|
+
if (app.ios?.usesNonExemptEncryption !== undefined) {
|
|
592
|
+
stamps.push(
|
|
593
|
+
`\t<key>ITSAppUsesNonExemptEncryption</key>\n\t<${app.ios.usesNonExemptEncryption ? 'true' : 'false'}/>`
|
|
594
|
+
)
|
|
595
|
+
}
|
|
596
|
+
if (app.ios?.fileSharing) {
|
|
597
|
+
stamps.push(
|
|
598
|
+
`\t<key>UIFileSharingEnabled</key>\n\t<true/>\n\t<key>LSSupportsOpeningDocumentsInPlace</key>\n\t<true/>`
|
|
599
|
+
)
|
|
600
|
+
}
|
|
601
|
+
if (stamps.length) {
|
|
602
|
+
const anchor = '\t<key>LSRequiresIPhoneOS</key>'
|
|
603
|
+
if (!rendered.includes(anchor))
|
|
604
|
+
throw new Error(
|
|
605
|
+
`[vxrn] prebuild template ${relativePath} lost its LSRequiresIPhoneOS anchor`
|
|
606
|
+
)
|
|
607
|
+
rendered = rendered.replace(anchor, `${stamps.join('\n')}\n${anchor}`)
|
|
608
|
+
}
|
|
592
609
|
}
|
|
593
610
|
if (
|
|
594
611
|
platform === 'android' &&
|
|
@@ -647,12 +664,8 @@ ${schemes.map((scheme) => ` <data android:scheme="${scheme}" />`).joi
|
|
|
647
664
|
}
|
|
648
665
|
}
|
|
649
666
|
if (platform === 'ios' && relativePath.endsWith('/Info.plist')) {
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
'\t<key>LSRequiresIPhoneOS</key>',
|
|
653
|
-
`\t<key>ITSAppUsesNonExemptEncryption</key>\n\t<${app.ios.usesNonExemptEncryption ? 'true' : 'false'}/>\n\t<key>LSRequiresIPhoneOS</key>`
|
|
654
|
-
)
|
|
655
|
-
}
|
|
667
|
+
// schemes, usesNonExemptEncryption, and fileSharing stamp above in one
|
|
668
|
+
// anchored block; only the camera description stamps here.
|
|
656
669
|
if (app.imagePicker?.camera !== undefined) {
|
|
657
670
|
const anchor = '\t<key>LSRequiresIPhoneOS</key>'
|
|
658
671
|
if (!rendered.includes(anchor)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prebuildWithoutExpo.d.ts","sourceRoot":"","sources":["../../src/exports/prebuildWithoutExpo.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AA6BzF,YAAY,EAAE,iBAAiB,IAAI,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAE3F,eAAO,MAAM,mBAAmB,0BAAoB,CAAA;AAmEpD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAoEhE;AAoID,MAAM,WAAW,o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