mirror of
https://github.com/fluencelabs/aqua.git
synced 2025-06-25 12:31:33 +00:00
chore: Refactor CI after moving tests from aqua-playground [fixes FLU-352] (#763)
* move integration tests to repo * Move aqua-playground CI * Fix * Use local aqua cli * Move aqua tests to e2e * Test new build.sbt * Fix? * Test * Test * Test * Test * Update * Fix * Fix * Fix * fix * Fix * Rename aqua-api to api directory for consistency * Migrate to pnpm * Add bump version script * Test snapshot workflow * fix * Fix * Fix * Setup pnpm * Update pnpm version * Fix * Do not publish tests * Update * Fix * Fix? * delete import * Fix * Fix * Fix? * Fix * Fix * Use main branch * Fix quotes * Fix * Fix release * Cleanup * Remove compiled examples * Cleanup --------- Co-authored-by: DieMyst <dmitry.shakhtarin@fluence.ai>
This commit is contained in:
committed by
GitHub
parent
6cc3a969d2
commit
aa10706506
32
api/api-example/index.js
Normal file
32
api/api-example/index.js
Normal file
@ -0,0 +1,32 @@
|
||||
import {
|
||||
Aqua,
|
||||
Call,
|
||||
Path,
|
||||
} from "@fluencelabs/aqua-api/aqua-api.js";
|
||||
|
||||
const aquaPath = new Path("test.aqua")
|
||||
// write function that we want to call and arguments
|
||||
const args = {num: 42}
|
||||
const call = new Call("getNumber(num)", args, aquaPath)
|
||||
|
||||
// compile call
|
||||
const compilationResult = await Aqua.compile(call, [])
|
||||
|
||||
|
||||
/*
|
||||
// Compilation result definition
|
||||
export class CompilationResult {
|
||||
// List of service definitions to register in Fluence JS Client
|
||||
services: Record<string, ServiceDef>
|
||||
// List of function definitions to call in Fluence JS Client
|
||||
functions: Record<string, AquaFunction>
|
||||
// Definition of wrapped function to call in Fluence JS Client
|
||||
functionCall?: AquaFunction
|
||||
// List of errors. All other fields will be empty if `errors` not empty
|
||||
errors: string[]
|
||||
}
|
||||
*/
|
||||
|
||||
// get function definition, that describes types of arguments and results of a function
|
||||
// and AIR script
|
||||
const {funcDef, script} = compilationResult.functionCall
|
Reference in New Issue
Block a user