@ms-cloudpack/remote-cache 0.9.19 → 0.10.1
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.
- package/dist/{AzureRemoteCacheClient-2PTNMOT6.js → AzureRemoteCacheClient-XD7JMDG2.js} +61 -66
- package/dist/{ReporterDecorator-FZKB4MWN.js → ReporterDecorator-VMBTAZRW.js} +1 -1
- package/dist/{chunk-RMB6VPNI.js → chunk-AAHKL65V.js} +845 -58
- package/dist/{chunk-LTZT5O5D.js → chunk-RCTPZOA2.js} +7 -16
- package/dist/{getCredential-KVHUWSLC.js → getCredential-L2ZQELGO.js} +6 -8
- package/dist/{getListOfBlobs-3HS5OH6K.js → getListOfBlobs-EY2E5AZT.js} +2 -13
- package/dist/index.js +23 -13
- package/lib/AzureRemoteCacheClient.d.ts +2 -2
- package/lib/createCacheStorageConfig.d.ts +2 -2
- package/lib/getListOfBlobs.d.ts +2 -2
- package/lib/index.d.ts +0 -1
- package/package.json +4 -4
- package/dist/chunk-KLSW7CDL.js +0 -807
- package/lib/types/RemoteCacheClientOptions.d.ts +0 -7
|
@@ -4,17 +4,15 @@ import topLevelUrl from 'node:url';
|
|
|
4
4
|
const require = topLevelCreateRequire(import.meta.url);
|
|
5
5
|
const __filename = topLevelUrl.fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = topLevelPath.dirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
require_dist
|
|
9
|
+
} from "./chunk-RCTPZOA2.js";
|
|
7
10
|
import {
|
|
8
11
|
require_package as require_package2
|
|
9
12
|
} from "./chunk-N4V3CONX.js";
|
|
10
|
-
import {
|
|
11
|
-
createBlobStorageUrl,
|
|
12
|
-
require_dist
|
|
13
|
-
} from "./chunk-LTZT5O5D.js";
|
|
14
13
|
import {
|
|
15
14
|
require_package2 as require_package
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-KLSW7CDL.js";
|
|
15
|
+
} from "./chunk-AAHKL65V.js";
|
|
18
16
|
import {
|
|
19
17
|
__commonJS,
|
|
20
18
|
__name,
|
|
@@ -5326,9 +5324,9 @@ var require_lib2 = __commonJS({
|
|
|
5326
5324
|
}
|
|
5327
5325
|
});
|
|
5328
5326
|
|
|
5329
|
-
// ../../node_modules/.store/backfill-config-npm-6.
|
|
5327
|
+
// ../../node_modules/.store/backfill-config-npm-6.5.0-cd285d3dfd/package/lib/cacheConfig.js
|
|
5330
5328
|
var require_cacheConfig = __commonJS({
|
|
5331
|
-
"../../node_modules/.store/backfill-config-npm-6.
|
|
5329
|
+
"../../node_modules/.store/backfill-config-npm-6.5.0-cd285d3dfd/package/lib/cacheConfig.js"(exports) {
|
|
5332
5330
|
"use strict";
|
|
5333
5331
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5334
5332
|
exports.getAzureBlobConfigFromSerializedOptions = exports.getNpmConfigFromSerializedOptions = void 0;
|
|
@@ -5369,9 +5367,9 @@ var require_cacheConfig = __commonJS({
|
|
|
5369
5367
|
}
|
|
5370
5368
|
});
|
|
5371
5369
|
|
|
5372
|
-
// ../../node_modules/.store/backfill-config-npm-6.
|
|
5370
|
+
// ../../node_modules/.store/backfill-config-npm-6.5.0-cd285d3dfd/package/lib/envConfig.js
|
|
5373
5371
|
var require_envConfig = __commonJS({
|
|
5374
|
-
"../../node_modules/.store/backfill-config-npm-6.
|
|
5372
|
+
"../../node_modules/.store/backfill-config-npm-6.5.0-cd285d3dfd/package/lib/envConfig.js"(exports) {
|
|
5375
5373
|
"use strict";
|
|
5376
5374
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5377
5375
|
exports.getEnvConfig = void 0;
|
|
@@ -5435,9 +5433,9 @@ var require_envConfig = __commonJS({
|
|
|
5435
5433
|
}
|
|
5436
5434
|
});
|
|
5437
5435
|
|
|
5438
|
-
// ../../node_modules/.store/backfill-config-npm-6.
|
|
5436
|
+
// ../../node_modules/.store/backfill-config-npm-6.5.0-cd285d3dfd/package/lib/index.js
|
|
5439
5437
|
var require_lib3 = __commonJS({
|
|
5440
|
-
"../../node_modules/.store/backfill-config-npm-6.
|
|
5438
|
+
"../../node_modules/.store/backfill-config-npm-6.5.0-cd285d3dfd/package/lib/index.js"(exports) {
|
|
5441
5439
|
"use strict";
|
|
5442
5440
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
5443
5441
|
if (k2 === void 0) k2 = k;
|
|
@@ -26234,9 +26232,9 @@ var require_lib9 = __commonJS({
|
|
|
26234
26232
|
}
|
|
26235
26233
|
});
|
|
26236
26234
|
|
|
26237
|
-
// ../../node_modules/.store/backfill-hasher-npm-6.5.
|
|
26235
|
+
// ../../node_modules/.store/backfill-hasher-npm-6.5.3-199890ec07/package/lib/helpers.js
|
|
26238
26236
|
var require_helpers = __commonJS({
|
|
26239
|
-
"../../node_modules/.store/backfill-hasher-npm-6.5.
|
|
26237
|
+
"../../node_modules/.store/backfill-hasher-npm-6.5.3-199890ec07/package/lib/helpers.js"(exports) {
|
|
26240
26238
|
"use strict";
|
|
26241
26239
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
26242
26240
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -26272,9 +26270,9 @@ var require_helpers = __commonJS({
|
|
|
26272
26270
|
}
|
|
26273
26271
|
});
|
|
26274
26272
|
|
|
26275
|
-
// ../../node_modules/.store/backfill-hasher-npm-6.5.
|
|
26273
|
+
// ../../node_modules/.store/backfill-hasher-npm-6.5.3-199890ec07/package/lib/hashOfFiles.js
|
|
26276
26274
|
var require_hashOfFiles = __commonJS({
|
|
26277
|
-
"../../node_modules/.store/backfill-hasher-npm-6.5.
|
|
26275
|
+
"../../node_modules/.store/backfill-hasher-npm-6.5.3-199890ec07/package/lib/hashOfFiles.js"(exports) {
|
|
26278
26276
|
"use strict";
|
|
26279
26277
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
26280
26278
|
if (k2 === void 0) k2 = k;
|
|
@@ -26328,9 +26326,9 @@ var require_hashOfFiles = __commonJS({
|
|
|
26328
26326
|
}
|
|
26329
26327
|
});
|
|
26330
26328
|
|
|
26331
|
-
// ../../node_modules/.store/backfill-hasher-npm-6.5.
|
|
26329
|
+
// ../../node_modules/.store/backfill-hasher-npm-6.5.3-199890ec07/package/lib/resolveInternalDependencies.js
|
|
26332
26330
|
var require_resolveInternalDependencies = __commonJS({
|
|
26333
|
-
"../../node_modules/.store/backfill-hasher-npm-6.5.
|
|
26331
|
+
"../../node_modules/.store/backfill-hasher-npm-6.5.3-199890ec07/package/lib/resolveInternalDependencies.js"(exports) {
|
|
26334
26332
|
"use strict";
|
|
26335
26333
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26336
26334
|
exports.resolveInternalDependencies = exports.filterInternalDependencies = void 0;
|
|
@@ -26350,9 +26348,9 @@ var require_resolveInternalDependencies = __commonJS({
|
|
|
26350
26348
|
}
|
|
26351
26349
|
});
|
|
26352
26350
|
|
|
26353
|
-
// ../../node_modules/.store/backfill-hasher-npm-6.5.
|
|
26351
|
+
// ../../node_modules/.store/backfill-hasher-npm-6.5.3-199890ec07/package/lib/resolveExternalDependencies.js
|
|
26354
26352
|
var require_resolveExternalDependencies = __commonJS({
|
|
26355
|
-
"../../node_modules/.store/backfill-hasher-npm-6.5.
|
|
26353
|
+
"../../node_modules/.store/backfill-hasher-npm-6.5.3-199890ec07/package/lib/resolveExternalDependencies.js"(exports) {
|
|
26356
26354
|
"use strict";
|
|
26357
26355
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26358
26356
|
exports.resolveExternalDependencies = exports.addToQueue = exports.filterExternalDependencies = void 0;
|
|
@@ -26418,9 +26416,9 @@ var require_resolveExternalDependencies = __commonJS({
|
|
|
26418
26416
|
}
|
|
26419
26417
|
});
|
|
26420
26418
|
|
|
26421
|
-
// ../../node_modules/.store/backfill-hasher-npm-6.5.
|
|
26419
|
+
// ../../node_modules/.store/backfill-hasher-npm-6.5.3-199890ec07/package/lib/hashOfPackage.js
|
|
26422
26420
|
var require_hashOfPackage = __commonJS({
|
|
26423
|
-
"../../node_modules/.store/backfill-hasher-npm-6.5.
|
|
26421
|
+
"../../node_modules/.store/backfill-hasher-npm-6.5.3-199890ec07/package/lib/hashOfPackage.js"(exports) {
|
|
26424
26422
|
"use strict";
|
|
26425
26423
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
26426
26424
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -39133,9 +39131,9 @@ var require_lib12 = __commonJS({
|
|
|
39133
39131
|
}
|
|
39134
39132
|
});
|
|
39135
39133
|
|
|
39136
|
-
// ../../node_modules/.store/backfill-hasher-npm-6.5.
|
|
39134
|
+
// ../../node_modules/.store/backfill-hasher-npm-6.5.3-199890ec07/package/lib/createPackageHashes.js
|
|
39137
39135
|
var require_createPackageHashes = __commonJS({
|
|
39138
|
-
"../../node_modules/.store/backfill-hasher-npm-6.5.
|
|
39136
|
+
"../../node_modules/.store/backfill-hasher-npm-6.5.3-199890ec07/package/lib/createPackageHashes.js"(exports) {
|
|
39139
39137
|
"use strict";
|
|
39140
39138
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
39141
39139
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -39177,9 +39175,9 @@ var require_createPackageHashes = __commonJS({
|
|
|
39177
39175
|
}
|
|
39178
39176
|
});
|
|
39179
39177
|
|
|
39180
|
-
// ../../node_modules/.store/backfill-hasher-npm-6.5.
|
|
39178
|
+
// ../../node_modules/.store/backfill-hasher-npm-6.5.3-199890ec07/package/lib/repoInfo.js
|
|
39181
39179
|
var require_repoInfo = __commonJS({
|
|
39182
|
-
"../../node_modules/.store/backfill-hasher-npm-6.5.
|
|
39180
|
+
"../../node_modules/.store/backfill-hasher-npm-6.5.3-199890ec07/package/lib/repoInfo.js"(exports) {
|
|
39183
39181
|
"use strict";
|
|
39184
39182
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39185
39183
|
exports.getRepoInfo = exports.getRepoInfoNoCache = void 0;
|
|
@@ -39236,9 +39234,9 @@ var require_repoInfo = __commonJS({
|
|
|
39236
39234
|
}
|
|
39237
39235
|
});
|
|
39238
39236
|
|
|
39239
|
-
// ../../node_modules/.store/backfill-hasher-npm-6.5.
|
|
39237
|
+
// ../../node_modules/.store/backfill-hasher-npm-6.5.3-199890ec07/package/lib/index.js
|
|
39240
39238
|
var require_lib13 = __commonJS({
|
|
39241
|
-
"../../node_modules/.store/backfill-hasher-npm-6.5.
|
|
39239
|
+
"../../node_modules/.store/backfill-hasher-npm-6.5.3-199890ec07/package/lib/index.js"(exports) {
|
|
39242
39240
|
"use strict";
|
|
39243
39241
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
39244
39242
|
if (k2 === void 0) k2 = k;
|
|
@@ -44750,9 +44748,9 @@ var require_package55 = __commonJS({
|
|
|
44750
44748
|
}
|
|
44751
44749
|
});
|
|
44752
44750
|
|
|
44753
|
-
// ../../node_modules/.store/backfill-cache-npm-5.
|
|
44751
|
+
// ../../node_modules/.store/backfill-cache-npm-5.9.0-788fdaa99b/package/lib/hashFile.js
|
|
44754
44752
|
var require_hashFile = __commonJS({
|
|
44755
|
-
"../../node_modules/.store/backfill-cache-npm-5.
|
|
44753
|
+
"../../node_modules/.store/backfill-cache-npm-5.9.0-788fdaa99b/package/lib/hashFile.js"(exports) {
|
|
44756
44754
|
"use strict";
|
|
44757
44755
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
44758
44756
|
if (k2 === void 0) k2 = k;
|
|
@@ -44826,9 +44824,9 @@ var require_hashFile = __commonJS({
|
|
|
44826
44824
|
}
|
|
44827
44825
|
});
|
|
44828
44826
|
|
|
44829
|
-
// ../../node_modules/.store/backfill-cache-npm-5.
|
|
44827
|
+
// ../../node_modules/.store/backfill-cache-npm-5.9.0-788fdaa99b/package/lib/CacheStorage.js
|
|
44830
44828
|
var require_CacheStorage = __commonJS({
|
|
44831
|
-
"../../node_modules/.store/backfill-cache-npm-5.
|
|
44829
|
+
"../../node_modules/.store/backfill-cache-npm-5.9.0-788fdaa99b/package/lib/CacheStorage.js"(exports) {
|
|
44832
44830
|
"use strict";
|
|
44833
44831
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
44834
44832
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -44884,9 +44882,9 @@ var require_CacheStorage = __commonJS({
|
|
|
44884
44882
|
}
|
|
44885
44883
|
});
|
|
44886
44884
|
|
|
44887
|
-
// ../../node_modules/.store/backfill-cache-npm-5.
|
|
44885
|
+
// ../../node_modules/.store/backfill-cache-npm-5.9.0-788fdaa99b/package/lib/AzureBlobCacheStorage.js
|
|
44888
44886
|
var require_AzureBlobCacheStorage = __commonJS({
|
|
44889
|
-
"../../node_modules/.store/backfill-cache-npm-5.
|
|
44887
|
+
"../../node_modules/.store/backfill-cache-npm-5.9.0-788fdaa99b/package/lib/AzureBlobCacheStorage.js"(exports) {
|
|
44890
44888
|
"use strict";
|
|
44891
44889
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
44892
44890
|
if (k2 === void 0) k2 = k;
|
|
@@ -44963,22 +44961,24 @@ var require_AzureBlobCacheStorage = __commonJS({
|
|
|
44963
44961
|
bufferSize: FOUR_MEGABYTES,
|
|
44964
44962
|
maxBuffers: 5
|
|
44965
44963
|
};
|
|
44966
|
-
async function createBlobClient(connectionString, containerName, blobName, credential) {
|
|
44967
|
-
const { BlobServiceClient: BlobServiceClient2 } = await Promise.resolve().then(() => __importStar(require_dist()));
|
|
44968
|
-
const blobServiceClient = credential ? new BlobServiceClient2(connectionString, credential) : BlobServiceClient2.fromConnectionString(connectionString);
|
|
44969
|
-
const containerClient = blobServiceClient.getContainerClient(containerName);
|
|
44970
|
-
const blobClient = containerClient.getBlobClient(blobName);
|
|
44971
|
-
return blobClient;
|
|
44972
|
-
}
|
|
44973
|
-
__name(createBlobClient, "createBlobClient");
|
|
44974
44964
|
var _AzureBlobCacheStorage = class _AzureBlobCacheStorage extends CacheStorage_1.CacheStorage {
|
|
44975
44965
|
constructor(options, logger, cwd, incrementalCaching = false) {
|
|
44976
44966
|
super(logger, cwd, incrementalCaching);
|
|
44977
44967
|
this.options = options;
|
|
44968
|
+
if ("containerClient" in options) {
|
|
44969
|
+
this.getContainerClient = () => Promise.resolve(options.containerClient);
|
|
44970
|
+
} else {
|
|
44971
|
+
const { connectionString, container, credential } = options;
|
|
44972
|
+
this.getContainerClient = () => Promise.resolve().then(() => __importStar(require_dist())).then(({ BlobServiceClient }) => {
|
|
44973
|
+
const blobServiceClient = credential ? new BlobServiceClient(connectionString, credential) : BlobServiceClient.fromConnectionString(connectionString);
|
|
44974
|
+
const containerClient = blobServiceClient.getContainerClient(container);
|
|
44975
|
+
return containerClient;
|
|
44976
|
+
});
|
|
44977
|
+
}
|
|
44978
44978
|
}
|
|
44979
44979
|
async _fetch(hash) {
|
|
44980
44980
|
try {
|
|
44981
|
-
const blobClient = await
|
|
44981
|
+
const blobClient = (await this.getContainerClient()).getBlobClient(hash);
|
|
44982
44982
|
if (this.options.maxSize) {
|
|
44983
44983
|
const sizeResponse = await blobClient.getProperties();
|
|
44984
44984
|
if (sizeResponse.contentLength && sizeResponse.contentLength > this.options.maxSize) {
|
|
@@ -45012,7 +45012,7 @@ var require_AzureBlobCacheStorage = __commonJS({
|
|
|
45012
45012
|
}
|
|
45013
45013
|
}
|
|
45014
45014
|
async _put(hash, filesToCache) {
|
|
45015
|
-
const blobClient = await
|
|
45015
|
+
const blobClient = (await this.getContainerClient()).getBlobClient(hash);
|
|
45016
45016
|
const blockBlobClient = blobClient.getBlockBlobClient();
|
|
45017
45017
|
const tarStream = tar_fs_1.default.pack(this.cwd, { entries: filesToCache });
|
|
45018
45018
|
if (this.options.maxSize) {
|
|
@@ -45034,9 +45034,9 @@ var require_AzureBlobCacheStorage = __commonJS({
|
|
|
45034
45034
|
}
|
|
45035
45035
|
});
|
|
45036
45036
|
|
|
45037
|
-
// ../../node_modules/.store/backfill-cache-npm-5.
|
|
45037
|
+
// ../../node_modules/.store/backfill-cache-npm-5.9.0-788fdaa99b/package/lib/LocalCacheStorage.js
|
|
45038
45038
|
var require_LocalCacheStorage = __commonJS({
|
|
45039
|
-
"../../node_modules/.store/backfill-cache-npm-5.
|
|
45039
|
+
"../../node_modules/.store/backfill-cache-npm-5.9.0-788fdaa99b/package/lib/LocalCacheStorage.js"(exports) {
|
|
45040
45040
|
"use strict";
|
|
45041
45041
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
45042
45042
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -47081,9 +47081,9 @@ var require_package69 = __commonJS({
|
|
|
47081
47081
|
}
|
|
47082
47082
|
});
|
|
47083
47083
|
|
|
47084
|
-
// ../../node_modules/.store/backfill-cache-npm-5.
|
|
47084
|
+
// ../../node_modules/.store/backfill-cache-npm-5.9.0-788fdaa99b/package/lib/NpmCacheStorage.js
|
|
47085
47085
|
var require_NpmCacheStorage = __commonJS({
|
|
47086
|
-
"../../node_modules/.store/backfill-cache-npm-5.
|
|
47086
|
+
"../../node_modules/.store/backfill-cache-npm-5.9.0-788fdaa99b/package/lib/NpmCacheStorage.js"(exports) {
|
|
47087
47087
|
"use strict";
|
|
47088
47088
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
47089
47089
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -47183,9 +47183,9 @@ var require_NpmCacheStorage = __commonJS({
|
|
|
47183
47183
|
}
|
|
47184
47184
|
});
|
|
47185
47185
|
|
|
47186
|
-
// ../../node_modules/.store/backfill-cache-npm-5.
|
|
47186
|
+
// ../../node_modules/.store/backfill-cache-npm-5.9.0-788fdaa99b/package/lib/LocalSkipCacheStorage.js
|
|
47187
47187
|
var require_LocalSkipCacheStorage = __commonJS({
|
|
47188
|
-
"../../node_modules/.store/backfill-cache-npm-5.
|
|
47188
|
+
"../../node_modules/.store/backfill-cache-npm-5.9.0-788fdaa99b/package/lib/LocalSkipCacheStorage.js"(exports) {
|
|
47189
47189
|
"use strict";
|
|
47190
47190
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
47191
47191
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -47225,9 +47225,9 @@ var require_LocalSkipCacheStorage = __commonJS({
|
|
|
47225
47225
|
}
|
|
47226
47226
|
});
|
|
47227
47227
|
|
|
47228
|
-
// ../../node_modules/.store/backfill-cache-npm-5.
|
|
47228
|
+
// ../../node_modules/.store/backfill-cache-npm-5.9.0-788fdaa99b/package/lib/index.js
|
|
47229
47229
|
var require_lib14 = __commonJS({
|
|
47230
|
-
"../../node_modules/.store/backfill-cache-npm-5.
|
|
47230
|
+
"../../node_modules/.store/backfill-cache-npm-5.9.0-788fdaa99b/package/lib/index.js"(exports) {
|
|
47231
47231
|
"use strict";
|
|
47232
47232
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47233
47233
|
exports.getCacheStorageProvider = exports.isCustomProvider = exports.CacheStorage = void 0;
|
|
@@ -47276,9 +47276,9 @@ var require_lib14 = __commonJS({
|
|
|
47276
47276
|
}
|
|
47277
47277
|
});
|
|
47278
47278
|
|
|
47279
|
-
// ../../node_modules/.store/backfill-npm-6.2.
|
|
47279
|
+
// ../../node_modules/.store/backfill-npm-6.2.4-25c6611e73/package/lib/api.js
|
|
47280
47280
|
var require_api = __commonJS({
|
|
47281
|
-
"../../node_modules/.store/backfill-npm-6.2.
|
|
47281
|
+
"../../node_modules/.store/backfill-npm-6.2.4-25c6611e73/package/lib/api.js"(exports) {
|
|
47282
47282
|
"use strict";
|
|
47283
47283
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47284
47284
|
exports.put = exports.fetch = exports.computeHashOfOutput = exports.computeHash = exports.makeLogger = void 0;
|
|
@@ -47358,26 +47358,21 @@ import fs from "fs";
|
|
|
47358
47358
|
|
|
47359
47359
|
// src/createCacheStorageConfig.ts
|
|
47360
47360
|
var import_backfill_cache = __toESM(require_lib14(), 1);
|
|
47361
|
-
var import_storage_blob = __toESM(require_dist(), 1);
|
|
47362
47361
|
import { join } from "path";
|
|
47363
47362
|
import { readFile } from "fs/promises";
|
|
47364
47363
|
import { lookup } from "mime-types";
|
|
47365
47364
|
var _CustomAzureCacheStorage = class _CustomAzureCacheStorage extends import_backfill_cache.CacheStorage {
|
|
47366
|
-
constructor(
|
|
47365
|
+
constructor(containerClient, logger, cwd) {
|
|
47367
47366
|
super(logger, cwd);
|
|
47367
|
+
this.containerClient = containerClient;
|
|
47368
47368
|
this.logger = logger;
|
|
47369
47369
|
this.cwd = cwd;
|
|
47370
|
-
const connectionString = createBlobStorageUrl(storageAccount);
|
|
47371
|
-
const blobStorageClient = new import_storage_blob.BlobServiceClient(connectionString, credential);
|
|
47372
|
-
this.containerClient = blobStorageClient.getContainerClient(container);
|
|
47373
47370
|
const internalCacheFolder = "";
|
|
47374
47371
|
this.tarStorage = (0, import_backfill_cache.getCacheStorageProvider)(
|
|
47375
47372
|
{
|
|
47376
47373
|
provider: "azure-blob",
|
|
47377
47374
|
options: {
|
|
47378
|
-
|
|
47379
|
-
credential,
|
|
47380
|
-
container
|
|
47375
|
+
containerClient: this.containerClient
|
|
47381
47376
|
}
|
|
47382
47377
|
},
|
|
47383
47378
|
internalCacheFolder,
|
|
@@ -47408,23 +47403,23 @@ var _CustomAzureCacheStorage = class _CustomAzureCacheStorage extends import_bac
|
|
|
47408
47403
|
};
|
|
47409
47404
|
__name(_CustomAzureCacheStorage, "CustomAzureCacheStorage");
|
|
47410
47405
|
var CustomAzureCacheStorage = _CustomAzureCacheStorage;
|
|
47411
|
-
function createCacheStorageConfig(
|
|
47406
|
+
function createCacheStorageConfig(containerClient) {
|
|
47412
47407
|
return {
|
|
47413
47408
|
name: "Custom Azure Cache Storage",
|
|
47414
|
-
provider: /* @__PURE__ */ __name((logger, cwd) => new CustomAzureCacheStorage(
|
|
47409
|
+
provider: /* @__PURE__ */ __name((logger, cwd) => new CustomAzureCacheStorage(containerClient, logger, cwd), "provider")
|
|
47415
47410
|
};
|
|
47416
47411
|
}
|
|
47417
47412
|
__name(createCacheStorageConfig, "createCacheStorageConfig");
|
|
47418
47413
|
|
|
47419
47414
|
// src/AzureRemoteCacheClient.ts
|
|
47420
47415
|
var _AzureRemoteCacheClient = class _AzureRemoteCacheClient {
|
|
47421
|
-
constructor(
|
|
47416
|
+
constructor(containerClient) {
|
|
47422
47417
|
this.logger = (0, import_api.makeLogger)("mute", process.stdout, process.stderr);
|
|
47423
47418
|
this.config = {
|
|
47424
47419
|
incrementalCaching: true,
|
|
47425
47420
|
internalCacheFolder: "",
|
|
47426
47421
|
// not used by azure-blob
|
|
47427
|
-
cacheStorageConfig: createCacheStorageConfig(
|
|
47422
|
+
cacheStorageConfig: createCacheStorageConfig(containerClient)
|
|
47428
47423
|
};
|
|
47429
47424
|
}
|
|
47430
47425
|
/**
|
|
@@ -76,7 +76,7 @@ ${list}`
|
|
|
76
76
|
downloadFolder(options) {
|
|
77
77
|
const { id, path, friendlyName } = options;
|
|
78
78
|
const task = this.context.reporter.addTask(`Downloading from remote cache: ${friendlyName}`);
|
|
79
|
-
return this.context.telemetryClient.tracer.startActiveSpan("
|
|
79
|
+
return this.context.telemetryClient.tracer.startActiveSpan("DOWNLOAD_FOLDER", async () => {
|
|
80
80
|
try {
|
|
81
81
|
const downloadResult = await this.client.downloadFolder(options);
|
|
82
82
|
const details = bulletedList([`Id: ${id}`, `Path: ${path}`, `Name: ${friendlyName}`]);
|