@boundaryml/baml
Advanced tools
Comparing version 0.50.0 to 0.51.0
@@ -11,3 +11,3 @@ import { BamlSpan, RuntimeContextManager, BamlRuntime, BamlLogEvent } from './native'; | ||
flush(): void; | ||
onLogEvent(callback: (event: BamlLogEvent) => void): void; | ||
onLogEvent(callback: ((event: BamlLogEvent) => void) | undefined): void; | ||
traceFnSync<ReturnType, F extends (...args: any[]) => ReturnType>(name: string, func: F): F; | ||
@@ -14,0 +14,0 @@ traceFnAsync<ReturnType, F extends (...args: any[]) => Promise<ReturnType>>(name: string, func: F): F; |
@@ -50,2 +50,6 @@ "use strict"; | ||
onLogEvent(callback) { | ||
if (!callback) { | ||
this.rt.setLogEventCallback(undefined); | ||
return; | ||
} | ||
this.rt.setLogEventCallback((error, param) => { | ||
@@ -52,0 +56,0 @@ if (!error) { |
@@ -26,4 +26,6 @@ /* auto-generated by NAPI-RS */ | ||
callFunction(functionName: string, args: { [string]: any }, ctx: RuntimeContextManager, tb?: TypeBuilder | undefined | null, cb?: ClientRegistry | undefined | null): Promise<FunctionResult> | ||
callFunctionSync(functionName: string, args: { [string]: any }, ctx: RuntimeContextManager, tb?: TypeBuilder | undefined | null, cb?: ClientRegistry | undefined | null): FunctionResult | ||
streamFunction(functionName: string, args: { [string]: any }, cb: (err: any, param: FunctionResult) => void, ctx: RuntimeContextManager, tb?: TypeBuilder | undefined | null, clientRegistry?: ClientRegistry | undefined | null): FunctionResultStream | ||
setLogEventCallback(func: (err: any, param: BamlLogEvent) => void): void | ||
streamFunctionSync(functionName: string, args: { [string]: any }, cb: (err: any, param: FunctionResult) => void, ctx: RuntimeContextManager, tb?: TypeBuilder | undefined | null, clientRegistry?: ClientRegistry | undefined | null): FunctionResultStream | ||
setLogEventCallback(func?: undefined | (err: any, param: BamlLogEvent) => void): void | ||
flush(): void | ||
@@ -73,2 +75,3 @@ drainStats(): TraceStats | ||
export class FunctionResult { | ||
isOk(): boolean | ||
parsed(): any | ||
@@ -118,3 +121,3 @@ } | ||
export function invoke_runtime_cli(params: Array<string>): void | ||
export declare function invoke_runtime_cli(params: Array<string>): void | ||
@@ -121,0 +124,0 @@ export interface LogEventMetadata { |
{ | ||
"name": "@boundaryml/baml", | ||
"version": "0.50.0", | ||
"version": "0.51.0", | ||
"description": "BAML typescript bindings (package.json)", | ||
@@ -83,9 +83,9 @@ "repository": { | ||
"optionalDependencies": { | ||
"@boundaryml/baml-darwin-arm64": "0.50.0", | ||
"@boundaryml/baml-win32-arm64-msvc": "0.50.0", | ||
"@boundaryml/baml-linux-arm64-gnu": "0.50.0", | ||
"@boundaryml/baml-darwin-x64": "0.50.0", | ||
"@boundaryml/baml-win32-x64-msvc": "0.50.0", | ||
"@boundaryml/baml-linux-x64-gnu": "0.50.0" | ||
"@boundaryml/baml-darwin-arm64": "0.51.0", | ||
"@boundaryml/baml-win32-arm64-msvc": "0.51.0", | ||
"@boundaryml/baml-linux-arm64-gnu": "0.51.0", | ||
"@boundaryml/baml-darwin-x64": "0.51.0", | ||
"@boundaryml/baml-win32-x64-msvc": "0.51.0", | ||
"@boundaryml/baml-linux-x64-gnu": "0.51.0" | ||
} | ||
} |
@@ -51,3 +51,5 @@ "use strict"; | ||
} | ||
yield this.partialCoerce(event.parsed()); | ||
if (event.isOk()) { | ||
yield this.partialCoerce(event.parsed()); | ||
} | ||
} | ||
@@ -54,0 +56,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31138
849