MCPcopy Create free account
hub / github.com/B3Pay/B3Wallet / readVersion

Function readVersion

scripts/utils.ts:84–100  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

82}
83
84export 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
102export const chunkGenerator = async function* (
103 wasmModule: number[],

Callers 3

copyFunction · 0.90
loadFunction · 0.90
loadFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected