Update Site source

This commit is contained in:
Meghdad committed 2026-10-12 23:20:56 +03:30
commit 9a4ce930c7
126 files changed
+25723

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import { AsyncLocalStorage } from "node:async_hooks";
import type { ConnectorBinding } from "./connector-contract.mjs";
// Capture the trusted capability before Vinext derives its revalidation context,
// which does not retain custom execution-context props. Never share across requests.
const bindings = new AsyncLocalStorage<ConnectorBinding | undefined>();
export function runWithConnectorBinding<T>(
binding: ConnectorBinding | undefined,
run: () => T,
): T {
return bindings.run(binding, run);
}
export function getConnectorBinding(): ConnectorBinding | undefined {
return bindings.getStore();
}