mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-12 01:40:17 +00:00
e9c004452e
* Introduced MetaModel.CallArrowModel * Fixed ArrowInlinerSpec * Implemented trace calls injection * Propagate TracingConfig * Add tracing flag to js api * Use detach instead of xor * Write tests * ScalarType -> LiteralType * Add tests * Fix after rebase * Fixed tests * Add tests * Remove debug prints * Clean up and add comments * Fix issues * Add tracing flag to js api * Rename liftString -> quote * Change literal type * Use CallServiceModel constructor * Fix js args * Fixed tests * Add tracing option to cli
68 lines
1.3 KiB
TypeScript
68 lines
1.3 KiB
TypeScript
import type { FunctionCallDef, ServiceDef } from "@fluencelabs/fluence/dist/internal/compilerSupport/v3impl/interface"
|
|
|
|
export class AquaConfig {
|
|
constructor(
|
|
logLevel?: string,
|
|
constants?: string[],
|
|
noXor?: boolean,
|
|
noRelay?: boolean,
|
|
targetType?: string,
|
|
tracing?: boolean
|
|
);
|
|
|
|
logLevel?: string
|
|
constants?: string[]
|
|
noXor?: boolean
|
|
noRelay?: boolean
|
|
targetType?: string
|
|
tracing?: boolean
|
|
}
|
|
|
|
export class AquaFunction {
|
|
funcDef: FunctionCallDef
|
|
script: string
|
|
}
|
|
|
|
export class GeneratedSource {
|
|
name: string
|
|
tsSource?: string
|
|
jsSource?: string
|
|
tsTypes?: string
|
|
}
|
|
|
|
export class CompilationResult {
|
|
services: Record<string, ServiceDef>
|
|
functions: Record<string, AquaFunction>
|
|
functionCall?: AquaFunction
|
|
errors: string[]
|
|
generatedSources: GeneratedSource[]
|
|
}
|
|
|
|
export class Input {
|
|
constructor(input: string);
|
|
|
|
input: string
|
|
}
|
|
|
|
export class Path {
|
|
constructor(path: string);
|
|
|
|
path: string
|
|
}
|
|
|
|
export class Call {
|
|
constructor(functionCall: string,
|
|
arguments: any,
|
|
input: Input | Path);
|
|
|
|
functionCall: string
|
|
arguments: any
|
|
input: Input | Path
|
|
}
|
|
|
|
export class Compiler {
|
|
compile(input: Input | Path | Call, imports: string[], config?: AquaConfig): Promise<CompilationResult>;
|
|
}
|
|
|
|
export var Aqua: Compiler;
|