From 92f0fd0a9a215d9a331bb2de0356c94ecaf0a82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Barri=C3=A9?= Date: Thu, 10 Nov 2022 11:52:37 +0100 Subject: [PATCH] Update @actions/cache --- dist/index.js | 1979 +++++++++++++++++++++++++------------------------ package.json | 2 +- yarn.lock | 55 +- 3 files changed, 1036 insertions(+), 1000 deletions(-) diff --git a/dist/index.js b/dist/index.js index 47da3e0d2..e9352fa2b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -613,17 +613,18 @@ function restoreCache(paths, primaryKey, restoreKeys, options) { checkKey(key); } const compressionMethod = yield utils.getCompressionMethod(); - // path are needed to compute version - const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, { - compressionMethod - }); - if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) { - // Cache not found - return undefined; - } - const archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core.debug(`Archive Path: ${archivePath}`); + let archivePath = ''; try { + // path are needed to compute version + const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, { + compressionMethod + }); + if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) { + // Cache not found + return undefined; + } + archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + core.debug(`Archive Path: ${archivePath}`); // Download the cache from the cache entry yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core.isDebug()) { @@ -633,6 +634,17 @@ function restoreCache(paths, primaryKey, restoreKeys, options) { core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); yield tar_1.extractTar(archivePath, compressionMethod); core.info('Cache restored successfully'); + return cacheEntry.cacheKey; + } + catch (error) { + const typedError = error; + if (typedError.name === ValidationError.name) { + throw error; + } + else { + // Supress all non-validation cache related errors because caching should be optional + core.warning(`Failed to restore: ${error.message}`); + } } finally { // Try to delete the archive to save space @@ -643,7 +655,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options) { core.debug(`Failed to delete archive: ${error}`); } } - return cacheEntry.cacheKey; + return undefined; }); } exports.restoreCache = restoreCache; @@ -661,7 +673,7 @@ function saveCache(paths, key, options) { checkPaths(paths); checkKey(key); const compressionMethod = yield utils.getCompressionMethod(); - let cacheId = null; + let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); core.debug('Cache Paths:'); core.debug(`${JSON.stringify(cachePaths)}`); @@ -700,6 +712,18 @@ function saveCache(paths, key, options) { core.debug(`Saving Cache (ID: ${cacheId})`); yield cacheHttpClient.saveCache(cacheId, archivePath, options); } + catch (error) { + const typedError = error; + if (typedError.name === ValidationError.name) { + throw error; + } + else if (typedError.name === ReserveCacheError.name) { + core.info(`Failed to save: ${typedError.message}`); + } + else { + core.warning(`Failed to save: ${typedError.message}`); + } + } finally { // Try to delete the archive to save space try { @@ -1024,7 +1048,13 @@ function resolvePaths(patterns) { .replace(new RegExp(`\\${path.sep}`, 'g'), '/'); core.debug(`Matched: ${relativeFile}`); // Paths are made relative so the tar entries are all relative to the root of the workspace. - paths.push(`${relativeFile}`); + if (relativeFile === '') { + // path.relative returns empty string if workspace and file are equal + paths.push('.'); + } + else { + paths.push(`${relativeFile}`); + } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } @@ -1182,6 +1212,7 @@ const util = __importStar(__nccwpck_require__(3837)); const utils = __importStar(__nccwpck_require__(1518)); const constants_1 = __nccwpck_require__(8840); const requestUtils_1 = __nccwpck_require__(3981); +const abort_controller_1 = __nccwpck_require__(2557); /** * Pipes the body of a HTTP response to a stream * @@ -1365,15 +1396,24 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) { const fd = fs.openSync(archivePath, 'w'); try { downloadProgress.startDisplayTimer(); + const controller = new abort_controller_1.AbortController(); + const abortSignal = controller.signal; while (!downloadProgress.isDone()) { const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize; const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart); downloadProgress.nextSegment(segmentSize); - const result = yield client.downloadToBuffer(segmentStart, segmentSize, { + const result = yield promiseWithTimeout(options.segmentTimeoutInMs || 3600000, client.downloadToBuffer(segmentStart, segmentSize, { + abortSignal, concurrency: options.downloadConcurrency, onProgress: downloadProgress.onProgress() - }); - fs.writeFileSync(fd, result); + })); + if (result === 'timeout') { + controller.abort(); + throw new Error('Aborting cache download as the download time exceeded the timeout.'); + } + else if (Buffer.isBuffer(result)) { + fs.writeFileSync(fd, result); + } } } finally { @@ -1384,6 +1424,16 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) { }); } exports.downloadCacheStorageSDK = downloadCacheStorageSDK; +const promiseWithTimeout = (timeoutMs, promise) => __awaiter(void 0, void 0, void 0, function* () { + let timeoutHandle; + const timeoutPromise = new Promise(resolve => { + timeoutHandle = setTimeout(() => resolve('timeout'), timeoutMs); + }); + return Promise.race([promise, timeoutPromise]).then(result => { + clearTimeout(timeoutHandle); + return result; + }); +}); //# sourceMappingURL=downloadUtils.js.map /***/ }), @@ -1543,6 +1593,7 @@ const fs_1 = __nccwpck_require__(7147); const path = __importStar(__nccwpck_require__(1017)); const utils = __importStar(__nccwpck_require__(1518)); const constants_1 = __nccwpck_require__(8840); +const IS_WINDOWS = process.platform === 'win32'; function getTarPath(args, compressionMethod) { return __awaiter(this, void 0, void 0, function* () { switch (process.platform) { @@ -1590,26 +1641,43 @@ function getWorkingDirectory() { var _a; return (_a = process.env['GITHUB_WORKSPACE']) !== null && _a !== void 0 ? _a : process.cwd(); } +// Common function for extractTar and listTar to get the compression method +function getCompressionProgram(compressionMethod) { + // -d: Decompress. + // unzstd is equivalent to 'zstd -d' + // --long=#: Enables long distance matching with # bits. Maximum is 30 (1GB) on 32-bit OS and 31 (2GB) on 64-bit. + // Using 30 here because we also support 32-bit self-hosted runners. + switch (compressionMethod) { + case constants_1.CompressionMethod.Zstd: + return [ + '--use-compress-program', + IS_WINDOWS ? 'zstd -d --long=30' : 'unzstd --long=30' + ]; + case constants_1.CompressionMethod.ZstdWithoutLong: + return ['--use-compress-program', IS_WINDOWS ? 'zstd -d' : 'unzstd']; + default: + return ['-z']; + } +} +function listTar(archivePath, compressionMethod) { + return __awaiter(this, void 0, void 0, function* () { + const args = [ + ...getCompressionProgram(compressionMethod), + '-tf', + archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), + '-P' + ]; + yield execTar(args, compressionMethod); + }); +} +exports.listTar = listTar; function extractTar(archivePath, compressionMethod) { return __awaiter(this, void 0, void 0, function* () { // Create directory to extract tar into const workingDirectory = getWorkingDirectory(); yield io.mkdirP(workingDirectory); - // --d: Decompress. - // --long=#: Enables long distance matching with # bits. Maximum is 30 (1GB) on 32-bit OS and 31 (2GB) on 64-bit. - // Using 30 here because we also support 32-bit self-hosted runners. - function getCompressionProgram() { - switch (compressionMethod) { - case constants_1.CompressionMethod.Zstd: - return ['--use-compress-program', 'zstd -d --long=30']; - case constants_1.CompressionMethod.ZstdWithoutLong: - return ['--use-compress-program', 'zstd -d']; - default: - return ['-z']; - } - } const args = [ - ...getCompressionProgram(), + ...getCompressionProgram(compressionMethod), '-xf', archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), '-P', @@ -1628,15 +1696,19 @@ function createTar(archiveFolder, sourceDirectories, compressionMethod) { fs_1.writeFileSync(path.join(archiveFolder, manifestFilename), sourceDirectories.join('\n')); const workingDirectory = getWorkingDirectory(); // -T#: Compress using # working thread. If # is 0, attempt to detect and use the number of physical CPU cores. + // zstdmt is equivalent to 'zstd -T0' // --long=#: Enables long distance matching with # bits. Maximum is 30 (1GB) on 32-bit OS and 31 (2GB) on 64-bit. // Using 30 here because we also support 32-bit self-hosted runners. // Long range mode is added to zstd in v1.3.2 release, so we will not use --long in older version of zstd. function getCompressionProgram() { switch (compressionMethod) { case constants_1.CompressionMethod.Zstd: - return ['--use-compress-program', 'zstd -T0 --long=30']; + return [ + '--use-compress-program', + IS_WINDOWS ? 'zstd -T0 --long=30' : 'zstdmt --long=30' + ]; case constants_1.CompressionMethod.ZstdWithoutLong: - return ['--use-compress-program', 'zstd -T0']; + return ['--use-compress-program', IS_WINDOWS ? 'zstd -T0' : 'zstdmt']; default: return ['-z']; } @@ -1658,32 +1730,6 @@ function createTar(archiveFolder, sourceDirectories, compressionMethod) { }); } exports.createTar = createTar; -function listTar(archivePath, compressionMethod) { - return __awaiter(this, void 0, void 0, function* () { - // --d: Decompress. - // --long=#: Enables long distance matching with # bits. - // Maximum is 30 (1GB) on 32-bit OS and 31 (2GB) on 64-bit. - // Using 30 here because we also support 32-bit self-hosted runners. - function getCompressionProgram() { - switch (compressionMethod) { - case constants_1.CompressionMethod.Zstd: - return ['--use-compress-program', 'zstd -d --long=30']; - case constants_1.CompressionMethod.ZstdWithoutLong: - return ['--use-compress-program', 'zstd -d']; - default: - return ['-z']; - } - } - const args = [ - ...getCompressionProgram(), - '-tf', - archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), - '-P' - ]; - yield execTar(args, compressionMethod); - }); -} -exports.listTar = listTar; //# sourceMappingURL=tar.js.map /***/ }), @@ -1734,7 +1780,8 @@ function getDownloadOptions(copy) { const result = { useAzureSdk: true, downloadConcurrency: 8, - timeoutInMs: 30000 + timeoutInMs: 30000, + segmentTimeoutInMs: 3600000 }; if (copy) { if (typeof copy.useAzureSdk === 'boolean') { @@ -1746,10 +1793,21 @@ function getDownloadOptions(copy) { if (typeof copy.timeoutInMs === 'number') { result.timeoutInMs = copy.timeoutInMs; } + if (typeof copy.segmentTimeoutInMs === 'number') { + result.segmentTimeoutInMs = copy.segmentTimeoutInMs; + } + } + const segmentDownloadTimeoutMins = process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS']; + if (segmentDownloadTimeoutMins && + !isNaN(Number(segmentDownloadTimeoutMins)) && + isFinite(Number(segmentDownloadTimeoutMins))) { + result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1000; } core.debug(`Use Azure SDK: ${result.useAzureSdk}`); core.debug(`Download concurrency: ${result.downloadConcurrency}`); core.debug(`Request timeout (ms): ${result.timeoutInMs}`); + core.debug(`Cache segment download timeout mins env var: ${process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS']}`); + core.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); return result; } exports.getDownloadOptions = getDownloadOptions; @@ -11342,7 +11400,6 @@ var uuid = __nccwpck_require__(5840); var util = __nccwpck_require__(3837); var tslib = __nccwpck_require__(4351); var xml2js = __nccwpck_require__(6189); -var abortController = __nccwpck_require__(2557); var coreUtil = __nccwpck_require__(1333); var logger$1 = __nccwpck_require__(3233); var coreAuth = __nccwpck_require__(9645); @@ -11350,6 +11407,7 @@ var os = __nccwpck_require__(2037); var http = __nccwpck_require__(3685); var https = __nccwpck_require__(5687); var tough = __nccwpck_require__(8165); +var abortController = __nccwpck_require__(2557); var tunnel = __nccwpck_require__(4294); var stream = __nccwpck_require__(2781); var FormData = __nccwpck_require__(6279); @@ -11572,7 +11630,7 @@ const Constants = { /** * The core-http version */ - coreHttpVersion: "2.2.7", + coreHttpVersion: "2.3.1", /** * Specifies HTTP. */ @@ -12489,7 +12547,8 @@ function isSpecialXmlProperty(propertyName, options) { return [XML_ATTRKEY, options.xmlCharKey].includes(propertyName); } function deserializeCompositeType(serializer, mapper, responseBody, objectName, options) { - var _a; + var _a, _b; + const xmlCharKey = (_a = options.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY; if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) { mapper = getPolymorphicMapper(serializer, mapper, responseBody, "serializedName"); } @@ -12520,6 +12579,16 @@ function deserializeCompositeType(serializer, mapper, responseBody, objectName, if (propertyMapper.xmlIsAttribute && responseBody[XML_ATTRKEY]) { instance[key] = serializer.deserialize(propertyMapper, responseBody[XML_ATTRKEY][xmlName], propertyObjectName, options); } + else if (propertyMapper.xmlIsMsText) { + if (responseBody[xmlCharKey] !== undefined) { + instance[key] = responseBody[xmlCharKey]; + } + else if (typeof responseBody === "string") { + // The special case where xml parser parses "content" into JSON of + // `{ name: "content"}` instead of `{ name: { "_": "content" }}` + instance[key] = responseBody; + } + } else { const propertyName = xmlElementName || xmlName || serializedName; if (propertyMapper.xmlIsWrapped) { @@ -12538,7 +12607,7 @@ function deserializeCompositeType(serializer, mapper, responseBody, objectName, xmlName is "Cors" and xmlElementName is"CorsRule". */ const wrapped = responseBody[xmlName]; - const elementList = (_a = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _a !== void 0 ? _a : []; + const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : []; instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options); } else { @@ -13964,7 +14033,11 @@ class NodeFetchHttpClient { body = uploadReportStream; } const platformSpecificRequestInit = await this.prepareRequest(httpRequest); - const requestInit = Object.assign({ body: body, headers: httpRequest.headers.rawHeaders(), method: httpRequest.method, signal: abortController$1.signal, redirect: "manual" }, platformSpecificRequestInit); + const requestInit = Object.assign({ body: body, headers: httpRequest.headers.rawHeaders(), method: httpRequest.method, + // the types for RequestInit are from the browser, which expects AbortSignal to + // have `reason` and `throwIfAborted`, but these don't exist on our polyfill + // for Node. + signal: abortController$1.signal, redirect: "manual" }, platformSpecificRequestInit); let operationResponse; try { const response = await this.fetch(httpRequest.url, requestInit); @@ -14726,49 +14799,6 @@ function updateRetryData(retryOptions, retryData = { retryCount: 0, retryInterva return retryData; } -// Copyright (c) Microsoft Corporation. -const StandardAbortMessage$1 = "The operation was aborted."; -/** - * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds. - * @param delayInMs - The number of milliseconds to be delayed. - * @param value - The value to be resolved with after a timeout of t milliseconds. - * @param options - The options for delay - currently abort options - * @param abortSignal - The abortSignal associated with containing operation. - * @param abortErrorMsg - The abort error message associated with containing operation. - * @returns - Resolved promise - */ -function delay(delayInMs, value, options) { - return new Promise((resolve, reject) => { - let timer = undefined; - let onAborted = undefined; - const rejectOnAbort = () => { - return reject(new abortController.AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage$1)); - }; - const removeListeners = () => { - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) { - options.abortSignal.removeEventListener("abort", onAborted); - } - }; - onAborted = () => { - if (coreUtil.isDefined(timer)) { - clearTimeout(timer); - } - removeListeners(); - return rejectOnAbort(); - }; - if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) { - return rejectOnAbort(); - } - timer = setTimeout(() => { - removeListeners(); - resolve(value); - }, delayInMs); - if (options === null || options === void 0 ? void 0 : options.abortSignal) { - options.abortSignal.addEventListener("abort", onAborted); - } - }); -} - // Copyright (c) Microsoft Corporation. /** * Policy that retries the request as many times as configured for as long as the max retry time interval specified, each retry waiting longer to begin than the last time. @@ -14849,7 +14879,7 @@ async function retry$1(policy, request, response, retryData, requestError) { if (!isAborted && shouldRetry(policy.retryCount, shouldPolicyRetry, retryData, response)) { logger.info(`Retrying request in ${retryData.retryInterval}`); try { - await delay(retryData.retryInterval); + await coreUtil.delay(retryData.retryInterval); const res = await policy._nextPolicy.sendRequest(request.clone()); return retry$1(policy, request, res, retryData); } @@ -15144,7 +15174,7 @@ async function beginRefresh(getAccessToken, retryIntervalInMs, timeoutInMs) { } let token = await tryGetAccessToken(); while (token === null) { - await delay(retryIntervalInMs); + await coreUtil.delay(retryIntervalInMs); token = await tryGetAccessToken(); } return token; @@ -15676,7 +15706,7 @@ async function getRegistrationStatus(policy, url, originalRequest) { return true; } else { - await delay(policy._retryTimeout * 1000); + await coreUtil.delay(policy._retryTimeout * 1000); return getRegistrationStatus(policy, url, originalRequest); } } @@ -15768,7 +15798,7 @@ async function retry(policy, request, operationResponse, err, retryData) { if (shouldRetry(policy.retryCount, shouldPolicyRetry, retryData, operationResponse, err)) { // If previous operation ended with an error and the policy allows a retry, do that try { - await delay(retryData.retryInterval); + await coreUtil.delay(retryData.retryInterval); return policy._nextPolicy.sendRequest(request.clone()); } catch (nestedErr) { @@ -15843,7 +15873,7 @@ class ThrottlingRetryPolicy extends BaseRequestPolicy { const delayInMs = ThrottlingRetryPolicy.parseRetryAfterHeader(retryAfterHeader); if (delayInMs) { this.numberOfRetries += 1; - await delay(delayInMs, undefined, { + await coreUtil.delay(delayInMs, { abortSignal: httpRequest.abortSignal, abortErrorMsg: StandardAbortMessage, }); @@ -16799,6 +16829,10 @@ class TopicCredentials extends ApiKeyCredentials { } } +Object.defineProperty(exports, "delay", ({ + enumerable: true, + get: function () { return coreUtil.delay; } +})); Object.defineProperty(exports, "isTokenCredential", ({ enumerable: true, get: function () { return coreAuth.isTokenCredential; } @@ -16826,7 +16860,6 @@ exports.applyMixins = applyMixins; exports.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy; exports.createPipelineFromOptions = createPipelineFromOptions; exports.createSpanFunction = createSpanFunction; -exports.delay = delay; exports.deserializationPolicy = deserializationPolicy; exports.deserializeResponseBody = deserializeResponseBody; exports.disableResponseDecompressionPolicy = disableResponseDecompressionPolicy; @@ -21063,31 +21096,51 @@ function getPagedAsyncIterator(pagedResult) { } function getItemAsyncIterator(pagedResult) { return tslib.__asyncGenerator(this, arguments, function* getItemAsyncIterator_1() { - var e_1, _a; + var e_1, _a, e_2, _b; const pages = getPageAsyncIterator(pagedResult); const firstVal = yield tslib.__await(pages.next()); // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is if (!Array.isArray(firstVal.value)) { - yield yield tslib.__await(firstVal.value); - // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case - yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(pages))); + // can extract elements from this page + const { toElements } = pagedResult; + if (toElements) { + yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(toElements(firstVal.value)))); + try { + for (var pages_1 = tslib.__asyncValues(pages), pages_1_1; pages_1_1 = yield tslib.__await(pages_1.next()), !pages_1_1.done;) { + const page = pages_1_1.value; + yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(toElements(page)))); + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (pages_1_1 && !pages_1_1.done && (_a = pages_1.return)) yield tslib.__await(_a.call(pages_1)); + } + finally { if (e_1) throw e_1.error; } + } + } + else { + yield yield tslib.__await(firstVal.value); + // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case + yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(pages))); + } } else { yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(firstVal.value))); try { - for (var pages_1 = tslib.__asyncValues(pages), pages_1_1; pages_1_1 = yield tslib.__await(pages_1.next()), !pages_1_1.done;) { - const page = pages_1_1.value; + for (var pages_2 = tslib.__asyncValues(pages), pages_2_1; pages_2_1 = yield tslib.__await(pages_2.next()), !pages_2_1.done;) { + const page = pages_2_1.value; // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch, // it must be the case that `TPage = TElement[]` yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page))); } } - catch (e_1_1) { e_1 = { error: e_1_1 }; } + catch (e_2_1) { e_2 = { error: e_2_1 }; } finally { try { - if (pages_1_1 && !pages_1_1.done && (_a = pages_1.return)) yield tslib.__await(_a.call(pages_1)); + if (pages_2_1 && !pages_2_1.done && (_b = pages_2.return)) yield tslib.__await(_b.call(pages_2)); } - finally { if (e_1) throw e_1.error; } + finally { if (e_2) throw e_2.error; } } } }); @@ -21096,9 +21149,15 @@ function getPageAsyncIterator(pagedResult, options = {}) { return tslib.__asyncGenerator(this, arguments, function* getPageAsyncIterator_1() { const { pageLink, maxPageSize } = options; let response = yield tslib.__await(pagedResult.getPage(pageLink !== null && pageLink !== void 0 ? pageLink : pagedResult.firstPageLink, maxPageSize)); + if (!response) { + return yield tslib.__await(void 0); + } yield yield tslib.__await(response.page); while (response.nextPageLink) { response = yield tslib.__await(pagedResult.getPage(response.nextPageLink, maxPageSize)); + if (!response) { + return yield tslib.__await(void 0); + } yield yield tslib.__await(response.page); } }); @@ -30263,7 +30322,7 @@ const timeoutInSeconds = { const version = { parameterPath: "version", mapper: { - defaultValue: "2021-08-06", + defaultValue: "2021-10-04", isConstant: true, serializedName: "x-ms-version", type: { @@ -35091,14 +35150,15 @@ const logger = logger$1.createClientLogger("storage-blob"); // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -const SDK_VERSION = "12.11.0"; -const SERVICE_VERSION = "2021-08-06"; +const SDK_VERSION = "12.12.0"; +const SERVICE_VERSION = "2021-10-04"; const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB const BLOCK_BLOB_MAX_BLOCKS = 50000; const DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; // 8MB const DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; // 4MB const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5; +const REQUEST_TIMEOUT = 100 * 1000; // In ms /** * The OAuth scope to use with Azure Storage. */ @@ -35286,6 +35346,30 @@ const StorageBlobLoggingAllowedQueryParameters = [ ]; const BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption"; const BlobDoesNotUseCustomerSpecifiedEncryption = "BlobDoesNotUseCustomerSpecifiedEncryption"; +/// List of ports used for path style addressing. +/// Path style addressing means that storage account is put in URI's Path segment in instead of in host. +const PathStylePorts = [ + "10000", + "10001", + "10002", + "10003", + "10004", + "10100", + "10101", + "10102", + "10103", + "10104", + "11000", + "11001", + "11002", + "11003", + "11004", + "11100", + "11101", + "11102", + "11103", + "11104", +]; // Copyright (c) Microsoft Corporation. /** @@ -35727,7 +35811,8 @@ function isIpEndpointStyle(parsedUrl) { // Case 2: localhost(:port), use broad regex to match port part. // Case 3: Ipv4, use broad regex which just check if host contains Ipv4. // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html. - return /^.*:.*:.*$|^localhost(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host); + return (/^.*:.*:.*$|^localhost(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) || + (parsedUrl.getPort() !== undefined && PathStylePorts.includes(parsedUrl.getPort()))); } /** * Convert Tags to encoded string. @@ -36245,6 +36330,16 @@ function* ExtractPageRangeInfoItems(getPageRangesSegment) { }; } } +/** + * Escape the blobName but keep path separator ('/'). + */ +function EscapePath(blobName) { + const split = blobName.split("/"); + for (let i = 0; i < split.length; i++) { + split[i] = encodeURIComponent(split[i]); + } + return split.join("/"); +} // Copyright (c) Microsoft Corporation. /** @@ -37203,7 +37298,7 @@ class StorageSharedKeyCredential extends Credential { * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ const packageName = "azure-storage-blob"; -const packageVersion = "12.11.0"; +const packageVersion = "12.12.0"; class StorageClientContext extends coreHttp__namespace.ServiceClient { /** * Initializes a new instance of the StorageClientContext class. @@ -37229,7 +37324,7 @@ class StorageClientContext extends coreHttp__namespace.ServiceClient { // Parameter assignments this.url = url; // Assigning values to Constant parameters - this.version = options.version || "2021-08-06"; + this.version = options.version || "2021-10-04"; } } @@ -41117,8 +41212,10 @@ async function streamToBuffer(stream, buffer, offset, end, encoding) { let pos = 0; // Position in stream const count = end - offset; // Total amount of data needed in stream return new Promise((resolve, reject) => { + const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT); stream.on("readable", () => { if (pos >= count) { + clearTimeout(timeout); resolve(); return; } @@ -41135,12 +41232,16 @@ async function streamToBuffer(stream, buffer, offset, end, encoding) { pos += chunkLength; }); stream.on("end", () => { + clearTimeout(timeout); if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } resolve(); }); - stream.on("error", reject); + stream.on("error", (msg) => { + clearTimeout(timeout); + reject(msg); + }); }); } /** @@ -44737,7 +44838,7 @@ class ContainerClient extends StorageClient { * @returns A new BlobClient object for the given blob name. */ getBlobClient(blobName) { - return new BlobClient(appendToURLPath(this.url, encodeURIComponent(blobName)), this.pipeline); + return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); } /** * Creates an {@link AppendBlobClient} @@ -44745,7 +44846,7 @@ class ContainerClient extends StorageClient { * @param blobName - An append blob name */ getAppendBlobClient(blobName) { - return new AppendBlobClient(appendToURLPath(this.url, encodeURIComponent(blobName)), this.pipeline); + return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); } /** * Creates a {@link BlockBlobClient} @@ -44763,7 +44864,7 @@ class ContainerClient extends StorageClient { * ``` */ getBlockBlobClient(blobName) { - return new BlockBlobClient(appendToURLPath(this.url, encodeURIComponent(blobName)), this.pipeline); + return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); } /** * Creates a {@link PageBlobClient} @@ -44771,7 +44872,7 @@ class ContainerClient extends StorageClient { * @param blobName - A page blob name */ getPageBlobClient(blobName) { - return new PageBlobClient(appendToURLPath(this.url, encodeURIComponent(blobName)), this.pipeline); + return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline); } /** * Returns all user-defined metadata and system properties for the specified @@ -47108,7 +47209,7 @@ exports.newPipeline = newPipeline; /***/ }), /***/ 7171: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -47127,46 +47228,40 @@ exports.newPipeline = newPipeline; * See the License for the specific language governing permissions and * limitations under the License. */ -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ContextAPI = void 0; -var NoopContextManager_1 = __nccwpck_require__(4118); -var global_utils_1 = __nccwpck_require__(5135); -var diag_1 = __nccwpck_require__(1877); -var API_NAME = 'context'; -var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager(); +const NoopContextManager_1 = __nccwpck_require__(4118); +const global_utils_1 = __nccwpck_require__(5135); +const diag_1 = __nccwpck_require__(1877); +const API_NAME = 'context'; +const NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager(); /** * Singleton object which represents the entry point to the OpenTelemetry Context API */ -var ContextAPI = /** @class */ (function () { +class ContextAPI { /** Empty private constructor prevents end users from constructing a new instance of the API */ - function ContextAPI() { - } + constructor() { } /** Get the singleton instance of the Context API */ - ContextAPI.getInstance = function () { + static getInstance() { if (!this._instance) { this._instance = new ContextAPI(); } return this._instance; - }; + } /** * Set the current context manager. * * @returns true if the context manager was successfully registered, else false */ - ContextAPI.prototype.setGlobalContextManager = function (contextManager) { - return global_utils_1.registerGlobal(API_NAME, contextManager, diag_1.DiagAPI.instance()); - }; + setGlobalContextManager(contextManager) { + return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance()); + } /** * Get the currently active context */ - ContextAPI.prototype.active = function () { + active() { return this._getContextManager().active(); - }; + } /** * Execute a function with an active context * @@ -47175,33 +47270,27 @@ var ContextAPI = /** @class */ (function () { * @param thisArg optional receiver to be used for calling fn * @param args optional arguments forwarded to fn */ - ContextAPI.prototype.with = function (context, fn, thisArg) { - var _a; - var args = []; - for (var _i = 3; _i < arguments.length; _i++) { - args[_i - 3] = arguments[_i]; - } - return (_a = this._getContextManager()).with.apply(_a, __spreadArray([context, fn, thisArg], args)); - }; + with(context, fn, thisArg, ...args) { + return this._getContextManager().with(context, fn, thisArg, ...args); + } /** * Bind a context to a target function or event emitter * * @param context context to bind to the event emitter or function. Defaults to the currently active context * @param target function or event emitter to bind */ - ContextAPI.prototype.bind = function (context, target) { + bind(context, target) { return this._getContextManager().bind(context, target); - }; - ContextAPI.prototype._getContextManager = function () { - return global_utils_1.getGlobal(API_NAME) || NOOP_CONTEXT_MANAGER; - }; + } + _getContextManager() { + return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER; + } /** Disable and remove the global context manager */ - ContextAPI.prototype.disable = function () { + disable() { this._getContextManager().disable(); - global_utils_1.unregisterGlobal(API_NAME, diag_1.DiagAPI.instance()); - }; - return ContextAPI; -}()); + (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance()); + } +} exports.ContextAPI = ContextAPI; //# sourceMappingURL=context.js.map @@ -47229,62 +47318,63 @@ exports.ContextAPI = ContextAPI; */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DiagAPI = void 0; -var ComponentLogger_1 = __nccwpck_require__(7978); -var logLevelLogger_1 = __nccwpck_require__(9639); -var types_1 = __nccwpck_require__(8077); -var global_utils_1 = __nccwpck_require__(5135); -var API_NAME = 'diag'; +const ComponentLogger_1 = __nccwpck_require__(7978); +const logLevelLogger_1 = __nccwpck_require__(9639); +const types_1 = __nccwpck_require__(8077); +const global_utils_1 = __nccwpck_require__(5135); +const API_NAME = 'diag'; /** * Singleton object which represents the entry point to the OpenTelemetry internal * diagnostic API */ -var DiagAPI = /** @class */ (function () { +class DiagAPI { /** * Private internal constructor * @private */ - function DiagAPI() { + constructor() { function _logProxy(funcName) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var logger = global_utils_1.getGlobal('diag'); + return function (...args) { + const logger = (0, global_utils_1.getGlobal)('diag'); // shortcut if logger not set if (!logger) return; - return logger[funcName].apply(logger, args); + return logger[funcName](...args); }; } // Using self local variable for minification purposes as 'this' cannot be minified - var self = this; + const self = this; // DiagAPI specific functions - self.setLogger = function (logger, logLevel) { - var _a, _b; - if (logLevel === void 0) { logLevel = types_1.DiagLogLevel.INFO; } + const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => { + var _a, _b, _c; if (logger === self) { // There isn't much we can do here. // Logging to the console might break the user application. // Try to log to self. If a logger was previously registered it will receive the log. - var err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation'); + const err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation'); self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message); return false; } - var oldLogger = global_utils_1.getGlobal('diag'); - var newLogger = logLevelLogger_1.createLogLevelDiagLogger(logLevel, logger); + if (typeof optionsOrLogLevel === 'number') { + optionsOrLogLevel = { + logLevel: optionsOrLogLevel, + }; + } + const oldLogger = (0, global_utils_1.getGlobal)('diag'); + const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : types_1.DiagLogLevel.INFO, logger); // There already is an logger registered. We'll let it know before overwriting it. - if (oldLogger) { - var stack = (_b = new Error().stack) !== null && _b !== void 0 ? _b : ''; - oldLogger.warn("Current logger will be overwritten from " + stack); - newLogger.warn("Current logger will overwrite one already registered from " + stack); + if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) { + const stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : ''; + oldLogger.warn(`Current logger will be overwritten from ${stack}`); + newLogger.warn(`Current logger will overwrite one already registered from ${stack}`); } - return global_utils_1.registerGlobal('diag', newLogger, self, true); + return (0, global_utils_1.registerGlobal)('diag', newLogger, self, true); }; - self.disable = function () { - global_utils_1.unregisterGlobal(API_NAME, self); + self.setLogger = setLogger; + self.disable = () => { + (0, global_utils_1.unregisterGlobal)(API_NAME, self); }; - self.createComponentLogger = function (options) { + self.createComponentLogger = (options) => { return new ComponentLogger_1.DiagComponentLogger(options); }; self.verbose = _logProxy('verbose'); @@ -47294,19 +47384,86 @@ var DiagAPI = /** @class */ (function () { self.error = _logProxy('error'); } /** Get the singleton instance of the DiagAPI API */ - DiagAPI.instance = function () { + static instance() { if (!this._instance) { this._instance = new DiagAPI(); } return this._instance; - }; - return DiagAPI; -}()); + } +} exports.DiagAPI = DiagAPI; //# sourceMappingURL=diag.js.map /***/ }), +/***/ 7696: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MetricsAPI = void 0; +const NoopMeterProvider_1 = __nccwpck_require__(2647); +const global_utils_1 = __nccwpck_require__(5135); +const diag_1 = __nccwpck_require__(1877); +const API_NAME = 'metrics'; +/** + * Singleton object which represents the entry point to the OpenTelemetry Metrics API + */ +class MetricsAPI { + /** Empty private constructor prevents end users from constructing a new instance of the API */ + constructor() { } + /** Get the singleton instance of the Metrics API */ + static getInstance() { + if (!this._instance) { + this._instance = new MetricsAPI(); + } + return this._instance; + } + /** + * Set the current global meter provider. + * Returns true if the meter provider was successfully registered, else false. + */ + setGlobalMeterProvider(provider) { + return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance()); + } + /** + * Returns the global meter provider. + */ + getMeterProvider() { + return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER; + } + /** + * Returns a meter from the global meter provider. + */ + getMeter(name, version, options) { + return this.getMeterProvider().getMeter(name, version, options); + } + /** Remove the global meter provider */ + disable() { + (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance()); + } +} +exports.MetricsAPI = MetricsAPI; +//# sourceMappingURL=metrics.js.map + +/***/ }), + /***/ 9909: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -47329,40 +47486,40 @@ exports.DiagAPI = DiagAPI; */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PropagationAPI = void 0; -var global_utils_1 = __nccwpck_require__(5135); -var NoopTextMapPropagator_1 = __nccwpck_require__(2368); -var TextMapPropagator_1 = __nccwpck_require__(865); -var context_helpers_1 = __nccwpck_require__(7682); -var utils_1 = __nccwpck_require__(8136); -var diag_1 = __nccwpck_require__(1877); -var API_NAME = 'propagation'; -var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator(); +const global_utils_1 = __nccwpck_require__(5135); +const NoopTextMapPropagator_1 = __nccwpck_require__(2368); +const TextMapPropagator_1 = __nccwpck_require__(865); +const context_helpers_1 = __nccwpck_require__(7682); +const utils_1 = __nccwpck_require__(8136); +const diag_1 = __nccwpck_require__(1877); +const API_NAME = 'propagation'; +const NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator(); /** * Singleton object which represents the entry point to the OpenTelemetry Propagation API */ -var PropagationAPI = /** @class */ (function () { +class PropagationAPI { /** Empty private constructor prevents end users from constructing a new instance of the API */ - function PropagationAPI() { + constructor() { this.createBaggage = utils_1.createBaggage; this.getBaggage = context_helpers_1.getBaggage; this.setBaggage = context_helpers_1.setBaggage; this.deleteBaggage = context_helpers_1.deleteBaggage; } /** Get the singleton instance of the Propagator API */ - PropagationAPI.getInstance = function () { + static getInstance() { if (!this._instance) { this._instance = new PropagationAPI(); } return this._instance; - }; + } /** * Set the current propagator. * * @returns true if the propagator was successfully registered, else false */ - PropagationAPI.prototype.setGlobalPropagator = function (propagator) { - return global_utils_1.registerGlobal(API_NAME, propagator, diag_1.DiagAPI.instance()); - }; + setGlobalPropagator(propagator) { + return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance()); + } /** * Inject context into a carrier to be propagated inter-process * @@ -47370,10 +47527,9 @@ var PropagationAPI = /** @class */ (function () { * @param carrier carrier to inject context into * @param setter Function used to set values on the carrier */ - PropagationAPI.prototype.inject = function (context, carrier, setter) { - if (setter === void 0) { setter = TextMapPropagator_1.defaultTextMapSetter; } + inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) { return this._getGlobalPropagator().inject(context, carrier, setter); - }; + } /** * Extract context from a carrier * @@ -47381,25 +47537,23 @@ var PropagationAPI = /** @class */ (function () { * @param carrier Carrier to extract context from * @param getter Function used to extract keys from a carrier */ - PropagationAPI.prototype.extract = function (context, carrier, getter) { - if (getter === void 0) { getter = TextMapPropagator_1.defaultTextMapGetter; } + extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) { return this._getGlobalPropagator().extract(context, carrier, getter); - }; + } /** * Return a list of all fields which may be used by the propagator. */ - PropagationAPI.prototype.fields = function () { + fields() { return this._getGlobalPropagator().fields(); - }; + } /** Remove the global propagator */ - PropagationAPI.prototype.disable = function () { - global_utils_1.unregisterGlobal(API_NAME, diag_1.DiagAPI.instance()); - }; - PropagationAPI.prototype._getGlobalPropagator = function () { - return global_utils_1.getGlobal(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR; - }; - return PropagationAPI; -}()); + disable() { + (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance()); + } + _getGlobalPropagator() { + return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR; + } +} exports.PropagationAPI = PropagationAPI; //# sourceMappingURL=propagation.js.map @@ -47427,18 +47581,18 @@ exports.PropagationAPI = PropagationAPI; */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.TraceAPI = void 0; -var global_utils_1 = __nccwpck_require__(5135); -var ProxyTracerProvider_1 = __nccwpck_require__(2285); -var spancontext_utils_1 = __nccwpck_require__(9745); -var context_utils_1 = __nccwpck_require__(3326); -var diag_1 = __nccwpck_require__(1877); -var API_NAME = 'trace'; +const global_utils_1 = __nccwpck_require__(5135); +const ProxyTracerProvider_1 = __nccwpck_require__(2285); +const spancontext_utils_1 = __nccwpck_require__(9745); +const context_utils_1 = __nccwpck_require__(3326); +const diag_1 = __nccwpck_require__(1877); +const API_NAME = 'trace'; /** * Singleton object which represents the entry point to the OpenTelemetry Tracing API */ -var TraceAPI = /** @class */ (function () { +class TraceAPI { /** Empty private constructor prevents end users from constructing a new instance of the API */ - function TraceAPI() { + constructor() { this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider(); this.wrapSpanContext = spancontext_utils_1.wrapSpanContext; this.isSpanContextValid = spancontext_utils_1.isSpanContextValid; @@ -47450,43 +47604,42 @@ var TraceAPI = /** @class */ (function () { this.setSpanContext = context_utils_1.setSpanContext; } /** Get the singleton instance of the Trace API */ - TraceAPI.getInstance = function () { + static getInstance() { if (!this._instance) { this._instance = new TraceAPI(); } return this._instance; - }; + } /** * Set the current global tracer. * * @returns true if the tracer provider was successfully registered, else false */ - TraceAPI.prototype.setGlobalTracerProvider = function (provider) { - var success = global_utils_1.registerGlobal(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance()); + setGlobalTracerProvider(provider) { + const success = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance()); if (success) { this._proxyTracerProvider.setDelegate(provider); } return success; - }; + } /** * Returns the global tracer provider. */ - TraceAPI.prototype.getTracerProvider = function () { - return global_utils_1.getGlobal(API_NAME) || this._proxyTracerProvider; - }; + getTracerProvider() { + return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider; + } /** * Returns a tracer from the global tracer provider. */ - TraceAPI.prototype.getTracer = function (name, version) { + getTracer(name, version) { return this.getTracerProvider().getTracer(name, version); - }; + } /** Remove the global tracer provider */ - TraceAPI.prototype.disable = function () { - global_utils_1.unregisterGlobal(API_NAME, diag_1.DiagAPI.instance()); + disable() { + (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance()); this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider(); - }; - return TraceAPI; -}()); + } +} exports.TraceAPI = TraceAPI; //# sourceMappingURL=trace.js.map @@ -47514,11 +47667,11 @@ exports.TraceAPI = TraceAPI; */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.deleteBaggage = exports.setBaggage = exports.getBaggage = void 0; -var context_1 = __nccwpck_require__(8242); +const context_1 = __nccwpck_require__(8242); /** * Baggage key */ -var BAGGAGE_KEY = context_1.createContextKey('OpenTelemetry Baggage Key'); +const BAGGAGE_KEY = (0, context_1.createContextKey)('OpenTelemetry Baggage Key'); /** * Retrieve the current baggage from the given context * @@ -47574,50 +47727,41 @@ exports.deleteBaggage = deleteBaggage; */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BaggageImpl = void 0; -var BaggageImpl = /** @class */ (function () { - function BaggageImpl(entries) { +class BaggageImpl { + constructor(entries) { this._entries = entries ? new Map(entries) : new Map(); } - BaggageImpl.prototype.getEntry = function (key) { - var entry = this._entries.get(key); + getEntry(key) { + const entry = this._entries.get(key); if (!entry) { return undefined; } return Object.assign({}, entry); - }; - BaggageImpl.prototype.getAllEntries = function () { - return Array.from(this._entries.entries()).map(function (_a) { - var k = _a[0], v = _a[1]; - return [k, v]; - }); - }; - BaggageImpl.prototype.setEntry = function (key, entry) { - var newBaggage = new BaggageImpl(this._entries); + } + getAllEntries() { + return Array.from(this._entries.entries()).map(([k, v]) => [k, v]); + } + setEntry(key, entry) { + const newBaggage = new BaggageImpl(this._entries); newBaggage._entries.set(key, entry); return newBaggage; - }; - BaggageImpl.prototype.removeEntry = function (key) { - var newBaggage = new BaggageImpl(this._entries); + } + removeEntry(key) { + const newBaggage = new BaggageImpl(this._entries); newBaggage._entries.delete(key); return newBaggage; - }; - BaggageImpl.prototype.removeEntries = function () { - var keys = []; - for (var _i = 0; _i < arguments.length; _i++) { - keys[_i] = arguments[_i]; - } - var newBaggage = new BaggageImpl(this._entries); - for (var _a = 0, keys_1 = keys; _a < keys_1.length; _a++) { - var key = keys_1[_a]; + } + removeEntries(...keys) { + const newBaggage = new BaggageImpl(this._entries); + for (const key of keys) { newBaggage._entries.delete(key); } return newBaggage; - }; - BaggageImpl.prototype.clear = function () { + } + clear() { return new BaggageImpl(); - }; - return BaggageImpl; -}()); + } +} exports.BaggageImpl = BaggageImpl; //# sourceMappingURL=baggage-impl.js.map @@ -47653,31 +47797,6 @@ exports.baggageEntryMetadataSymbol = Symbol('BaggageEntryMetadata'); /***/ }), -/***/ 1508: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=types.js.map - -/***/ }), - /***/ 8136: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -47700,17 +47819,16 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.baggageEntryMetadataFromString = exports.createBaggage = void 0; -var diag_1 = __nccwpck_require__(1877); -var baggage_impl_1 = __nccwpck_require__(4811); -var symbol_1 = __nccwpck_require__(3542); -var diag = diag_1.DiagAPI.instance(); +const diag_1 = __nccwpck_require__(1877); +const baggage_impl_1 = __nccwpck_require__(4811); +const symbol_1 = __nccwpck_require__(3542); +const diag = diag_1.DiagAPI.instance(); /** * Create a new Baggage with optional entries * * @param entries An array of baggage entries the new baggage should contain */ -function createBaggage(entries) { - if (entries === void 0) { entries = {}; } +function createBaggage(entries = {}) { return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries))); } exports.createBaggage = createBaggage; @@ -47722,12 +47840,12 @@ exports.createBaggage = createBaggage; */ function baggageEntryMetadataFromString(str) { if (typeof str !== 'string') { - diag.error("Cannot create baggage metadata from unknown type: " + typeof str); + diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`); str = ''; } return { __TYPE__: symbol_1.baggageEntryMetadataSymbol, - toString: function () { + toString() { return str; }, }; @@ -47737,33 +47855,8 @@ exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString; /***/ }), -/***/ 1109: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=Attributes.js.map - -/***/ }), - -/***/ 4447: -/***/ ((__unused_webpack_module, exports) => { +/***/ 7393: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -47783,22 +47876,18 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=Exception.js.map - -/***/ }), - -/***/ 2358: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=Time.js.map +exports.context = void 0; +// Split module-level variable definition into separate files to allow +// tree-shaking on each api instance. +const context_1 = __nccwpck_require__(7171); +/** Entrypoint for context API */ +exports.context = context_1.ContextAPI.getInstance(); +//# sourceMappingURL=context-api.js.map /***/ }), /***/ 4118: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -47817,38 +47906,26 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); * See the License for the specific language governing permissions and * limitations under the License. */ -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.NoopContextManager = void 0; -var context_1 = __nccwpck_require__(8242); -var NoopContextManager = /** @class */ (function () { - function NoopContextManager() { - } - NoopContextManager.prototype.active = function () { +const context_1 = __nccwpck_require__(8242); +class NoopContextManager { + active() { return context_1.ROOT_CONTEXT; - }; - NoopContextManager.prototype.with = function (_context, fn, thisArg) { - var args = []; - for (var _i = 3; _i < arguments.length; _i++) { - args[_i - 3] = arguments[_i]; - } - return fn.call.apply(fn, __spreadArray([thisArg], args)); - }; - NoopContextManager.prototype.bind = function (_context, target) { + } + with(_context, fn, thisArg, ...args) { + return fn.call(thisArg, ...args); + } + bind(_context, target) { return target; - }; - NoopContextManager.prototype.enable = function () { + } + enable() { return this; - }; - NoopContextManager.prototype.disable = function () { + } + disable() { return this; - }; - return NoopContextManager; -}()); + } +} exports.NoopContextManager = NoopContextManager; //# sourceMappingURL=NoopContextManager.js.map @@ -47887,38 +47964,37 @@ function createContextKey(description) { return Symbol.for(description); } exports.createContextKey = createContextKey; -var BaseContext = /** @class */ (function () { +class BaseContext { /** * Construct a new context which inherits values from an optional parent context. * * @param parentContext a context from which to inherit values */ - function BaseContext(parentContext) { + constructor(parentContext) { // for minification - var self = this; + const self = this; self._currentContext = parentContext ? new Map(parentContext) : new Map(); - self.getValue = function (key) { return self._currentContext.get(key); }; - self.setValue = function (key, value) { - var context = new BaseContext(self._currentContext); + self.getValue = (key) => self._currentContext.get(key); + self.setValue = (key, value) => { + const context = new BaseContext(self._currentContext); context._currentContext.set(key, value); return context; }; - self.deleteValue = function (key) { - var context = new BaseContext(self._currentContext); + self.deleteValue = (key) => { + const context = new BaseContext(self._currentContext); context._currentContext.delete(key); return context; }; } - return BaseContext; -}()); +} /** The root context is used as the default parent context when there is no active context */ exports.ROOT_CONTEXT = new BaseContext(); //# sourceMappingURL=context.js.map /***/ }), -/***/ 6504: -/***/ ((__unused_webpack_module, exports) => { +/***/ 9721: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -47938,7 +48014,18 @@ exports.ROOT_CONTEXT = new BaseContext(); * limitations under the License. */ Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=types.js.map +exports.diag = void 0; +// Split module-level variable definition into separate files to allow +// tree-shaking on each api instance. +const diag_1 = __nccwpck_require__(1877); +/** + * Entrypoint for Diag API. + * Defines Diagnostic handler used for internal diagnostic logging operations. + * The default provides a Noop DiagLogger implementation which may be changed via the + * diag.setLogger(logger: DiagLogger) function. + */ +exports.diag = diag_1.DiagAPI.instance(); +//# sourceMappingURL=diag-api.js.map /***/ }), @@ -47964,7 +48051,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DiagComponentLogger = void 0; -var global_utils_1 = __nccwpck_require__(5135); +const global_utils_1 = __nccwpck_require__(5135); /** * Component Logger which is meant to be used as part of any component which * will add automatically additional namespace in front of the log message. @@ -47974,56 +48061,35 @@ var global_utils_1 = __nccwpck_require__(5135); * cLogger.debug('test'); * // @opentelemetry/instrumentation-http test */ -var DiagComponentLogger = /** @class */ (function () { - function DiagComponentLogger(props) { +class DiagComponentLogger { + constructor(props) { this._namespace = props.namespace || 'DiagComponentLogger'; } - DiagComponentLogger.prototype.debug = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } + debug(...args) { return logProxy('debug', this._namespace, args); - }; - DiagComponentLogger.prototype.error = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } + } + error(...args) { return logProxy('error', this._namespace, args); - }; - DiagComponentLogger.prototype.info = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } + } + info(...args) { return logProxy('info', this._namespace, args); - }; - DiagComponentLogger.prototype.warn = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } + } + warn(...args) { return logProxy('warn', this._namespace, args); - }; - DiagComponentLogger.prototype.verbose = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } + } + verbose(...args) { return logProxy('verbose', this._namespace, args); - }; - return DiagComponentLogger; -}()); + } +} exports.DiagComponentLogger = DiagComponentLogger; function logProxy(funcName, namespace, args) { - var logger = global_utils_1.getGlobal('diag'); + const logger = (0, global_utils_1.getGlobal)('diag'); // shortcut if logger not set if (!logger) { return; } args.unshift(namespace); - return logger[funcName].apply(logger, args); + return logger[funcName](...args); } //# sourceMappingURL=ComponentLogger.js.map @@ -48051,7 +48117,7 @@ function logProxy(funcName, namespace, args) { */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DiagConsoleLogger = void 0; -var consoleMap = [ +const consoleMap = [ { n: 'error', c: 'error' }, { n: 'warn', c: 'warn' }, { n: 'info', c: 'info' }, @@ -48063,18 +48129,14 @@ var consoleMap = [ * If you want to limit the amount of logging to a specific level or lower use the * {@link createLogLevelDiagLogger} */ -var DiagConsoleLogger = /** @class */ (function () { - function DiagConsoleLogger() { +class DiagConsoleLogger { + constructor() { function _consoleFunc(funcName) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } + return function (...args) { if (console) { // Some environments only expose the console when the F12 developer console is open // eslint-disable-next-line no-console - var theFunc = console[funcName]; + let theFunc = console[funcName]; if (typeof theFunc !== 'function') { // Not all environments support all functions // eslint-disable-next-line no-console @@ -48087,54 +48149,16 @@ var DiagConsoleLogger = /** @class */ (function () { } }; } - for (var i = 0; i < consoleMap.length; i++) { + for (let i = 0; i < consoleMap.length; i++) { this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c); } } - return DiagConsoleLogger; -}()); +} exports.DiagConsoleLogger = DiagConsoleLogger; //# sourceMappingURL=consoleLogger.js.map /***/ }), -/***/ 1634: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -__exportStar(__nccwpck_require__(3041), exports); -__exportStar(__nccwpck_require__(8077), exports); -//# sourceMappingURL=index.js.map - -/***/ }), - /***/ 9639: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -48157,7 +48181,7 @@ __exportStar(__nccwpck_require__(8077), exports); */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createLogLevelDiagLogger = void 0; -var types_1 = __nccwpck_require__(8077); +const types_1 = __nccwpck_require__(8077); function createLogLevelDiagLogger(maxLevel, logger) { if (maxLevel < types_1.DiagLogLevel.NONE) { maxLevel = types_1.DiagLogLevel.NONE; @@ -48168,7 +48192,7 @@ function createLogLevelDiagLogger(maxLevel, logger) { // In case the logger is null or undefined logger = logger || {}; function _filterFunc(funcName, theLevel) { - var theFunc = logger[funcName]; + const theFunc = logger[funcName]; if (typeof theFunc === 'function' && maxLevel >= theLevel) { return theFunc.bind(logger); } @@ -48239,7 +48263,7 @@ var DiagLogLevel; /***/ }), /***/ 5163: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -48258,44 +48282,42 @@ var DiagLogLevel; * See the License for the specific language governing permissions and * limitations under the License. */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.diag = exports.propagation = exports.trace = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.baggageEntryMetadataFromString = void 0; -__exportStar(__nccwpck_require__(1508), exports); +exports.trace = exports.propagation = exports.metrics = exports.diag = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.TraceFlags = exports.SpanStatusCode = exports.SpanKind = exports.SamplingDecision = exports.ProxyTracerProvider = exports.ProxyTracer = exports.defaultTextMapSetter = exports.defaultTextMapGetter = exports.ValueType = exports.createNoopMeter = exports.DiagLogLevel = exports.DiagConsoleLogger = exports.ROOT_CONTEXT = exports.createContextKey = exports.baggageEntryMetadataFromString = void 0; var utils_1 = __nccwpck_require__(8136); Object.defineProperty(exports, "baggageEntryMetadataFromString", ({ enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } })); -__exportStar(__nccwpck_require__(4447), exports); -__exportStar(__nccwpck_require__(2358), exports); -__exportStar(__nccwpck_require__(1109), exports); -__exportStar(__nccwpck_require__(1634), exports); -__exportStar(__nccwpck_require__(865), exports); -__exportStar(__nccwpck_require__(7492), exports); -__exportStar(__nccwpck_require__(4023), exports); -__exportStar(__nccwpck_require__(3503), exports); -__exportStar(__nccwpck_require__(2285), exports); -__exportStar(__nccwpck_require__(9671), exports); -__exportStar(__nccwpck_require__(3209), exports); -__exportStar(__nccwpck_require__(5769), exports); -__exportStar(__nccwpck_require__(1424), exports); -__exportStar(__nccwpck_require__(4416), exports); -__exportStar(__nccwpck_require__(955), exports); -__exportStar(__nccwpck_require__(8845), exports); -__exportStar(__nccwpck_require__(6905), exports); -__exportStar(__nccwpck_require__(8384), exports); +// Context APIs +var context_1 = __nccwpck_require__(8242); +Object.defineProperty(exports, "createContextKey", ({ enumerable: true, get: function () { return context_1.createContextKey; } })); +Object.defineProperty(exports, "ROOT_CONTEXT", ({ enumerable: true, get: function () { return context_1.ROOT_CONTEXT; } })); +// Diag APIs +var consoleLogger_1 = __nccwpck_require__(3041); +Object.defineProperty(exports, "DiagConsoleLogger", ({ enumerable: true, get: function () { return consoleLogger_1.DiagConsoleLogger; } })); +var types_1 = __nccwpck_require__(8077); +Object.defineProperty(exports, "DiagLogLevel", ({ enumerable: true, get: function () { return types_1.DiagLogLevel; } })); +// Metrics APIs +var NoopMeter_1 = __nccwpck_require__(4837); +Object.defineProperty(exports, "createNoopMeter", ({ enumerable: true, get: function () { return NoopMeter_1.createNoopMeter; } })); +var Metric_1 = __nccwpck_require__(9999); +Object.defineProperty(exports, "ValueType", ({ enumerable: true, get: function () { return Metric_1.ValueType; } })); +// Propagation APIs +var TextMapPropagator_1 = __nccwpck_require__(865); +Object.defineProperty(exports, "defaultTextMapGetter", ({ enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapGetter; } })); +Object.defineProperty(exports, "defaultTextMapSetter", ({ enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapSetter; } })); +var ProxyTracer_1 = __nccwpck_require__(3503); +Object.defineProperty(exports, "ProxyTracer", ({ enumerable: true, get: function () { return ProxyTracer_1.ProxyTracer; } })); +var ProxyTracerProvider_1 = __nccwpck_require__(2285); +Object.defineProperty(exports, "ProxyTracerProvider", ({ enumerable: true, get: function () { return ProxyTracerProvider_1.ProxyTracerProvider; } })); +var SamplingResult_1 = __nccwpck_require__(3209); +Object.defineProperty(exports, "SamplingDecision", ({ enumerable: true, get: function () { return SamplingResult_1.SamplingDecision; } })); +var span_kind_1 = __nccwpck_require__(1424); +Object.defineProperty(exports, "SpanKind", ({ enumerable: true, get: function () { return span_kind_1.SpanKind; } })); +var status_1 = __nccwpck_require__(8845); +Object.defineProperty(exports, "SpanStatusCode", ({ enumerable: true, get: function () { return status_1.SpanStatusCode; } })); +var trace_flags_1 = __nccwpck_require__(6905); +Object.defineProperty(exports, "TraceFlags", ({ enumerable: true, get: function () { return trace_flags_1.TraceFlags; } })); var utils_2 = __nccwpck_require__(2615); Object.defineProperty(exports, "createTraceState", ({ enumerable: true, get: function () { return utils_2.createTraceState; } })); -__exportStar(__nccwpck_require__(891), exports); -__exportStar(__nccwpck_require__(3168), exports); -__exportStar(__nccwpck_require__(1823), exports); var spancontext_utils_1 = __nccwpck_require__(9745); Object.defineProperty(exports, "isSpanContextValid", ({ enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } })); Object.defineProperty(exports, "isValidTraceId", ({ enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } })); @@ -48304,30 +48326,25 @@ var invalid_span_constants_1 = __nccwpck_require__(1760); Object.defineProperty(exports, "INVALID_SPANID", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPANID; } })); Object.defineProperty(exports, "INVALID_TRACEID", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_TRACEID; } })); Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", ({ enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPAN_CONTEXT; } })); -__exportStar(__nccwpck_require__(8242), exports); -__exportStar(__nccwpck_require__(6504), exports); -var context_1 = __nccwpck_require__(7171); -/** Entrypoint for context API */ -exports.context = context_1.ContextAPI.getInstance(); -var trace_1 = __nccwpck_require__(1539); -/** Entrypoint for trace API */ -exports.trace = trace_1.TraceAPI.getInstance(); -var propagation_1 = __nccwpck_require__(9909); -/** Entrypoint for propagation API */ -exports.propagation = propagation_1.PropagationAPI.getInstance(); -var diag_1 = __nccwpck_require__(1877); -/** - * Entrypoint for Diag API. - * Defines Diagnostic handler used for internal diagnostic logging operations. - * The default provides a Noop DiagLogger implementation which may be changed via the - * diag.setLogger(logger: DiagLogger) function. - */ -exports.diag = diag_1.DiagAPI.instance(); +// Split module-level variable definition into separate files to allow +// tree-shaking on each api instance. +const context_api_1 = __nccwpck_require__(7393); +Object.defineProperty(exports, "context", ({ enumerable: true, get: function () { return context_api_1.context; } })); +const diag_api_1 = __nccwpck_require__(9721); +Object.defineProperty(exports, "diag", ({ enumerable: true, get: function () { return diag_api_1.diag; } })); +const metrics_api_1 = __nccwpck_require__(2601); +Object.defineProperty(exports, "metrics", ({ enumerable: true, get: function () { return metrics_api_1.metrics; } })); +const propagation_api_1 = __nccwpck_require__(7591); +Object.defineProperty(exports, "propagation", ({ enumerable: true, get: function () { return propagation_api_1.propagation; } })); +const trace_api_1 = __nccwpck_require__(8989); +Object.defineProperty(exports, "trace", ({ enumerable: true, get: function () { return trace_api_1.trace; } })); +// Default export. exports["default"] = { - trace: exports.trace, - context: exports.context, - propagation: exports.propagation, - diag: exports.diag, + context: context_api_1.context, + diag: diag_api_1.diag, + metrics: metrics_api_1.metrics, + propagation: propagation_api_1.propagation, + trace: trace_api_1.trace, }; //# sourceMappingURL=index.js.map @@ -48355,47 +48372,46 @@ exports["default"] = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = void 0; -var platform_1 = __nccwpck_require__(9957); -var version_1 = __nccwpck_require__(8996); -var semver_1 = __nccwpck_require__(1522); -var major = version_1.VERSION.split('.')[0]; -var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for("opentelemetry.js.api." + major); -var _global = platform_1._globalThis; -function registerGlobal(type, instance, diag, allowOverride) { +const platform_1 = __nccwpck_require__(9957); +const version_1 = __nccwpck_require__(8996); +const semver_1 = __nccwpck_require__(1522); +const major = version_1.VERSION.split('.')[0]; +const GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`); +const _global = platform_1._globalThis; +function registerGlobal(type, instance, diag, allowOverride = false) { var _a; - if (allowOverride === void 0) { allowOverride = false; } - var api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : { + const api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : { version: version_1.VERSION, }); if (!allowOverride && api[type]) { // already registered an API of this type - var err = new Error("@opentelemetry/api: Attempted duplicate registration of API: " + type); + const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`); diag.error(err.stack || err.message); return false; } if (api.version !== version_1.VERSION) { // All registered APIs must be of the same version exactly - var err = new Error('@opentelemetry/api: All API registration versions must match'); + const err = new Error('@opentelemetry/api: All API registration versions must match'); diag.error(err.stack || err.message); return false; } api[type] = instance; - diag.debug("@opentelemetry/api: Registered a global for " + type + " v" + version_1.VERSION + "."); + diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`); return true; } exports.registerGlobal = registerGlobal; function getGlobal(type) { var _a, _b; - var globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version; - if (!globalVersion || !semver_1.isCompatible(globalVersion)) { + const globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version; + if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) { return; } return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type]; } exports.getGlobal = getGlobal; function unregisterGlobal(type, diag) { - diag.debug("@opentelemetry/api: Unregistering a global for " + type + " v" + version_1.VERSION + "."); - var api = _global[GLOBAL_OPENTELEMETRY_API_KEY]; + diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`); + const api = _global[GLOBAL_OPENTELEMETRY_API_KEY]; if (api) { delete api[type]; } @@ -48427,8 +48443,8 @@ exports.unregisterGlobal = unregisterGlobal; */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isCompatible = exports._makeCompatibilityCheck = void 0; -var version_1 = __nccwpck_require__(8996); -var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/; +const version_1 = __nccwpck_require__(8996); +const re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/; /** * Create a function to test an API version to see if it is compatible with the provided ownVersion. * @@ -48446,14 +48462,14 @@ var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/; * @param ownVersion version which should be checked against */ function _makeCompatibilityCheck(ownVersion) { - var acceptedVersions = new Set([ownVersion]); - var rejectedVersions = new Set(); - var myVersionMatch = ownVersion.match(re); + const acceptedVersions = new Set([ownVersion]); + const rejectedVersions = new Set(); + const myVersionMatch = ownVersion.match(re); if (!myVersionMatch) { // we cannot guarantee compatibility so we always return noop - return function () { return false; }; + return () => false; } - var ownVersionParsed = { + const ownVersionParsed = { major: +myVersionMatch[1], minor: +myVersionMatch[2], patch: +myVersionMatch[3], @@ -48480,13 +48496,13 @@ function _makeCompatibilityCheck(ownVersion) { if (rejectedVersions.has(globalVersion)) { return false; } - var globalVersionMatch = globalVersion.match(re); + const globalVersionMatch = globalVersion.match(re); if (!globalVersionMatch) { // cannot parse other version // we cannot guarantee compatibility so we always noop return _reject(globalVersion); } - var globalVersionParsed = { + const globalVersionParsed = { major: +globalVersionMatch[1], minor: +globalVersionMatch[2], patch: +globalVersionMatch[3], @@ -48534,6 +48550,230 @@ exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION); /***/ }), +/***/ 2601: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.metrics = void 0; +// Split module-level variable definition into separate files to allow +// tree-shaking on each api instance. +const metrics_1 = __nccwpck_require__(7696); +/** Entrypoint for metrics API */ +exports.metrics = metrics_1.MetricsAPI.getInstance(); +//# sourceMappingURL=metrics-api.js.map + +/***/ }), + +/***/ 9999: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ValueType = void 0; +/** The Type of value. It describes how the data is reported. */ +var ValueType; +(function (ValueType) { + ValueType[ValueType["INT"] = 0] = "INT"; + ValueType[ValueType["DOUBLE"] = 1] = "DOUBLE"; +})(ValueType = exports.ValueType || (exports.ValueType = {})); +//# sourceMappingURL=Metric.js.map + +/***/ }), + +/***/ 4837: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = void 0; +/** + * NoopMeter is a noop implementation of the {@link Meter} interface. It reuses + * constant NoopMetrics for all of its methods. + */ +class NoopMeter { + constructor() { } + /** + * @see {@link Meter.createHistogram} + */ + createHistogram(_name, _options) { + return exports.NOOP_HISTOGRAM_METRIC; + } + /** + * @see {@link Meter.createCounter} + */ + createCounter(_name, _options) { + return exports.NOOP_COUNTER_METRIC; + } + /** + * @see {@link Meter.createUpDownCounter} + */ + createUpDownCounter(_name, _options) { + return exports.NOOP_UP_DOWN_COUNTER_METRIC; + } + /** + * @see {@link Meter.createObservableGauge} + */ + createObservableGauge(_name, _options) { + return exports.NOOP_OBSERVABLE_GAUGE_METRIC; + } + /** + * @see {@link Meter.createObservableCounter} + */ + createObservableCounter(_name, _options) { + return exports.NOOP_OBSERVABLE_COUNTER_METRIC; + } + /** + * @see {@link Meter.createObservableUpDownCounter} + */ + createObservableUpDownCounter(_name, _options) { + return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC; + } + /** + * @see {@link Meter.addBatchObservableCallback} + */ + addBatchObservableCallback(_callback, _observables) { } + /** + * @see {@link Meter.removeBatchObservableCallback} + */ + removeBatchObservableCallback(_callback) { } +} +exports.NoopMeter = NoopMeter; +class NoopMetric { +} +exports.NoopMetric = NoopMetric; +class NoopCounterMetric extends NoopMetric { + add(_value, _attributes) { } +} +exports.NoopCounterMetric = NoopCounterMetric; +class NoopUpDownCounterMetric extends NoopMetric { + add(_value, _attributes) { } +} +exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric; +class NoopHistogramMetric extends NoopMetric { + record(_value, _attributes) { } +} +exports.NoopHistogramMetric = NoopHistogramMetric; +class NoopObservableMetric { + addCallback(_callback) { } + removeCallback(_callback) { } +} +exports.NoopObservableMetric = NoopObservableMetric; +class NoopObservableCounterMetric extends NoopObservableMetric { +} +exports.NoopObservableCounterMetric = NoopObservableCounterMetric; +class NoopObservableGaugeMetric extends NoopObservableMetric { +} +exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric; +class NoopObservableUpDownCounterMetric extends NoopObservableMetric { +} +exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric; +exports.NOOP_METER = new NoopMeter(); +// Synchronous instruments +exports.NOOP_COUNTER_METRIC = new NoopCounterMetric(); +exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric(); +exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric(); +// Asynchronous instruments +exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric(); +exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric(); +exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric(); +/** + * Create a no-op Meter + */ +function createNoopMeter() { + return exports.NOOP_METER; +} +exports.createNoopMeter = createNoopMeter; +//# sourceMappingURL=NoopMeter.js.map + +/***/ }), + +/***/ 2647: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = void 0; +const NoopMeter_1 = __nccwpck_require__(4837); +/** + * An implementation of the {@link MeterProvider} which returns an impotent Meter + * for all calls to `getMeter` + */ +class NoopMeterProvider { + getMeter(_name, _version, _options) { + return NoopMeter_1.NOOP_METER; + } +} +exports.NoopMeterProvider = NoopMeterProvider; +exports.NOOP_METER_PROVIDER = new NoopMeterProvider(); +//# sourceMappingURL=NoopMeterProvider.js.map + +/***/ }), + /***/ 9957: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { @@ -48635,6 +48875,37 @@ __exportStar(__nccwpck_require__(9406), exports); /***/ }), +/***/ 7591: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.propagation = void 0; +// Split module-level variable definition into separate files to allow +// tree-shaking on each api instance. +const propagation_1 = __nccwpck_require__(9909); +/** Entrypoint for propagation API */ +exports.propagation = propagation_1.PropagationAPI.getInstance(); +//# sourceMappingURL=propagation-api.js.map + +/***/ }), + /***/ 2368: /***/ ((__unused_webpack_module, exports) => { @@ -48660,20 +48931,17 @@ exports.NoopTextMapPropagator = void 0; /** * No-op implementations of {@link TextMapPropagator}. */ -var NoopTextMapPropagator = /** @class */ (function () { - function NoopTextMapPropagator() { - } +class NoopTextMapPropagator { /** Noop inject function does nothing */ - NoopTextMapPropagator.prototype.inject = function (_context, _carrier) { }; + inject(_context, _carrier) { } /** Noop extract function does nothing and returns the input context */ - NoopTextMapPropagator.prototype.extract = function (context, _carrier) { + extract(context, _carrier) { return context; - }; - NoopTextMapPropagator.prototype.fields = function () { + } + fields() { return []; - }; - return NoopTextMapPropagator; -}()); + } +} exports.NoopTextMapPropagator = NoopTextMapPropagator; //# sourceMappingURL=NoopTextMapPropagator.js.map @@ -48702,13 +48970,13 @@ exports.NoopTextMapPropagator = NoopTextMapPropagator; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultTextMapSetter = exports.defaultTextMapGetter = void 0; exports.defaultTextMapGetter = { - get: function (carrier, key) { + get(carrier, key) { if (carrier == null) { return undefined; } return carrier[key]; }, - keys: function (carrier) { + keys(carrier) { if (carrier == null) { return []; } @@ -48716,7 +48984,7 @@ exports.defaultTextMapGetter = { }, }; exports.defaultTextMapSetter = { - set: function (carrier, key, value) { + set(carrier, key, value) { if (carrier == null) { return; } @@ -48727,6 +48995,37 @@ exports.defaultTextMapSetter = { /***/ }), +/***/ 8989: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +/* + * Copyright The OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.trace = void 0; +// Split module-level variable definition into separate files to allow +// tree-shaking on each api instance. +const trace_1 = __nccwpck_require__(1539); +/** Entrypoint for trace API */ +exports.trace = trace_1.TraceAPI.getInstance(); +//# sourceMappingURL=trace-api.js.map + +/***/ }), + /***/ 1462: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -48749,51 +49048,49 @@ exports.defaultTextMapSetter = { */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.NonRecordingSpan = void 0; -var invalid_span_constants_1 = __nccwpck_require__(1760); +const invalid_span_constants_1 = __nccwpck_require__(1760); /** * The NonRecordingSpan is the default {@link Span} that is used when no Span * implementation is available. All operations are no-op including context * propagation. */ -var NonRecordingSpan = /** @class */ (function () { - function NonRecordingSpan(_spanContext) { - if (_spanContext === void 0) { _spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT; } +class NonRecordingSpan { + constructor(_spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) { this._spanContext = _spanContext; } // Returns a SpanContext. - NonRecordingSpan.prototype.spanContext = function () { + spanContext() { return this._spanContext; - }; + } // By default does nothing - NonRecordingSpan.prototype.setAttribute = function (_key, _value) { + setAttribute(_key, _value) { return this; - }; + } // By default does nothing - NonRecordingSpan.prototype.setAttributes = function (_attributes) { + setAttributes(_attributes) { return this; - }; + } // By default does nothing - NonRecordingSpan.prototype.addEvent = function (_name, _attributes) { + addEvent(_name, _attributes) { return this; - }; + } // By default does nothing - NonRecordingSpan.prototype.setStatus = function (_status) { + setStatus(_status) { return this; - }; + } // By default does nothing - NonRecordingSpan.prototype.updateName = function (_name) { + updateName(_name) { return this; - }; + } // By default does nothing - NonRecordingSpan.prototype.end = function (_endTime) { }; + end(_endTime) { } // isRecording always returns false for NonRecordingSpan. - NonRecordingSpan.prototype.isRecording = function () { + isRecording() { return false; - }; + } // By default does nothing - NonRecordingSpan.prototype.recordException = function (_exception, _time) { }; - return NonRecordingSpan; -}()); + recordException(_exception, _time) { } +} exports.NonRecordingSpan = NonRecordingSpan; //# sourceMappingURL=NonRecordingSpan.js.map @@ -48821,36 +49118,34 @@ exports.NonRecordingSpan = NonRecordingSpan; */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.NoopTracer = void 0; -var context_1 = __nccwpck_require__(7171); -var context_utils_1 = __nccwpck_require__(3326); -var NonRecordingSpan_1 = __nccwpck_require__(1462); -var spancontext_utils_1 = __nccwpck_require__(9745); -var context = context_1.ContextAPI.getInstance(); +const context_1 = __nccwpck_require__(7171); +const context_utils_1 = __nccwpck_require__(3326); +const NonRecordingSpan_1 = __nccwpck_require__(1462); +const spancontext_utils_1 = __nccwpck_require__(9745); +const contextApi = context_1.ContextAPI.getInstance(); /** * No-op implementations of {@link Tracer}. */ -var NoopTracer = /** @class */ (function () { - function NoopTracer() { - } +class NoopTracer { // startSpan starts a noop span. - NoopTracer.prototype.startSpan = function (name, options, context) { - var root = Boolean(options === null || options === void 0 ? void 0 : options.root); + startSpan(name, options, context) { + const root = Boolean(options === null || options === void 0 ? void 0 : options.root); if (root) { return new NonRecordingSpan_1.NonRecordingSpan(); } - var parentFromContext = context && context_utils_1.getSpanContext(context); + const parentFromContext = context && (0, context_utils_1.getSpanContext)(context); if (isSpanContext(parentFromContext) && - spancontext_utils_1.isSpanContextValid(parentFromContext)) { + (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) { return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext); } else { return new NonRecordingSpan_1.NonRecordingSpan(); } - }; - NoopTracer.prototype.startActiveSpan = function (name, arg2, arg3, arg4) { - var opts; - var ctx; - var fn; + } + startActiveSpan(name, arg2, arg3, arg4) { + let opts; + let ctx; + let fn; if (arguments.length < 2) { return; } @@ -48866,13 +49161,12 @@ var NoopTracer = /** @class */ (function () { ctx = arg3; fn = arg4; } - var parentContext = ctx !== null && ctx !== void 0 ? ctx : context.active(); - var span = this.startSpan(name, opts, parentContext); - var contextWithSpanSet = context_utils_1.setSpan(parentContext, span); - return context.with(contextWithSpanSet, fn, undefined, span); - }; - return NoopTracer; -}()); + const parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active(); + const span = this.startSpan(name, opts, parentContext); + const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span); + return contextApi.with(contextWithSpanSet, fn, undefined, span); + } +} exports.NoopTracer = NoopTracer; function isSpanContext(spanContext) { return (typeof spanContext === 'object' && @@ -48906,21 +49200,18 @@ function isSpanContext(spanContext) { */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.NoopTracerProvider = void 0; -var NoopTracer_1 = __nccwpck_require__(7606); +const NoopTracer_1 = __nccwpck_require__(7606); /** * An implementation of the {@link TracerProvider} which returns an impotent * Tracer for all calls to `getTracer`. * * All operations are no-op. */ -var NoopTracerProvider = /** @class */ (function () { - function NoopTracerProvider() { - } - NoopTracerProvider.prototype.getTracer = function (_name, _version, _options) { +class NoopTracerProvider { + getTracer(_name, _version, _options) { return new NoopTracer_1.NoopTracer(); - }; - return NoopTracerProvider; -}()); + } +} exports.NoopTracerProvider = NoopTracerProvider; //# sourceMappingURL=NoopTracerProvider.js.map @@ -48948,42 +49239,41 @@ exports.NoopTracerProvider = NoopTracerProvider; */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ProxyTracer = void 0; -var NoopTracer_1 = __nccwpck_require__(7606); -var NOOP_TRACER = new NoopTracer_1.NoopTracer(); +const NoopTracer_1 = __nccwpck_require__(7606); +const NOOP_TRACER = new NoopTracer_1.NoopTracer(); /** * Proxy tracer provided by the proxy tracer provider */ -var ProxyTracer = /** @class */ (function () { - function ProxyTracer(_provider, name, version, options) { +class ProxyTracer { + constructor(_provider, name, version, options) { this._provider = _provider; this.name = name; this.version = version; this.options = options; } - ProxyTracer.prototype.startSpan = function (name, options, context) { + startSpan(name, options, context) { return this._getTracer().startSpan(name, options, context); - }; - ProxyTracer.prototype.startActiveSpan = function (_name, _options, _context, _fn) { - var tracer = this._getTracer(); + } + startActiveSpan(_name, _options, _context, _fn) { + const tracer = this._getTracer(); return Reflect.apply(tracer.startActiveSpan, tracer, arguments); - }; + } /** * Try to get a tracer from the proxy tracer provider. * If the proxy tracer provider has no delegate, return a noop tracer. */ - ProxyTracer.prototype._getTracer = function () { + _getTracer() { if (this._delegate) { return this._delegate; } - var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options); + const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options); if (!tracer) { return NOOP_TRACER; } this._delegate = tracer; return this._delegate; - }; - return ProxyTracer; -}()); + } +} exports.ProxyTracer = ProxyTracer; //# sourceMappingURL=ProxyTracer.js.map @@ -49011,9 +49301,9 @@ exports.ProxyTracer = ProxyTracer; */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ProxyTracerProvider = void 0; -var ProxyTracer_1 = __nccwpck_require__(3503); -var NoopTracerProvider_1 = __nccwpck_require__(3259); -var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider(); +const ProxyTracer_1 = __nccwpck_require__(3503); +const NoopTracerProvider_1 = __nccwpck_require__(3259); +const NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider(); /** * Tracer provider which provides {@link ProxyTracer}s. * @@ -49022,62 +49312,34 @@ var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider(); * When a delegate is set after tracers have already been provided, * all tracers already provided will use the provided delegate implementation. */ -var ProxyTracerProvider = /** @class */ (function () { - function ProxyTracerProvider() { - } +class ProxyTracerProvider { /** * Get a {@link ProxyTracer} */ - ProxyTracerProvider.prototype.getTracer = function (name, version, options) { + getTracer(name, version, options) { var _a; return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options)); - }; - ProxyTracerProvider.prototype.getDelegate = function () { + } + getDelegate() { var _a; return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER; - }; + } /** * Set the delegate tracer provider */ - ProxyTracerProvider.prototype.setDelegate = function (delegate) { + setDelegate(delegate) { this._delegate = delegate; - }; - ProxyTracerProvider.prototype.getDelegateTracer = function (name, version, options) { + } + getDelegateTracer(name, version, options) { var _a; return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options); - }; - return ProxyTracerProvider; -}()); + } +} exports.ProxyTracerProvider = ProxyTracerProvider; //# sourceMappingURL=ProxyTracerProvider.js.map /***/ }), -/***/ 9671: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=Sampler.js.map - -/***/ }), - /***/ 3209: /***/ ((__unused_webpack_module, exports) => { @@ -49127,56 +49389,6 @@ var SamplingDecision; /***/ }), -/***/ 955: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=SpanOptions.js.map - -/***/ }), - -/***/ 7492: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=attributes.js.map - -/***/ }), - /***/ 3326: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49199,13 +49411,13 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = void 0; -var context_1 = __nccwpck_require__(8242); -var NonRecordingSpan_1 = __nccwpck_require__(1462); -var context_2 = __nccwpck_require__(7171); +const context_1 = __nccwpck_require__(8242); +const NonRecordingSpan_1 = __nccwpck_require__(1462); +const context_2 = __nccwpck_require__(7171); /** * span key */ -var SPAN_KEY = context_1.createContextKey('OpenTelemetry Context Key SPAN'); +const SPAN_KEY = (0, context_1.createContextKey)('OpenTelemetry Context Key SPAN'); /** * Return the span if one exists * @@ -49288,11 +49500,11 @@ exports.getSpanContext = getSpanContext; */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.TraceStateImpl = void 0; -var tracestate_validators_1 = __nccwpck_require__(4864); -var MAX_TRACE_STATE_ITEMS = 32; -var MAX_TRACE_STATE_LEN = 512; -var LIST_MEMBERS_SEPARATOR = ','; -var LIST_MEMBER_KEY_VALUE_SPLITTER = '='; +const tracestate_validators_1 = __nccwpck_require__(4864); +const MAX_TRACE_STATE_ITEMS = 32; +const MAX_TRACE_STATE_LEN = 512; +const LIST_MEMBERS_SEPARATOR = ','; +const LIST_MEMBER_KEY_VALUE_SPLITTER = '='; /** * TraceState must be a class and not a simple object type because of the spec * requirement (https://www.w3.org/TR/trace-context/#tracestate-field). @@ -49302,52 +49514,51 @@ var LIST_MEMBER_KEY_VALUE_SPLITTER = '='; * - The value of any key can be updated. Modified keys MUST be moved to the * beginning of the list. */ -var TraceStateImpl = /** @class */ (function () { - function TraceStateImpl(rawTraceState) { +class TraceStateImpl { + constructor(rawTraceState) { this._internalState = new Map(); if (rawTraceState) this._parse(rawTraceState); } - TraceStateImpl.prototype.set = function (key, value) { + set(key, value) { // TODO: Benchmark the different approaches(map vs list) and // use the faster one. - var traceState = this._clone(); + const traceState = this._clone(); if (traceState._internalState.has(key)) { traceState._internalState.delete(key); } traceState._internalState.set(key, value); return traceState; - }; - TraceStateImpl.prototype.unset = function (key) { - var traceState = this._clone(); + } + unset(key) { + const traceState = this._clone(); traceState._internalState.delete(key); return traceState; - }; - TraceStateImpl.prototype.get = function (key) { + } + get(key) { return this._internalState.get(key); - }; - TraceStateImpl.prototype.serialize = function () { - var _this = this; + } + serialize() { return this._keys() - .reduce(function (agg, key) { - agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + _this.get(key)); + .reduce((agg, key) => { + agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key)); return agg; }, []) .join(LIST_MEMBERS_SEPARATOR); - }; - TraceStateImpl.prototype._parse = function (rawTraceState) { + } + _parse(rawTraceState) { if (rawTraceState.length > MAX_TRACE_STATE_LEN) return; this._internalState = rawTraceState .split(LIST_MEMBERS_SEPARATOR) .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning - .reduce(function (agg, part) { - var listMember = part.trim(); // Optional Whitespace (OWS) handling - var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER); + .reduce((agg, part) => { + const listMember = part.trim(); // Optional Whitespace (OWS) handling + const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER); if (i !== -1) { - var key = listMember.slice(0, i); - var value = listMember.slice(i + 1, part.length); - if (tracestate_validators_1.validateKey(key) && tracestate_validators_1.validateValue(value)) { + const key = listMember.slice(0, i); + const value = listMember.slice(i + 1, part.length); + if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) { agg.set(key, value); } else { @@ -49362,17 +49573,16 @@ var TraceStateImpl = /** @class */ (function () { .reverse() // Use reverse same as original tracestate parse chain .slice(0, MAX_TRACE_STATE_ITEMS)); } - }; - TraceStateImpl.prototype._keys = function () { + } + _keys() { return Array.from(this._internalState.keys()).reverse(); - }; - TraceStateImpl.prototype._clone = function () { - var traceState = new TraceStateImpl(); + } + _clone() { + const traceState = new TraceStateImpl(); traceState._internalState = new Map(this._internalState); return traceState; - }; - return TraceStateImpl; -}()); + } +} exports.TraceStateImpl = TraceStateImpl; //# sourceMappingURL=tracestate-impl.js.map @@ -49400,12 +49610,12 @@ exports.TraceStateImpl = TraceStateImpl; */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.validateValue = exports.validateKey = void 0; -var VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]'; -var VALID_KEY = "[a-z]" + VALID_KEY_CHAR_RANGE + "{0,255}"; -var VALID_VENDOR_KEY = "[a-z0-9]" + VALID_KEY_CHAR_RANGE + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE + "{0,13}"; -var VALID_KEY_REGEX = new RegExp("^(?:" + VALID_KEY + "|" + VALID_VENDOR_KEY + ")$"); -var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/; -var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/; +const VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]'; +const VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`; +const VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`; +const VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`); +const VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/; +const INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/; /** * Key is opaque string up to 256 characters printable. It MUST begin with a * lowercase letter, and can only contain lowercase letters a-z, digits 0-9, @@ -49453,7 +49663,7 @@ exports.validateValue = validateValue; */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createTraceState = void 0; -var tracestate_impl_1 = __nccwpck_require__(2110); +const tracestate_impl_1 = __nccwpck_require__(2110); function createTraceState(rawTraceState) { return new tracestate_impl_1.TraceStateImpl(rawTraceState); } @@ -49484,7 +49694,7 @@ exports.createTraceState = createTraceState; */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = void 0; -var trace_flags_1 = __nccwpck_require__(6905); +const trace_flags_1 = __nccwpck_require__(6905); exports.INVALID_SPANID = '0000000000000000'; exports.INVALID_TRACEID = '00000000000000000000000000000000'; exports.INVALID_SPAN_CONTEXT = { @@ -49496,81 +49706,6 @@ exports.INVALID_SPAN_CONTEXT = { /***/ }), -/***/ 4023: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=link.js.map - -/***/ }), - -/***/ 4416: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=span.js.map - -/***/ }), - -/***/ 5769: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=span_context.js.map - -/***/ }), - /***/ 1424: /***/ ((__unused_webpack_module, exports) => { @@ -49646,10 +49781,10 @@ exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = e * See the License for the specific language governing permissions and * limitations under the License. */ -var invalid_span_constants_1 = __nccwpck_require__(1760); -var NonRecordingSpan_1 = __nccwpck_require__(1462); -var VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i; -var VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i; +const invalid_span_constants_1 = __nccwpck_require__(1760); +const NonRecordingSpan_1 = __nccwpck_require__(1462); +const VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i; +const VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i; function isValidTraceId(traceId) { return VALID_TRACEID_REGEX.test(traceId) && traceId !== invalid_span_constants_1.INVALID_TRACEID; } @@ -49743,106 +49878,6 @@ var TraceFlags; /***/ }), -/***/ 8384: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=trace_state.js.map - -/***/ }), - -/***/ 3168: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=tracer.js.map - -/***/ }), - -/***/ 1823: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=tracer_options.js.map - -/***/ }), - -/***/ 891: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/* - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -//# sourceMappingURL=tracer_provider.js.map - -/***/ }), - /***/ 8996: /***/ ((__unused_webpack_module, exports) => { @@ -49866,7 +49901,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.VERSION = void 0; // this is autogenerated file, see scripts/version-update.js -exports.VERSION = '1.2.0'; +exports.VERSION = '1.3.0'; //# sourceMappingURL=version.js.map /***/ }), @@ -59310,7 +59345,7 @@ var __createBinding; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); - while (_) try { + while (g && (g = 0, op[0] && (_ = 0)), _) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { diff --git a/package.json b/package.json index a99f6b93a..baf7c687e 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "homepage": "https://github.com/ruby/setup-ruby", "dependencies": { - "@actions/cache": "^2.0.2", + "@actions/cache": "^3", "@actions/core": "^1.9.1", "@actions/exec": "^1.1.1", "@actions/io": "^1.1.2", diff --git a/yarn.lock b/yarn.lock index 0a2157765..2a9fd5c31 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,22 +2,23 @@ # yarn lockfile v1 -"@actions/cache@^2.0.2": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@actions/cache/-/cache-2.0.6.tgz#fa5d150219c11eb297b2b766b5ba53aeee3e6e3e" - integrity sha512-Z39ZrWaTRRPaV/AOQdY7hve+Iy/HloH5prpz+k+0lZgGQs/3SeO0UYSIakVuXOk2pdMZnl0Nv0PoK1rmh9YfGQ== +"@actions/cache@^3": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@actions/cache/-/cache-3.0.6.tgz#b76c51a78c927fcf0eb631b96a07e34f575c422b" + integrity sha512-Tttit+nqmxgb2M5Ufj5p8Lwd+fx329HOTLzxMrY4aaaZqBzqetgWlEfszMyiXfX4cJML+bzLJbyD9rNYt8TJ8g== dependencies: - "@actions/core" "^1.2.6" + "@actions/core" "^1.10.0" "@actions/exec" "^1.0.1" "@actions/glob" "^0.1.0" "@actions/http-client" "^2.0.1" "@actions/io" "^1.0.1" + "@azure/abort-controller" "^1.1.0" "@azure/ms-rest-js" "^2.6.0" "@azure/storage-blob" "^12.8.0" semver "^6.1.0" uuid "^3.3.3" -"@actions/core@^1.2.6", "@actions/core@^1.9.1": +"@actions/core@^1.10.0", "@actions/core@^1.2.6", "@actions/core@^1.9.1": version "1.10.0" resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.10.0.tgz#44551c3c71163949a2f06e94d9ca2157a0cfac4f" integrity sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug== @@ -71,7 +72,7 @@ semver "^6.1.0" uuid "^3.3.2" -"@azure/abort-controller@^1.0.0": +"@azure/abort-controller@^1.0.0", "@azure/abort-controller@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@azure/abort-controller/-/abort-controller-1.1.0.tgz#788ee78457a55af8a1ad342acb182383d2119249" integrity sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw== @@ -87,14 +88,14 @@ tslib "^2.2.0" "@azure/core-http@^2.0.0": - version "2.2.7" - resolved "https://registry.yarnpkg.com/@azure/core-http/-/core-http-2.2.7.tgz#f4f52b3b7b8adb5387acf11102e751358a31fa6f" - integrity sha512-TyGMeDm90mkRS8XzSQbSMD+TqnWL1XKGCh0x0QVGMD8COH2yU0q5SaHm/IBEBkzcq0u73NhS/p57T3KVSgUFqQ== + version "2.3.1" + resolved "https://registry.yarnpkg.com/@azure/core-http/-/core-http-2.3.1.tgz#eed8a7d012ba8c576c557828f66af0fc4e52b23a" + integrity sha512-cur03BUwV0Tbv81bQBOLafFB02B6G++K6F2O3IMl8pSE2QlXm3cu11bfyBNlDUKi5U+xnB3GC63ae3athhkx6Q== dependencies: "@azure/abort-controller" "^1.0.0" "@azure/core-auth" "^1.3.0" "@azure/core-tracing" "1.0.0-preview.13" - "@azure/core-util" "^1.1.0" + "@azure/core-util" "^1.1.1" "@azure/logger" "^1.0.0" "@types/node-fetch" "^2.5.0" "@types/tunnel" "^0.0.3" @@ -117,9 +118,9 @@ tslib "^2.2.0" "@azure/core-paging@^1.1.1": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@azure/core-paging/-/core-paging-1.3.0.tgz#ebf6520a931be7d5ff1cf58bc4fe6c14d6a3080d" - integrity sha512-H6Tg9eBm0brHqLy0OSAGzxIh1t4UL8eZVrSUMJ60Ra9cwq2pOskFqVpz2pYoHDsBY1jZ4V/P8LRGb5D5pmC6rg== + version "1.4.0" + resolved "https://registry.yarnpkg.com/@azure/core-paging/-/core-paging-1.4.0.tgz#b04a73ad18149733a848c3089a5e5ed144592338" + integrity sha512-tabFtZTg8D9XqZKEfNUOGh63SuYeOxmvH4GDcOJN+R1bZWZ1FZskctgY9Pmuwzhn+0Xvq9rmimK9hsvtLkeBsw== dependencies: tslib "^2.2.0" @@ -131,7 +132,7 @@ "@opentelemetry/api" "^1.0.1" tslib "^2.2.0" -"@azure/core-util@^1.1.0": +"@azure/core-util@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@azure/core-util/-/core-util-1.1.1.tgz#8f87b3dd468795df0f0849d9f096c3e7b29452c1" integrity sha512-A4TBYVQCtHOigFb2ETiiKFDocBoI1Zk2Ui1KpI42aJSIDexF7DHQFpnjonltXAIU/ceH+1fsZAWWgvX6/AKzog== @@ -162,9 +163,9 @@ xml2js "^0.4.19" "@azure/storage-blob@^12.8.0": - version "12.11.0" - resolved "https://registry.yarnpkg.com/@azure/storage-blob/-/storage-blob-12.11.0.tgz#2e27902ab293715411ab1f7c8fae422ad0b4b827" - integrity sha512-na+FisoARuaOWaHWpmdtk3FeuTWf2VWamdJ9/TJJzj5ZdXPLC3juoDgFs6XVuJIoK30yuBpyFBEDXVRK4pB7Tg== + version "12.12.0" + resolved "https://registry.yarnpkg.com/@azure/storage-blob/-/storage-blob-12.12.0.tgz#25e277c885692d5adcd8c2a949789b2837a74c59" + integrity sha512-o/Mf6lkyYG/eBW4/hXB9864RxVNmAkcKHjsGR6Inlp5hupa3exjSyH2KjO3tLO//YGA+tS+17hM2bxRl9Sn16g== dependencies: "@azure/abort-controller" "^1.0.0" "@azure/core-http" "^2.0.0" @@ -176,9 +177,9 @@ tslib "^2.2.0" "@opentelemetry/api@^1.0.1": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.2.0.tgz#89ef99401cde6208cff98760b67663726ef26686" - integrity sha512-0nBr+VZNKm9tvNDZFstI3Pq1fCTEDK5OZTnVKNvBNAKgd0yIvmwsP4m61rEv7ZP+tOUjWJhROpxK5MsnlF911g== + version "1.3.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.3.0.tgz#27c6f776ac3c1c616651e506a89f438a0ed6a055" + integrity sha512-YveTnGNsFFixTKJz09Oi4zYkiLT5af3WpZDu4aIUM7xX+2bHAkOJayFTVQd6zB8kkWPpbua4Ha6Ql00grdLlJQ== "@types/node-fetch@^2.5.0": version "2.6.2" @@ -189,9 +190,9 @@ form-data "^3.0.0" "@types/node@*": - version "18.8.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.8.5.tgz#6a31f820c1077c3f8ce44f9e203e68a176e8f59e" - integrity sha512-Bq7G3AErwe5A/Zki5fdD3O6+0zDChhg671NfPjtIcbtzDNZTv4NPKMRFr7gtYPG7y+B8uTiNK4Ngd9T0FTar6Q== + version "18.11.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4" + integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg== "@types/tunnel@^0.0.3": version "0.0.3" @@ -394,9 +395,9 @@ tslib@^1.10.0: integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslib@^2.2.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" - integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== + version "2.4.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" + integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== tunnel@0.0.6, tunnel@^0.0.6: version "0.0.6"