(name: string)
| 82 | } |
| 83 | |
| 84 | export const readVersion = async (name: string) => { |
| 85 | const file = await open(`${process.cwd()}/backend/${name}/Cargo.toml`) |
| 86 | |
| 87 | try { |
| 88 | for await (const line of file.readLines()) { |
| 89 | const version = line.match(/version = "(.*)"/)?.[1] |
| 90 | |
| 91 | if (version !== undefined) { |
| 92 | return version |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | return undefined |
| 97 | } finally { |
| 98 | await file.close() |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | export const chunkGenerator = async function* ( |
| 103 | wasmModule: number[], |