(jsBindings)
| 3 | const EXPORT_MARKER = '// Auto-generated exports by postbuild.js. Do not edit directly.'; |
| 4 | |
| 5 | function collectNativeExportNames(jsBindings) { |
| 6 | const names = []; |
| 7 | const seen = new Set(); |
| 8 | const matches = jsBindings.matchAll(/module\.exports\.(\w+)/g); |
| 9 | |
| 10 | for (const match of matches) { |
| 11 | const name = match[1]; |
| 12 | if (!seen.has(name)) { |
| 13 | seen.add(name); |
| 14 | names.push(name); |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | return names; |
| 19 | } |
| 20 | |
| 21 | function buildIndexJs(nativeExportNames) { |
| 22 | const originalSource = readFileSync('./index.js', 'utf-8'); |
no outgoing calls
no test coverage detected
searching dependent graphs…