@boundaryml/baml
Advanced tools
Comparing version 0.56.1 to 0.57.0
@@ -6,2 +6,4 @@ import { BamlSpan, RuntimeContextManager, BamlRuntime, BamlLogEvent } from './native'; | ||
constructor(rt: BamlRuntime); | ||
allowResets(): boolean; | ||
reset(): void; | ||
upsertTags(tags: Record<string, string>): void; | ||
@@ -8,0 +10,0 @@ cloneContext(): RuntimeContextManager; |
@@ -17,2 +17,16 @@ "use strict"; | ||
} | ||
allowResets() { | ||
let store = this.ctx.getStore(); | ||
if (store === undefined) { | ||
return true; | ||
} | ||
if (store.contextDepth() > 0) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
reset() { | ||
this.ctx = new async_hooks_1.AsyncLocalStorage(); | ||
this.ctx.enterWith(this.rt.createContextManager()); | ||
} | ||
upsertTags(tags) { | ||
@@ -19,0 +33,0 @@ const manager = this.ctx.getStore(); |
@@ -24,2 +24,3 @@ /* auto-generated by NAPI-RS */ | ||
static fromFiles(rootPath: string, files: Record<string, string>, envVars: Record<string, string>): BamlRuntime | ||
reset(rootPath: string, files: Record<string, string>, envVars: Record<string, string>): void | ||
createContextManager(): RuntimeContextManager | ||
@@ -87,2 +88,3 @@ callFunction(functionName: string, args: { [string]: any }, ctx: RuntimeContextManager, tb?: TypeBuilder | undefined | null, cb?: ClientRegistry | undefined | null): Promise<FunctionResult> | ||
deepClone(): RuntimeContextManager | ||
contextDepth(): number | ||
} | ||
@@ -89,0 +91,0 @@ |
{ | ||
"name": "@boundaryml/baml", | ||
"version": "0.56.1", | ||
"version": "0.57.0", | ||
"description": "BAML typescript bindings (package.json)", | ||
@@ -83,9 +83,9 @@ "repository": { | ||
"optionalDependencies": { | ||
"@boundaryml/baml-darwin-arm64": "0.56.1", | ||
"@boundaryml/baml-win32-arm64-msvc": "0.56.1", | ||
"@boundaryml/baml-linux-arm64-gnu": "0.56.1", | ||
"@boundaryml/baml-darwin-x64": "0.56.1", | ||
"@boundaryml/baml-win32-x64-msvc": "0.56.1", | ||
"@boundaryml/baml-linux-x64-gnu": "0.56.1" | ||
"@boundaryml/baml-darwin-arm64": "0.57.0", | ||
"@boundaryml/baml-win32-arm64-msvc": "0.57.0", | ||
"@boundaryml/baml-linux-arm64-gnu": "0.57.0", | ||
"@boundaryml/baml-darwin-x64": "0.57.0", | ||
"@boundaryml/baml-win32-x64-msvc": "0.57.0", | ||
"@boundaryml/baml-linux-x64-gnu": "0.57.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
32303
884