2023-08-09 14:32:27 +00:00
|
|
|
//@ts-check
|
2023-02-14 13:11:33 +00:00
|
|
|
|
2023-08-09 14:32:27 +00:00
|
|
|
import { compileAquaCallFromPath } from '@fluencelabs/aqua-api'
|
2023-02-14 13:11:33 +00:00
|
|
|
|
|
|
|
// compile call
|
2023-08-09 14:32:27 +00:00
|
|
|
const compilationResult = await compileAquaCallFromPath({
|
|
|
|
filePath: 'test.aqua',
|
|
|
|
data: { num: 3 },
|
|
|
|
funcCall: 'getNumber(num)',
|
|
|
|
})
|
2023-02-14 13:11:33 +00:00
|
|
|
|
2023-08-09 14:32:27 +00:00
|
|
|
const {
|
|
|
|
errors,
|
|
|
|
functionCall: { funcDef, script },
|
|
|
|
functions,
|
|
|
|
generatedSources,
|
|
|
|
services,
|
|
|
|
} = compilationResult
|
2023-02-14 13:11:33 +00:00
|
|
|
|
2023-08-09 14:32:27 +00:00
|
|
|
console.log(script)
|