Prepare a work directory for use with componentization
()
| 514 | |
| 515 | /** Prepare a work directory for use with componentization */ |
| 516 | async function prepWorkDir() { |
| 517 | const baseDir = maybeWindowsPath( |
| 518 | join( |
| 519 | tmpdir(), |
| 520 | createHash('sha256') |
| 521 | .update(Math.random().toString()) |
| 522 | .digest('hex') |
| 523 | .slice(0, 12), |
| 524 | ), |
| 525 | ); |
| 526 | await mkdir(baseDir); |
| 527 | const sourcesDir = maybeWindowsPath(join(baseDir, 'sources')); |
| 528 | await mkdir(sourcesDir); |
| 529 | return { baseDir, sourcesDir }; |
| 530 | } |
| 531 | |
| 532 | /** |
| 533 | * Initialize a WebAssembly binary, given the |
no test coverage detected