Added azurite connection string option to techdocs azureBlobStorage publisher

Signed-off-by: titanventura <aswath7862001@gmail.com>
This commit is contained in:
titanventura
2023-07-27 23:46:37 +05:30
parent dcd7e1622c
commit 5985d458ee
3 changed files with 94 additions and 5 deletions
@@ -78,6 +78,26 @@ export class AzureBlobStoragePublish implements PublisherBase {
);
}
const legacyPathCasing =
config.getOptionalBoolean(
'techdocs.legacyUseCaseSensitiveTripletPaths',
) || false;
// Give more priority for azurite, if configured, return the AzureBlobStoragePublish object here itself
const azuriteConnString = config.getOptionalString(
'techdocs.publisher.azureBlobStorage.azuriteConnectionString',
);
if (azuriteConnString) {
const storageClient =
BlobServiceClient.fromConnectionString(azuriteConnString);
return new AzureBlobStoragePublish({
storageClient: storageClient,
containerName: containerName,
legacyPathCasing: legacyPathCasing,
logger: logger,
});
}
let accountName = '';
try {
accountName = config.getString(
@@ -108,11 +128,6 @@ export class AzureBlobStoragePublish implements PublisherBase {
credential,
);
const legacyPathCasing =
config.getOptionalBoolean(
'techdocs.legacyUseCaseSensitiveTripletPaths',
) || false;
return new AzureBlobStoragePublish({
storageClient: storageClient,
containerName: containerName,