import { writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store"; import { createAsyncLock, type AsyncLock } from "./async-lock.js"; import { loadMatrixCredentials, resolveMatrixCredentialsPath } from "./credentials-read.js"; import type { MatrixStoredCredentials } from "./credentials-read.js";
export {
clearMatrixCredentials,
credentialsMatchConfig,
loadMatrixCredentials,
resolveMatrixCredentialsDir,
resolveMatrixCredentialsPath,
} from "./credentials-read.js";
export type { MatrixStoredCredentials } from "./credentials-read.js";
const credentialWriteLocks = new Map<string, AsyncLock>();
function withCredentialWriteLock<T>(credPath: string, fn: () => Promise<T>): Promise<T> {
let withLock = credentialWriteLocks.get(credPath); if (!withLock) {
withLock = createAsyncLock();
credentialWriteLocks.set(credPath, withLock);
} return withLock(fn);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.