()
| 113 | } |
| 114 | |
| 115 | function setupHermescWrapper() { |
| 116 | const wrapperSourcePath = path.join(__dirname, 'hermesc-wrapper.js'); |
| 117 | |
| 118 | if (!fs.existsSync(wrapperSourcePath)) { |
| 119 | console.error(`❌ [Hermesc Setup] Wrapper script not found at: ${wrapperSourcePath}`); |
| 120 | return; |
| 121 | } |
| 122 | |
| 123 | try { |
| 124 | fs.chmodSync(wrapperSourcePath, 0o755); |
| 125 | } catch (error) { |
| 126 | console.error('❌ [Hermesc Setup] Failed to set execute permissions on wrapper:', error); |
| 127 | } |
| 128 | |
| 129 | console.log('🔧 [Hermesc Setup] Starting hermesc wrapper setup...'); |
| 130 | |
| 131 | const hermescLocations = [ |
| 132 | { |
| 133 | path: path.join(PROJECT_ROOT, 'node_modules/react-native/sdks/hermesc/osx-bin/hermesc'), |
| 134 | name: 'Node Modules' |
| 135 | }, |
| 136 | { |
| 137 | path: path.join(PROJECT_ROOT, 'ios/Pods/hermes-engine/destroot/bin/hermesc'), |
| 138 | name: 'iOS Pods' |
| 139 | } |
| 140 | ]; |
| 141 | |
| 142 | let successCount = 0; |
| 143 | let totalProcessed = 0; |
| 144 | |
| 145 | for (const location of hermescLocations) { |
| 146 | const success = setupSingleHermesc(location.path, location.name); |
| 147 | if (success) { |
| 148 | successCount++; |
| 149 | } |
| 150 | totalProcessed++; |
| 151 | } |
| 152 | |
| 153 | console.log(`\n📊 [Hermesc Setup] Summary: ${successCount}/${totalProcessed} locations configured successfully`); |
| 154 | } |
| 155 | |
| 156 | function metadataSerializer(entryPoint, preModules, graph, options) { |
| 157 | setupHermescWrapper(); |
no test coverage detected