diff --git a/packages/cli/src/fs.ts b/packages/cli/src/fs.ts index ec5a1d9a..dddefe2d 100644 --- a/packages/cli/src/fs.ts +++ b/packages/cli/src/fs.ts @@ -1,6 +1,7 @@ import { fsTypeFromUrl, localFsFromUrl } from '@preevy/core' import { googleCloudStorageFs } from '@preevy/driver-gce' import { s3fs } from '@preevy/driver-lightsail' +import { azureStorageBlobFs } from '@preevy/driver-azure' export const fsFromUrl = async (url: string, localBaseDir: string) => { const fsType = fsTypeFromUrl(url) @@ -17,5 +18,10 @@ export const fsFromUrl = async (url: string, localBaseDir: string) => { // eslint-disable-next-line @typescript-eslint/return-await return await googleCloudStorageFs(url) } + if (fsType === 'az') { + // eslint false positive here on case-sensitive filesystems due to unknown type + // eslint-disable-next-line @typescript-eslint/return-await + return await azureStorageBlobFs(url) + } throw new Error(`Unsupported URL type: ${fsType}`) } diff --git a/packages/driver-azure/src/driver/fs/index.ts b/packages/driver-azure/src/fs/index.ts similarity index 98% rename from packages/driver-azure/src/driver/fs/index.ts rename to packages/driver-azure/src/fs/index.ts index 360df3eb..947d6dfb 100644 --- a/packages/driver-azure/src/driver/fs/index.ts +++ b/packages/driver-azure/src/fs/index.ts @@ -3,7 +3,7 @@ import { VirtualFS } from '@preevy/core' export const defaultBucketName = ( { profileAlias, accountId }: { profileAlias: string; accountId: string }, -) => `preevy-${accountId}-${profileAlias}` +) => `preevy-${accountId}-${profileAlias}` const ensureBucketExists = async (blobServiceClient: BlobServiceClient, containerName: string) => { const containerClient: ContainerClient = blobServiceClient.getContainerClient(containerName) diff --git a/packages/driver-azure/src/index.ts b/packages/driver-azure/src/index.ts index 546c88ee..6802b160 100644 --- a/packages/driver-azure/src/index.ts +++ b/packages/driver-azure/src/index.ts @@ -1,3 +1,4 @@ import azure from './driver' export default azure +export { azureStorageBlobFs, defaultBucketName } from './fs'