first commit
SAP-ERP Portal CI/CD / build (push) Failing after 5m20s

This commit is contained in:
John
2026-09-23 17:31:02 +05:30
commit 69b4e68baf
51657 changed files with 3864077 additions and 0 deletions
@@ -0,0 +1,35 @@
import { AnthropicError } from "../../core/error.mjs";
/**
* Reads a JWT from a file on every call. Supports automatic rotation
* (e.g. Kubernetes projected service-account tokens).
*/
export function identityTokenFromFile(path) {
if (!path) {
throw new AnthropicError('Identity token file path is empty');
}
return async () => {
const fs = await import('node:fs');
let content;
try {
content = await fs.promises.readFile(path, 'utf-8');
}
catch (err) {
throw new AnthropicError(`Failed to read identity token file at ${path}: ${err}`);
}
const token = content.trim();
if (!token) {
throw new AnthropicError(`Identity token file at ${path} is empty`);
}
return token;
};
}
/**
* Wraps a static JWT string as an {@link IdentityTokenProvider}.
*/
export function identityTokenFromValue(token) {
if (!token) {
throw new AnthropicError('Identity token value is empty');
}
return () => token;
}
//# sourceMappingURL=identity-token.mjs.map