MCPcopy Index your code
hub / github.com/simstudioai/sim / getAccountCredentials

Function getAccountCredentials

apps/sim/lib/uploads/providers/blob/client.ts:53–68  ·  view source on GitHub ↗

* Get account credentials from BLOB_CONFIG, extracting from connection string if necessary.

()

Source from the content-addressed store, hash-verified

51 * Get account credentials from BLOB_CONFIG, extracting from connection string if necessary.
52 */
53function getAccountCredentials(): ParsedCredentials {
54 if (BLOB_CONFIG.connectionString) {
55 return parseConnectionString(BLOB_CONFIG.connectionString)
56 }
57
58 if (BLOB_CONFIG.accountName && BLOB_CONFIG.accountKey) {
59 return {
60 accountName: BLOB_CONFIG.accountName,
61 accountKey: BLOB_CONFIG.accountKey,
62 }
63 }
64
65 throw new Error(
66 'Azure Blob Storage credentials are missing – set AZURE_CONNECTION_STRING or both AZURE_ACCOUNT_NAME and AZURE_ACCOUNT_KEY'
67 )
68}
69
70export async function getBlobServiceClient(): Promise<BlobServiceClientType> {
71 if (_blobServiceClient) return _blobServiceClient

Callers 2

getPresignedUrlFunction · 0.85
getMultipartPartUrlsFunction · 0.85

Calls 1

parseConnectionStringFunction · 0.85

Tested by

no test coverage detected