@stryker-mutator/dashboard-data-access 0.14.4-pr-888.7 → 0.14.4-pr-888.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
- import { StorageSharedKeyCredential, BlobServiceClient } from '@azure/storage-blob';
1
+ import { DefaultAzureCredential } from '@azure/identity';
2
+ import { BlobServiceClient, StorageSharedKeyCredential } from '@azure/storage-blob';
2
3
  export const createBlobServiceClient = () => {
3
4
  const connectionString = process.env.AZURE_STORAGE_CONNECTION_STRING;
4
5
  if (connectionString) {
@@ -7,8 +8,11 @@ export const createBlobServiceClient = () => {
7
8
  else {
8
9
  const storageAccount = process.env.AZURE_STORAGE_ACCOUNT;
9
10
  const accessKey = process.env.AZURE_STORAGE_ACCESS_KEY;
10
- if (storageAccount && accessKey) {
11
- return new BlobServiceClient(`https://${storageAccount}.blob.core.windows.net`, new StorageSharedKeyCredential(storageAccount, accessKey));
11
+ if (storageAccount) {
12
+ const credential = accessKey
13
+ ? new StorageSharedKeyCredential(storageAccount, accessKey)
14
+ : new DefaultAzureCredential();
15
+ return new BlobServiceClient(`https://${storageAccount}.blob.core.windows.net`, credential);
12
16
  }
13
17
  }
14
18
  throw new Error('AZURE_STORAGE_CONNECTION_STRING is not set');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryker-mutator/dashboard-data-access",
3
- "version": "0.14.4-pr-888.7",
3
+ "version": "0.14.4-pr-888.9",
4
4
  "type": "module",
5
5
  "description": "This package contains the data access layer of the stryker dashboard application.",
6
6
  "scripts": {
@@ -24,9 +24,9 @@
24
24
  "dependencies": {
25
25
  "@azure/data-tables": "13.2.2",
26
26
  "@azure/storage-blob": "12.24.0",
27
- "@stryker-mutator/dashboard-common": "0.14.4-pr-888.7",
27
+ "@stryker-mutator/dashboard-common": "0.14.4-pr-888.9",
28
28
  "mutation-testing-metrics": "3.2.0",
29
29
  "mutation-testing-report-schema": "3.1.1"
30
30
  },
31
- "gitHead": "33ee97e2f96a71d6af4068a3cf714480753d894e"
31
+ "gitHead": "4049d79c6add8e767b41c8a3a0712d7558b9a31c"
32
32
  }